1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/bugfixes/mcol-4453-4455.test

37 lines
963 B
Plaintext

-- source ../include/have_columnstore.inc
-- disable_warnings
DROP DATABASE IF EXISTS mcol_4453_4455;
-- enable_warnings
CREATE DATABASE mcol_4453_4455;
USE mcol_4453_4455;
CREATE TABLE `t1` (
a INT
) ENGINE=ColumnStore;
INSERT INTO t1 (a) VALUES (3), (3), (2), (1), (2);
# MCOL-4453 test case, `LIMIT 0` should return empty set
SELECT a FROM t1 LIMIT 0;
SELECT a FROM t1 LIMIT 1,0;
SELECT DISTINCT a FROM t1 LIMIT 0;
SELECT DISTINCT a FROM t1 LIMIT 1,0;
SELECT a FROM t1 ORDER BY 1 LIMIT 0;
SELECT a FROM t1 ORDER BY 1 LIMIT 1,0;
# MCOL-4455 test case, `SELECT DISTINCT ... LIMIT O,N` should skip first O rows
SELECT DISTINCT a FROM t1;
SELECT DISTINCT a FROM t1 LIMIT 0,2;
SELECT DISTINCT a FROM t1 LIMIT 1,2;
SELECT DISTINCT a FROM t1 LIMIT 2,2;
SELECT DISTINCT a FROM t1 LIMIT 3,2;
SELECT DISTINCT a FROM t1 LIMIT 1,1;
SELECT DISTINCT a FROM t1 LIMIT 2,1;
SELECT DISTINCT a FROM t1 LIMIT 3,1;
# cleanup
DROP TABLE t1;
DROP DATABASE mcol_4453_4455;