[MDEV-13970] crash in Item_func_json_extract::read_json Created: 2017-09-30  Updated: 2017-12-25  Resolved: 2017-12-25

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: 10.2.9
Fix Version/s: 10.2.12

Type: Bug Priority: Major
Reporter: sbester1 Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None
Environment:

Win64


Sprint: 10.2.12

 Description   

Version: '10.2.9-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
mysqld.exe!String::append()[sql_string.cc:451]
mysqld.exe!Item_func_json_extract::read_json()[item_jsonfunc.cc:782]
mysqld.exe!Item_func_json_extract::val_int()[item_jsonfunc.cc:881]
mysqld.exe!evaluate_join_record()[sql_select.cc:18661]
mysqld.exe!sub_select()[sql_select.cc:18563]
mysqld.exe!do_select()[sql_select.cc:18107]
mysqld.exe!JOIN::exec_inner()[sql_select.cc:3485]
mysqld.exe!JOIN::exec()[sql_select.cc:3279]
mysqld.exe!mysql_select()[sql_select.cc:3680]
mysqld.exe!handle_select()[sql_select.cc:361]
mysqld.exe!execute_sqlcom_select()[sql_parse.cc:6434]
mysqld.exe!mysql_execute_command()[sql_parse.cc:3461]
mysqld.exe!mysql_parse()[sql_parse.cc:7880]
mysqld.exe!dispatch_command()[sql_parse.cc:1814]
mysqld.exe!do_command()[sql_parse.cc:1359]
mysqld.exe!threadpool_process_request()[threadpool_common.cc:366]
mysqld.exe!tp_callback()[threadpool_common.cc:192]

How to repeat

drop table if exists t;
create table t(a double not null)engine=innodb;
insert into t values (2),(1);
select 1 from t where json_extract(a,'$','$[81]');



 Comments   
Comment by Elena Stepanova [ 2017-09-30 ]

Thanks for the report and test case.

Comment by Alexey Botchkov [ 2017-12-25 ]

http://lists.askmonty.org/pipermail/commits/2017-December/011762.html

Generated at Thu Feb 08 08:09:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.