diff --git a/dbms/tests/queries/0_stateless/01011_show_tables_limit.reference b/dbms/tests/queries/0_stateless/01011_show_tables_limit.reference new file mode 100644 index 00000000000..4d33d4016db --- /dev/null +++ b/dbms/tests/queries/0_stateless/01011_show_tables_limit.reference @@ -0,0 +1,15 @@ +*** Should show 6: *** +test1 +test2 +test3 +test4 +test5 +test6 +*** Should show 2: *** +test1 +test2 +*** Should show 4: *** +test1 +test2 +test3 +test4 diff --git a/dbms/tests/queries/0_stateless/01011_show_tables_limit.sql b/dbms/tests/queries/0_stateless/01011_show_tables_limit.sql new file mode 100644 index 00000000000..f75ba88cf2b --- /dev/null +++ b/dbms/tests/queries/0_stateless/01011_show_tables_limit.sql @@ -0,0 +1,20 @@ +DROP DATABASE IF EXISTS test_show_limit; + +CREATE DATABASE test_show_limit; + +CREATE TABLE test_show_limit.test1 (test UInt8) ENGINE = TinyLog; +CREATE TABLE test_show_limit.test2 (test UInt8) ENGINE = TinyLog; +CREATE TABLE test_show_limit.test3 (test UInt8) ENGINE = TinyLog; +CREATE TABLE test_show_limit.test4 (test UInt8) ENGINE = TinyLog; +CREATE TABLE test_show_limit.test5 (test UInt8) ENGINE = TinyLog; +CREATE TABLE test_show_limit.test6 (test UInt8) ENGINE = TinyLog; + +SELECT '*** Should show 6: ***'; +SHOW TABLES FROM test_show_limit; +SELECT '*** Should show 2: ***'; +SHOW TABLES FROM test_show_limit LIMIT 2; +SELECT '*** Should show 4: ***'; +SHOW TABLES FROM test_show_limit LIMIT 2 * 2; + +DROP DATABASE test_show_limit; +