summaryrefslogtreecommitdiff
path: root/mysql-test/t/upgrade.test
diff options
context:
space:
mode:
authorbar@mysql.com <>2006-03-07 13:05:24 +0400
committerbar@mysql.com <>2006-03-07 13:05:24 +0400
commit02023859bfbe8ddca2637c988246c4a0a998849d (patch)
tree20c7873bffe143edef4ab5cb510e91b327d00854 /mysql-test/t/upgrade.test
parent7d7da8876d4bdc2d6105b179bb1b6544ff8dab86 (diff)
downloadmariadb-git-02023859bfbe8ddca2637c988246c4a0a998849d.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.
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`;