mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SQL: MDEV-14633 Assertion on TRT read [fixes #406]
This commit is contained in:
@ -368,9 +368,15 @@ create or replace table t2 (b int);
|
|||||||
create or replace view v1 as select a, sys_trx_start, sys_trx_end from t1 where a > round(rand()*1000);
|
create or replace view v1 as select a, sys_trx_start, sys_trx_end from t1 where a > round(rand()*1000);
|
||||||
select * from v1 natural join t2;
|
select * from v1 natural join t2;
|
||||||
a b
|
a b
|
||||||
|
### Issue #406, MDEV-14633 Assertion on TRT read
|
||||||
|
create or replace table t1 (pk int primary key, i int, t time, key (i)) with system versioning;
|
||||||
|
insert into t1 values (1, 10, '15:01:53'), (2, 20, '00:00:00');
|
||||||
|
delete from t1;
|
||||||
|
select * from t1 where t = '00:00:00' and i > 0 and sys_trx_end <> '2012-12-12 00:00:00';
|
||||||
|
pk i t
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
call innodb_verify_vtq(32);
|
call innodb_verify_vtq(34);
|
||||||
No A B C D
|
No A B C D
|
||||||
1 1 1 1 1
|
1 1 1 1 1
|
||||||
2 1 1 1 1
|
2 1 1 1 1
|
||||||
@ -404,3 +410,5 @@ No A B C D
|
|||||||
30 1 1 1 1
|
30 1 1 1 1
|
||||||
31 1 1 1 1
|
31 1 1 1 1
|
||||||
32 1 1 1 1
|
32 1 1 1 1
|
||||||
|
33 1 1 1 1
|
||||||
|
34 1 1 1 1
|
||||||
|
@ -254,9 +254,17 @@ create or replace table t2 (b int);
|
|||||||
create or replace view v1 as select a, sys_trx_start, sys_trx_end from t1 where a > round(rand()*1000);
|
create or replace view v1 as select a, sys_trx_start, sys_trx_end from t1 where a > round(rand()*1000);
|
||||||
select * from v1 natural join t2;
|
select * from v1 natural join t2;
|
||||||
|
|
||||||
|
--echo ### Issue #406, MDEV-14633 Assertion on TRT read
|
||||||
|
create or replace table t1 (pk int primary key, i int, t time, key (i)) with system versioning;
|
||||||
|
insert into t1 values (1, 10, '15:01:53'), (2, 20, '00:00:00');
|
||||||
|
delete from t1;
|
||||||
|
--disable_warnings
|
||||||
|
select * from t1 where t = '00:00:00' and i > 0 and sys_trx_end <> '2012-12-12 00:00:00';
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
|
||||||
call innodb_verify_vtq(32);
|
call innodb_verify_vtq(34);
|
||||||
|
|
||||||
-- source suite/versioning/common_finish.inc
|
-- source suite/versioning/common_finish.inc
|
||||||
|
@ -5736,7 +5736,14 @@ lock_table_wait:
|
|||||||
|
|
||||||
normal_return:
|
normal_return:
|
||||||
/*-------------------------------------------------------------*/
|
/*-------------------------------------------------------------*/
|
||||||
|
{
|
||||||
|
/* handler_index_cond_check() may pull TR_table search
|
||||||
|
which initates another row_search_mvcc(). */
|
||||||
|
ulint n_active_thrs= trx->lock.n_active_thrs;
|
||||||
|
trx->lock.n_active_thrs= 1;
|
||||||
que_thr_stop_for_mysql_no_error(thr, trx);
|
que_thr_stop_for_mysql_no_error(thr, trx);
|
||||||
|
trx->lock.n_active_thrs= n_active_thrs - 1;
|
||||||
|
}
|
||||||
|
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user