mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-16421 Make system tables crash safe
Make all system tables in mysql directory of type engine=Aria Privilege tables are using transactional=1 Statistical tables are using transactional=0, to allow them to be quickly updated with low overhead. Help tables are also using transactional=0 as these are only updated at init time. Other changes: - Aria store engine is now a required engine - Update comment for Aria tables to reflect their new usage - Fixed that _ma_reset_trn_for_table() removes unlocked table from transaction table list. This was needed to allow one to lock and unlock system tables separately from other tables, for example when reading a procedure from mysql.proc - Don't give a warning when using transactional=1 for engines that is using transactions. This is both logical and also to avoid warnings/errors when doing an alter of a privilege table to InnoDB. - Don't abort on warnings from ALTER TABLE for changes that would be accepted by CREATE TABLE. - New created Aria transactional tables are marked as not movable (as they include create_rename_lsn). - bootstrap.test was changed to kill orignal server, as one can't anymore have two servers started at same time on same data directory and data files. - Disable maria.small_blocksize as one can't anymore change aria block size after system tables are created. - Speed up creation of help tables by using lock tables. - wsrep_sst_resync now also copies Aria redo logs.
This commit is contained in:
@ -4260,11 +4260,9 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
||||
}
|
||||
|
||||
/* Give warnings for not supported table options */
|
||||
#if defined(WITH_ARIA_STORAGE_ENGINE)
|
||||
extern handlerton *maria_hton;
|
||||
if (file->partition_ht() != maria_hton)
|
||||
#endif
|
||||
if (create_info->transactional)
|
||||
if (file->partition_ht() != maria_hton && create_info->transactional &&
|
||||
!file->has_transaction_manager())
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
ER_THD(thd, ER_ILLEGAL_HA_CREATE_OPTION),
|
||||
@ -9563,8 +9561,6 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
|
||||
}
|
||||
|
||||
DEBUG_SYNC(thd, "alter_table_before_create_table_no_lock");
|
||||
/* We can abort alter table for any table type */
|
||||
thd->abort_on_warning= !ignore && thd->is_strict_mode();
|
||||
|
||||
/*
|
||||
Create .FRM for new version of table with a temporary name.
|
||||
@ -9594,7 +9590,6 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
|
||||
C_ALTER_TABLE_FRM_ONLY, NULL,
|
||||
&key_info, &key_count, &frm);
|
||||
reenable_binlog(thd);
|
||||
thd->abort_on_warning= false;
|
||||
if (unlikely(error))
|
||||
{
|
||||
my_free(const_cast<uchar*>(frm.str));
|
||||
|
Reference in New Issue
Block a user