| 1 |
Reset binlog and show no state held |
| 2 |
reset master; |
| 3 |
select count(1) from mysql.ndb_binlog_index; |
| 4 |
count(1) |
| 5 |
0 |
| 6 |
Create table for experiments |
| 7 |
use test; |
| 8 |
create table test.t1 (a int primary key, b varchar(1000), c text) engine=ndb; |
| 9 |
Basic test that an insert affects Server + Session epochs |
| 10 |
insert into test.t1 values (1, repeat("B", 1000), repeat("E", 500)); |
| 11 |
init_server_epoch_includes_session_epoch curr_server_epoch_includes_session_epoch server_epoch_does_not_regress session_epoch_does_not_regress |
| 12 |
1 1 1 1 |
| 13 |
binlog_contains_last_session_epoch |
| 14 |
1 |
| 15 |
Basic test that a read with exclusive lock has no effect |
| 16 |
begin; |
| 17 |
select count(1) from test.t1 where a=1 for update; |
| 18 |
count(1) |
| 19 |
1 |
| 20 |
commit; |
| 21 |
init_server_epoch_includes_session_epoch curr_server_epoch_includes_session_epoch server_epoch_does_not_regress session_epoch_does_not_regress |
| 22 |
1 1 1 1 |
| 23 |
binlog_contains_last_session_epoch |
| 24 |
0 |
| 25 |
Basic test that a read with shared lock has no effect |
| 26 |
begin; |
| 27 |
select count(1) from test.t1 where a=1 lock in share mode; |
| 28 |
count(1) |
| 29 |
1 |
| 30 |
commit; |
| 31 |
init_server_epoch_includes_session_epoch curr_server_epoch_includes_session_epoch server_epoch_does_not_regress session_epoch_does_not_regress |
| 32 |
1 1 1 1 |
| 33 |
binlog_contains_last_session_epoch |
| 34 |
0 |
| 35 |
Basic test that a committedread has no effect |
| 36 |
begin; |
| 37 |
select count(1) from test.t1 where a=1; |
| 38 |
count(1) |
| 39 |
1 |
| 40 |
commit; |
| 41 |
init_server_epoch_includes_session_epoch curr_server_epoch_includes_session_epoch server_epoch_does_not_regress session_epoch_does_not_regress |
| 42 |
1 1 1 1 |
| 43 |
binlog_contains_last_session_epoch |
| 44 |
0 |
| 45 |
Basic test that an update affects Server + Session epochs |
| 46 |
update test.t1 set b=repeat("E", 1000), c=repeat("A", 5000) where a=1; |
| 47 |
init_server_epoch_includes_session_epoch curr_server_epoch_includes_session_epoch server_epoch_does_not_regress session_epoch_does_not_regress |
| 48 |
1 1 1 1 |
| 49 |
binlog_contains_last_session_epoch |
| 50 |
1 |
| 51 |
Basic test that a delete affects Server + Session epochs |
| 52 |
delete from test.t1 where a=1; |
| 53 |
init_server_epoch_includes_session_epoch curr_server_epoch_includes_session_epoch server_epoch_does_not_regress session_epoch_does_not_regress |
| 54 |
1 1 1 1 |
| 55 |
binlog_contains_last_session_epoch |
| 56 |
1 |
| 57 |
Show that server epoch is preserved across connections |
| 58 |
but session epoch is not |
| 59 |
server_epoch_preserved |
| 60 |
1 |
| 61 |
session_epoch_reset |
| 62 |
1 |
| 63 |
drop table test.t1; |