From 0802961bd13adef4f108ebb84a7de84951811795 Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Fri, 19 Apr 2013 15:54:35 +0200 Subject: [PATCH 1/2] lower the limit, should fit in a byte --- ext/mysqlnd/mysqlnd_enum_n_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mysqlnd/mysqlnd_enum_n_def.h b/ext/mysqlnd/mysqlnd_enum_n_def.h index 10deb03812d..f02a5b119a7 100644 --- a/ext/mysqlnd/mysqlnd_enum_n_def.h +++ b/ext/mysqlnd/mysqlnd_enum_n_def.h @@ -39,7 +39,7 @@ #define MYSQLND_SQLSTATE_LENGTH 5 #define MYSQLND_SQLSTATE_NULL "00000" -#define MYSQLND_MAX_ALLOWED_USER_LEN 256 /* 64 char * 4byte . MySQL supports now only 16 char, but let it be forward compatible */ +#define MYSQLND_MAX_ALLOWED_USER_LEN 252 /* 63 char * 4byte . MySQL supports now only 16 char, but let it be forward compatible */ #define MYSQLND_MAX_ALLOWED_DB_LEN 1024 /* 256 char * 4byte. MySQL supports now only 64 char in the tables, but on the FS could be different. Forward compatible. */ #define MYSQLND_NET_CMD_BUFFER_MIN_SIZE 4096 From c7cf9b68b6f63b2b507335719fbbda21df6a7c56 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 19 Apr 2013 21:37:24 +0400 Subject: [PATCH 2/2] Fixed 5.2 ZTS build --- ext/opcache/zend_accelerator_util_funcs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 75b1561713a..33ecf7f1830 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -120,10 +120,17 @@ void zend_accel_free_user_functions(HashTable *ht TSRMLS_DC) ht->pDestructor = orig_dtor; } -static int move_user_function(zend_function *function TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) +static int move_user_function(zend_function *function +#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO + TSRMLS_DC +#endif + , int num_args, va_list args, zend_hash_key *hash_key) { HashTable *function_table = va_arg(args, HashTable *); (void)num_args; /* keep the compiler happy */ +#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO + TSRMLS_FETCH(); +#endif if (function->type == ZEND_USER_FUNCTION) { zend_hash_quick_update(function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, function, sizeof(zend_function), NULL); @@ -138,7 +145,11 @@ void zend_accel_move_user_functions(HashTable *src, HashTable *dst TSRMLS_DC) dtor_func_t orig_dtor = src->pDestructor; src->pDestructor = NULL; +#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO + zend_hash_apply_with_arguments(src, (apply_func_args_t)move_user_function, 1, dst); +#else zend_hash_apply_with_arguments(src TSRMLS_CC, (apply_func_args_t)move_user_function, 1, dst); +#endif src->pDestructor = orig_dtor; }