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
9c1c075d
Commit
9c1c075d
authored
Sep 06, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect comment with command using extra delimiter
parent
4c2ddda8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
client/mysqltest.c
client/mysqltest.c
+16
-0
mysql-test/include/have_lowercase0.inc
mysql-test/include/have_lowercase0.inc
+2
-2
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+1
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+3
-1
No files found.
client/mysqltest.c
View file @
9c1c075d
...
@@ -3901,6 +3901,22 @@ void get_query_type(struct st_query* q)
...
@@ -3901,6 +3901,22 @@ void get_query_type(struct st_query* q)
q
->
type
!=
Q_DISABLE_PARSING
)
q
->
type
!=
Q_DISABLE_PARSING
)
q
->
type
=
Q_COMMENT
;
q
->
type
=
Q_COMMENT
;
}
}
else
if
(
q
->
type
==
Q_COMMENT_WITH_COMMAND
&&
q
->
query
[
q
->
first_word_len
-
1
]
==
';'
)
{
/*
Detect comment with command using extra delimiter
Ex --disable_query_log;
^ Extra delimiter causing the command
to be skipped
*/
save
=
q
->
query
[
q
->
first_word_len
-
1
];
q
->
query
[
q
->
first_word_len
-
1
]
=
0
;
type
=
find_type
(
q
->
query
,
&
command_typelib
,
1
+
2
);
q
->
query
[
q
->
first_word_len
-
1
]
=
save
;
if
(
type
>
0
)
die
(
"Extra delimiter
\"
;
\"
found"
);
}
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
mysql-test/include/have_lowercase0.inc
View file @
9c1c075d
--
require
r
/
lowercase0
.
require
--
require
r
/
lowercase0
.
require
--
disable_query_log
;
--
disable_query_log
show
variables
like
"lower_case_%"
;
show
variables
like
"lower_case_%"
;
--
enable_query_log
;
--
enable_query_log
mysql-test/r/mysqltest.result
View file @
9c1c075d
...
@@ -152,6 +152,7 @@ mysqltest: At line 1: End of line junk detected: "6"
...
@@ -152,6 +152,7 @@ mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Extra delimiter ";" found
MySQL
MySQL
"MySQL"
"MySQL"
MySQL: The world''s most popular open source database
MySQL: The world''s most popular open source database
...
...
mysql-test/t/mysqltest.test
View file @
9c1c075d
...
@@ -369,6 +369,8 @@ select 3 from t1 ;
...
@@ -369,6 +369,8 @@ select 3 from t1 ;
#
#
--
error
1
--
error
1
--
exec
echo
"--sleep 4;"
|
$MYSQL_TEST
2
>&
1
--
exec
echo
"--sleep 4;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"--disable_query_log;"
|
$MYSQL_TEST
2
>&
1
# Allow trailing # comment
# Allow trailing # comment
...
@@ -592,7 +594,7 @@ while ($num)
...
@@ -592,7 +594,7 @@ while ($num)
--
source
var
/
tmp
/
sourced1
.
sql
--
source
var
/
tmp
/
sourced1
.
sql
dec
$num
;
dec
$num
;
}
}
--
enable_abort_on_error
;
--
enable_abort_on_error
--
enable_query_log
--
enable_query_log
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
...
...
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