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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1a292ee5
Commit
1a292ee5
authored
Feb 25, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merged bug 31060 to 5.1-bugteam
parents
592a05fd
5cc8c6f3
Changes
3
Show 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 @
1a292ee5
...
@@ -2245,8 +2245,22 @@ static bool add_line(String &buffer,char *line,char *in_string,
...
@@ -2245,8 +2245,22 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
}
if
(
out
!=
line
||
!
buffer
.
is_empty
())
if
(
out
!=
line
||
!
buffer
.
is_empty
())
{
{
*
out
++=
'\n'
;
uint
length
=
(
uint
)
(
out
-
line
);
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
())
if
(
buffer
.
length
()
+
length
>=
buffer
.
alloced_length
())
buffer
.
realloc
(
buffer
.
length
()
+
length
+
IO_SIZE
);
buffer
.
realloc
(
buffer
.
length
()
+
length
+
IO_SIZE
);
if
((
!*
ml_comment
||
preserve_comments
)
&&
buffer
.
append
(
line
,
length
))
if
((
!*
ml_comment
||
preserve_comments
)
&&
buffer
.
append
(
line
,
length
))
...
...
mysql-test/r/mysql.result
View file @
1a292ee5
...
@@ -188,6 +188,10 @@ delimiter
...
@@ -188,6 +188,10 @@ delimiter
2
2
@z:='1' @z=database()
@z:='1' @z=database()
1 NULL
1 NULL
1
1
1
1
End of 5.0 tests
End of 5.0 tests
WARNING: --server-arg option not supported in this configuration.
WARNING: --server-arg option not supported in this configuration.
Warning (Code 1286): Unknown table engine 'nonexistent'
Warning (Code 1286): Unknown table engine 'nonexistent'
...
...
mysql-test/t/mysql.test
View file @
1a292ee5
...
@@ -315,6 +315,23 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql;
...
@@ -315,6 +315,23 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql;
#
#
--
exec
$MYSQL
-
e
"select @z:='1',@z=database()"
--
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
--
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