1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

merge of 38158 to 5.1-bugteam

This commit is contained in:
Georgi Kodinov
2008-07-18 15:00:45 +03:00
6 changed files with 36 additions and 9 deletions

View File

@ -2101,6 +2101,37 @@ static bool add_line(String &buffer,char *line,char *in_string,
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))
{
// Found a statement. Continue parsing after the delimiter

View File

@ -1,5 +1,6 @@
set @old_concurrent_insert= @@global.concurrent_insert;
set @@global.concurrent_insert= 0;
drop table if exists t1;
create table t1 (
`a&b` int,
`a<b` int,

View File

@ -38,8 +38,6 @@ t2
t3
Tables_in_test
t1
delimiter
1
_
Test delimiter : from command line
a

View File

@ -6,6 +6,9 @@
# the data is actually in the table).
set @old_concurrent_insert= @@global.concurrent_insert;
set @@global.concurrent_insert= 0;
--disable_warnings
drop table if exists t1;
--enable_warnings
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
# sure that basic encoding issues are handled properly

View File

@ -60,12 +60,6 @@ use test//
show tables//
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

View File

@ -1026,7 +1026,7 @@ static const char *my_get_module_parent(char *buf, size_t size)
{
char *last= NULL;
char *end;
if (!GetModuleFileName(NULL, buf, size))
if (!GetModuleFileName(NULL, buf, (DWORD) size))
return NULL;
end= strend(buf);