Commit e0734c8c authored by Yuchen Pei's avatar Yuchen Pei

MDEV-27662 remove SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE

parent 1e7138cf
...@@ -10598,7 +10598,6 @@ int ha_spider::create( ...@@ -10598,7 +10598,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(
...@@ -10609,7 +10608,6 @@ int ha_spider::create( ...@@ -10609,7 +10608,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,5 @@ ...@@ -20,7 +20,5 @@
#ifndef SPD_ENVIRON_INCLUDED #ifndef SPD_ENVIRON_INCLUDED
#define SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE
#define HANDLER_HAS_DIRECT_AGGREGATE #define HANDLER_HAS_DIRECT_AGGREGATE
#endif /* SPD_ENVIRON_INCLUDED */ #endif /* SPD_ENVIRON_INCLUDED */
...@@ -8548,7 +8548,6 @@ int spider_discover_table_structure( ...@@ -8548,7 +8548,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,
...@@ -8556,11 +8555,8 @@ int spider_discover_table_structure( ...@@ -8556,11 +8555,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);
} }
...@@ -8664,7 +8660,6 @@ int spider_discover_table_structure( ...@@ -8664,7 +8660,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,
...@@ -8672,11 +8667,8 @@ int spider_discover_table_structure( ...@@ -8672,11 +8667,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)
...@@ -8700,7 +8692,6 @@ int spider_discover_table_structure( ...@@ -8700,7 +8692,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,
...@@ -8708,11 +8699,8 @@ int spider_discover_table_structure( ...@@ -8708,11 +8699,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