summaryrefslogtreecommitdiff
path: root/mysql-test/t/sql_mode.test
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-02-03 16:14:02 -0800
committerjimw@mysql.com <>2005-02-03 16:14:02 -0800
commitf32c61fbaf4057b9e18b07268fae5d50d56b6731 (patch)
treeb5e6ef3bd11e1a681107627a7d2085df2a4b4880 /mysql-test/t/sql_mode.test
parent9eca8dced67aca3cb82f546e7a4bf05e7548293d (diff)
downloadmariadb-git-f32c61fbaf4057b9e18b07268fae5d50d56b6731.tar.gz
Handle backslashes correctly in strings that also have doubled quotes when
we are using the NO_BACKSLASH_ESCAPES SQL mode. (Bug #6368)
Diffstat (limited to 'mysql-test/t/sql_mode.test')
-rw-r--r--mysql-test/t/sql_mode.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test
index fa5c6cb8a5b..e80752eb71b 100644
--- a/mysql-test/t/sql_mode.test
+++ b/mysql-test/t/sql_mode.test
@@ -174,4 +174,14 @@ order by masks.p, example;
DROP TABLE t1;
+# Bug #6368: Make sure backslashes mixed with doubled quotes are handled
+# correctly in NO_BACKSLASH_ESCAPES mode
+SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
+SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
+SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
+
+SET @@SQL_MODE='';
+SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
+SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
+
SET @@SQL_MODE=@OLD_SQL_MODE;