mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-22726: Add check that one can't change general or slow log to a
transactional engine
This commit is contained in:
@ -259,6 +259,12 @@ Warning 1286 Unknown storage engine 'NonExistentEngine'
|
|||||||
alter table mysql.slow_log engine=memory;
|
alter table mysql.slow_log engine=memory;
|
||||||
ERROR HY000: Storage engine MEMORY cannot be used for log tables
|
ERROR HY000: Storage engine MEMORY cannot be used for log tables
|
||||||
set storage_engine= @save_storage_engine;
|
set storage_engine= @save_storage_engine;
|
||||||
|
ALTER TABLE mysql.general_log ENGINE=Aria;
|
||||||
|
ERROR HY000: Only non-transactional Aria table can be used for logging
|
||||||
|
ALTER TABLE mysql.general_log ENGINE=Aria transactional = 0;
|
||||||
|
ALTER TABLE mysql.slow_log ENGINE=Aria;
|
||||||
|
ERROR HY000: Only non-transactional Aria table can be used for logging
|
||||||
|
ALTER TABLE mysql.slow_log ENGINE=Aria transactional = 0;
|
||||||
drop table mysql.slow_log;
|
drop table mysql.slow_log;
|
||||||
drop table mysql.general_log;
|
drop table mysql.general_log;
|
||||||
drop table mysql.general_log;
|
drop table mysql.general_log;
|
||||||
|
@ -269,6 +269,14 @@ alter table mysql.slow_log engine=memory;
|
|||||||
#alter table mysql.slow_log engine=blackhole;
|
#alter table mysql.slow_log engine=blackhole;
|
||||||
set storage_engine= @save_storage_engine;
|
set storage_engine= @save_storage_engine;
|
||||||
|
|
||||||
|
# Make sure only non-transactional Aria table can be used for logging
|
||||||
|
--error ER_TRANSACTIONAL_ARIA_LOG_ENGINE
|
||||||
|
ALTER TABLE mysql.general_log ENGINE=Aria;
|
||||||
|
ALTER TABLE mysql.general_log ENGINE=Aria transactional = 0;
|
||||||
|
--error ER_TRANSACTIONAL_ARIA_LOG_ENGINE
|
||||||
|
ALTER TABLE mysql.slow_log ENGINE=Aria;
|
||||||
|
ALTER TABLE mysql.slow_log ENGINE=Aria transactional = 0;
|
||||||
|
|
||||||
drop table mysql.slow_log;
|
drop table mysql.slow_log;
|
||||||
drop table mysql.general_log;
|
drop table mysql.general_log;
|
||||||
|
|
||||||
|
@ -7731,3 +7731,5 @@ ER_GEOJSON_EMPTY_COORDINATES
|
|||||||
|
|
||||||
ER_MYROCKS_CANT_NOPAD_COLLATION
|
ER_MYROCKS_CANT_NOPAD_COLLATION
|
||||||
eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
|
eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
|
||||||
|
ER_TRANSACTIONAL_ARIA_LOG_ENGINE
|
||||||
|
eng "Only non-transactional Aria table can be used for logging"
|
||||||
|
@ -8925,6 +8925,13 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||||||
DBUG_RETURN(true);
|
DBUG_RETURN(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (create_info->db_type == maria_hton &&
|
||||||
|
create_info->transactional != HA_CHOICE_NO)
|
||||||
|
{
|
||||||
|
my_error(ER_TRANSACTIONAL_ARIA_LOG_ENGINE, MYF(0));
|
||||||
|
DBUG_RETURN(true);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||||
if (alter_info->flags & Alter_info::ALTER_PARTITION)
|
if (alter_info->flags & Alter_info::ALTER_PARTITION)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user