diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-10-20 13:44:49 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-10-20 13:44:49 -0600 |
commit | ff66bc05f741ec1d3041413f8dba14b4f7891501 (patch) | |
tree | 47207793ee0142b5f6b040246d711a34508ab320 /storage/innobase/ut | |
parent | 5fda3c2c88ddd016ba3c7065c1f265ce7db8f6cc (diff) | |
download | mariadb-git-ff66bc05f741ec1d3041413f8dba14b4f7891501.tar.gz |
Applied InnoDB snapshot 5.1-ss927
Fixes:
- Bug #23368: crash during insert, table has foreign key pointing into other schema,permission
storage/innobase/dict/dict0dict.c:
Applied InnoDB snapshot 5.1-ss927
Revision r927:
dict_print_info_on_foreign_key_in_create_format(): Use ut_print_name()
instead of passing the wrong length to ut_print_namel(). (Bug #23368)
ut_print_name(), ut_print_namel(): Document the special treatment of '/'.
ut_print_namel(): Replace strchr() with memchr(), as the string might
not be NUL-terminated.
storage/innobase/include/ut0ut.h:
Applied InnoDB snapshot 5.1-ss927
Revision r927:
dict_print_info_on_foreign_key_in_create_format(): Use ut_print_name()
instead of passing the wrong length to ut_print_namel(). (Bug #23368)
ut_print_name(), ut_print_namel(): Document the special treatment of '/'.
ut_print_namel(): Replace strchr() with memchr(), as the string might
not be NUL-terminated.
storage/innobase/ut/ut0ut.c:
Applied InnoDB snapshot 5.1-ss927
Revision r927:
dict_print_info_on_foreign_key_in_create_format(): Use ut_print_name()
instead of passing the wrong length to ut_print_namel(). (Bug #23368)
ut_print_name(), ut_print_namel(): Document the special treatment of '/'.
ut_print_namel(): Replace strchr() with memchr(), as the string might
not be NUL-terminated.
Diffstat (limited to 'storage/innobase/ut')
-rw-r--r-- | storage/innobase/ut/ut0ut.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/storage/innobase/ut/ut0ut.c b/storage/innobase/ut/ut0ut.c index 10641b88a17..d805cc3b4b2 100644 --- a/storage/innobase/ut/ut0ut.c +++ b/storage/innobase/ut/ut0ut.c @@ -394,7 +394,10 @@ done: } /************************************************************************** -Outputs a NUL-terminated string, quoted as an SQL identifier. */ +Outputs a fixed-length string, quoted as an SQL identifier. +If the string contains a slash '/', the string will be +output as two identifiers separated by a period (.), +as in SQL database_name.identifier. */ void ut_print_name( @@ -409,7 +412,10 @@ ut_print_name( } /************************************************************************** -Outputs a fixed-length string, quoted as an SQL identifier. */ +Outputs a fixed-length string, quoted as an SQL identifier. +If the string contains a slash '/', the string will be +output as two identifiers separated by a period (.), +as in SQL database_name.identifier. */ void ut_print_namel( @@ -424,7 +430,7 @@ ut_print_namel( #ifdef UNIV_HOTBACKUP fwrite(name, 1, namelen, f); #else - char* slash = strchr(name, '/'); + char* slash = memchr(name, '/', namelen); if (UNIV_LIKELY_NULL(slash)) { /* Print the database name and table name separately. */ |