Re: [Maria-developers] 97f7d4a9b4d: MDEV-22726: Add check that one can't change general or slow log to a
Hi, Vlad! On Jun 25, Vlad Lesin wrote:
revision-id: 97f7d4a9b4d (mariadb-10.2.31-290-g97f7d4a9b4d) parent(s): e3104c4a8c6 author: Vlad Lesin <vlad_lesin@mail.ru> committer: Vlad Lesin <vlad_lesin@mail.ru> timestamp: 2020-06-24 14:37:54 +0300 message:
MDEV-22726: Add check that one can't change general or slow log to a transactional engine
the commit subject should be in one line (and I personally only put one space between the MDEV number and the text, not a colon, because the subject length is quite limited to waste it on pretty delimiters that don't add any meaningful information)
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index ff495f69a4f..8db992c7501 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7731,3 +7731,5 @@ ER_GEOJSON_EMPTY_COORDINATES
ER_MYROCKS_CANT_NOPAD_COLLATION 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"
No, sorry, you cannot add new error messages in 10.2. Or 10.3 or 10.4. Because adding a new error message to anything below 10.5 would mean that 10.5 error numbers will shift and we aren't allowed to do it for compatibility reasons. The typical workaround is to use my_print_error(ER_something_else, "Only non-transactional Aria table can be used for logging"); (with the appropriate error number, MYF(0), etc)
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 7cce3bcc323..b3a600eec36 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -8925,6 +8925,13 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, 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); + }
What about InnoDB? Or RocksDB? Or any other transactional engine?
#ifdef WITH_PARTITION_STORAGE_ENGINE if (alter_info->flags & Alter_info::ALTER_PARTITION) {
Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org
participants (1)
-
Sergei Golubchik