1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Handle backslashes correctly in strings that also have doubled quotes when

we are using the NO_BACKSLASH_ESCAPES SQL mode. (Bug #6368)
This commit is contained in:
jimw@mysql.com
2005-02-03 16:14:02 -08:00
parent 9eca8dced6
commit f32c61fbaf
3 changed files with 26 additions and 1 deletions

View File

@@ -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;