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