1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

parse_item() in execplan code now always get an actual GWI structure

to avoid accedental crashes.

Add check for Conversion of Big IN Predicates Into Subqueries optimization
conditions.

Enabled derivedTableOptimization() for group by and derived handlers.

Disabled Conversion of Big IN Predicates Into Subqueries optimization.

Disabled most of optimizer_flags for now.

RowGroup + operator now correctly sets useStringTable flag that
instructs code to check StringStore instead of plain data buffer.
This commit is contained in:
Roman Nozdrin
2019-07-26 23:39:51 +03:00
committed by Gagan Goel
parent 7d5275e1bd
commit d62b66ecf7
8 changed files with 119 additions and 44 deletions

View File

@ -58,6 +58,21 @@ static MYSQL_THDVAR_ULONGLONG(
1
);
// optimizer flags vault
static MYSQL_THDVAR_ULONGLONG(
original_optimizer_flags,
PLUGIN_VAR_NOSYSVAR | PLUGIN_VAR_NOCMDOPT,
"Vault for original optimizer flags. For internal usage.",
NULL,
NULL,
0,
0,
~0U,
1
);
// legacy system variables
static MYSQL_THDVAR_ULONG(
decimal_scale,
@ -240,6 +255,7 @@ st_mysql_sys_var* mcs_system_variables[] =
{
MYSQL_SYSVAR(compression_type),
MYSQL_SYSVAR(fe_conn_info_ptr),
MYSQL_SYSVAR(original_optimizer_flags),
MYSQL_SYSVAR(decimal_scale),
MYSQL_SYSVAR(use_decimal_scale),
MYSQL_SYSVAR(ordered_only),
@ -275,14 +291,20 @@ void set_fe_conn_info_ptr(void* ptr, THD* thd)
THDVAR(current_thd, fe_conn_info_ptr) = (uint64_t)(ptr);
}
bool get_use_legacy_sysvars(THD* thd)
ulonglong get_original_optimizer_flags(THD* thd)
{
return ( thd == NULL ) ? false : THDVAR(thd, use_legacy_sysvars);
return ( current_thd == NULL && thd == NULL ) ? NULL :
THDVAR(current_thd, original_optimizer_flags);
}
void set_use_legacy_sysvars(THD* thd, bool value)
void set_original_optimizer_flags(ulonglong ptr, THD* thd)
{
THDVAR(thd, use_legacy_sysvars) = value;
if ( current_thd == NULL && thd == NULL)
{
return;
}
THDVAR(current_thd, original_optimizer_flags) = (uint64_t)(ptr);
}
void set_compression_type(THD* thd, ulong value)