| 1 |
source include/have_log_bin.inc; |
| 2 |
source include/have_innodb.inc; |
| 3 |
|
| 4 |
let $engine = InnoDB; |
| 5 |
|
| 6 |
SET @old_binlog_format=@@binlog_format; |
| 7 |
|
| 8 |
SET BINLOG_FORMAT=ROW; |
| 9 |
RESET MASTER; |
| 10 |
|
| 11 |
source include/binlog_truncate.test; |
| 12 |
|
| 13 |
--echo # Even though the isolation level might be permissive, truncate |
| 14 |
--echo # table follows a stricter isolation as its locking is based on |
| 15 |
--echo # (exclusive) metadata locks. |
| 16 |
|
| 17 |
let $before_truncate = SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; |
| 18 |
source include/binlog_truncate.test; |
| 19 |
|
| 20 |
let $before_truncate = SET TRANSACTION ISOLATION LEVEL READ COMMITTED; |
| 21 |
source include/binlog_truncate.test; |
| 22 |
|
| 23 |
let $before_truncate = SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; |
| 24 |
source include/binlog_truncate.test; |
| 25 |
|
| 26 |
let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; |
| 27 |
source include/binlog_truncate.test; |
| 28 |
|
| 29 |
SET BINLOG_FORMAT=STATEMENT; |
| 30 |
RESET MASTER; |
| 31 |
|
| 32 |
source include/binlog_truncate.test; |
| 33 |
|
| 34 |
--echo # Truncate is not supported for SBR if the isolation level is |
| 35 |
--echo # READ UNCOMMITTED or READ COMMITTED. These specific isolation |
| 36 |
--echo # levels are tested elsewhere. |
| 37 |
|
| 38 |
let $before_truncate = SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; |
| 39 |
source include/binlog_truncate.test; |
| 40 |
|
| 41 |
let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; |
| 42 |
source include/binlog_truncate.test; |
| 43 |
|
| 44 |
SET @@global.binlog_format = @old_binlog_format; |
| 45 |
SET @@session.binlog_format = @old_binlog_format; |