Commit ab49b46d authored by Yuchen Pei's avatar Yuchen Pei

MDEV-27664 remove SPIDER_SQL_CACHE_IS_IN_LEX

sql_cache was moved to lex in MDEV-11953 in
de745ecf
parent a1e5ee91
......@@ -12506,11 +12506,7 @@ void ha_spider::check_pre_call(
) ||
(
(skip_parallel_search & 2) &&
#ifdef SPIDER_SQL_CACHE_IS_IN_LEX
lex->sql_cache == LEX::SQL_NO_CACHE // for mysqldump
#else
select_lex && select_lex->sql_cache == SELECT_LEX::SQL_NO_CACHE // for mysqldump
#endif
)
) {
use_pre_call = FALSE;
......
......@@ -9450,29 +9450,16 @@ int spider_mbase_handler::append_select(
wide_handler->lock_mode < 1)
{
/* no lock */
#ifdef SPIDER_SQL_CACHE_IS_IN_LEX
LEX *lex = wide_handler->trx->thd->lex;
#else
st_select_lex *select_lex =
&wide_handler->trx->thd->lex->select_lex;
#endif
if (
#ifdef SPIDER_SQL_CACHE_IS_IN_LEX
lex->sql_cache == LEX::SQL_CACHE &&
#else
select_lex->sql_cache == SELECT_LEX::SQL_CACHE &&
#endif
(spider->share->query_cache_sync & 1)
) {
if (str->reserve(SPIDER_SQL_SQL_CACHE_LEN))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
str->q_append(SPIDER_SQL_SQL_CACHE_STR, SPIDER_SQL_SQL_CACHE_LEN);
} else if (
#ifdef SPIDER_SQL_CACHE_IS_IN_LEX
lex->sql_cache == LEX::SQL_NO_CACHE &&
#else
select_lex->sql_cache == SELECT_LEX::SQL_NO_CACHE &&
#endif
(spider->share->query_cache_sync & 2)
) {
if (str->reserve(SPIDER_SQL_SQL_NO_CACHE_LEN))
......
......@@ -24,7 +24,6 @@
#define HANDLER_HAS_DIRECT_AGGREGATE
#define SPIDER_SQL_CACHE_IS_IN_LEX
#define SPIDER_LIKE_FUNC_HAS_GET_NEGATED
#define HA_HAS_CHECKSUM_EXTENDED
......
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