diff options
author | Georgi Kodinov <kgeorge@mysql.com> | 2008-07-18 13:24:59 +0300 |
---|---|---|
committer | Georgi Kodinov <kgeorge@mysql.com> | 2008-07-18 13:24:59 +0300 |
commit | 88d66418c8fb2fbd6b60968d1ad8962b2af56232 (patch) | |
tree | 9503607d7a08efd26f8de23ef4c951047f621ba3 /client | |
parent | 6a42c35fa74103c8706ffd223a22dd25df7faa63 (diff) | |
download | mariadb-git-88d66418c8fb2fbd6b60968d1ad8962b2af56232.tar.gz |
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
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 31 |
1 files changed, 31 insertions, 0 deletions
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 |