The attached query ("crashing_select...sql") on the attached Columnstore table (see "create_tables_...sql") using the exported data ("ebi_es_op_or...csv") immediately crashes Columnstore engine when executed.
Result: ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query
When the table is InnoDB (suffix "_innodb") it works flawlessly ("working_select...sql")
Side note: query is generated by a third-party BI tool, where we have no possibility to change the way it generates the SQL queries to avoid such big IN-clauses.
TBD: solution :
The currently proposed solution: Introduction of a new runtime variable defined as
MariaDB [test]> show variables like 'columnstore_max_in%';
1 row in set (0.001 sec)
which is a limit for the maximum length of an IN query measure in number of values .
If the query is longer, an error is signaled:
ERROR 1178 (42000): The storage engine for the table doesn't support long in clauses. Query exceeds max_in_limit_query_length threshold: consider changing the value via SET @var_name := value;
If there are multiple IN clauses in query, the limit is checked against the longest.
The default value is a subject to be determined, right now it is 6000 items.
Right now this has a possible side effect of possibly limiting some of the OR clauses as well, but I have not managed to find one.