mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-35417 InnoDB crashes under ... AND DISABLE CHECKPOINT
restore pre-11.7 behavior when InnoDB was ignoring the "AND DISABLE CHECKPOINT" clause of FTWGRL. InnoDB isn't ready for it yet
This commit is contained in:
parent
8de5b58627
commit
61806af658
3 changed files with 59 additions and 0 deletions
|
@ -1854,3 +1854,24 @@ connection con2;
|
|||
disconnect con2;
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
# End of 10.4 tests
|
||||
#
|
||||
# MDEV-35417 InnoDB crashes under ... AND DISABLE CHECKPOINT
|
||||
#
|
||||
set global innodb_stats_persistent=0;
|
||||
create table t (a int) engine=innodb;
|
||||
set global innodb_stats_persistent=1;
|
||||
alter table t add column b int;
|
||||
flush tables with read lock and disable checkpoint;
|
||||
insert into t values (1,2) ;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
unlock tables;
|
||||
drop table t;
|
||||
flush tables with read lock and disable checkpoint;
|
||||
create temporary table t(a int) engine=innodb;
|
||||
unlock tables;
|
||||
drop table t;
|
||||
# restart: --innodb-read-only
|
||||
flush tables with read lock and disable checkpoint;
|
||||
# restart
|
||||
# End of 11.7 tests
|
||||
|
|
|
@ -2269,3 +2269,35 @@ reap;
|
|||
disconnect con2;
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35417 InnoDB crashes under ... AND DISABLE CHECKPOINT
|
||||
--echo #
|
||||
|
||||
# case 1
|
||||
set global innodb_stats_persistent=0;
|
||||
create table t (a int) engine=innodb;
|
||||
set global innodb_stats_persistent=1;
|
||||
alter table t add column b int;
|
||||
flush tables with read lock and disable checkpoint;
|
||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||
insert into t values (1,2) ;
|
||||
unlock tables;
|
||||
drop table t;
|
||||
|
||||
# case 2
|
||||
flush tables with read lock and disable checkpoint;
|
||||
create temporary table t(a int) engine=innodb;
|
||||
unlock tables;
|
||||
drop table t;
|
||||
|
||||
# case 3
|
||||
--let $restart_parameters=--innodb-read-only
|
||||
--source include/restart_mysqld.inc
|
||||
flush tables with read lock and disable checkpoint;
|
||||
--let $restart_parameters=
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--echo # End of 11.7 tests
|
||||
|
|
|
@ -1889,6 +1889,12 @@ static void sst_enable_innodb_writes()
|
|||
|
||||
static void innodb_disable_internal_writes(bool disable)
|
||||
{
|
||||
/*
|
||||
this works only in the SST donor thread and is not yet fixed
|
||||
to work in a normal connection thread
|
||||
*/
|
||||
if (thd_get_thread_id(current_thd)) // if normal thread
|
||||
return;
|
||||
if (disable)
|
||||
sst_disable_innodb_writes();
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue