diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2008-03-12 16:15:34 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2008-03-12 16:15:34 -0400 |
commit | 232481e477b377f7c87e6c0e6156a0dae51d15f2 (patch) | |
tree | 4cdad48f88cbaea5e891ec095b92e332cef07238 /sql | |
parent | ad79dee045500e6392967193ba02957e03ed2c37 (diff) | |
parent | b5978a9424c6213a8282713feb3734c2f92968c8 (diff) | |
download | mariadb-git-232481e477b377f7c87e6c0e6156a0dae51d15f2.tar.gz |
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug26703/my51-bug26703
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_db.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index d03ac7921ac..75f9f5e847d 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -1111,12 +1111,17 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, /* Drop the table nicely */ *extension= 0; // Remove extension TABLE_LIST *table_list=(TABLE_LIST*) - thd->calloc(sizeof(*table_list)+ strlen(db)+strlen(file->name)+2); + thd->calloc(sizeof(*table_list) + + strlen(db) + 1 + + MYSQL50_TABLE_NAME_PREFIX_LENGTH + + strlen(file->name) + 1); + if (!table_list) - goto err; + goto err; table_list->db= (char*) (table_list+1); table_list->table_name= strmov(table_list->db, db) + 1; VOID(filename_to_tablename(file->name, table_list->table_name, + MYSQL50_TABLE_NAME_PREFIX_LENGTH + strlen(file->name) + 1)); table_list->alias= table_list->table_name; // If lower_case_table_names=2 table_list->internal_tmp_table= is_prefix(file->name, tmp_file_prefix); |