summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-01-31 21:48:47 +0100
committerSergei Golubchik <serg@mariadb.org>2015-01-31 21:48:47 +0100
commit4b21cd21fef2763d757aa15681c9c9a7ed5db3c9 (patch)
treee9e233392b47f93de12cecce1f7f403ce26057b0 /client
parent0b049b40124d72d77c008d4441e4db2e77f0f127 (diff)
parenta06624d61f36c70edd63adcfe2803bb7a8564de5 (diff)
downloadmariadb-git-4b21cd21fef2763d757aa15681c9c9a7ed5db3c9.tar.gz
Merge branch '10.0' into merge-wip
Diffstat (limited to 'client')
-rw-r--r--client/mysqlbinlog.cc5
-rw-r--r--client/mysqlcheck.c34
-rw-r--r--client/mysqltest.cc2
3 files changed, 25 insertions, 16 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 319be9111aa..7c93e8d3ebd 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2013, Monty Program Ab.
+ Copyright (c) 2000, 2014, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2014, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2435,6 +2435,7 @@ int main(int argc, char** argv)
DBUG_PROCESS(argv[0]);
my_init_time(); // for time functions
+ tzset(); // set tzname
init_alloc_root(&s_mem_root, 16384, 0, MYF(0));
if (load_defaults("my", load_groups, &argc, &argv))
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 295affe9b1a..e70c5e0fb9d 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -521,9 +521,6 @@ static uint fixed_name_length(const char *name)
{
if (*p == '`')
extra_length++;
- else if (*p == '.')
- extra_length+= 2;
-
}
DBUG_RETURN((uint) ((p - name) + extra_length));
}
@@ -537,11 +534,6 @@ static char *fix_table_name(char *dest, char *src)
for (; *src; src++)
{
switch (*src) {
- case '.': /* add backticks around '.' */
- *dest++= '`';
- *dest++= '.';
- *dest++= '`';
- break;
case '`': /* escape backtick character */
*dest++= '`';
/* fall through */
@@ -837,13 +829,17 @@ static void print_result()
{
MYSQL_RES *res;
MYSQL_ROW row;
- char prev[(NAME_LEN+9)*2+2];
+ char prev[(NAME_LEN+9)*3+2];
char prev_alter[MAX_ALTER_STR_SIZE];
+ char *db_name;
+ uint length_of_db;
uint i;
my_bool found_error=0, table_rebuild=0;
DBUG_ENTER("print_result");
res = mysql_use_result(sock);
+ db_name= sock->db;
+ length_of_db= strlen(db_name);
prev[0] = '\0';
prev_alter[0]= 0;
@@ -867,10 +863,16 @@ static void print_result()
if (prev_alter[0])
insert_dynamic(&alter_table_cmds, (uchar*) prev_alter);
else
- insert_dynamic(&tables4rebuild, (uchar*) prev);
+ {
+ char *table_name= prev + (length_of_db+1);
+ insert_dynamic(&tables4rebuild, (uchar*) table_name);
+ }
}
else
- insert_dynamic(&tables4repair, prev);
+ {
+ char *table_name= prev + (length_of_db+1);
+ insert_dynamic(&tables4repair, table_name);
+ }
}
found_error=0;
table_rebuild=0;
@@ -911,10 +913,16 @@ static void print_result()
if (prev_alter[0])
insert_dynamic(&alter_table_cmds, prev_alter);
else
- insert_dynamic(&tables4rebuild, prev);
+ {
+ char *table_name= prev + (length_of_db+1);
+ insert_dynamic(&tables4rebuild, table_name);
+ }
}
else
- insert_dynamic(&tables4repair, prev);
+ {
+ char *table_name= prev + (length_of_db+1);
+ insert_dynamic(&tables4repair, table_name);
+ }
}
mysql_free_result(res);
DBUG_VOID_RETURN;
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 69b94bad106..5118b024078 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5766,7 +5766,7 @@ void do_connect(struct st_command *command)
{
int con_port= opt_port;
char *con_options;
- char *ssl_cipher= 0;
+ char *ssl_cipher __attribute__((unused))= 0;
my_bool con_ssl= 0, con_compress= 0;
my_bool con_pipe= 0;
my_bool con_shm __attribute__ ((unused))= 0;