diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-02-18 18:07:45 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-02-18 18:07:45 -0500 |
commit | 860576f4161ab0ea29bf7ecf6dee0e9d10b6fed6 (patch) | |
tree | 4e3298fd280e7e1e3aca5716c0b93f95f636ac4c /client | |
parent | cd187ecf90e9988e5a729a1a4db7239e3baa2e6c (diff) | |
parent | f37bdd9c1a29865574b10fe7d21164ee7cae4d19 (diff) | |
download | mariadb-git-860576f4161ab0ea29bf7ecf6dee0e9d10b6fed6.tar.gz |
Merge branch '10.0' into 10.0-galera
Merge branch 10.0 till revision:
f37bdd9 - Merge remote-tracking branch 'github/10.0' into 10.0
Conflicts:
.bzrignore
storage/xtradb/CMakeLists.txt
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlcheck.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 10f787d5e20..d7a84e36eec 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 */ @@ -842,13 +834,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; @@ -872,10 +868,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; @@ -916,10 +918,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; |