Commit 86adee38 authored by Yuchen Pei's avatar Yuchen Pei

MDEV-31475 remove unnecessary assignment to spider share init_error

The init, init_error, and init_error_time fields of a SPIDER_SHARE
should only be assigned when actually doing the initialisation of a
SPIDER_SHARE, otherwise they could result in spurious failures from
spider_get_share() in a subsequent statement.
parent ac2e02e9
...@@ -8328,8 +8328,6 @@ int ha_spider::info( ...@@ -8328,8 +8328,6 @@ int ha_spider::info(
spider_init_error_table->init_error_time = spider_init_error_table->init_error_time =
(time_t) time((time_t*) 0); (time_t) time((time_t*) 0);
} }
share->init_error = TRUE;
share->init = TRUE;
} }
if (wide_handler->sql_command == SQLCOM_SHOW_CREATE || if (wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
wide_handler->sql_command == SQLCOM_SHOW_FIELDS) wide_handler->sql_command == SQLCOM_SHOW_FIELDS)
...@@ -8382,10 +8380,6 @@ int ha_spider::info( ...@@ -8382,10 +8380,6 @@ int ha_spider::info(
share, TRUE)) share, TRUE))
) { ) {
spider_init_error_table->init_error = error_num; spider_init_error_table->init_error = error_num;
/*
if (!thd->is_error())
my_error(error_num, MYF(0), "");
*/
if ((spider_init_error_table->init_error_with_message = if ((spider_init_error_table->init_error_with_message =
thd->is_error())) thd->is_error()))
strmov(spider_init_error_table->init_error_msg, strmov(spider_init_error_table->init_error_msg,
...@@ -8393,8 +8387,6 @@ int ha_spider::info( ...@@ -8393,8 +8387,6 @@ int ha_spider::info(
spider_init_error_table->init_error_time = spider_init_error_table->init_error_time =
(time_t) time((time_t*) 0); (time_t) time((time_t*) 0);
} }
share->init_error = TRUE;
share->init = TRUE;
} }
if (wide_handler->sql_command == SQLCOM_SHOW_CREATE || if (wide_handler->sql_command == SQLCOM_SHOW_CREATE ||
wide_handler->sql_command == SQLCOM_SHOW_FIELDS) wide_handler->sql_command == SQLCOM_SHOW_FIELDS)
...@@ -8688,8 +8680,6 @@ ha_rows ha_spider::records_in_range( ...@@ -8688,8 +8680,6 @@ ha_rows ha_spider::records_in_range(
spider_init_error_table->init_error_time = spider_init_error_table->init_error_time =
(time_t) time((time_t*) 0); (time_t) time((time_t*) 0);
} }
share->init_error = TRUE;
share->init = TRUE;
} }
if (check_error_mode(error_num)) if (check_error_mode(error_num))
my_errno = error_num; my_errno = error_num;
...@@ -8993,8 +8983,6 @@ int ha_spider::check_crd() ...@@ -8993,8 +8983,6 @@ int ha_spider::check_crd()
spider_init_error_table->init_error_time = spider_init_error_table->init_error_time =
(time_t) time((time_t*) 0); (time_t) time((time_t*) 0);
} }
share->init_error = TRUE;
share->init = TRUE;
} }
DBUG_RETURN(check_error_mode(error_num)); DBUG_RETURN(check_error_mode(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