Skip to content

Commit f391ab4

Browse files
author
Alexey Botchkov
committed
MDEV-11438 Assertion `null_value' failed in Item::send(Protocol*, String*) upon casting NULL as JSON.
test added.
1 parent f105014 commit f391ab4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

mysql-test/r/func_json.result

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ json_object("a", '{"b": "abcd"}')
244244
select json_object("a", cast('{"b": "abcd"}' as json));
245245
json_object("a", cast('{"b": "abcd"}' as json))
246246
{"a": {"b": "abcd"}}
247+
select cast(NULL AS JSON);
248+
cast(NULL AS JSON)
249+
NULL
247250
select json_depth(cast(NULL as JSON));
248251
json_depth(cast(NULL as JSON))
249252
NULL

mysql-test/t/func_json.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,6 @@ select json_object("a", json_object("b", "abcd"));
108108
select json_object("a", '{"b": "abcd"}');
109109
select json_object("a", cast('{"b": "abcd"}' as json));
110110

111+
select cast(NULL AS JSON);
111112
select json_depth(cast(NULL as JSON));
112113

0 commit comments

Comments
 (0)