Commit a482e76e authored by Sergei Golubchik's avatar Sergei Golubchik

fix a mysql-5.5.50 merge: mysqlcheck

quote identifiers correctly
parent 95bf696d
......@@ -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`;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment