From: prabakaran thirumalai Date: August 3 2012 5:00am Subject: bzr push into mysql-5.6 branch (prabakaran.thirumalai:4103 to 4104) Bug#13032999 List-Archive: http://lists.mysql.com/commits/144509 X-Bug: 13032999 Message-Id: <201208030501.q73512tI014845@acsmt356.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4104 prabakaran thirumalai 2012-08-03 Bug#13032999 RPL.RPL_PARALLEL_DDL FAILS OCCASIONALLY ON PB2 backporting fix to 5.6 modified: include/my_sys.h mysys/my_init.c sql/handler.cc sql/handler.h sql/sql_db.cc 4103 Jimmy Yang 2012-08-03 Fix Bug #14377142 FAILING ASSERTION: (UNSIGNED) STATUS == INDEX->ONLINE_STATUS rb://1186 approved by Sunny Bains modified: storage/innobase/include/dict0dict.ic === modified file 'include/my_sys.h' --- a/include/my_sys.h 2012-05-31 15:33:21 +0000 +++ b/include/my_sys.h 2012-08-03 04:58:55 +0000 @@ -251,7 +251,6 @@ extern CHARSET_INFO compiled_charsets[]; /* statistics */ extern ulong my_file_opened,my_stream_opened, my_tmp_file_created; extern ulong my_file_total_opened; -extern uint mysys_usage_id; extern my_bool my_init_done; /* Point to current my_message() */ === modified file 'mysys/my_init.c' --- a/mysys/my_init.c 2012-03-06 14:29:42 +0000 +++ b/mysys/my_init.c 2012-08-03 04:58:55 +0000 @@ -38,7 +38,6 @@ static my_bool win32_init_tcp_ip(); #define SCALE_USEC 10000 my_bool my_init_done= 0; -uint mysys_usage_id= 0; /* Incremented for each my_init() */ ulong my_thread_stack_size= 65536; static ulong atoi_octal(const char *str) @@ -72,7 +71,6 @@ my_bool my_init(void) my_init_done= 1; - mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ === modified file 'sql/handler.cc' --- a/sql/handler.cc 2012-07-26 06:07:00 +0000 +++ b/sql/handler.cc 2012-08-03 04:58:55 +0000 @@ -103,9 +103,6 @@ const char *tx_isolation_names[] = TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"", tx_isolation_names, NULL}; -static TYPELIB known_extensions= {0,"known_exts", NULL, NULL}; -uint known_extensions_id= 0; - #ifndef DBUG_OFF const char *ha_legacy_type_name(legacy_db_type legacy_type) @@ -6704,34 +6701,33 @@ static my_bool exts_handlerton(THD *unus return FALSE; } -TYPELIB *ha_known_exts(void) +TYPELIB* ha_known_exts() { - if (!known_extensions.type_names || mysys_usage_id != known_extensions_id) - { - List found_exts; - const char **ext, *old_ext; + TYPELIB *known_extensions = (TYPELIB*) sql_alloc(sizeof(TYPELIB)); + known_extensions->name= "known_exts"; + known_extensions->type_lengths= NULL; + + List found_exts; + const char **ext, *old_ext; - known_extensions_id= mysys_usage_id; - found_exts.push_back((char*) TRG_EXT); - found_exts.push_back((char*) TRN_EXT); - - plugin_foreach(NULL, exts_handlerton, - MYSQL_STORAGE_ENGINE_PLUGIN, &found_exts); - - ext= (const char **) my_once_alloc(sizeof(char *)* - (found_exts.elements+1), - MYF(MY_WME | MY_FAE)); - - DBUG_ASSERT(ext != 0); - known_extensions.count= found_exts.elements; - known_extensions.type_names= ext; - - List_iterator_fast it(found_exts); - while ((old_ext= it++)) - *ext++= old_ext; - *ext= 0; - } - return &known_extensions; + found_exts.push_back((char*) TRG_EXT); + found_exts.push_back((char*) TRN_EXT); + + plugin_foreach(NULL, exts_handlerton, + MYSQL_STORAGE_ENGINE_PLUGIN, &found_exts); + + size_t arr_length= sizeof(char *)* (found_exts.elements+1); + ext= (const char **) sql_alloc(arr_length); + + DBUG_ASSERT(NULL != ext); + known_extensions->count= found_exts.elements; + known_extensions->type_names= ext; + + List_iterator_fast it(found_exts); + while ((old_ext= it++)) + *ext++= old_ext; + *ext= NULL; + return known_extensions; } === modified file 'sql/handler.h' --- a/sql/handler.h 2012-07-26 06:07:00 +0000 +++ b/sql/handler.h 2012-08-03 04:58:55 +0000 @@ -3257,7 +3257,7 @@ int ha_end(void); int ha_initialize_handlerton(st_plugin_int *plugin); int ha_finalize_handlerton(st_plugin_int *plugin); -TYPELIB *ha_known_exts(void); +TYPELIB* ha_known_exts(); int ha_panic(enum ha_panic_function flag); void ha_close_connection(THD* thd); bool ha_flush_logs(handlerton *db_type); === modified file 'sql/sql_db.cc' --- a/sql/sql_db.cc 2012-04-30 07:13:31 +0000 +++ b/sql/sql_db.cc 2012-08-03 04:58:55 +0000 @@ -1008,6 +1008,7 @@ static bool find_db_tables_and_rm_known_ TABLE_LIST *tot_list=0, **tot_list_next_local, **tot_list_next_global; DBUG_ENTER("find_db_tables_and_rm_known_files"); DBUG_PRINT("enter",("path: %s", path)); + TYPELIB *known_extensions= ha_known_exts(); tot_list_next_local= tot_list_next_global= &tot_list; @@ -1049,8 +1050,8 @@ static bool find_db_tables_and_rm_known_ extension= strend(file->name); if (find_type(extension, &deletable_extentions, FIND_TYPE_NO_PREFIX) <= 0) { - if (find_type(extension, ha_known_exts(), FIND_TYPE_NO_PREFIX) <= 0) - *found_other_files= true; + if (find_type(extension, known_extensions, FIND_TYPE_NO_PREFIX) <= 0) + *found_other_files= true; continue; } /* just for safety we use files_charset_info */ No bundle (reason: useless for push emails).