File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -1854,3 +1854,24 @@ connection con2;
1854
1854
disconnect con2;
1855
1855
connection default;
1856
1856
SET DEBUG_SYNC= 'RESET';
1857
+ # End of 10.4 tests
1858
+ #
1859
+ # MDEV-35417 InnoDB crashes under ... AND DISABLE CHECKPOINT
1860
+ #
1861
+ set global innodb_stats_persistent=0;
1862
+ create table t (a int) engine=innodb;
1863
+ set global innodb_stats_persistent=1;
1864
+ alter table t add column b int;
1865
+ flush tables with read lock and disable checkpoint;
1866
+ insert into t values (1,2) ;
1867
+ ERROR HY000: Can't execute the query because you have a conflicting read lock
1868
+ unlock tables;
1869
+ drop table t;
1870
+ flush tables with read lock and disable checkpoint;
1871
+ create temporary table t(a int) engine=innodb;
1872
+ unlock tables;
1873
+ drop table t;
1874
+ # restart: --innodb-read-only
1875
+ flush tables with read lock and disable checkpoint;
1876
+ # restart
1877
+ # End of 11.7 tests
Original file line number Diff line number Diff line change @@ -2269,3 +2269,35 @@ reap;
2269
2269
disconnect con2;
2270
2270
connection default;
2271
2271
SET DEBUG_SYNC= 'RESET';
2272
+
2273
+ --echo # End of 10.4 tests
2274
+
2275
+ --echo #
2276
+ --echo # MDEV-35417 InnoDB crashes under ... AND DISABLE CHECKPOINT
2277
+ --echo #
2278
+
2279
+ # case 1
2280
+ set global innodb_stats_persistent=0;
2281
+ create table t (a int) engine=innodb;
2282
+ set global innodb_stats_persistent=1;
2283
+ alter table t add column b int;
2284
+ flush tables with read lock and disable checkpoint;
2285
+ --error ER_CANT_UPDATE_WITH_READLOCK
2286
+ insert into t values (1,2) ;
2287
+ unlock tables;
2288
+ drop table t;
2289
+
2290
+ # case 2
2291
+ flush tables with read lock and disable checkpoint;
2292
+ create temporary table t(a int) engine=innodb;
2293
+ unlock tables;
2294
+ drop table t;
2295
+
2296
+ # case 3
2297
+ --let $restart_parameters=--innodb-read-only
2298
+ --source include/restart_mysqld.inc
2299
+ flush tables with read lock and disable checkpoint;
2300
+ --let $restart_parameters=
2301
+ --source include/restart_mysqld.inc
2302
+
2303
+ --echo # End of 11.7 tests
Original file line number Diff line number Diff line change @@ -1889,6 +1889,12 @@ static void sst_enable_innodb_writes()
1889
1889
1890
1890
static void innodb_disable_internal_writes(bool disable)
1891
1891
{
1892
+ /*
1893
+ this works only in the SST donor thread and is not yet fixed
1894
+ to work in a normal connection thread
1895
+ */
1896
+ if (thd_get_thread_id(current_thd)) // if normal thread
1897
+ return;
1892
1898
if (disable)
1893
1899
sst_disable_innodb_writes();
1894
1900
else
You can’t perform that action at this time.
0 commit comments