diff options
author | Jonathan Perkin <jonathan.perkin@oracle.com> | 2011-02-08 14:59:03 +0100 |
---|---|---|
committer | Jonathan Perkin <jonathan.perkin@oracle.com> | 2011-02-08 14:59:03 +0100 |
commit | f13788c9fd8af035dd9a5af446d8a88214760fdc (patch) | |
tree | d87bb4b1cece4e1570ba257393e94057e79bd518 /storage/innobase/dict/dict0dict.c | |
parent | 8805ecee531f048726382fdd47cb2b59d8d6a711 (diff) | |
parent | 31e87bb552b5a36b25cb14c2c6f380a06cfd981c (diff) | |
download | mariadb-git-f13788c9fd8af035dd9a5af446d8a88214760fdc.tar.gz |
Merge from mysql-5.5.9-release
Diffstat (limited to 'storage/innobase/dict/dict0dict.c')
-rw-r--r-- | storage/innobase/dict/dict0dict.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index f98d3dbc639..ebc7747640e 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -949,7 +949,7 @@ dict_table_rename_in_cache( dict_foreign_t* foreign; dict_index_t* index; ulint fold; - char old_name[MAX_TABLE_NAME_LEN + 1]; + char old_name[MAX_FULL_NAME_LEN + 1]; ut_ad(table); ut_ad(mutex_own(&(dict_sys->mutex))); @@ -961,7 +961,7 @@ dict_table_rename_in_cache( ut_print_timestamp(stderr); fprintf(stderr, "InnoDB: too long table name: '%s', " "max length is %d\n", table->name, - MAX_TABLE_NAME_LEN); + MAX_FULL_NAME_LEN); ut_error; } @@ -1011,11 +1011,11 @@ dict_table_rename_in_cache( ut_fold_string(old_name), table); if (strlen(new_name) > strlen(table->name)) { - /* We allocate MAX_TABLE_NAME_LEN+1 bytes here to avoid + /* We allocate MAX_FULL_NAME_LEN + 1 bytes here to avoid memory fragmentation, we assume a repeated calls of ut_realloc() with the same size do not cause fragmentation */ - ut_a(strlen(new_name) <= MAX_TABLE_NAME_LEN); - table->name = ut_realloc(table->name, MAX_TABLE_NAME_LEN + 1); + ut_a(strlen(new_name) <= MAX_FULL_NAME_LEN); + table->name = ut_realloc(table->name, MAX_FULL_NAME_LEN + 1); } memcpy(table->name, new_name, strlen(new_name) + 1); |