1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE

vers_insert_history_row(): do not insert rows with zero or negative lifetime.

mysql_update(): properly handle error from vers_insert_history_row()
This commit is contained in:
Eugene Kosov
2018-02-02 15:01:53 +03:00
committed by Sergei Golubchik
parent 75afaa7e00
commit edeeaac451
7 changed files with 67 additions and 15 deletions

View File

@@ -620,6 +620,20 @@ create or replace table t1 (a int primary key, b int)
with system versioning engine myisam;
insert into t1 (a) values (1);
replace t1 values (1,2),(1,3),(2,4);
ERROR 23000: Duplicate entry '1-YYYY-MM-DD hh:mm:ss.uuuuuu' for key 'PRIMARY'
create or replace table t1 (pk int, a char(3), b char(3), primary key(pk))
engine=innodb with system versioning;
insert into t1 (pk) values (1);
connect con1,localhost,root,,test;
start transaction;
select * from t1 for update;
pk a b
1 NULL NULL
connection default;
update t1 set b = 'foo';
connection con1;
update t1 set a = 'bar';
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
disconnect con1;
connection default;
drop database test;
create database test;