diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 3042fc5b7af..36e0adddbe4 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2977,7 +2977,6 @@ ha_innobase::open( dict_table_t* ib_table; char norm_name[1000]; THD* thd; - ulint retries = 0; char* is_part = NULL; ibool par_case_name_set = FALSE; char par_case_name[MAX_FULL_NAME_LEN + 1]; @@ -3023,22 +3022,18 @@ ha_innobase::open( } /* We look for pattern #P# to see if the table is partitioned - MySQL table. The retry logic for partitioned tables is a - workaround for http://bugs.mysql.com/bug.php?id=33349. Look - at support issue https://support.mysql.com/view.php?id=21080 - for more details. */ + MySQL table. */ #ifdef __WIN__ is_part = strstr(norm_name, "#p#"); #else is_part = strstr(norm_name, "#P#"); #endif /* __WIN__ */ -retry: /* Get pointer to a table object in InnoDB dictionary cache */ ib_table = dict_table_get(norm_name, TRUE); if (NULL == ib_table) { - if (is_part && retries < 10) { + if (is_part) { /* MySQL partition engine hard codes the file name separator as "#P#". The text case is fixed even if lower_case_table_names is set to 1 or 2. This is true @@ -3081,11 +3076,7 @@ retry: ib_table = dict_table_get( par_case_name, FALSE); } - if (!ib_table) { - ++retries; - os_thread_sleep(100000); - goto retry; - } else { + if (ib_table) { #ifndef __WIN__ sql_print_warning("Partition table %s opened " "after converting to lower " @@ -3108,12 +3099,9 @@ retry: #endif goto table_opened; } - } - if (is_part) { - sql_print_error("Failed to open table %s after " - "%lu attemtps.\n", norm_name, - retries); + sql_print_error("Failed to open table %s.\n", + norm_name); } sql_print_error("Cannot find or open table %s from\n" diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc index 5424c4af68c..87769f6e593 100644 --- a/storage/innodb_plugin/handler/ha_innodb.cc +++ b/storage/innodb_plugin/handler/ha_innodb.cc @@ -3615,7 +3615,6 @@ ha_innobase::open( dict_table_t* ib_table; char norm_name[1000]; THD* thd; - ulint retries = 0; char* is_part = NULL; ibool par_case_name_set = FALSE; char par_case_name[MAX_FULL_NAME_LEN + 1]; @@ -3661,22 +3660,18 @@ ha_innobase::open( } /* We look for pattern #P# to see if the table is partitioned - MySQL table. The retry logic for partitioned tables is a - workaround for http://bugs.mysql.com/bug.php?id=33349. Look - at support issue https://support.mysql.com/view.php?id=21080 - for more details. */ + MySQL table. */ #ifdef __WIN__ is_part = strstr(norm_name, "#p#"); #else is_part = strstr(norm_name, "#P#"); #endif /* __WIN__ */ -retry: /* Get pointer to a table object in InnoDB dictionary cache */ ib_table = dict_table_get(norm_name, TRUE); if (NULL == ib_table) { - if (is_part && retries < 10) { + if (is_part) { /* MySQL partition engine hard codes the file name separator as "#P#". The text case is fixed even if lower_case_table_names is set to 1 or 2. This is true @@ -3719,11 +3714,7 @@ retry: ib_table = dict_table_get( par_case_name, FALSE); } - if (!ib_table) { - ++retries; - os_thread_sleep(100000); - goto retry; - } else { + if (ib_table) { #ifndef __WIN__ sql_print_warning("Partition table %s opened " "after converting to lower " @@ -3749,9 +3740,8 @@ retry: } if (is_part) { - sql_print_error("Failed to open table %s after " - "%lu attempts.\n", norm_name, - retries); + sql_print_error("Failed to open table %s.\n", + norm_name); } sql_print_error("Cannot find or open table %s from\n"