1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge pull request #2421 from denis0x0D/MCOL-4778

[MCOL-4778] Return if we have an error in push_down_init.
This commit is contained in:
Roman Nozdrin
2022-07-04 21:16:13 +03:00
committed by GitHub
3 changed files with 50 additions and 0 deletions

View File

@ -962,6 +962,9 @@ select_handler* create_columnstore_select_handler(THD* thd, SELECT_LEX* select_l
{ {
my_printf_error(ER_INTERNAL_ERROR, "%s", MYF(0), "Error occured in ha_mcs_impl_pushdown_init()"); my_printf_error(ER_INTERNAL_ERROR, "%s", MYF(0), "Error occured in ha_mcs_impl_pushdown_init()");
} }
// We had an error in `ha_mcs_impl_pushdown_init`, no need to continue execution of this query.
return handler;
} }
// Unset select_lex::first_cond_optimization // Unset select_lex::first_cond_optimization

View File

@ -0,0 +1,18 @@
DROP DATABASE IF EXISTS mcol_4778;
CREATE DATABASE mcol_4778;
USE mcol_4778;
CREATE TABLE bus_routes (origin varchar(50), dst varchar(50)) engine=columnstore;
INSERT INTO bus_routes VALUES
('New York', 'Boston'),
('Boston', 'New York'),
('New York', 'Washington'),
('Washington', 'Boston'),
('Washington', 'Raleigh');
WITH RECURSIVE bus_dst as (
SELECT origin as dst FROM bus_routes WHERE origin='New York'
UNION
SELECT bus_routes.dst FROM bus_routes JOIN bus_dst ON bus_dst.dst = bus_routes.origin
)
SELECT * FROM bus_dst;
ERROR 42000: The storage engine for the table doesn't support Recursive CTE
DROP DATABASE mcol_4778;

View File

@ -0,0 +1,29 @@
#
# MCOL-4778 Recursive CTE Crashing MariaDB - fix crash produce err.
#
-- source ../include/have_columnstore.inc
--disable_warnings
DROP DATABASE IF EXISTS mcol_4778;
--enable_warnings
CREATE DATABASE mcol_4778;
USE mcol_4778;
CREATE TABLE bus_routes (origin varchar(50), dst varchar(50)) engine=columnstore;
INSERT INTO bus_routes VALUES
('New York', 'Boston'),
('Boston', 'New York'),
('New York', 'Washington'),
('Washington', 'Boston'),
('Washington', 'Raleigh');
--error ER_CHECK_NOT_IMPLEMENTED
WITH RECURSIVE bus_dst as (
SELECT origin as dst FROM bus_routes WHERE origin='New York'
UNION
SELECT bus_routes.dst FROM bus_routes JOIN bus_dst ON bus_dst.dst = bus_routes.origin
)
SELECT * FROM bus_dst;
DROP DATABASE mcol_4778;