From eaae3b2d2b847e9185e931f6334083d3f076bc83 Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Sun, 30 Jul 2006 19:30:20 +0200 Subject: BUG#21217 "mysqltest" client is inconsistent when to log a line number - Init start_lineno to 0 --- client/mysqltest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/mysqltest.c b/client/mysqltest.c index 3f2e7d8edb6..ad0f9f857bb 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -147,7 +147,7 @@ const char *user = 0, *host = 0, *unix_sock = 0, *opt_basedir="./"; static int port = 0; static my_bool opt_big_test= 0, opt_compress= 0, silent= 0, verbose = 0; static my_bool tty_password= 0, ps_protocol= 0, ps_protocol_enabled= 0; -static uint start_lineno, *lineno; +static uint start_lineno= 0, *lineno; const char *manager_user="root",*manager_host=0; char *manager_pass=0; int manager_port=MYSQL_MANAGER_PORT; @@ -580,7 +580,7 @@ static void die(const char *fmt, ...) if (cur_file && cur_file != file_stack) fprintf(stderr, "In included file \"%s\": ", cur_file->file_name); - if (start_lineno != 0) + if (start_lineno > 0) fprintf(stderr, "At line %u: ", start_lineno); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); @@ -4072,6 +4072,8 @@ int main(int argc, char **argv) parser.current_line += current_line_inc; } + start_lineno= 0; + if (!query_executed && result_file && my_stat(result_file, &res_info, 0)) { /* -- cgit v1.2.1 From 7b5e4ed026dfc2f1d3020be0d0fe8f2504ab105c Mon Sep 17 00:00:00 2001 From: "gkodinov/kgeorge@macbook.gmz" <> Date: Tue, 1 Aug 2006 11:05:54 +0300 Subject: Bug #20103: Escaping with backslash does not work - make the client to respect the server-side no_backslash_escapes option and disable the special meaning of backslash also at client side. --- client/mysql.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/mysql.cc b/client/mysql.cc index 94b43d030e8..0b7284426c5 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1221,7 +1221,8 @@ static bool add_line(String &buffer,char *line,char *in_string, continue; } #endif - if (!*ml_comment && inchar == '\\') + if (!*ml_comment && inchar == '\\' && + !(mysql.server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)) { // Found possbile one character command like \c -- cgit v1.2.1