summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2008-07-18 13:24:59 +0300
committerGeorgi Kodinov <kgeorge@mysql.com>2008-07-18 13:24:59 +0300
commit5c256ec67a825c41eac0eaffef354ef73f6fb372 (patch)
tree9503607d7a08efd26f8de23ef4c951047f621ba3 /client
parente390f843d54caf4a2cf063fa373a6936d30963da (diff)
downloadmariadb-git-5c256ec67a825c41eac0eaffef354ef73f6fb372.tar.gz
Bug 38158: mysql client regression, can't read dump files
- Revert the fix for bug 33812 - fixed a win32 warning
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc31
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