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
9671d8ce
Commit
9671d8ce
authored
Feb 25, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merged bug 31060 to 5.1-bugteam
parents
3d31b8ee
71c6be54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
client/mysql.cc
client/mysql.cc
+15
-1
mysql-test/r/mysql.result
mysql-test/r/mysql.result
+4
-0
mysql-test/t/mysql.test
mysql-test/t/mysql.test
+17
-0
No files found.
client/mysql.cc
View file @
9671d8ce
...
...
@@ -2245,8 +2245,22 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
if
(
out
!=
line
||
!
buffer
.
is_empty
())
{
*
out
++=
'\n'
;
uint
length
=
(
uint
)
(
out
-
line
);
if
(
length
<
9
||
my_strnncoll
(
charset_info
,
(
uchar
*
)
line
,
9
,
(
const
uchar
*
)
"delimiter"
,
9
))
{
/*
Don't add a new line in case there's a DELIMITER command to be
added to the glob buffer (e.g. on processing a line like
"<command>;DELIMITER <non-eof>") : similar to how a new line is
not added in the case when the DELIMITER is the first command
entered with an empty glob buffer.
*/
*
out
++=
'\n'
;
length
++
;
}
if
(
buffer
.
length
()
+
length
>=
buffer
.
alloced_length
())
buffer
.
realloc
(
buffer
.
length
()
+
length
+
IO_SIZE
);
if
((
!*
ml_comment
||
preserve_comments
)
&&
buffer
.
append
(
line
,
length
))
...
...
mysql-test/r/mysql.result
View file @
9671d8ce
...
...
@@ -188,6 +188,10 @@ delimiter
2
@z:='1' @z=database()
1 NULL
1
1
1
1
End of 5.0 tests
WARNING: --server-arg option not supported in this configuration.
Warning (Code 1286): Unknown table engine 'nonexistent'
...
...
mysql-test/t/mysql.test
View file @
9671d8ce
...
...
@@ -315,6 +315,23 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql;
#
--
exec
$MYSQL
-
e
"select @z:='1',@z=database()"
#
# Bug #31060: MySQL CLI parser bug 2
#
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
bug31060
.
sql
;
DELIMITER
DELIMITER
;
SELECT
1
DELIMITER
DELIMITER
;
SELECT
1
;
EOF
--
exec
$MYSQL
<
$MYSQLTEST_VARDIR
/
tmp
/
bug31060
.
sql
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
bug31060
.
sql
;
--
echo
End
of
5.0
tests
#
...
...
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