diff options
author | unknown <jimw@mysql.com> | 2005-02-03 16:14:02 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-02-03 16:14:02 -0800 |
commit | d3550828d44fdbc2731f18656870034d945334f1 (patch) | |
tree | b5e6ef3bd11e1a681107627a7d2085df2a4b4880 /mysql-test/t/sql_mode.test | |
parent | e541180b3bf9d5cc2bb6f8ffd095ae0ddc6fad04 (diff) | |
download | mariadb-git-d3550828d44fdbc2731f18656870034d945334f1.tar.gz |
Handle backslashes correctly in strings that also have doubled quotes when
we are using the NO_BACKSLASH_ESCAPES SQL mode. (Bug #6368)
mysql-test/t/sql_mode.test:
Add regression test for Bug #6368
mysql-test/r/sql_mode.result:
Add new results
sql/sql_lex.cc:
Handle NO_BACKSLASH_ESCAPES mode when copying string that
also has escapes due to doubled quotes
Diffstat (limited to 'mysql-test/t/sql_mode.test')
-rw-r--r-- | mysql-test/t/sql_mode.test | 10 |
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; |