diff options
author | Michael Widenius <monty@mariadb.org> | 2020-07-31 16:11:35 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-05-19 22:27:28 +0200 |
commit | 451c4ae548fd4b0dda93ac499682e95b249bfcf4 (patch) | |
tree | 0a119270ddd0ca016df592b53d215c260b69ecb7 | |
parent | 189d03dac52ecce13d3dc2b01faba25b7ca168a0 (diff) | |
download | mariadb-git-451c4ae548fd4b0dda93ac499682e95b249bfcf4.tar.gz |
Renamed 'flags' variables in Item_class
This is a preparation for adding a flags variable to Item class
-rw-r--r-- | sql/item_func.cc | 15 | ||||
-rw-r--r-- | sql/item_func.h | 6 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 8 | ||||
-rw-r--r-- | sql/item_strfunc.h | 6 | ||||
-rw-r--r-- | storage/spider/spd_db_handlersocket.cc | 8 | ||||
-rw-r--r-- | storage/spider/spd_db_mysql.cc | 8 | ||||
-rw-r--r-- | storage/spider/spd_db_oracle.cc | 16 |
7 files changed, 33 insertions, 34 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index a8caf7f916c..6acfdfc2749 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -6200,12 +6200,12 @@ bool Item_func_match::init_search(THD *thd, bool no_order) } if (join_key && !no_order) - flags|=FT_SORTED; + match_flags|=FT_SORTED; if (key != NO_SUCH_KEY) THD_STAGE_INFO(table->in_use, stage_fulltext_initialization); - ft_handler= table->file->ft_init_ext(flags, key, ft_tmp); + ft_handler= table->file->ft_init_ext(match_flags, key, ft_tmp); if (join_key) table->file->ft_handler=ft_handler; @@ -6316,9 +6316,8 @@ bool Item_func_match::fix_index() for (keynr=0 ; keynr < table->s->keys ; keynr++) { if ((table->key_info[keynr].flags & HA_FULLTEXT) && - (flags & FT_BOOL ? table->keys_in_use_for_query.is_set(keynr) : - table->s->usable_indexes(table->in_use).is_set(keynr))) - + (match_flags & FT_BOOL ? table->keys_in_use_for_query.is_set(keynr) : + table->s->usable_indexes(table->in_use).is_set(keynr))) { ft_to_key[fts]=keynr; ft_cnt[fts]=0; @@ -6393,7 +6392,7 @@ bool Item_func_match::eq(const Item *item, bool binary_cmp) const { if (item->type() != FUNC_ITEM || ((Item_func*)item)->functype() != FT_FUNC || - flags != ((Item_func_match*)item)->flags) + match_flags != ((Item_func_match*)item)->match_flags) return 0; Item_func_match *ifm=(Item_func_match*) item; @@ -6441,9 +6440,9 @@ void Item_func_match::print(String *str, enum_query_type query_type) print_args(str, 1, query_type); str->append(STRING_WITH_LEN(" against (")); args[0]->print(str, query_type); - if (flags & FT_BOOL) + if (match_flags & FT_BOOL) str->append(STRING_WITH_LEN(" in boolean mode")); - else if (flags & FT_EXPAND) + else if (match_flags & FT_EXPAND) str->append(STRING_WITH_LEN(" with query expansion")); str->append(STRING_WITH_LEN("))")); } diff --git a/sql/item_func.h b/sql/item_func.h index 08eda7203ab..46e23170c71 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -3234,7 +3234,7 @@ public: class Item_func_match :public Item_real_func { public: - uint key, flags; + uint key, match_flags; bool join_key; DTCollation cmp_collation; FT_INFO *ft_handler; @@ -3245,7 +3245,7 @@ public: String search_value; // key_item()'s value converted to cmp_collation Item_func_match(THD *thd, List<Item> &a, uint b): - Item_real_func(thd, a), key(0), flags(b), join_key(0), ft_handler(0), + Item_real_func(thd, a), key(0), match_flags(b), join_key(0), ft_handler(0), table(0), master(0), concat_ws(0) { } void cleanup() { @@ -3308,7 +3308,7 @@ private: bool allows_search_on_non_indexed_columns(TABLE* table_arg) { // Only Boolean search may support non_indexed columns - if (!(flags & FT_BOOL)) + if (!(match_flags & FT_BOOL)) return false; DBUG_ASSERT(table_arg && table_arg->file); diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 8b5465ffdb6..5b4a7989f63 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3601,7 +3601,7 @@ bool Item_func_weight_string::fix_length_and_dec() { CHARSET_INFO *cs= args[0]->collation.collation; collation.set(&my_charset_bin, args[0]->collation.derivation); - flags= my_strxfrm_flag_normalize(flags, cs->levels_for_order); + weigth_flags= my_strxfrm_flag_normalize(weigth_flags, cs->levels_for_order); /* Use result_length if it was given explicitly in constructor, otherwise calculate max_length using argument's max_length @@ -3660,7 +3660,7 @@ String *Item_func_weight_string::val_str(String *str) to know the true number of characters. */ if (!(char_length= nweights)) - char_length= (flags & MY_STRXFRM_PAD_WITH_SPACE) ? + char_length= (weigth_flags & MY_STRXFRM_PAD_WITH_SPACE) ? res->numchars() : (res->length() / cs->mbminlen); } tmp_length= cs->strnxfrmlen(char_length * cs->mbmaxlen); @@ -3685,7 +3685,7 @@ String *Item_func_weight_string::val_str(String *str) frm_length= cs->strnxfrm((char*) str->ptr(), tmp_length, nweights ? nweights : (uint) tmp_length, res->ptr(), res->length(), - flags); + weigth_flags); DBUG_ASSERT(frm_length <= tmp_length); str->length(frm_length); @@ -3708,7 +3708,7 @@ void Item_func_weight_string::print(String *str, enum_query_type query_type) str->append(','); str->append_ulonglong(nweights); str->append(','); - str->append_ulonglong(flags); + str->append_ulonglong(weigth_flags); str->append(')'); } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 70a23ebf294..201022f4611 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -1569,7 +1569,7 @@ public: class Item_func_weight_string :public Item_str_func { String tmp_value; - uint flags; + uint weigth_flags; uint nweights; uint result_length; public: @@ -1578,7 +1578,7 @@ public: Item_str_func(thd, a) { nweights= nweights_arg; - flags= flags_arg; + weigth_flags= flags_arg; result_length= result_length_arg; } const char *func_name() const { return "weight_string"; } @@ -1589,7 +1589,7 @@ public: if (!Item_str_func::eq(item, binary_cmp)) return false; Item_func_weight_string *that= (Item_func_weight_string *)item; - return this->flags == that->flags && + return this->weigth_flags == that->weigth_flags && this->nweights == that->nweights && this->result_length == that->result_length; } diff --git a/storage/spider/spd_db_handlersocket.cc b/storage/spider/spd_db_handlersocket.cc index 6b1da7d3593..edc9ee33477 100644 --- a/storage/spider/spd_db_handlersocket.cc +++ b/storage/spider/spd_db_handlersocket.cc @@ -3891,16 +3891,16 @@ int spider_db_handlersocket_util::open_item_func( if (str) { if (str->reserve( - ((item_func_match->flags & FT_BOOL) ? + ((item_func_match->match_flags & FT_BOOL) ? SPIDER_SQL_IN_BOOLEAN_MODE_LEN : 0) + - ((item_func_match->flags & FT_EXPAND) ? + ((item_func_match->match_flags & FT_EXPAND) ? SPIDER_SQL_WITH_QUERY_EXPANSION_LEN : 0) )) DBUG_RETURN(HA_ERR_OUT_OF_MEM); - if (item_func_match->flags & FT_BOOL) + if (item_func_match->match_flags & FT_BOOL) str->q_append(SPIDER_SQL_IN_BOOLEAN_MODE_STR, SPIDER_SQL_IN_BOOLEAN_MODE_LEN); - if (item_func_match->flags & FT_EXPAND) + if (item_func_match->match_flags & FT_EXPAND) str->q_append(SPIDER_SQL_WITH_QUERY_EXPANSION_STR, SPIDER_SQL_WITH_QUERY_EXPANSION_LEN); } diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 408a010a56e..6821e36e445 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -6845,16 +6845,16 @@ int spider_db_mbase_util::open_item_func( if (str) { if (str->reserve( - ((item_func_match->flags & FT_BOOL) ? + ((item_func_match->match_flags & FT_BOOL) ? SPIDER_SQL_IN_BOOLEAN_MODE_LEN : 0) + - ((item_func_match->flags & FT_EXPAND) ? + ((item_func_match->match_flags & FT_EXPAND) ? SPIDER_SQL_WITH_QUERY_EXPANSION_LEN : 0) )) DBUG_RETURN(HA_ERR_OUT_OF_MEM); - if (item_func_match->flags & FT_BOOL) + if (item_func_match->match_flags & FT_BOOL) str->q_append(SPIDER_SQL_IN_BOOLEAN_MODE_STR, SPIDER_SQL_IN_BOOLEAN_MODE_LEN); - if (item_func_match->flags & FT_EXPAND) + if (item_func_match->match_flags & FT_EXPAND) str->q_append(SPIDER_SQL_WITH_QUERY_EXPANSION_STR, SPIDER_SQL_WITH_QUERY_EXPANSION_LEN); } diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc index 60a8a1b3600..92b4556a198 100644 --- a/storage/spider/spd_db_oracle.cc +++ b/storage/spider/spd_db_oracle.cc @@ -4299,16 +4299,16 @@ int spider_db_oracle_util::open_item_func( if (str) { if (str->reserve( - ((item_func_match->flags & FT_BOOL) ? + ((item_func_match->match_flags & FT_BOOL) ? SPIDER_SQL_IN_BOOLEAN_MODE_LEN : 0) + - ((item_func_match->flags & FT_EXPAND) ? + ((item_func_match->match_flags & FT_EXPAND) ? SPIDER_SQL_WITH_QUERY_EXPANSION_LEN : 0) )) DBUG_RETURN(HA_ERR_OUT_OF_MEM); - if (item_func_match->flags & FT_BOOL) + if (item_func_match->match_flags & FT_BOOL) str->q_append(SPIDER_SQL_IN_BOOLEAN_MODE_STR, SPIDER_SQL_IN_BOOLEAN_MODE_LEN); - if (item_func_match->flags & FT_EXPAND) + if (item_func_match->match_flags & FT_EXPAND) str->q_append(SPIDER_SQL_WITH_QUERY_EXPANSION_STR, SPIDER_SQL_WITH_QUERY_EXPANSION_LEN); } @@ -8030,16 +8030,16 @@ int spider_oracle_handler::append_match_against( if (str->reserve( SPIDER_SQL_VALUE_QUOTE_LEN + SPIDER_SQL_CLOSE_PAREN_LEN + - ((ft_info->flags & FT_BOOL) ? SPIDER_SQL_IN_BOOLEAN_MODE_LEN : 0) + - ((ft_info->flags & FT_EXPAND) ? + ((ft_info->match_flags & FT_BOOL) ? SPIDER_SQL_IN_BOOLEAN_MODE_LEN : 0) + + ((ft_info->match_flags & FT_EXPAND) ? SPIDER_SQL_WITH_QUERY_EXPANSION_LEN : 0) )) DBUG_RETURN(HA_ERR_OUT_OF_MEM); str->q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN); - if (ft_info->flags & FT_BOOL) + if (ft_info->match_flags & FT_BOOL) str->q_append(SPIDER_SQL_IN_BOOLEAN_MODE_STR, SPIDER_SQL_IN_BOOLEAN_MODE_LEN); - if (ft_info->flags & FT_EXPAND) + if (ft_info->match_flags & FT_EXPAND) str->q_append(SPIDER_SQL_WITH_QUERY_EXPANSION_STR, SPIDER_SQL_WITH_QUERY_EXPANSION_LEN); str->q_append(SPIDER_SQL_CLOSE_PAREN_STR, SPIDER_SQL_CLOSE_PAREN_LEN); |