summaryrefslogtreecommitdiff
path: root/mysql-test/main/limit.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/limit.test')
-rw-r--r--mysql-test/main/limit.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/limit.test b/mysql-test/main/limit.test
index 4dbe13096d4..668d3b74518 100644
--- a/mysql-test/main/limit.test
+++ b/mysql-test/main/limit.test
@@ -115,3 +115,17 @@ SELECT a FROM t1 ORDER BY a LIMIT 2 OFFSET 14;
DROP TABLE t1;
--echo End of 5.1 tests
+
+--echo #
+--echo # mdev-16235: SELECT over a table with LIMIT 0
+--echo #
+
+EXPLAIN
+SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
+SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
+
+EXPLAIN
+SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
+SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
+
+--echo End of 5.5 tests