diff options
author | Eugene Kosov <eugene.kosov@mariadb.com> | 2020-06-27 12:30:17 +0300 |
---|---|---|
committer | Eugene Kosov <eugene.kosov@mariadb.com> | 2020-06-27 12:52:08 +0300 |
commit | e4cff9a85565d0183ab53601c1cef462f5f45fe5 (patch) | |
tree | 7c421e25bd3808882b22c2fc255e8ae9630d53ef /storage/innobase/fil/fil0fil.cc | |
parent | 52c4abbff2ec4b97d6c69f238457bf759591ce15 (diff) | |
download | mariadb-git-e4cff9a85565d0183ab53601c1cef462f5f45fe5.tar.gz |
MDEV-19298 Assertion `space->id != 0xFFFFFFFEU || space == fil_system.temp_space' failed in Check::validate upon crash upgrade from 10.2.22
This issue is pretty much the same as MDEV-20213.
The fix is similar to:
3c238ac51c21dd0b7ba410012cf317298873c0c2
52c4abbff2ec4b97d6c69f238457bf759591ce15
Check::validate(): fix a debug assertion
SysTablespace::open_or_create(): protect assigning to a shared
variable with a mutex
Diffstat (limited to 'storage/innobase/fil/fil0fil.cc')
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 1c3ef644782..fc91d10cab6 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -4641,11 +4641,20 @@ struct Check { Check check; ut_list_validate(space->chain, check); ut_a(space->size == check.size); - ut_ad(space->id != TRX_SYS_SPACE - || space == fil_system.sys_space - || fil_system.sys_space == NULL); - ut_ad(space->id != SRV_TMP_SPACE_ID - || space == fil_system.temp_space); + + switch (space->id) { + case TRX_SYS_SPACE: + ut_ad(fil_system.sys_space == NULL + || fil_system.sys_space == space); + break; + case SRV_TMP_SPACE_ID: + ut_ad(fil_system.temp_space == NULL + || fil_system.temp_space == space); + break; + default: + break; + } + return(check.n_open); } }; |