You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Rename a limit var + change error message (#2946)
* Rename a limit var + change error message * Adjust the test
This commit is contained in:
@ -7097,14 +7097,15 @@ int processWhere(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, const s
|
|||||||
filters = extractCommonLeafConjunctionsToRoot(filters);
|
filters = extractCommonLeafConjunctionsToRoot(filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t limit = get_max_in_limit_query_length(gwi.thd);
|
uint64_t limit = get_max_allowed_in_values(gwi.thd);
|
||||||
|
|
||||||
if (filters && !checkFiltersLimit(filters, limit))
|
if (filters && !checkFiltersLimit(filters, limit))
|
||||||
{
|
{
|
||||||
gwi.fatalParseError = true;
|
gwi.fatalParseError = true;
|
||||||
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED,
|
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED,
|
||||||
"long in clauses. Query exceeds max_in_limit_query_length threshold: consider changing the "
|
" in clauses of this length. Number of values in the IN clause exceeded "
|
||||||
"value via SET @var_name := value;",
|
"columnstore_max_allowed_in_values "
|
||||||
|
"threshold.",
|
||||||
gwi);
|
gwi);
|
||||||
return ER_CHECK_NOT_IMPLEMENTED;
|
return ER_CHECK_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
@ -219,8 +219,8 @@ static MYSQL_THDVAR_STR(s3_secret, PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_MEMALLOC, "S
|
|||||||
NULL, NULL, "");
|
NULL, NULL, "");
|
||||||
static MYSQL_THDVAR_STR(s3_region, PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_MEMALLOC, "S3 region", NULL, NULL, "");
|
static MYSQL_THDVAR_STR(s3_region, PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_MEMALLOC, "S3 region", NULL, NULL, "");
|
||||||
|
|
||||||
static MYSQL_THDVAR_ULONG(max_in_limit_query_length, PLUGIN_VAR_RQCMDARG,
|
static MYSQL_THDVAR_ULONG(max_allowed_in_values, PLUGIN_VAR_RQCMDARG,
|
||||||
"The maximum length of the entries in the IN uery clause.", NULL, NULL, 6000, 1,
|
"The maximum length of the entries in the IN query clause.", NULL, NULL, 6000, 1,
|
||||||
~0U, 1);
|
~0U, 1);
|
||||||
|
|
||||||
st_mysql_sys_var* mcs_system_variables[] = {MYSQL_SYSVAR(compression_type),
|
st_mysql_sys_var* mcs_system_variables[] = {MYSQL_SYSVAR(compression_type),
|
||||||
@ -263,7 +263,7 @@ st_mysql_sys_var* mcs_system_variables[] = {MYSQL_SYSVAR(compression_type),
|
|||||||
MYSQL_SYSVAR(s3_secret),
|
MYSQL_SYSVAR(s3_secret),
|
||||||
MYSQL_SYSVAR(s3_region),
|
MYSQL_SYSVAR(s3_region),
|
||||||
MYSQL_SYSVAR(pron),
|
MYSQL_SYSVAR(pron),
|
||||||
MYSQL_SYSVAR(max_in_limit_query_length),
|
MYSQL_SYSVAR(max_allowed_in_values),
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
st_mysql_show_var mcs_status_variables[] = {{"columnstore_version", (char*)&cs_version, SHOW_CHAR},
|
st_mysql_show_var mcs_status_variables[] = {{"columnstore_version", (char*)&cs_version, SHOW_CHAR},
|
||||||
@ -660,11 +660,11 @@ void set_s3_region(THD* thd, char* value)
|
|||||||
THDVAR(thd, s3_region) = value;
|
THDVAR(thd, s3_region) = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ulong get_max_in_limit_query_length(THD* thd)
|
ulong get_max_allowed_in_values(THD* thd)
|
||||||
{
|
{
|
||||||
return (thd == NULL) ? 0 : THDVAR(thd, max_in_limit_query_length);
|
return (thd == NULL) ? 0 : THDVAR(thd, max_allowed_in_values);
|
||||||
}
|
}
|
||||||
void set_max_in_limit_query_length(THD* thd, ulong value)
|
void set_max_allowed_in_values(THD* thd, ulong value)
|
||||||
{
|
{
|
||||||
THDVAR(thd, max_in_limit_query_length) = value;
|
THDVAR(thd, max_allowed_in_values) = value;
|
||||||
}
|
}
|
@ -177,5 +177,5 @@ void set_s3_region(THD* thd, char* value);
|
|||||||
const char* get_pron(THD* thd);
|
const char* get_pron(THD* thd);
|
||||||
void set_pron(THD* thd, char* value);
|
void set_pron(THD* thd, char* value);
|
||||||
|
|
||||||
ulong get_max_in_limit_query_length(THD* thd);
|
ulong get_max_allowed_in_values(THD* thd);
|
||||||
void set_max_in_limit_query_length(THD* thd, ulong value);
|
void set_max_allowed_in_values(THD* thd, ulong value);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user