1
0
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:
Andrey Piskunov
2023-09-05 12:19:15 +03:00
committed by GitHub
parent 4172cf8e71
commit d586975da7
5 changed files with 16 additions and 15 deletions

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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