Commit 3a582916 authored by Yuchen Pei's avatar Yuchen Pei

MDEV-27662 remove SPIDER_SUPPORT_CREATE_OR_REPLACE_TABLE

parent 84977868
...@@ -10597,7 +10597,6 @@ int ha_spider::create( ...@@ -10597,7 +10597,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(
...@@ -10608,7 +10607,6 @@ int ha_spider::create( ...@@ -10608,7 +10607,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 */
...@@ -8380,7 +8380,6 @@ int spider_discover_table_structure( ...@@ -8380,7 +8380,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,
...@@ -8388,11 +8387,8 @@ int spider_discover_table_structure( ...@@ -8388,11 +8387,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);
} }
...@@ -8496,7 +8492,6 @@ int spider_discover_table_structure( ...@@ -8496,7 +8492,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,
...@@ -8504,11 +8499,8 @@ int spider_discover_table_structure( ...@@ -8504,11 +8499,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)
...@@ -8532,7 +8524,6 @@ int spider_discover_table_structure( ...@@ -8532,7 +8524,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,
...@@ -8540,11 +8531,8 @@ int spider_discover_table_structure( ...@@ -8540,11 +8531,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