summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-01-30 00:37:11 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-04-03 16:47:27 +0400
commit914bb5387fa1a0e7324573370fb353ea41bffc0f (patch)
tree0a5036578e6d6e13af3843aea2b6bfa0121b8dd6 /sql
parent878f83151f58b8fbf1b6102f32c5bfabbca3c478 (diff)
downloadmariadb-git-914bb5387fa1a0e7324573370fb353ea41bffc0f.tar.gz
Removed redundant partitioning check
This check was introduced in 602a222 and then became redundant in ad1553e, where we attempt to open a table even for non-copy algorithms. Added missing test case from 602a222. Part of MDEV-17805 - Remove InnoDB cache for temporary tables.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_table.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index ba44972e88a..ca26c7149e5 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -5055,43 +5055,7 @@ int create_table_impl(THD *thd, const LEX_CSTRING &orig_db,
thd->thread_specific_used= TRUE;
create_info->table= table; // Store pointer to table
}
-#ifdef WITH_PARTITION_STORAGE_ENGINE
- else if (thd->work_part_info && frm_only)
- {
- /*
- For partitioned tables we can't find some problems with table
- until table is opened. Therefore in order to disallow creation
- of corrupted tables we have to try to open table as the part
- of its creation process.
- In cases when both .FRM and SE part of table are created table
- is implicitly open in ha_create_table() call.
- In cases when we create .FRM without SE part we have to open
- table explicitly.
- */
- TABLE table;
- TABLE_SHARE share;
-
- init_tmp_table_share(thd, &share, db.str, 0, table_name.str, path);
-
- bool result= (open_table_def(thd, &share, GTS_TABLE) ||
- open_table_from_share(thd, &share, &empty_clex_str, 0,
- (uint) READ_ALL, 0, &table, true));
- if (!result)
- (void) closefrm(&table);
- free_table_share(&share);
-
- if (result)
- {
- char frm_name[FN_REFLEN];
- strxnmov(frm_name, sizeof(frm_name), path, reg_ext, NullS);
- (void) mysql_file_delete(key_file_frm, frm_name, MYF(0));
- (void) file->ha_create_partitioning_metadata(path, NULL, CHF_DELETE_FLAG);
- goto err;
- }
- }
-#endif
-
error= 0;
err:
THD_STAGE_INFO(thd, stage_after_create);