You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4334 Enable Select Handler for queries run inside Stored Procedures
There is another session variable to enable/disable SH in SP
This commit is contained in:
@ -747,13 +747,8 @@ create_columnstore_select_handler(THD* thd, SELECT_LEX* select_lex)
|
|||||||
|
|
||||||
// Check the session variable value to enable/disable use of
|
// Check the session variable value to enable/disable use of
|
||||||
// select_handler
|
// select_handler
|
||||||
if (!get_select_handler(thd))
|
if (!get_select_handler(thd) ||
|
||||||
{
|
((thd->lex)->sphead && !get_select_handler_in_stored_procedures(thd)))
|
||||||
return handler;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable SP support in the select_handler for now.
|
|
||||||
if ((thd->lex)->sphead)
|
|
||||||
{
|
{
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,15 @@ static MYSQL_THDVAR_BOOL(
|
|||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static MYSQL_THDVAR_BOOL(
|
||||||
|
select_handler_in_stored_procedures,
|
||||||
|
PLUGIN_VAR_NOCMDARG,
|
||||||
|
"Enable/Disable the MCS select_handler for Stored Procedures",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
1
|
||||||
|
);
|
||||||
|
|
||||||
static MYSQL_THDVAR_UINT(
|
static MYSQL_THDVAR_UINT(
|
||||||
orderby_threads,
|
orderby_threads,
|
||||||
PLUGIN_VAR_RQCMDARG,
|
PLUGIN_VAR_RQCMDARG,
|
||||||
@ -332,6 +341,7 @@ st_mysql_sys_var* mcs_system_variables[] =
|
|||||||
MYSQL_SYSVAR(select_handler),
|
MYSQL_SYSVAR(select_handler),
|
||||||
MYSQL_SYSVAR(derived_handler),
|
MYSQL_SYSVAR(derived_handler),
|
||||||
MYSQL_SYSVAR(group_by_handler),
|
MYSQL_SYSVAR(group_by_handler),
|
||||||
|
MYSQL_SYSVAR(select_handler_in_stored_procedures),
|
||||||
MYSQL_SYSVAR(orderby_threads),
|
MYSQL_SYSVAR(orderby_threads),
|
||||||
MYSQL_SYSVAR(decimal_scale),
|
MYSQL_SYSVAR(decimal_scale),
|
||||||
MYSQL_SYSVAR(use_decimal_scale),
|
MYSQL_SYSVAR(use_decimal_scale),
|
||||||
@ -419,6 +429,16 @@ void set_group_by_handler(THD* thd, bool value)
|
|||||||
THDVAR(thd, group_by_handler) = value;
|
THDVAR(thd, group_by_handler) = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get_select_handler_in_stored_procedures(THD* thd)
|
||||||
|
{
|
||||||
|
return ( thd == NULL ) ? true :
|
||||||
|
THDVAR(thd, select_handler_in_stored_procedures);
|
||||||
|
}
|
||||||
|
void set_select_handler_in_stored_procedures(THD* thd, bool value)
|
||||||
|
{
|
||||||
|
THDVAR(thd, select_handler_in_stored_procedures) = value;
|
||||||
|
}
|
||||||
|
|
||||||
void set_compression_type(THD* thd, ulong value)
|
void set_compression_type(THD* thd, ulong value)
|
||||||
{
|
{
|
||||||
THDVAR(thd, compression_type) = value;
|
THDVAR(thd, compression_type) = value;
|
||||||
|
@ -62,6 +62,9 @@ void set_derived_handler(THD* thd, bool value);
|
|||||||
bool get_group_by_handler(THD* thd);
|
bool get_group_by_handler(THD* thd);
|
||||||
void set_group_by_handler(THD* thd, bool value);
|
void set_group_by_handler(THD* thd, bool value);
|
||||||
|
|
||||||
|
bool get_select_handler_in_stored_procedures(THD* thd);
|
||||||
|
void set_select_handler_in_stored_procedures(THD* thd, bool value);
|
||||||
|
|
||||||
uint get_orderby_threads(THD* thd);
|
uint get_orderby_threads(THD* thd);
|
||||||
void set_orderby_threads(THD* thd, uint value);
|
void set_orderby_threads(THD* thd, uint value);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user