diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:19:01 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:19:01 +0200 |
commit | a53200d4e7e1377784034d676c609d9b533e9fb7 (patch) | |
tree | 50fab6ff12812d5fcc971735df4cb0ebcb2bcf57 /sql/unireg.cc | |
parent | 0c4cf3c7e58973511975443e52fb232b3d940e4a (diff) | |
download | mariadb-git-a53200d4e7e1377784034d676c609d9b533e9fb7.tar.gz |
remove HA_CREATE_INFO::frm_only - it's internal server flag,
not part of the SE API, and, again, mutually exclusive with
C_ORDINARY_CREATE and C_CREATE_SELECT.
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index 5da9f88132d..811ee50e502 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -361,7 +361,7 @@ err: db Data base name table_name Table name create_info create info parameters - file Handler to use or NULL if only frm needs to be created + file Handler to use or NULL if only frm needs to be created RETURN 0 ok @@ -374,21 +374,16 @@ int rea_create_table(THD *thd, LEX_CUSTRING *frm, { DBUG_ENTER("rea_create_table"); - if (thd->variables.keep_files_on_create) - create_info->options|= HA_CREATE_KEEP_FILES; - - if (create_info->frm_only) - { - if (writefrm(path, db, table_name, 1, frm->str, frm->length)) - goto err_handler; - } - else + if (file) { // TODO don't write frm for temp tables if (create_info->tmp_table() && writefrm(path, db, table_name, 0, frm->str, frm->length)) goto err_handler; + if (thd->variables.keep_files_on_create) + create_info->options|= HA_CREATE_KEEP_FILES; + if (file->ha_create_partitioning_metadata(path, NULL, CHF_CREATE_FLAG, create_info) || ha_create_table(thd, path, db, table_name, create_info, frm)) @@ -398,6 +393,11 @@ int rea_create_table(THD *thd, LEX_CUSTRING *frm, goto err_handler; } } + else + { + if (writefrm(path, db, table_name, 1, frm->str, frm->length)) + goto err_handler; + } DBUG_RETURN(0); |