summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/spider/spd_db_conn.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc
index 62a02bf7de4..c34dea18adf 100644
--- a/storage/spider/spd_db_conn.cc
+++ b/storage/spider/spd_db_conn.cc
@@ -9376,6 +9376,8 @@ int spider_db_open_item_ident(
} else {
if (!use_fields)
{
+ if (!(field = spider->field_exchange(field)))
+ DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
if (str)
{
if ((error_num = share->dbton_share[dbton_id]->
@@ -9384,16 +9386,12 @@ int spider_db_open_item_ident(
DBUG_RETURN(error_num);
}
} else {
- if (!(field = spider->field_exchange(field)))
- DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
if (str)
{
SPIDER_FIELD_CHAIN *field_chain = fields->get_next_field_chain();
SPIDER_FIELD_HOLDER *field_holder = field_chain->field_holder;
spider = field_holder->spider;
share = spider->share;
- field = spider->field_exchange(field);
- DBUG_ASSERT(field);
if ((error_num = share->dbton_share[dbton_id]->
append_column_name_with_alias(str, field->field_index,
field_holder->alias->ptr(), field_holder->alias->length())))