1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-16235 Server crashes in my_utf8_uni or in my_strtod_int

upon SELECT .. LIMIT 0

The code must differentiate between a SELECT with contradictory
WHERE/HAVING and one with LIMIT 0.
Also for the latter printed 'Zero limit' instead of 'Impossible where'
in the EXPLAIN output.
This commit is contained in:
Igor Babaev
2018-05-22 12:09:05 -07:00
parent 27a7365f42
commit 6a04c2a1aa
6 changed files with 46 additions and 7 deletions

View File

@ -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