Commit df89855e authored by Kristofer Pettersson's avatar Kristofer Pettersson

Auto merge

parents 71930db2 5c256ec6
...@@ -2081,6 +2081,37 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -2081,6 +2081,37 @@ 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
......
drop table if exists t1;
create table t1 ( create table t1 (
`a&b` int, `a&b` int,
`a<b` int, `a<b` int,
......
...@@ -38,8 +38,6 @@ t2 ...@@ -38,8 +38,6 @@ 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
......
# Can't run with embedded server # Can't run with embedded server
-- source include/not_embedded.inc -- source include/not_embedded.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes # Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
# sure that basic encoding issues are handled properly # sure that basic encoding issues are handled properly
create table t1 ( create table t1 (
......
...@@ -60,12 +60,6 @@ use test// ...@@ -60,12 +60,6 @@ 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 # Bug #36244: MySQL CLI doesn't recognize standalone -- as comment
# before DELIMITER statement # before DELIMITER statement
......
...@@ -1017,7 +1017,7 @@ static const char *my_get_module_parent(char *buf, size_t size) ...@@ -1017,7 +1017,7 @@ static const char *my_get_module_parent(char *buf, size_t size)
{ {
char *last= NULL; char *last= NULL;
char *end; char *end;
if (!GetModuleFileName(NULL, buf, size)) if (!GetModuleFileName(NULL, buf, (DWORD) size))
return NULL; return NULL;
end= strend(buf); end= strend(buf);
......
...@@ -405,6 +405,9 @@ static byte *federated_get_key(FEDERATED_SHARE *share, uint *length, ...@@ -405,6 +405,9 @@ static byte *federated_get_key(FEDERATED_SHARE *share, uint *length,
bool federated_db_init() bool federated_db_init()
{ {
DBUG_ENTER("federated_db_init"); DBUG_ENTER("federated_db_init");
/* the federated engine can be disabled by a command line option */
if (have_federated_db == SHOW_OPTION_DISABLED)
DBUG_RETURN(TRUE);
if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST)) if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST))
goto error; goto error;
if (hash_init(&federated_open_tables, &my_charset_bin, 32, 0, 0, if (hash_init(&federated_open_tables, &my_charset_bin, 32, 0, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment