[MDEV-12262] Assertion `!null_value' failed in virtual bool Item::send on JSON_REMOVE Created: 2017-03-14  Updated: 2017-03-20  Resolved: 2017-03-20

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: 10.2
Fix Version/s: 10.2.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: 10.2-ga

Issue Links:
Relates
Sprint: 10.2.6-1

 Description   

10.2 a77c2ea78f76c

mysqld: /data/src/10.2/sql/item.cc:6889: virtual bool Item::send(Protocol*, String*): Assertion `!null_value' failed.
170315  0:38:42 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fce6da1e312 in __GI___assert_fail (assertion=0x7fce70e36dc8 "!null_value", file=0x7fce70e36450 "/data/src/10.2/sql/item.cc", line=6889, function=0x7fce70e397a0 <Item::send(Protocol*, String*)::__PRETTY_FUNCTION__> "virtual bool Item::send(Protocol*, String*)") at assert.c:101
#8  0x00007fce7058c097 in Item::send (this=0x7fce64c645b0, protocol=0x7fce64c16608, buffer=0x7fce714134f0) at /data/src/10.2/sql/item.cc:6889
#9  0x00007fce702351d6 in Protocol::send_result_set_row (this=0x7fce64c16608, row_items=0x7fce64c1a3a8) at /data/src/10.2/sql/protocol.cc:979
#10 0x00007fce702b5f26 in select_send::send_data (this=0x7fce64c64e08, items=...) at /data/src/10.2/sql/sql_class.cc:2760
#11 0x00007fce7036cb86 in end_send (join=0x7fce64c64e28, join_tab=0x7fce64c66780, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:19582
#12 0x00007fce7036a703 in evaluate_join_record (join=0x7fce64c64e28, join_tab=0x7fce64c663d0, error=0) at /data/src/10.2/sql/sql_select.cc:18639
#13 0x00007fce7036a1b3 in sub_select (join=0x7fce64c64e28, join_tab=0x7fce64c663d0, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18456
#14 0x00007fce703695b7 in do_select (join=0x7fce64c64e28, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:17961
#15 0x00007fce703445cb in JOIN::exec_inner (this=0x7fce64c64e28) at /data/src/10.2/sql/sql_select.cc:3463
#16 0x00007fce70343ad0 in JOIN::exec (this=0x7fce64c64e28) at /data/src/10.2/sql/sql_select.cc:3266
#17 0x00007fce70344c43 in mysql_select (thd=0x7fce64c16070, tables=0x7fce64c64720, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fce64c64e08, unit=0x7fce64c19b50, select_lex=0x7fce64c1a280) at /data/src/10.2/sql/sql_select.cc:3658
#18 0x00007fce70339724 in handle_select (thd=0x7fce64c16070, lex=0x7fce64c19a88, result=0x7fce64c64e08, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
#19 0x00007fce70305b6d in execute_sqlcom_select (thd=0x7fce64c16070, all_tables=0x7fce64c64720) at /data/src/10.2/sql/sql_parse.cc:6415
#20 0x00007fce702fbb9a in mysql_execute_command (thd=0x7fce64c16070) at /data/src/10.2/sql/sql_parse.cc:3448
#21 0x00007fce70309540 in mysql_parse (thd=0x7fce64c16070, rawbuf=0x7fce64c64088 "SELECT j, p, json_remove(j, p) FROM t", length=37, parser_state=0x7fce71414dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7858
#22 0x00007fce702f7606 in dispatch_command (command=COM_QUERY, thd=0x7fce64c16070, packet=0x7fce64c58071 "", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1812
#23 0x00007fce702f5f76 in do_command (thd=0x7fce64c16070) at /data/src/10.2/sql/sql_parse.cc:1362
#24 0x00007fce7043ef47 in do_handle_one_connection (connect=0x7fce6d065410) at /data/src/10.2/sql/sql_connect.cc:1354
#25 0x00007fce7043ecd4 in handle_one_connection (arg=0x7fce6d065410) at /data/src/10.2/sql/sql_connect.cc:1260
#26 0x00007fce708571fc in pfs_spawn_thread (arg=0x7fce6d0499f0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
#27 0x00007fce6f920064 in start_thread (arg=0x7fce71416300) at pthread_create.c:309
#28 0x00007fce6dad862d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Test case

CREATE TABLE t (j longtext, p longtext);
INSERT INTO t VALUES
  ('{"a":1,"b":2,"c":3}','$.a'),
  ('{"a":1,"b":2,"c":3}','$.b'),
  ('{"a":1,"b":2,"c":3}','$.c');
SELECT j, p, json_remove(j, p) FROM t;
DROP TABLE t;



 Comments   
Comment by Alexey Botchkov [ 2017-03-20 ]

http://lists.askmonty.org/pipermail/commits/2017-March/010897.html

Generated at Thu Feb 08 07:56:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.