1source include/have_log_bin.inc; 2source include/have_innodb.inc; 3 4let $engine = InnoDB; 5 6SET @old_binlog_format=@@binlog_format; 7 8SET BINLOG_FORMAT=ROW; 9RESET MASTER; 10 11source 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 17let $before_truncate = SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; 18source include/binlog_truncate.test; 19 20let $before_truncate = SET TRANSACTION ISOLATION LEVEL READ COMMITTED; 21source include/binlog_truncate.test; 22 23let $before_truncate = SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; 24source include/binlog_truncate.test; 25 26let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 27source include/binlog_truncate.test; 28 29SET BINLOG_FORMAT=STATEMENT; 30RESET MASTER; 31 32source 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 38let $before_truncate = SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; 39source include/binlog_truncate.test; 40 41let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 42source include/binlog_truncate.test; 43 44SET @@global.binlog_format = @old_binlog_format; 45SET @@session.binlog_format = @old_binlog_format;