Commit 9c05c840 authored by Yuchen Pei's avatar Yuchen Pei Committed by Yuchen Pei

MDEV-28891 Spider: remove #ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR

unifdef -DSPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR -m
storage/spider/*.{cc,h}

and removing the definition manually.
Signed-off-by: default avatarYuchen Pei <yuchen.pei@mariadb.com>
Reviewed-by: default avatarNayuta Yanagisawa <nayuta.yanagisawa@mariadb.com>
parent b1856aff
...@@ -85,7 +85,6 @@ ...@@ -85,7 +85,6 @@
#define SPIDER_TEST(A) MY_TEST(A) #define SPIDER_TEST(A) MY_TEST(A)
#define SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
#define SPIDER_ENGINE_CONDITION_PUSHDOWN_IS_ALWAYS_ON #define SPIDER_ENGINE_CONDITION_PUSHDOWN_IS_ALWAYS_ON
#define SPIDER_Item_args_arg_count_IS_PROTECTED #define SPIDER_Item_args_arg_count_IS_PROTECTED
......
...@@ -3572,24 +3572,13 @@ TABLE *spider_mk_sys_tmp_table( ...@@ -3572,24 +3572,13 @@ TABLE *spider_mk_sys_tmp_table(
TABLE *tmp_table; TABLE *tmp_table;
DBUG_ENTER("spider_mk_sys_tmp_table"); DBUG_ENTER("spider_mk_sys_tmp_table");
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(field = new (thd->mem_root) Field_blob( if (!(field = new (thd->mem_root) Field_blob(
4294967295U, FALSE, field_name, cs, TRUE))) 4294967295U, FALSE, field_name, cs, TRUE)))
goto error_alloc_field; goto error_alloc_field;
#else
if (!(field = new Field_blob(
4294967295U, FALSE, field_name, cs, TRUE)))
goto error_alloc_field;
#endif
field->init(table); field->init(table);
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(i_field = new (thd->mem_root) Item_field(thd, (Field *) field))) if (!(i_field = new (thd->mem_root) Item_field(thd, (Field *) field)))
goto error_alloc_item_field; goto error_alloc_item_field;
#else
if (!(i_field = new Item_field((Field *) field)))
goto error_alloc_item_field;
#endif
if (i_list.push_back(i_field)) if (i_list.push_back(i_field))
goto error_push_item; goto error_push_item;
...@@ -3650,68 +3639,35 @@ TABLE *spider_mk_sys_tmp_table_for_result( ...@@ -3650,68 +3639,35 @@ TABLE *spider_mk_sys_tmp_table_for_result(
TABLE *tmp_table; TABLE *tmp_table;
DBUG_ENTER("spider_mk_sys_tmp_table_for_result"); DBUG_ENTER("spider_mk_sys_tmp_table_for_result");
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(field1 = new (thd->mem_root) Field_blob( if (!(field1 = new (thd->mem_root) Field_blob(
4294967295U, FALSE, field_name1, cs, TRUE))) 4294967295U, FALSE, field_name1, cs, TRUE)))
goto error_alloc_field1; goto error_alloc_field1;
#else
if (!(field1 = new Field_blob(
4294967295U, FALSE, field_name1, cs, TRUE)))
goto error_alloc_field1;
#endif
field1->init(table); field1->init(table);
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(i_field1 = new (thd->mem_root) Item_field(thd, (Field *) field1))) if (!(i_field1 = new (thd->mem_root) Item_field(thd, (Field *) field1)))
goto error_alloc_item_field1; goto error_alloc_item_field1;
#else
if (!(i_field1 = new Item_field((Field *) field1)))
goto error_alloc_item_field1;
#endif
if (i_list.push_back(i_field1)) if (i_list.push_back(i_field1))
goto error_push_item1; goto error_push_item1;
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(field2 = new (thd->mem_root) Field_blob( if (!(field2 = new (thd->mem_root) Field_blob(
4294967295U, FALSE, field_name2, cs, TRUE))) 4294967295U, FALSE, field_name2, cs, TRUE)))
goto error_alloc_field2; goto error_alloc_field2;
#else
if (!(field2 = new Field_blob(
4294967295U, FALSE, field_name2, cs, TRUE)))
goto error_alloc_field2;
#endif
field2->init(table); field2->init(table);
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(i_field2 = new (thd->mem_root) Item_field(thd, (Field *) field2))) if (!(i_field2 = new (thd->mem_root) Item_field(thd, (Field *) field2)))
goto error_alloc_item_field2; goto error_alloc_item_field2;
#else
if (!(i_field2 = new Item_field((Field *) field2)))
goto error_alloc_item_field2;
#endif
if (i_list.push_back(i_field2)) if (i_list.push_back(i_field2))
goto error_push_item2; goto error_push_item2;
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(field3 = new (thd->mem_root) Field_blob( if (!(field3 = new (thd->mem_root) Field_blob(
4294967295U, FALSE, field_name3, cs, TRUE))) 4294967295U, FALSE, field_name3, cs, TRUE)))
goto error_alloc_field3; goto error_alloc_field3;
#else
if (!(field3 = new Field_blob(
4294967295U, FALSE, field_name3, cs, TRUE)))
goto error_alloc_field3;
#endif
field3->init(table); field3->init(table);
#ifdef SPIDER_FIELD_FIELDPTR_REQUIRES_THDPTR
if (!(i_field3 = new (thd->mem_root) Item_field(thd, (Field *) field3))) if (!(i_field3 = new (thd->mem_root) Item_field(thd, (Field *) field3)))
goto error_alloc_item_field3; goto error_alloc_item_field3;
#else
if (!(i_field3 = new Item_field((Field *) field3)))
goto error_alloc_item_field3;
#endif
if (i_list.push_back(i_field3)) if (i_list.push_back(i_field3))
goto error_push_item3; goto error_push_item3;
......
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