Commit d9288383 authored by marko's avatar marko

ut_print_namel(): Do not assume that all '/' are separators between

database and table names.

Approved by Heikki.
parent b1663422
...@@ -459,17 +459,20 @@ ut_print_namel( ...@@ -459,17 +459,20 @@ ut_print_namel(
#ifdef UNIV_HOTBACKUP #ifdef UNIV_HOTBACKUP
fwrite(name, 1, namelen, f); fwrite(name, 1, namelen, f);
#else #else
char* slash = memchr(name, '/', namelen); if (table_id) {
char* slash = memchr(name, '/', namelen);
if (!slash) {
if (UNIV_LIKELY_NULL(slash)) { goto no_db_name;
/* Print the database name and table name separately. */ }
ut_ad(table_id);
/* Print the database name and table name separately. */
innobase_print_identifier(f, trx, TRUE, name, slash - name); innobase_print_identifier(f, trx, TRUE, name, slash - name);
putc('.', f); putc('.', f);
innobase_print_identifier(f, trx, TRUE, slash + 1, innobase_print_identifier(f, trx, TRUE, slash + 1,
namelen - (slash - name) - 1); namelen - (slash - name) - 1);
} else { } else {
no_db_name:
innobase_print_identifier(f, trx, table_id, name, namelen); innobase_print_identifier(f, trx, table_id, name, namelen);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment