diff options
author | unknown <sanja@askmonty.org> | 2010-02-01 08:14:12 +0200 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2010-02-01 08:14:12 +0200 |
commit | e5099a2c85468d01d084b1071f724bc20766271d (patch) | |
tree | 50e180dfcaa058cefb382d2ab931592cddbd007d /storage/innobase/ut/ut0ut.c | |
parent | f83113df07d6ef8e8a6d1db8f6dc3bb90fb0652a (diff) | |
parent | e9bce6c9d4bde35306b845e22e9b5ada69c4512f (diff) | |
download | mariadb-git-e5099a2c85468d01d084b1071f724bc20766271d.tar.gz |
merge 5.1->5.2
Diffstat (limited to 'storage/innobase/ut/ut0ut.c')
-rw-r--r-- | storage/innobase/ut/ut0ut.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/storage/innobase/ut/ut0ut.c b/storage/innobase/ut/ut0ut.c index 6b5bcef1830..3b26d83bbb9 100644 --- a/storage/innobase/ut/ut0ut.c +++ b/storage/innobase/ut/ut0ut.c @@ -19,6 +19,7 @@ Created 5/11/1994 Heikki Tuuri #include "ut0sort.h" #include "trx0trx.h" #include "ha_prototypes.h" +#include "mysql_com.h" /* NAME_LEN */ ibool ut_always_false = FALSE; @@ -484,26 +485,17 @@ ut_print_namel( const char* name, /* in: name to print */ ulint namelen)/* in: length of name */ { -#ifdef UNIV_HOTBACKUP - fwrite(name, 1, namelen, f); -#else - if (table_id) { - char* slash = memchr(name, '/', namelen); - if (!slash) { + /* 2 * NAME_LEN for database and table name, + and some slack for the #mysql50# prefix and quotes */ + char buf[3 * NAME_LEN]; + const char* bufend; - goto no_db_name; - } + bufend = innobase_convert_name(buf, sizeof buf, + name, namelen, + trx ? trx->mysql_thd : NULL, + table_id); - /* Print the database name and table name separately. */ - innobase_print_identifier(f, trx, TRUE, name, slash - name); - putc('.', f); - innobase_print_identifier(f, trx, TRUE, slash + 1, - namelen - (slash - name) - 1); - } else { -no_db_name: - innobase_print_identifier(f, trx, table_id, name, namelen); - } -#endif + fwrite(buf, 1, bufend - buf, f); } /************************************************************************** |