summaryrefslogtreecommitdiff
path: root/mysql-test/t/upgrade.test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-03-07 13:05:24 +0400
committerunknown <bar@mysql.com>2006-03-07 13:05:24 +0400
commit06691fc3c6a7310669c236f4c533ffeafee3a754 (patch)
tree20c7873bffe143edef4ab5cb510e91b327d00854 /mysql-test/t/upgrade.test
parent38ccc8c2c1fffe1445aed095dc16ae78fa058095 (diff)
downloadmariadb-git-06691fc3c6a7310669c236f4c533ffeafee3a754.tar.gz
Bug#17142 Crash if create with encoded name
upgrade.result, upgrade.test: Adding test case. table.cc: Don't try to open a table with old-formatted name, if the table name contains "@" character. This is to avoid mixing two different names to each other. Thanks Monty for suggesting this fix. sql/table.cc: Bug#17142 Crash if create with encoded name Don't try to open a table with old-formatted name, if the table name contains "@" character. This is to avoid mixing two different names to each other. mysql-test/t/upgrade.test: Adding test case. mysql-test/r/upgrade.result: Adding test case.
Diffstat (limited to 'mysql-test/t/upgrade.test')
-rw-r--r--mysql-test/t/upgrade.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test
index 42e32b686c2..f2017d81d5c 100644
--- a/mysql-test/t/upgrade.test
+++ b/mysql-test/t/upgrade.test
@@ -29,3 +29,21 @@ show tables in `mysqltest1`;
show tables in `mysqltest-1`;
drop database `mysqltest1`;
drop database `mysqltest-1`;
+
+#
+# Bug#17142: Crash if create with encoded name
+#
+--disable_warnings
+drop table if exists `txu@0023P@0023p1`;
+drop table if exists `txu#P#p1`;
+--enable_warnings
+create table `txu#P#p1` (s1 int);
+insert into `txu#P#p1` values (1);
+--error 1146
+select * from `txu@0023P@0023p1`;
+create table `txu@0023P@0023p1` (s1 int);
+insert into `txu@0023P@0023p1` values (2);
+select * from `txu@0023P@0023p1`;
+select * from `txu#P#p1`;
+drop table `txu@0023P@0023p1`;
+drop table `txu#P#p1`;