Skip to content

Commit

Permalink
MDEV-27662 Spider: remove #ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
Shunpoco committed Feb 11, 2022
1 parent 362c5fb commit d644cd6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions storage/spider/ha_spider.cc
Expand Up @@ -9096,15 +9096,13 @@ int ha_spider::create(
) {
goto error;
}
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if (
thd->lex->create_info.or_replace() &&
(error_num = spider_delete_tables(
table_tables, tmp_share.table_name, &dummy))
) {
goto error;
}
#endif
if (
(error_num = spider_insert_tables(table_tables, &tmp_share))
) {
Expand Down
1 change: 0 additions & 1 deletion storage/spider/spd_environ.h
Expand Up @@ -20,7 +20,6 @@

#ifndef SPD_ENVIRON_INCLUDED

#define SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
#define SPIDER_NET_HAS_THD
#define HANDLER_HAS_TOP_TABLE_FIELDS
#define PARTITION_HAS_GET_PART_SPEC
Expand Down
12 changes: 0 additions & 12 deletions storage/spider/spd_table.cc
Expand Up @@ -8670,19 +8670,15 @@ int spider_discover_table_structure(
SPIDER_SYS_TABLES_TABLE_NAME_LEN, TRUE, &open_tables_backup, FALSE,
&error_num))
) {
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if (thd->lex->create_info.or_replace())
{
error_num = spider_delete_tables(table_tables,
spider_share->table_name, &dummy);
}
if (!error_num)
{
#endif
error_num = spider_insert_tables(table_tables, spider_share);
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
}
#endif
spider_close_sys_table(thd, table_tables,
&open_tables_backup, FALSE);
}
Expand Down Expand Up @@ -8786,19 +8782,15 @@ int spider_discover_table_structure(
DBUG_RETURN(error_num);
}

#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if (thd->lex->create_info.or_replace())
{
error_num = spider_delete_tables(table_tables,
spider_share->table_name, &dummy);
}
if (!error_num)
{
#endif
error_num = spider_insert_tables(table_tables, spider_share);
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
}
#endif

spider_free_share_resource_only(spider_share);
if (error_num)
Expand All @@ -8822,19 +8814,15 @@ int spider_discover_table_structure(
DBUG_RETURN(error_num);
}

#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if (thd->lex->create_info.or_replace())
{
error_num = spider_delete_tables(table_tables,
spider_share->table_name, &dummy);
}
if (!error_num)
{
#endif
error_num = spider_insert_tables(table_tables, spider_share);
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
}
#endif

spider_free_share_resource_only(spider_share);
if (error_num)
Expand Down

0 comments on commit d644cd6

Please sign in to comment.