mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
4102f1589c
MDEV-22531 Remove maria::implicit_commit() MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in MYSQL_BIN_LOG::unlog_xa_prepare From the handler point of view, Aria now looks like a transactional engine. One effect of this is that we don't need to call maria::implicit_commit() anymore. This change also forces the server to call trans_commit_stmt() after doing any read or writes to system tables. This work will also make it easier to later allow users to have system tables in other engines than Aria. To handle the case that Aria doesn't support rollback, a new handlerton flag, HTON_NO_ROLLBACK, was added to engines that has transactions without rollback (for the moment only binlog and Aria). Other things - Moved freeing of MARIA_SHARE to a separate function as the MARIA_SHARE can be still part of a transaction even if the table has closed. - Changed Aria checkpoint to use the new MARIA_SHARE free function. This fixes a possible memory leak when using S3 tables - Changed testing of binlog_hton to instead test for HTON_NO_ROLLBACK - Removed checking of has_transaction_manager() in handler.cc as we can assume that as the transaction was started by the engine, it does support transactions. - Added new class 'start_new_trans' that can be used to start indepdendent sub transactions, for example while reading mysql.proc, using help or status tables etc. - open_system_tables...() and open_proc_table_for_Read() doesn't anymore take a Open_tables_backup list. This is now handled by 'start_new_trans'. - Split thd::has_transactions() to thd::has_transactions() and thd::has_transactions_and_rollback() - Added handlerton code to free cached transactions objects. Needed by InnoDB. squash! 2ed35999f2a2d84f1c786a21ade5db716b6f1bbc
47 lines
1 KiB
Text
47 lines
1 KiB
Text
#
|
|
# Test that can't be run with --extern
|
|
#
|
|
|
|
-- source include/have_maria.inc
|
|
-- source include/have_log_bin.inc
|
|
-- source include/binlog_start_pos.inc
|
|
|
|
let $start_pos= `select @binlog_start_pos`;
|
|
|
|
let $default=`select @@global.default_storage_engine`;
|
|
set global default_storage_engine=aria;
|
|
set session default_storage_engine=aria;
|
|
|
|
# Initialise
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
SET SQL_WARNINGS=1;
|
|
|
|
#
|
|
# UNIQUE key test
|
|
#
|
|
# as long as aria cannot rollback, binlog should contain both inserts
|
|
#
|
|
RESET MASTER;
|
|
set binlog_format=statement;
|
|
CREATE TABLE t1 (a int primary key);
|
|
insert t1 values (1),(2),(3);
|
|
--error ER_DUP_ENTRY
|
|
insert t1 values (4),(2),(5);
|
|
show warnings;
|
|
select * from t1;
|
|
--replace_result $start_pos <start_pos>
|
|
--replace_column 2 # 5 #
|
|
eval SHOW BINLOG EVENTS FROM $start_pos;
|
|
drop table t1;
|
|
set binlog_format=default;
|
|
|
|
# End of 5.2 tests
|
|
|
|
--disable_result_log
|
|
--disable_query_log
|
|
eval set global default_storage_engine=$default;
|
|
set global aria_log_file_size=default;
|
|
--enable_result_log
|
|
--enable_query_log
|