Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bd72e165
Commit
bd72e165
authored
Feb 07, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-5.0-6368
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
5f28ad75
f32c61fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
mysql-test/r/sql_mode.result
mysql-test/r/sql_mode.result
+14
-0
mysql-test/t/sql_mode.test
mysql-test/t/sql_mode.test
+10
-0
sql/sql_lex.cc
sql/sql_lex.cc
+2
-1
No files found.
mysql-test/r/sql_mode.result
View file @
bd72e165
...
...
@@ -386,4 +386,18 @@ p mask example
20 \\\\% \\\\%
20 \\\\% \\\\_
DROP TABLE t1;
SET @@SQL_MODE='NO_BACKSLASH_ESCAPES';
SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
a\\b a\\\"b a'\\b a'\\\"b
a\\b a\\\"b a'\\b a'\\\"b
SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
a\\b a\\\'b a"\\b a"\\\'b
a\\b a\\\'b a"\\b a"\\\'b
SET @@SQL_MODE='';
SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b';
a\b a\"b a'\b a'\"b
a\b a\"b a'\b a'\"b
SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
a\b a\'b a"\b a"\'b
a\b a\'b a"\b a"\'b
SET @@SQL_MODE=@OLD_SQL_MODE;
mysql-test/t/sql_mode.test
View file @
bd72e165
...
...
@@ -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
;
sql/sql_lex.cc
View file @
bd72e165
...
...
@@ -337,7 +337,8 @@ static char *get_text(LEX *lex)
continue
;
}
#endif
if
(
*
str
==
'\\'
&&
str
+
1
!=
end
)
if
(
!
(
lex
->
thd
->
variables
.
sql_mode
&
MODE_NO_BACKSLASH_ESCAPES
)
&&
*
str
==
'\\'
&&
str
+
1
!=
end
)
{
switch
(
*++
str
)
{
case
'n'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment