summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index e5f230841f6..64a5b7d8910 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -227,6 +227,14 @@ bool mysql_create_frm(THD *thd, const char *file_name,
strmake((char*) forminfo+47, create_info->comment.str ?
create_info->comment.str : "", create_info->comment.length);
forminfo[46]=(uchar) create_info->comment.length;
+#ifdef EXTRA_DEBUG
+ /*
+ EXTRA_DEBUG causes strmake() to initialize its buffer behind the
+ payload with a magic value to detect wrong buffer-sizes. We
+ explicitly zero that segment again.
+ */
+ memset((char*) forminfo+47 + forminfo[46], 0, 61 - forminfo[46]);
+#endif
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (part_info)
{
@@ -395,7 +403,7 @@ int rea_create_table(THD *thd, const char *path,
DBUG_ASSERT(*fn_rext(frm_name));
if (thd->variables.keep_files_on_create)
create_info->options|= HA_CREATE_KEEP_FILES;
- if (file->create_handler_files(path, NULL, CHF_CREATE_FLAG, create_info))
+ if (file->ha_create_handler_files(path, NULL, CHF_CREATE_FLAG, create_info))
goto err_handler;
if (!create_info->frm_only && ha_create_table(thd, path, db, table_name,
create_info,0))
@@ -403,7 +411,7 @@ int rea_create_table(THD *thd, const char *path,
DBUG_RETURN(0);
err_handler:
- VOID(file->create_handler_files(path, NULL, CHF_DELETE_FLAG, create_info));
+ VOID(file->ha_create_handler_files(path, NULL, CHF_DELETE_FLAG, create_info));
my_delete(frm_name, MYF(0));
DBUG_RETURN(1);
} /* rea_create_table */