[MDEV-7912] multitable delete with wrongly set sort_buffer_size crashes in merge_buffers Created: 2015-04-05  Updated: 2019-12-03  Resolved: 2015-04-28

Status: Closed
Project: MariaDB Server
Component/s: Data Manipulation - Delete, Platform Windows
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 5.5.43

Type: Bug Priority: Major
Reporter: sbester1 Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 0
Labels: verified
Environment:

Windows x64


Issue Links:
Problem/Incident
causes MDEV-21210 main.uniques_crash-7912 tries to allo... Closed
Relates
relates to MDEV-8068 64 bit Windows integer casts warnings Closed

 Description   

Version: '10.0.17-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
[ERROR] mysqld got exception 0xc0000005 ;
 
mysqld.exe!memcmp()[memcmp.asm:95]
mysqld.exe!queue_insert()[queues.c:206]
mysqld.exe!merge_buffers()[filesort.cc:1612]
mysqld.exe!merge_index()[filesort.cc:1818]
mysqld.exe!Unique::merge()[uniques.cc:730]
mysqld.exe!Unique::get()[uniques.cc:781]
mysqld.exe!multi_delete::do_deletes()[sql_delete.cc:1136]
mysqld.exe!multi_delete::send_eof()[sql_delete.cc:1252]
mysqld.exe!do_select()[sql_select.cc:17500]
mysqld.exe!JOIN::exec_inner()[sql_select.cc:3081]
mysqld.exe!JOIN::exec()[sql_select.cc:2372]
mysqld.exe!mysql_select()[sql_select.cc:3312]
mysqld.exe!mysql_execute_command()[sql_parse.cc:3624]
mysqld.exe!mysql_parse()[sql_parse.cc:6522]
mysqld.exe!dispatch_command()[sql_parse.cc:1303]
mysqld.exe!do_command()[sql_parse.cc:1003]
mysqld.exe!threadpool_process_request()[threadpool_common.cc:233]
mysqld.exe!io_completion_callback()[threadpool_win.cc:568]

How to repeat
-----------------

set sql_mode="";
drop table if exists t1,t2;
create table `t1` (`a` datetime not null) engine=innodb;
create table `t2` (`a` int not null) engine=innodb;
set session sort_buffer_size = 1024*1024*1024*1024;
replace into t1 values (),();
insert into t2 values(0);
delete d1, d2 from t2 as d1, t1 as d2 where d1.a<=>d2.a;



 Comments   
Comment by Elena Stepanova [ 2015-04-06 ]

As the Environment field states, it's a Windows problem. On Linux the scenario produces 'Out of memory' error, and life goes on.
It's possible the problem also exists in 5.3, I didn't have a Windows build handy; and it doesn't matter much anyway, we aren't going to fix it there.

Comment by Vicențiu Ciorbaru [ 2015-04-28 ]

Fixed with https://github.com/MariaDB/server/commit/ac2b92c4760c7aa111d3f115f9af40fc657e18ed

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