1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-12363 Assertion `0' failed in Type_handler_string_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*).

maybe_null wasn't properly set for Item_json_func_keys.
This commit is contained in:
Alexey Botchkov
2017-05-02 15:47:43 +04:00
parent 4a484e7a20
commit 3ea9d3e59e
3 changed files with 27 additions and 0 deletions

View File

@ -287,3 +287,12 @@ SELECT JSON_SEARCH('{"foo":"bar"}', 'all' , @str, '%', @path);
SELECT JSON_VALUE('[{"foo": 1},"bar"]', '$[*][0]');
#
# MDEV-12363 Assertion `0' failed in Type_handler_string_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*)
#
CREATE TABLE t1 (f INT NOT NULL);
INSERT INTO t1 VALUES (0);
SELECT JSON_KEYS(f) FROM t1 ORDER BY 1;
DROP TABLE t1;