From 88d66418c8fb2fbd6b60968d1ad8962b2af56232 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 18 Jul 2008 13:24:59 +0300 Subject: Bug 38158: mysql client regression, can't read dump files - Revert the fix for bug 33812 - fixed a win32 warning client/mysql.cc: revert the fix for bug 33812 mysql-test/r/mysql.result: revert the fix for bug 33812 mysql-test/t/mysql_delimiter.sql: revert the fix for bug 33812 mysys/default.c: fixed a win32 warning --- client/mysql.cc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'client') diff --git a/client/mysql.cc b/client/mysql.cc index c8d5522628d..9b14f9fb3ef 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2081,6 +2081,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 -- cgit v1.2.1