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
c3f69b41
Commit
c3f69b41
authored
Aug 30, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
merge 55413
parents
fd9b6b8e
3ca814b7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
client/mysqltest.cc
client/mysqltest.cc
+8
-2
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+3
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+10
-0
No files found.
client/mysqltest.cc
View file @
c3f69b41
...
@@ -5509,6 +5509,8 @@ int read_line(char *buf, int size)
...
@@ -5509,6 +5509,8 @@ int read_line(char *buf, int size)
char
c
,
UNINIT_VAR
(
last_quote
);
char
c
,
UNINIT_VAR
(
last_quote
);
char
*
p
=
buf
,
*
buf_end
=
buf
+
size
-
1
;
char
*
p
=
buf
,
*
buf_end
=
buf
+
size
-
1
;
int
skip_char
=
0
;
int
skip_char
=
0
;
my_bool
have_slash
=
FALSE
;
enum
{
R_NORMAL
,
R_Q
,
R_SLASH_IN_Q
,
enum
{
R_NORMAL
,
R_Q
,
R_SLASH_IN_Q
,
R_COMMENT
,
R_LINE_START
}
state
=
R_LINE_START
;
R_COMMENT
,
R_LINE_START
}
state
=
R_LINE_START
;
DBUG_ENTER
(
"read_line"
);
DBUG_ENTER
(
"read_line"
);
...
@@ -5579,10 +5581,14 @@ int read_line(char *buf, int size)
...
@@ -5579,10 +5581,14 @@ int read_line(char *buf, int size)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
else
if
(
c
==
'\''
||
c
==
'"'
||
c
==
'`'
)
else
if
(
c
==
'\''
||
c
==
'"'
||
c
==
'`'
)
{
if
(
!
have_slash
)
{
{
last_quote
=
c
;
last_quote
=
c
;
state
=
R_Q
;
state
=
R_Q
;
}
}
}
have_slash
=
(
c
==
'\\'
);
break
;
break
;
case
R_COMMENT
:
case
R_COMMENT
:
...
...
mysql-test/r/mysqltest.result
View file @
c3f69b41
...
@@ -262,6 +262,9 @@ a long \$where variable content
...
@@ -262,6 +262,9 @@ a long \$where variable content
banana = banana
banana = banana
Not a banana: ba\$cat\$cat
Not a banana: ba\$cat\$cat
with\`some"escaped\'quotes
with\`some"escaped\'quotes
single'tick`backtick
mysqltest: At line 1: Missing arguments to let
mysqltest: At line 1: Missing arguments to let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing assignment operator in let
...
...
mysql-test/t/mysqltest.test
View file @
c3f69b41
...
@@ -701,6 +701,16 @@ echo banana = $cat;
...
@@ -701,6 +701,16 @@ echo banana = $cat;
let
$cat
=
ba
\\\
$cat
\\\
$cat
;
let
$cat
=
ba
\\\
$cat
\\\
$cat
;
echo
Not
a
banana
:
$cat
;
echo
Not
a
banana
:
$cat
;
# Bug #55413 would cause this to fail
let
$escape
=
with
\
`some\"escaped\'quotes;
echo $escape;
--let $escape= with\`some\"escaped\'quotes
echo $escape;
# This only works with "--let" syntax
--let $tick= single'tick`
backtick
echo
$tick
;
# Test illegal uses of let
# Test illegal uses of let
...
...
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