From d02e2854ae348ef2ff22918f3ae8d8b4518acc37 Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Thu, 10 Oct 2024 18:53:07 +0200 Subject: [PATCH] Add test case --- .../columnstore/bugfixes/mcol-5703.result | 16 ++++++++++++ .../columnstore/bugfixes/mcol-5703.test | 26 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 mysql-test/columnstore/bugfixes/mcol-5703.result create mode 100644 mysql-test/columnstore/bugfixes/mcol-5703.test diff --git a/mysql-test/columnstore/bugfixes/mcol-5703.result b/mysql-test/columnstore/bugfixes/mcol-5703.result new file mode 100644 index 000000000..28e35bf4b --- /dev/null +++ b/mysql-test/columnstore/bugfixes/mcol-5703.result @@ -0,0 +1,16 @@ +DROP DATABASE IF EXISTS mcol5703; +CREATE DATABASE mcol5703; +USE mcol5703; +CREATE TABLE `doubles` ( +`a` int(11), +`b` int(11) +) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +INSERT INTO doubles VALUES (1, 2), (2, 4); +SELECT a, b FROM doubles UNION VALUES (3, 6); +ERROR 42000: The storage engine for the table doesn't support subquery with VALUES +SELECT a, b FROM doubles UNION ALL VALUES (3, 6); +ERROR 42000: The storage engine for the table doesn't support subquery with VALUES +SELECT a, b FROM doubles UNION DISTINCT VALUES (3, 6); +ERROR 42000: The storage engine for the table doesn't support subquery with VALUES +DROP TABLE doubles; +DROP DATABASE mcol5703; diff --git a/mysql-test/columnstore/bugfixes/mcol-5703.test b/mysql-test/columnstore/bugfixes/mcol-5703.test new file mode 100644 index 000000000..279392e81 --- /dev/null +++ b/mysql-test/columnstore/bugfixes/mcol-5703.test @@ -0,0 +1,26 @@ +--source ../include/have_columnstore.inc + +--disable_warnings +DROP DATABASE IF EXISTS mcol5703; +--enable_warnings + +CREATE DATABASE mcol5703; +USE mcol5703; + + +CREATE TABLE `doubles` ( + `a` int(11), + `b` int(11) +) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +INSERT INTO doubles VALUES (1, 2), (2, 4); + +--ERROR 1178 +SELECT a, b FROM doubles UNION VALUES (3, 6); +--ERROR 1178 +SELECT a, b FROM doubles UNION ALL VALUES (3, 6); +--ERROR 1178 +SELECT a, b FROM doubles UNION DISTINCT VALUES (3, 6); + +DROP TABLE doubles; +DROP DATABASE mcol5703; +