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
f3978f77
Commit
f3978f77
authored
Jun 24, 2008
by
Gleb Shchepa
Browse files
Options
Browse Files
Download
Plain Diff
auto merge 5.0-bugteam --> 5.1-bugteam
parents
12846f41
748a9b1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
33 deletions
+24
-33
client/mysql.cc
client/mysql.cc
+9
-33
mysql-test/r/mysql.result
mysql-test/r/mysql.result
+2
-0
mysql-test/t/mysql_delimiter.sql
mysql-test/t/mysql_delimiter.sql
+13
-0
No files found.
client/mysql.cc
View file @
f3978f77
...
@@ -1821,7 +1821,7 @@ static int read_and_execute(bool interactive)
...
@@ -1821,7 +1821,7 @@ static int read_and_execute(bool interactive)
the very beginning of a text file when
the very beginning of a text file when
you save the file using "Unicode UTF-8" format.
you save the file using "Unicode UTF-8" format.
*/
*/
if
(
!
line_number
&&
if
(
line
&&
!
line_number
&&
(
uchar
)
line
[
0
]
==
0xEF
&&
(
uchar
)
line
[
0
]
==
0xEF
&&
(
uchar
)
line
[
1
]
==
0xBB
&&
(
uchar
)
line
[
1
]
==
0xBB
&&
(
uchar
)
line
[
2
]
==
0xBF
)
(
uchar
)
line
[
2
]
==
0xBF
)
...
@@ -2101,37 +2101,6 @@ static bool add_line(String &buffer,char *line,char *in_string,
...
@@ -2101,37 +2101,6 @@ static bool add_line(String &buffer,char *line,char *in_string,
continue
;
continue
;
}
}
}
}
else
if
(
!*
ml_comment
&&
!*
in_string
&&
(
end_of_line
-
pos
)
>=
10
&&
!
my_strnncoll
(
charset_info
,
(
uchar
*
)
pos
,
10
,
(
const
uchar
*
)
"delimiter "
,
10
))
{
// Flush previously accepted characters
if
(
out
!=
line
)
{
buffer
.
append
(
line
,
(
uint32
)
(
out
-
line
));
out
=
line
;
}
// Flush possible comments in the buffer
if
(
!
buffer
.
is_empty
())
{
if
(
com_go
(
&
buffer
,
0
)
>
0
)
// < 0 is not fatal
DBUG_RETURN
(
1
);
buffer
.
length
(
0
);
}
/*
Delimiter wants the get rest of the given line as argument to
allow one to change ';' to ';;' and back
*/
buffer
.
append
(
pos
);
if
(
com_delimiter
(
&
buffer
,
pos
)
>
0
)
DBUG_RETURN
(
1
);
buffer
.
length
(
0
);
break
;
}
else
if
(
!*
ml_comment
&&
!*
in_string
&&
is_prefix
(
pos
,
delimiter
))
else
if
(
!*
ml_comment
&&
!*
in_string
&&
is_prefix
(
pos
,
delimiter
))
{
{
// Found a statement. Continue parsing after the delimiter
// Found a statement. Continue parsing after the delimiter
...
@@ -2176,7 +2145,14 @@ static bool add_line(String &buffer,char *line,char *in_string,
...
@@ -2176,7 +2145,14 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
}
else
if
(
!*
ml_comment
&&
(
!*
in_string
&&
(
inchar
==
'#'
||
else
if
(
!*
ml_comment
&&
(
!*
in_string
&&
(
inchar
==
'#'
||
inchar
==
'-'
&&
pos
[
1
]
==
'-'
&&
inchar
==
'-'
&&
pos
[
1
]
==
'-'
&&
my_isspace
(
charset_info
,
pos
[
2
]))))
/*
The third byte is either whitespace or is the
end of the line -- which would occur only
because of the user sending newline -- which is
itself whitespace and should also match.
*/
(
my_isspace
(
charset_info
,
pos
[
2
])
||
!
pos
[
2
]))))
{
{
// Flush previously accepted characters
// Flush previously accepted characters
if
(
out
!=
line
)
if
(
out
!=
line
)
...
...
mysql-test/r/mysql.result
View file @
f3978f77
...
@@ -38,6 +38,8 @@ t2
...
@@ -38,6 +38,8 @@ t2
t3
t3
Tables_in_test
Tables_in_test
t1
t1
delimiter
1
_
_
Test delimiter : from command line
Test delimiter : from command line
a
a
...
...
mysql-test/t/mysql_delimiter.sql
View file @
f3978f77
...
@@ -59,3 +59,16 @@ source t/mysql_delimiter_19799.sql
...
@@ -59,3 +59,16 @@ source t/mysql_delimiter_19799.sql
use
test
//
use
test
//
show
tables
//
show
tables
//
delimiter
;
#
Reset
delimiter
delimiter
;
#
Reset
delimiter
#
#
Bug
#
33812
:
mysql
client
incorrectly
parsing
DELIMITER
#
select
a
as
delimiter
from
t1
delimiter
;
#
Reset
delimiter
#
#
Bug
#
36244
:
MySQL
CLI
doesn
't recognize standalone -- as comment
# before DELIMITER statement
#
--
DELIMITER ;
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