diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-06-28 10:10:31 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-06-28 10:10:31 +0200 |
commit | a02ba9c1c96f8245b2fd5c8b555c74204af421e3 (patch) | |
tree | 8d84e04d7ee6ec5713a120f2fb1ac436d0348508 /mysql-test | |
parent | 8baf9b0c469e2845d15cc1181bc6b101cdfba087 (diff) | |
parent | d5cd33450413816f8696125cd66c8393921e6267 (diff) | |
download | mariadb-git-a02ba9c1c96f8245b2fd5c8b555c74204af421e3.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/mysql.result | 58 | ||||
-rw-r--r-- | mysql-test/r/mysqltest.result | 5 | ||||
-rw-r--r-- | mysql-test/t/mysql.test | 30 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 8 |
4 files changed, 100 insertions, 1 deletions
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index dd0129df0d9..8a24128daa2 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -529,3 +529,61 @@ a +-------------------+ End of tests +create table `a1\``b1` (a int); +show tables; +Tables_in_test +a1\`b1 +insert `a1\``b1` values (1),(2); +show create table `a1\``b1`; +Table Create Table +a1\`b1 CREATE TABLE `a1\``b1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `a1\``b1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO `a1\``b1` VALUES (1),(2); +insert `a1\``b1` values (4),(5); +show create table `a1\``b1`; +Table Create Table +a1\`b1 CREATE TABLE `a1\``b1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from `a1\``b1`; +a +1 +2 +drop table `a1\``b1`; +set sql_mode=ansi_quotes; +create table "a1\""b1" (a int); +show tables; +Tables_in_test +a1\"b1 +insert "a1\""b1" values (1),(2); +show create table "a1\""b1"; +Table Create Table +a1\"b1 CREATE TABLE "a1\""b1" ( + "a" int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE "a1\""b1" ( + "a" int(11) DEFAULT NULL +); +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO "a1\""b1" VALUES (1),(2); +insert "a1\""b1" values (4),(5); +show create table "a1\""b1"; +Table Create Table +a1\"b1 CREATE TABLE "a1\""b1" ( + "a" int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from "a1\""b1"; +a +1 +2 +drop table "a1\""b1"; +set sql_mode=default; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index fa054d457f9..b3d8fb93e1f 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -960,4 +960,9 @@ con1 con2 con2 -closed_connection- +set sql_mode=no_backslash_escapes; +select "foo\""bar"; +foo\"bar +foo\"bar +set sql_mode=default; End of tests diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 263e1103e8b..4403a9d668f 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -618,3 +618,33 @@ EOF --echo --echo End of tests + +# +# MDEV-13187 incorrect backslash parsing in clients +# +create table `a1\``b1` (a int); +show tables; +insert `a1\``b1` values (1),(2); +show create table `a1\``b1`; +--exec $MYSQL_DUMP --compact test +--exec $MYSQL_DUMP test > $MYSQLTEST_VARDIR/tmp/bug.sql +insert `a1\``b1` values (4),(5); +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug.sql +show create table `a1\``b1`; +select * from `a1\``b1`; +drop table `a1\``b1`; + +# same with ansi_quotes +set sql_mode=ansi_quotes; +create table "a1\""b1" (a int); +show tables; +insert "a1\""b1" values (1),(2); +show create table "a1\""b1"; +--exec $MYSQL_DUMP --compact --compatible=postgres test +--exec $MYSQL_DUMP --compatible=postgres test > $MYSQLTEST_VARDIR/tmp/bug.sql +insert "a1\""b1" values (4),(5); +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug.sql +show create table "a1\""b1"; +select * from "a1\""b1"; +drop table "a1\""b1"; +set sql_mode=default; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index e85d793b628..aea4ba6432d 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -2948,11 +2948,17 @@ disconnect $x; # Disconnect the selected connection disconnect $y; --echo $CURRENT_CONNECTION +connection default; +# +# MDEV-13187 incorrect backslash parsing in clients +# +set sql_mode=no_backslash_escapes; +select "foo\""bar"; +set sql_mode=default; --echo End of tests -connection default; # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc |