1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

autocommit 5.1->5.5

This commit is contained in:
Serge Kozlov
2011-04-14 00:48:09 +04:00
25 changed files with 62 additions and 527 deletions

View File

@ -0,0 +1,19 @@
SET AUTOCOMMIT=0;
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
SELECT COUNT(*) FROM t1;
COUNT(*)
1000
SHOW VARIABLES LIKE 'max_binlog_cache_size';
Variable_name Value
max_binlog_cache_size 4294963200
SET @saved_max_binlog_cache_size=@@max_binlog_cache_size;
SET GLOBAL max_binlog_cache_size=4096;
START TRANSACTION;
CREATE TABLE t2 SELECT * FROM t1;
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
COMMIT;
SHOW TABLES LIKE 't%';
Tables_in_test (t%)
t1
SET GLOBAL max_binlog_cache_size=@saved_max_binlog_cache_size;
DROP TABLE t1;

View File

@ -0,0 +1,10 @@
CREATE TABLE t1(id INT);
SHOW TABLES;
Tables_in_test
t1
FLUSH LOGS;
DROP TABLE t1;
SHOW TABLES;
Tables_in_test
t1
DROP TABLE t1;

View File

@ -0,0 +1,38 @@
#############################################################
# Bug#23533: CREATE SELECT max_binlog_cache_size test
# case needed
#############################################################
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/have_binlog_format_row.inc
SET AUTOCOMMIT=0;
# Create 1st table
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
--disable_query_log
let $i= 1000;
while ($i)
{
eval INSERT INTO t1 VALUES($i, REPEAT('x', 4096));
dec $i;
}
--enable_query_log
SELECT COUNT(*) FROM t1;
# Set small value for max_binlog_cache_size
SHOW VARIABLES LIKE 'max_binlog_cache_size';
SET @saved_max_binlog_cache_size=@@max_binlog_cache_size;
SET GLOBAL max_binlog_cache_size=4096;
# Copied data from t1 into t2 large than max_binlog_cache_size
START TRANSACTION;
--error 1197
CREATE TABLE t2 SELECT * FROM t1;
COMMIT;
SHOW TABLES LIKE 't%';
# 5.1 End of Test
SET GLOBAL max_binlog_cache_size=@saved_max_binlog_cache_size;
DROP TABLE t1;

View File

@ -0,0 +1 @@
--sql_mode=NO_BACKSLASH_ESCAPES

View File

@ -0,0 +1,30 @@
#
# BUG#36391 and BUG#38731
#
# The fix for BUG#20103 "Escaping with backslash does not work as expected"
# was implemented too greedy though in that it not only changes the behavior
# of backslashes within strings but in general, so disabling command shortcuts
# like \G or \C (which in turn leads to BUG#36391: "mysqlbinlog creates invalid charset statements".
#
# The test executes simple commands that are stored in the binary log and
# re-execute them through the mysql client which should have to process
# some command shortcuts. The backslashes within strings is disabled in the file
# rpl_bug36391-master.opt by the option --sql_mode=NO_BACKSLASH_ESCAPES.
#
#
--source include/have_log_bin.inc
--source include/have_binlog_format_mixed.inc
CREATE TABLE t1(id INT);
let $binlog= query_get_value(SHOW MASTER STATUS, File, 1);
let $binlog_path= `SELECT CONCAT(@@DATADIR, '$binlog')`;
SHOW TABLES;
FLUSH LOGS;
DROP TABLE t1;
--exec $MYSQL_BINLOG $binlog_path | $MYSQL test
SHOW TABLES;
# Clean up
DROP TABLE t1;