mysqlcheck failed to fix table names when using the --fix-table-names
and --all-in-1 options together. (Bug #31821)
This commit is contained in:
parent
89a6be6438
commit
f8e2402084
@ -442,7 +442,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
if (use_db(db))
|
||||
return 1;
|
||||
if (opt_all_in_1)
|
||||
if (opt_all_in_1 && what_to_do != DO_UPGRADE)
|
||||
{
|
||||
/*
|
||||
We need table list in form `a`, `b`, `c`
|
||||
@ -536,7 +536,7 @@ static int process_all_tables_in_db(char *database)
|
||||
|
||||
num_columns= mysql_num_fields(res);
|
||||
|
||||
if (opt_all_in_1)
|
||||
if (opt_all_in_1 && what_to_do != DO_UPGRADE)
|
||||
{
|
||||
/*
|
||||
We need table list in form `a`, `b`, `c`
|
||||
|
@ -186,4 +186,18 @@ a
|
||||
500
|
||||
DROP DATABASE `a@b`;
|
||||
USE test;
|
||||
#
|
||||
# Bug #31821: --all-in-1 and --fix-table-names don't work together
|
||||
#
|
||||
drop table if exists `#mysql50#t1-1`;
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
show tables like 't1-1';
|
||||
Tables_in_test (t1-1)
|
||||
t1-1
|
||||
drop table `t1-1`;
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
show tables like 't1-1';
|
||||
Tables_in_test (t1-1)
|
||||
t1-1
|
||||
drop table `t1-1`;
|
||||
End of 5.1 tests
|
||||
|
@ -193,5 +193,22 @@ DROP DATABASE `a@b`;
|
||||
|
||||
USE test;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #31821: --all-in-1 and --fix-table-names don't work together
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists `#mysql50#t1-1`;
|
||||
--enable_warnings
|
||||
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
--exec $MYSQL_CHECK --all-in-1 --fix-table-names --databases test
|
||||
show tables like 't1-1';
|
||||
drop table `t1-1`;
|
||||
|
||||
create table `#mysql50#t1-1` (a int);
|
||||
--exec $MYSQL_CHECK --all-in-1 --fix-table-names test "#mysql50#t1-1"
|
||||
show tables like 't1-1';
|
||||
drop table `t1-1`;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
Loading…
x
Reference in New Issue
Block a user