mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
fix a mysql-5.5.50 merge: mysqlcheck
quote identifiers correctly
This commit is contained in:
@ -756,7 +756,7 @@ static int fix_table_storage_name(const char *name)
|
||||
|
||||
if (strncmp(name, "#mysql50#", 9))
|
||||
DBUG_RETURN(1);
|
||||
my_snprintf(qbuf, sizeof(qbuf), "RENAME TABLE `%s` TO `%s`",
|
||||
my_snprintf(qbuf, sizeof(qbuf), "RENAME TABLE %`s TO %`s",
|
||||
name, name + 9);
|
||||
|
||||
rc= run_query(qbuf);
|
||||
@ -773,7 +773,7 @@ static int fix_database_storage_name(const char *name)
|
||||
|
||||
if (strncmp(name, "#mysql50#", 9))
|
||||
DBUG_RETURN(1);
|
||||
my_snprintf(qbuf, sizeof(qbuf), "ALTER DATABASE `%s` UPGRADE DATA DIRECTORY "
|
||||
my_snprintf(qbuf, sizeof(qbuf), "ALTER DATABASE %`s UPGRADE DATA DIRECTORY "
|
||||
"NAME", name);
|
||||
rc= run_query(qbuf);
|
||||
if (verbose)
|
||||
|
@ -339,3 +339,8 @@ Repairing views
|
||||
test.v1 OK
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create table `#mysql50#t1``1` (a int) engine=myisam;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1`1
|
||||
drop table `t1``1`;
|
||||
|
@ -350,3 +350,8 @@ create table t1(a int);
|
||||
--exec $MYSQL_CHECK --process-views --check-upgrade --auto-repair test
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
create table `#mysql50#t1``1` (a int) engine=myisam;
|
||||
--exec $MYSQL_CHECK --fix-table-names --databases test
|
||||
show tables;
|
||||
drop table `t1``1`;
|
||||
|
Reference in New Issue
Block a user