diff options
author | Igor Babaev <igor@askmonty.org> | 2018-05-22 12:09:05 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-05-22 12:09:05 -0700 |
commit | 6a04c2a1aa60e67c07d4e6ada63f65cc3b26a5a9 (patch) | |
tree | c602e72328a69ad6a77856040a237fd1ec6e3853 /mysql-test/r/limit.result | |
parent | 27a7365f42ce0184a004e09b3bb1cadb868c8f64 (diff) | |
download | mariadb-git-6a04c2a1aa60e67c07d4e6ada63f65cc3b26a5a9.tar.gz |
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.
Diffstat (limited to 'mysql-test/r/limit.result')
-rw-r--r-- | mysql-test/r/limit.result | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result index 176a93c7a46..deb4ca2ab95 100644 --- a/mysql-test/r/limit.result +++ b/mysql-test/r/limit.result @@ -146,3 +146,19 @@ a 16 DROP TABLE t1; End of 5.1 tests +# +# mdev-16235: SELECT over a table with LIMIT 0 +# +EXPLAIN +SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit +SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0; +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +EXPLAIN +SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit +SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0; +help_topic_id name help_category_id description example url +End of 5.5 tests |