Commit 0e1381d8 authored by Sergei Golubchik's avatar Sergei Golubchik

lpbug#665028 SHOW STORAGE ENGINES shows incorrect Transaction support for Aria

don't fill in handlerton::commit member, as it's not used
and makes MySQL believe that Aria is transactional.
Fix the TRANSACTIONAL=1 warning.
parent 01d7b4b6
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA"; select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
Aria YES Crash-safe tables with MyISAM heritage YES NO NO Aria YES Crash-safe tables with MyISAM heritage NO NO NO
set global storage_engine=aria; set global storage_engine=aria;
set session storage_engine=aria; set session storage_engine=aria;
set global aria_page_checksum=0; set global aria_page_checksum=0;
......
select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA"; select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
Aria YES Crash-safe tables with MyISAM heritage YES NO NO Aria YES Crash-safe tables with MyISAM heritage NO NO NO
set global storage_engine=aria; set global storage_engine=aria;
set session storage_engine=aria; set session storage_engine=aria;
set global aria_page_checksum=0; set global aria_page_checksum=0;
......
...@@ -3929,12 +3929,16 @@ bool mysql_create_table_no_lock(THD *thd, ...@@ -3929,12 +3929,16 @@ bool mysql_create_table_no_lock(THD *thd,
} }
/* Give warnings for not supported table options */ /* Give warnings for not supported table options */
if (create_info->transactional && !file->ht->commit) #if defined(WITH_ARIA_STORAGE_ENGINE)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, extern handlerton *maria_hton;
ER_ILLEGAL_HA_CREATE_OPTION, if (file->ht != maria_hton)
ER(ER_ILLEGAL_HA_CREATE_OPTION), #endif
file->engine_name()->str, if (create_info->transactional)
"TRANSACTIONAL=1"); push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
file->engine_name()->str,
"TRANSACTIONAL=1");
VOID(pthread_mutex_lock(&LOCK_open)); VOID(pthread_mutex_lock(&LOCK_open));
if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE)) if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
......
...@@ -3302,6 +3302,9 @@ static int ha_maria_init(void *p) ...@@ -3302,6 +3302,9 @@ static int ha_maria_init(void *p)
maria_hton->panic= maria_hton_panic; maria_hton->panic= maria_hton_panic;
maria_hton->commit= maria_commit; maria_hton->commit= maria_commit;
maria_hton->rollback= maria_rollback; maria_hton->rollback= maria_rollback;
#ifdef MARIA_CANNOT_ROLLBACK
maria_hton->commit= 0;
#endif
maria_hton->flush_logs= maria_flush_logs; maria_hton->flush_logs= maria_flush_logs;
maria_hton->show_status= maria_show_status; maria_hton->show_status= maria_show_status;
/* TODO: decide if we support Maria being used for log tables */ /* TODO: decide if we support Maria being used for log tables */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment