InSub::handleFunc() was incorrectly exiting early for an IN subquery
containing an isnull predicate in the OR operation in the WHERE clause.
This patch properly handles the OR predicate containing an isnull/isnotnull
predicate in the WHERE clause. We don't remove the isnull operand from the
filter ParseTree in 6.x as the server no longer injects the isnull predicate
in the IN subquery due to MCOL-4617, where we moved the creation and injection
of in-to-exists predicate into the engine.
Some MTR test still failed when running without --extern
Fixing the following problems:
- Changing "--exec mariadb" to "--exect $MYSQL" to properly pass the socket
- Changing ./suite/columnstore/std_data/ to MTR_SUITE_DIR/../std_data/
- Changing "cpimport" to $MCS_CPIMPORT.
Detecting and exporting a proper $MCS_CPIMPORT in suite.pm
in the query projection list.
With this patch, we enable SELECT/DERIVED handler execution for
queries involving 'get_user_var' function. Whereas for 'set_user_var'
function, the handlers are still disabled and the query execution
fallsback to the server, except for some edges case described in
the test file mcol-4410.test, in which case, an appropriate error
message is returned to the client.
Main theme of the patch is to fix joins processing in the plugin
code. We now use SELECT_LEX::top_join_list and process the nested
joins recursively, instead of SELECT_LEX::table_list struct which
we earlier used to build the join filters. The earlier approach
did not process certain nested join ON expressions, causing certain
queries to incorrectly error out such as that described in MCOL-4680.
In addition, some legacy code is also removed.
In this patch, we set the unioned type to a wide decimal, if any of the
numeric columns involved in the union operation have a precision > 18
(which is also possible for BIGINT/UBIGINT types) and <= 38.
We earlier leveraged the server functionality provided by
Item_in_subselect::create_in_to_exists_cond and
Item_in_subselect::inject_in_to_exists_cond
to create and inject the in-to-exists predicate into an IN
subquery's JOIN struct. With this patch, we leave the IN subquery's
JOIN unaltered and instead directly perform this predicate creation
and injection into ColumnStore's select execution plan.
This patch fixes failures in mtr (without --remote) in the following tests:
columnstore/basic.mcs88_import_export_csv
columnstore/basic.mcs47_cpimport_central_loc_sin_source
columnstore/basic.mcs49_cpimport_parallel_dist
columnstore/basic.mcs50_cpimport_stdin
columnstore/basic.mcs55_cpimport_binary_source
columnstore/basic.mcs56_cpimport_negative
columnstore/basic.mcs68_cpimport_datafile_separators
Also fixing the problem with missing UDFs for the affected tests.
(see MCOL-4659 for details):
When mtr runs without --remote, the UDFs must be installed inside
the test using CREATE FUNCTION.
Note, there are still more tests left with missing UDFs. They'll be
fixed separately.