1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-9621 INSERT DELAYED fails on insert for tables with many columns

This fix also fixes a connection hang when trying to do INSERT DELAYED to a crashed table.

Added crash_mysqld.inc to allow easy crash+restart of mysqld
This commit is contained in:
Monty
2016-04-07 19:26:25 +03:00
parent 4b6a3518e4
commit 293cb04959
8 changed files with 119 additions and 8 deletions

View File

@@ -1,5 +1,12 @@
# delayed works differently in embedded server
--source include/not_embedded.inc
# Don't test this under valgrind, memory leaks will occur
--source include/not_valgrind.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
# Binary must be compiled with debug for crash to occur
--source include/have_debug_sync.inc
#
# test of DELAYED insert and timestamps
# (Can't be tested with purify :( )
@@ -629,3 +636,37 @@ disconnect con1;
--echo # Connection 'default'.
connection default;
drop tables tm, t1, t2;
--echo #
--echo # MDEV-9621 INSERT DELAYED fails on insert for tables with many columns
--echo #
CREATE TABLE t1 (
a int,b int,c int,d int,e int,f int,g int,h int,i int,j int,k int,l int,m int,n int,o int,p int,q int,r int,s int,t int,u int,v int,x int,y int,z int
) ENGINE=MyISAM;
INSERT DELAYED INTO t1 (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,x,y,z)
values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
INSERT DELAYED INTO t1 (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,x,y,z)
values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
drop table t1;
--echo #
--echo # INSERT DELAYED hangs if table was crashed
--echo #
create table t1 (a int, b int) engine=myisam;
insert into t1 values (1,1);
# Will come back with t1 crashed.
--source include/crash_mysqld.inc
call mtr.add_suppression(" marked as crashed and should be repaired");
call mtr.add_suppression("Checking table");
--replace_result '\\' '/'
insert delayed into t1 values (2,2);
insert delayed into t1 values (3,3);
flush tables t1;
select * from t1;
drop table t1;