Browse Source
Aria will now register it's transactions
Aria will now register it's transactions
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! 2ed35999f2
bb-10.5-aria
67 changed files with 3910 additions and 3678 deletions
-
15mysql-test/include/commit.inc
-
37mysql-test/main/backup_lock.result
-
30mysql-test/main/backup_lock.test
-
19mysql-test/main/commit_1innodb.result
-
6mysql-test/main/warnings_debug.result
-
2mysql-test/main/warnings_debug.test
-
54mysql-test/main/xa_binlog.result
-
35mysql-test/main/xa_binlog.test
-
159mysql-test/suite/handler/aria.result
-
161mysql-test/suite/handler/handler.inc
-
159mysql-test/suite/handler/heap.result
-
338mysql-test/suite/handler/innodb.result
-
1mysql-test/suite/handler/innodb.test
-
159mysql-test/suite/handler/myisam.result
-
182mysql-test/suite/handler/savepoint.inc
-
5mysql-test/suite/maria/maria-connect.result
-
1mysql-test/suite/maria/maria-connect.test
-
186mysql-test/suite/maria/rollback.result
-
51mysql-test/suite/maria/rollback.test
-
19mysql-test/suite/maria/transaction.result
-
26mysql-test/suite/maria/transaction.test
-
956mysql-test/suite/perfschema/r/event_aggregate.result
-
652mysql-test/suite/perfschema/r/event_aggregate_no_a.result
-
556mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
-
332mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
-
236mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
-
860mysql-test/suite/perfschema/r/event_aggregate_no_h.result
-
636mysql-test/suite/perfschema/r/event_aggregate_no_u.result
-
540mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
-
208mysql-test/suite/perfschema/r/transaction_nested_events.result
-
4mysql-test/suite/perfschema/t/transaction_nested_events.test
-
83sql/event_db_repository.cc
-
2sql/event_scheduler.cc
-
6sql/ha_partition.cc
-
27sql/handler.cc
-
42sql/handler.h
-
35sql/log.cc
-
2sql/log_event_server.cc
-
2sql/share/errmsg-utf8.txt
-
72sql/sp.cc
-
2sql/sp.h
-
59sql/sql_base.cc
-
5sql/sql_base.h
-
90sql/sql_class.cc
-
37sql/sql_class.h
-
6sql/sql_delete.cc
-
11sql/sql_help.cc
-
12sql/sql_insert.cc
-
4sql/sql_load.cc
-
60sql/sql_parse.cc
-
3sql/sql_sequence.cc
-
13sql/sql_show.cc
-
87sql/sql_statistics.cc
-
4sql/sql_trigger.cc
-
2sql/sql_truncate.cc
-
8sql/sql_update.cc
-
13sql/transaction.cc
-
13sql/tztime.cc
-
95storage/maria/ha_maria.cc
-
5storage/maria/ma_checkpoint.c
-
64storage/maria/ma_close.c
-
4storage/maria/ma_open.c
-
22storage/maria/ma_state.c
-
13storage/maria/maria_def.h
-
2storage/spider/spd_db_conn.cc
-
17storage/spider/spd_sys_table.cc
-
41storage/spider/spd_table.cc
@ -0,0 +1,182 @@ |
|||
--echo # |
|||
--echo # Testing savepoints with handlers that supports it |
|||
--echo # |
|||
connect(con1, localhost, root,,); |
|||
connect(con2, localhost, root,,); |
|||
connect(con3, localhost, root,,); |
|||
connection default; |
|||
--echo # |
|||
--echo # ROLLBACK TO SAVEPOINT releases transactional locks, |
|||
--echo # but has no effect on open HANDLERs |
|||
--echo # |
|||
create table t1 (a int, key a (a)); |
|||
insert into t1 (a) values (1), (2), (3), (4), (5); |
|||
create table t2 like t1; |
|||
create table t3 like t1; |
|||
begin; |
|||
--echo # Have something before the savepoint |
|||
select * from t3; |
|||
savepoint sv; |
|||
handler t1 open; |
|||
handler t1 read a first; |
|||
handler t1 read a next; |
|||
select * from t2; |
|||
connection con1; |
|||
--echo # Sending: |
|||
--send drop table t1 |
|||
connection con2; |
|||
--echo # Sending: |
|||
--send drop table t2 |
|||
connection default; |
|||
--echo # Let DROP TABLE statements sync in. We must use |
|||
--echo # a separate connection for that, because otherwise SELECT |
|||
--echo # will auto-close the HANDLERs, becaues there are pending |
|||
--echo # exclusive locks against them. |
|||
connection con3; |
|||
--echo # Waiting for 'drop table t1' to get blocked... |
|||
let $wait_condition=select count(*)=1 from information_schema.processlist |
|||
where state='Waiting for table metadata lock' and |
|||
info='drop table t1'; |
|||
--source include/wait_condition.inc |
|||
--echo # Waiting for 'drop table t2' to get blocked... |
|||
let $wait_condition=select count(*)=1 from information_schema.processlist |
|||
where state='Waiting for table metadata lock' and |
|||
info='drop table t2'; |
|||
--source include/wait_condition.inc |
|||
--echo # Demonstrate that t2 lock was released and t2 was dropped |
|||
--echo # after ROLLBACK TO SAVEPOINT |
|||
connection default; |
|||
rollback to savepoint sv; |
|||
connection con2; |
|||
--echo # Reaping 'drop table t2'... |
|||
--reap |
|||
--echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler |
|||
--echo # lock. |
|||
connection default; |
|||
handler t1 read a next; |
|||
handler t1 read a next; |
|||
--echo # Demonstrate that the drop will go through as soon as we close the |
|||
--echo # HANDLER |
|||
handler t1 close; |
|||
connection con1; |
|||
--echo # Reaping 'drop table t1'... |
|||
--reap |
|||
connection default; |
|||
commit; |
|||
drop table t3; |
|||
--echo # |
|||
--echo # A few special cases when using SAVEPOINT/ROLLBACK TO |
|||
--echo # SAVEPOINT and HANDLER. |
|||
--echo # |
|||
--echo # Show that rollback to the savepoint taken in the beginning |
|||
--echo # of the transaction doesn't release mdl lock on |
|||
--echo # the HANDLER that was opened later. |
|||
--echo # |
|||
create table t1 (a int, key using btree (a)); |
|||
insert into t1 (a) values (1), (2), (3), (4), (5); |
|||
create table t2 like t1; |
|||
begin; |
|||
savepoint sv; |
|||
handler t1 open; |
|||
handler t1 read a first; |
|||
handler t1 read a next; |
|||
select * from t2; |
|||
connection con1; |
|||
--echo # Sending: |
|||
--send drop table t1 |
|||
connection con2; |
|||
--echo # Sending: |
|||
--send drop table t2 |
|||
connection default; |
|||
--echo # Let DROP TABLE statements sync in. We must use |
|||
--echo # a separate connection for that, because otherwise SELECT |
|||
--echo # will auto-close the HANDLERs, becaues there are pending |
|||
--echo # exclusive locks against them. |
|||
connection con3; |
|||
--echo # Waiting for 'drop table t1' to get blocked... |
|||
let $wait_condition=select count(*)=1 from information_schema.processlist |
|||
where state='Waiting for table metadata lock' and |
|||
info='drop table t1'; |
|||
--source include/wait_condition.inc |
|||
--echo # Waiting for 'drop table t2' to get blocked... |
|||
let $wait_condition=select count(*)=1 from information_schema.processlist |
|||
where state='Waiting for table metadata lock' and |
|||
info='drop table t2'; |
|||
--source include/wait_condition.inc |
|||
--echo # Demonstrate that t2 lock was released and t2 was dropped |
|||
--echo # after ROLLBACK TO SAVEPOINT |
|||
connection default; |
|||
rollback to savepoint sv; |
|||
connection con2; |
|||
--echo # Reaping 'drop table t2'... |
|||
--reap |
|||
--echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler |
|||
--echo # lock. |
|||
connection default; |
|||
handler t1 read a next; |
|||
handler t1 read a next; |
|||
--echo # Demonstrate that the drop will go through as soon as we close the |
|||
--echo # HANDLER |
|||
handler t1 close; |
|||
connection con1; |
|||
--echo # Reaping 'drop table t1'... |
|||
--reap |
|||
connection default; |
|||
commit; |
|||
--echo # |
|||
--echo # Show that rollback to the savepoint taken in the beginning |
|||
--echo # of the transaction works properly (no valgrind warnins, etc), |
|||
--echo # even though it's done after the HANDLER mdl lock that was there |
|||
--echo # at the beginning is released and added again. |
|||
--echo # |
|||
create table t1 (a int, key using btree (a)); |
|||
insert into t1 (a) values (1), (2), (3), (4), (5); |
|||
create table t2 like t1; |
|||
create table t3 like t1; |
|||
insert into t3 (a) select a from t1; |
|||
begin; |
|||
handler t1 open; |
|||
savepoint sv; |
|||
handler t1 read a first; |
|||
select * from t2; |
|||
handler t1 close; |
|||
handler t3 open; |
|||
handler t3 read a first; |
|||
rollback to savepoint sv; |
|||
connection con1; |
|||
drop table t1, t2; |
|||
--echo # Sending: |
|||
--send drop table t3 |
|||
--echo # Let DROP TABLE statement sync in. |
|||
connection con2; |
|||
--echo # Waiting for 'drop table t3' to get blocked... |
|||
let $wait_condition=select count(*)=1 from information_schema.processlist |
|||
where state='Waiting for table metadata lock' and |
|||
info='drop table t3'; |
|||
--source include/wait_condition.inc |
|||
--echo # Demonstrate that ROLLBACK TO SAVEPOINT didn't release the handler |
|||
--echo # lock. |
|||
connection default; |
|||
handler t3 read a next; |
|||
--echo # Demonstrate that the drop will go through as soon as we close the |
|||
--echo # HANDLER |
|||
handler t3 close; |
|||
connection con1; |
|||
--echo # Reaping 'drop table t3'... |
|||
--reap |
|||
connection default; |
|||
commit; |
|||
|
|||
--echo # |
|||
--echo # Cleanup for savepoint.inc |
|||
--echo # |
|||
connection con1; |
|||
disconnect con1; |
|||
--source include/wait_until_disconnected.inc |
|||
connection con2; |
|||
disconnect con2; |
|||
--source include/wait_until_disconnected.inc |
|||
connection con3; |
|||
disconnect con3; |
|||
--source include/wait_until_disconnected.inc |
|||
connection default; |
|||
@ -0,0 +1,186 @@ |
|||
call mtr.add_suppression("Table '.*' is marked as crashed and should be repaired"); |
|||
call mtr.add_suppression("Checking table: .*"); |
|||
create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1; |
|||
create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0; |
|||
create sequence s1 cache=2 engine=aria; |
|||
insert into t1 (b) values (1),(2),(3),(4); |
|||
insert into t2 (b) values (1),(2),(3),(4); |
|||
select NEXT VALUE for s1,seq from seq_1_to_4; |
|||
NEXT VALUE for s1 seq |
|||
1 1 |
|||
2 2 |
|||
3 3 |
|||
4 4 |
|||
begin; |
|||
insert into t1 (b) values (5),(6); |
|||
insert into t1 (b) values (7),(8); |
|||
insert into t2 (b) values (5),(6); |
|||
insert into t2 (b) values (7),(8); |
|||
commit; |
|||
begin; |
|||
insert into t1 (b) values (10),(11),(12); |
|||
update t1 set b=100 where a=2; |
|||
delete from t1 where a between 3 and 4; |
|||
insert into t2 (b) values (10),(11),(12); |
|||
update t2 set b=100 where a=2; |
|||
delete from t2 where a between 3 and 4; |
|||
select NEXT VALUE for s1,seq from seq_1_to_4; |
|||
NEXT VALUE for s1 seq |
|||
5 1 |
|||
6 2 |
|||
7 3 |
|||
8 4 |
|||
# Kill and restart |
|||
select * from t1 order by a; |
|||
a b |
|||
1 1 |
|||
2 100 |
|||
5 5 |
|||
6 6 |
|||
7 7 |
|||
8 8 |
|||
9 10 |
|||
10 11 |
|||
11 12 |
|||
select * from t2 order by a; |
|||
a b |
|||
1 1 |
|||
2 100 |
|||
5 5 |
|||
6 6 |
|||
7 7 |
|||
8 8 |
|||
9 10 |
|||
10 11 |
|||
11 12 |
|||
Warnings: |
|||
Error 145 Table './test/t2' is marked as crashed and should be repaired |
|||
Warning 1034 1 client is using or hasn't closed the table properly |
|||
Note 1034 Table is fixed |
|||
insert into t1 (b) values (100),(200); |
|||
insert into t2 (b) values (100),(200); |
|||
select * from t1 order by a; |
|||
a b |
|||
1 1 |
|||
2 100 |
|||
5 5 |
|||
6 6 |
|||
7 7 |
|||
8 8 |
|||
9 10 |
|||
10 11 |
|||
11 12 |
|||
12 100 |
|||
13 200 |
|||
select * from t2 order by a; |
|||
a b |
|||
1 1 |
|||
2 100 |
|||
5 5 |
|||
6 6 |
|||
7 7 |
|||
8 8 |
|||
9 10 |
|||
10 11 |
|||
11 12 |
|||
12 100 |
|||
13 200 |
|||
select NEXT VALUE for s1,seq from seq_1_to_4; |
|||
NEXT VALUE for s1 seq |
|||
9 1 |
|||
10 2 |
|||
11 3 |
|||
12 4 |
|||
Warnings: |
|||
Error 145 Table './test/s1' is marked as crashed and should be repaired |
|||
Warning 1034 1 client is using or hasn't closed the table properly |
|||
Note 1034 Table is fixed |
|||
drop table t1,t2; |
|||
drop sequence s1; |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Table \'.*\' is marked as crashed and should be repaired' COLLATE 'latin1_swedish_ci')) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Checking table: .*' COLLATE 'latin1_swedish_ci')) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # GTID #-#-# |
|||
master-bin.000001 # Query # # use `test`; create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1 |
|||
master-bin.000001 # Gtid # # GTID #-#-# |
|||
master-bin.000001 # Query # # use `test`; create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0 |
|||
master-bin.000001 # Gtid # # GTID #-#-# |
|||
master-bin.000001 # Query # # use `test`; create sequence s1 cache=2 engine=aria |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=1 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 (b) values (1),(2),(3),(4) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=1 |
|||
master-bin.000001 # Query # # use `test`; insert into t2 (b) values (1),(2),(3),(4) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Annotate_rows # # select NEXT VALUE for s1,seq from seq_1_to_4 |
|||
master-bin.000001 # Table_map # # table_id: # (test.s1) |
|||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=5 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 (b) values (5),(6) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=7 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 (b) values (7),(8) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=5 |
|||
master-bin.000001 # Query # # use `test`; insert into t2 (b) values (5),(6) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=7 |
|||
master-bin.000001 # Query # # use `test`; insert into t2 (b) values (7),(8) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=9 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 (b) values (10),(11),(12) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Query # # use `test`; update t1 set b=100 where a=2 |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Query # # use `test`; delete from t1 where a between 3 and 4 |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Intvar # # INSERT_ID=9 |
|||
master-bin.000001 # Query # # use `test`; insert into t2 (b) values (10),(11),(12) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Query # # use `test`; update t2 set b=100 where a=2 |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Query # # use `test`; delete from t2 where a between 3 and 4 |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000001 # Annotate_rows # # select NEXT VALUE for s1,seq from seq_1_to_4 |
|||
master-bin.000001 # Table_map # # table_id: # (test.s1) |
|||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Query # # COMMIT |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000002 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000002 # Intvar # # INSERT_ID=12 |
|||
master-bin.000002 # Query # # use `test`; insert into t1 (b) values (100),(200) |
|||
master-bin.000002 # Query # # COMMIT |
|||
master-bin.000002 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000002 # Intvar # # INSERT_ID=12 |
|||
master-bin.000002 # Query # # use `test`; insert into t2 (b) values (100),(200) |
|||
master-bin.000002 # Query # # COMMIT |
|||
master-bin.000002 # Gtid # # BEGIN GTID #-#-# |
|||
master-bin.000002 # Annotate_rows # # select NEXT VALUE for s1,seq from seq_1_to_4 |
|||
master-bin.000002 # Table_map # # table_id: # (test.s1) |
|||
master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
master-bin.000002 # Query # # COMMIT |
|||
master-bin.000002 # Gtid # # GTID #-#-# |
|||
master-bin.000002 # Query # # use `test`; DROP TABLE `t1`,`t2` /* generated by server */ |
|||
master-bin.000002 # Gtid # # GTID #-#-# |
|||
master-bin.000002 # Query # # use `test`; DROP SEQUENCE `s1` /* generated by server */ |
|||
@ -0,0 +1,51 @@ |
|||
--source include/have_binlog_format_mixed_or_statement.inc |
|||
--source include/have_sequence.inc |
|||
# no-protocol doesn't print warnings about repaired tables |
|||
--source include/no_protocol.inc |
|||
|
|||
call mtr.add_suppression("Table '.*' is marked as crashed and should be repaired"); |
|||
call mtr.add_suppression("Checking table: .*"); |
|||
|
|||
# |
|||
# Testing rollback after crash |
|||
# |
|||
|
|||
create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1; |
|||
create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0; |
|||
create sequence s1 cache=2 engine=aria; |
|||
|
|||
insert into t1 (b) values (1),(2),(3),(4); |
|||
insert into t2 (b) values (1),(2),(3),(4); |
|||
select NEXT VALUE for s1,seq from seq_1_to_4; |
|||
|
|||
begin; |
|||
insert into t1 (b) values (5),(6); |
|||
insert into t1 (b) values (7),(8); |
|||
insert into t2 (b) values (5),(6); |
|||
insert into t2 (b) values (7),(8); |
|||
commit; |
|||
begin; |
|||
insert into t1 (b) values (10),(11),(12); |
|||
update t1 set b=100 where a=2; |
|||
delete from t1 where a between 3 and 4; |
|||
|
|||
insert into t2 (b) values (10),(11),(12); |
|||
update t2 set b=100 where a=2; |
|||
delete from t2 where a between 3 and 4; |
|||
select NEXT VALUE for s1,seq from seq_1_to_4; |
|||
|
|||
--source include/kill_and_restart_mysqld.inc |
|||
|
|||
select * from t1 order by a; |
|||
select * from t2 order by a; |
|||
insert into t1 (b) values (100),(200); |
|||
insert into t2 (b) values (100),(200); |
|||
select * from t1 order by a; |
|||
select * from t2 order by a; |
|||
select NEXT VALUE for s1,seq from seq_1_to_4; |
|||
drop table t1,t2; |
|||
drop sequence s1; |
|||
|
|||
source include/show_binlog_events.inc; |
|||
--let $binlog_file=master-bin.000002 |
|||
source include/show_binlog_events.inc; |
|||
@ -0,0 +1,19 @@ |
|||
connect con1, localhost, root,,; |
|||
connection default; |
|||
CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) |
|||
ENGINE = aria; |
|||
START TRANSACTION; |
|||
INSERT INTO t1 (c1) VALUES (2); |
|||
INSERT INTO t1 (c1) VALUES (4); |
|||
connection con1; |
|||
START TRANSACTION; |
|||
select * from t1; |
|||
c1 |
|||
2 |
|||
4 |
|||
select * from t1 where c1=2; |
|||
c1 |
|||
2 |
|||
disconnect con1; |
|||
connection default; |
|||
drop table t1; |
|||
@ -0,0 +1,26 @@ |
|||
# |
|||
# Test that checks transactions and MVCC |
|||
# |
|||
|
|||
# |
|||
# This is a taken from parts.partition_auto_increment_maria. It originally |
|||
# crashde because con1 could read the first record from t1, which confused |
|||
# the optimizer. |
|||
# |
|||
|
|||
connect(con1, localhost, root,,); |
|||
connection default; |
|||
CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) |
|||
ENGINE = aria; |
|||
START TRANSACTION; |
|||
INSERT INTO t1 (c1) VALUES (2); |
|||
INSERT INTO t1 (c1) VALUES (4); |
|||
connection con1; |
|||
START TRANSACTION; |
|||
# When Aria proparly supports MVCC, the following two queries will not see |
|||
# any rows |
|||
select * from t1; |
|||
select * from t1 where c1=2; |
|||
disconnect con1; |
|||
connection default; |
|||
drop table t1; |
|||
956
mysql-test/suite/perfschema/r/event_aggregate.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
652
mysql-test/suite/perfschema/r/event_aggregate_no_a.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
556
mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
332
mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
860
mysql-test/suite/perfschema/r/event_aggregate_no_h.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
636
mysql-test/suite/perfschema/r/event_aggregate_no_u.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
540
mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue