Commit d644cd6b authored by Shunsuke Tokunaga's avatar Shunsuke Tokunaga Committed by GitHub

MDEV-27662 Spider: remove #ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE

parent 362c5fb1
...@@ -9096,7 +9096,6 @@ int ha_spider::create( ...@@ -9096,7 +9096,6 @@ int ha_spider::create(
) { ) {
goto error; goto error;
} }
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if ( if (
thd->lex->create_info.or_replace() && thd->lex->create_info.or_replace() &&
(error_num = spider_delete_tables( (error_num = spider_delete_tables(
...@@ -9104,7 +9103,6 @@ int ha_spider::create( ...@@ -9104,7 +9103,6 @@ int ha_spider::create(
) { ) {
goto error; goto error;
} }
#endif
if ( if (
(error_num = spider_insert_tables(table_tables, &tmp_share)) (error_num = spider_insert_tables(table_tables, &tmp_share))
) { ) {
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#ifndef SPD_ENVIRON_INCLUDED #ifndef SPD_ENVIRON_INCLUDED
#define SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
#define SPIDER_NET_HAS_THD #define SPIDER_NET_HAS_THD
#define HANDLER_HAS_TOP_TABLE_FIELDS #define HANDLER_HAS_TOP_TABLE_FIELDS
#define PARTITION_HAS_GET_PART_SPEC #define PARTITION_HAS_GET_PART_SPEC
......
...@@ -8670,7 +8670,6 @@ int spider_discover_table_structure( ...@@ -8670,7 +8670,6 @@ int spider_discover_table_structure(
SPIDER_SYS_TABLES_TABLE_NAME_LEN, TRUE, &open_tables_backup, FALSE, SPIDER_SYS_TABLES_TABLE_NAME_LEN, TRUE, &open_tables_backup, FALSE,
&error_num)) &error_num))
) { ) {
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if (thd->lex->create_info.or_replace()) if (thd->lex->create_info.or_replace())
{ {
error_num = spider_delete_tables(table_tables, error_num = spider_delete_tables(table_tables,
...@@ -8678,11 +8677,8 @@ int spider_discover_table_structure( ...@@ -8678,11 +8677,8 @@ int spider_discover_table_structure(
} }
if (!error_num) if (!error_num)
{ {
#endif
error_num = spider_insert_tables(table_tables, spider_share); error_num = spider_insert_tables(table_tables, spider_share);
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
} }
#endif
spider_close_sys_table(thd, table_tables, spider_close_sys_table(thd, table_tables,
&open_tables_backup, FALSE); &open_tables_backup, FALSE);
} }
...@@ -8786,7 +8782,6 @@ int spider_discover_table_structure( ...@@ -8786,7 +8782,6 @@ int spider_discover_table_structure(
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if (thd->lex->create_info.or_replace()) if (thd->lex->create_info.or_replace())
{ {
error_num = spider_delete_tables(table_tables, error_num = spider_delete_tables(table_tables,
...@@ -8794,11 +8789,8 @@ int spider_discover_table_structure( ...@@ -8794,11 +8789,8 @@ int spider_discover_table_structure(
} }
if (!error_num) if (!error_num)
{ {
#endif
error_num = spider_insert_tables(table_tables, spider_share); error_num = spider_insert_tables(table_tables, spider_share);
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
} }
#endif
spider_free_share_resource_only(spider_share); spider_free_share_resource_only(spider_share);
if (error_num) if (error_num)
...@@ -8822,7 +8814,6 @@ int spider_discover_table_structure( ...@@ -8822,7 +8814,6 @@ int spider_discover_table_structure(
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
if (thd->lex->create_info.or_replace()) if (thd->lex->create_info.or_replace())
{ {
error_num = spider_delete_tables(table_tables, error_num = spider_delete_tables(table_tables,
...@@ -8830,11 +8821,8 @@ int spider_discover_table_structure( ...@@ -8830,11 +8821,8 @@ int spider_discover_table_structure(
} }
if (!error_num) if (!error_num)
{ {
#endif
error_num = spider_insert_tables(table_tables, spider_share); error_num = spider_insert_tables(table_tables, spider_share);
#ifdef SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
} }
#endif
spider_free_share_resource_only(spider_share); spider_free_share_resource_only(spider_share);
if (error_num) if (error_num)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment