-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-7912 multitable delete with wrongly set sort_buffer_size crashes…
… in merge_buffers Fixed overflow error that caused fewer bites to be allocated than necessary on Windows 64 bit. This is due to ulong being 32 bit on 64 bit Windows and 64 bit on 64 bit Linux.
- Loading branch information
Showing
3 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set sql_mode=""; | ||
drop table if exists t1,t2; | ||
Warnings: | ||
Note 1051 Unknown table 't1' | ||
Note 1051 Unknown table 't2' | ||
create table `t1` (`a` datetime not null) engine=InnoDB; | ||
create table `t2` (`a` int not null) engine=innodb; | ||
replace into t1 values (),(); | ||
Warnings: | ||
Warning 1364 Field 'a' doesn't have a default value | ||
insert into t2 values(0); | ||
set session sort_buffer_size = 1024*1024*1024*1024; | ||
SET session debug_dbug= '+d,make_merge_buff_alloc_fail'; | ||
delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; | ||
ERROR HY000: Out of memory (Needed 2 bytes) | ||
SET SESSION debug_dbug=DEFAULT; | ||
drop table t2; | ||
drop table t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# MDEV-7912 | ||
# multitable delete with wrongly set sort_buffer_size crashes in merge_buffers | ||
--source include/have_innodb.inc | ||
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; | ||
|
||
replace into t1 values (),(); | ||
insert into t2 values(0); | ||
set session sort_buffer_size = 1024*1024*1024*1024; | ||
SET session debug_dbug= '+d,make_merge_buff_alloc_fail'; | ||
--error 5 #EE_OUTOFMEMORY | ||
delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; | ||
SET SESSION debug_dbug=DEFAULT; | ||
|
||
drop table t2; | ||
drop table t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters