mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
Merge branch '5.5' into 10.1
This commit is contained in:
@@ -52,3 +52,30 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
RESET MASTER;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
|
||||
# WITH TEMPORARY TABLE -> ERRORS
|
||||
# Test case for DELETE query.
|
||||
RESET MASTER;
|
||||
# Set up.
|
||||
SET @save_binlog_format= @@session.binlog_format;
|
||||
SET @@session.binlog_format=STATEMENT;
|
||||
CREATE TABLE t1 (a INT) ENGINE=INNODB;
|
||||
SET @@session.binlog_format=STATEMENT;
|
||||
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
|
||||
DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
|
||||
DROP TABLE t1;
|
||||
# DELETE query fails with table re-open error without patch.
|
||||
# Clean up.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET MASTER;
|
||||
# Test case for DROP query.
|
||||
CREATE TABLE t1 (a INT) ENGINE=INNODB;
|
||||
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1;
|
||||
# DROP table query fails with unknown table error without patch.
|
||||
# Clean up
|
||||
SET @@session.binlog_format= @save_binlog_format;
|
||||
RESET MASTER;
|
||||
|
@@ -80,3 +80,30 @@ master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
|
||||
RESET MASTER;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
|
||||
# WITH TEMPORARY TABLE -> ERRORS
|
||||
# Test case for DELETE query.
|
||||
RESET MASTER;
|
||||
# Set up.
|
||||
SET @save_binlog_format= @@session.binlog_format;
|
||||
SET @@session.binlog_format=STATEMENT;
|
||||
CREATE TABLE t1 (a INT) ENGINE=INNODB;
|
||||
SET @@session.binlog_format=STATEMENT;
|
||||
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
|
||||
DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
|
||||
DROP TABLE t1;
|
||||
# DELETE query fails with table re-open error without patch.
|
||||
# Clean up.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET MASTER;
|
||||
# Test case for DROP query.
|
||||
CREATE TABLE t1 (a INT) ENGINE=INNODB;
|
||||
CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1;
|
||||
# DROP table query fails with unknown table error without patch.
|
||||
# Clean up
|
||||
SET @@session.binlog_format= @save_binlog_format;
|
||||
RESET MASTER;
|
||||
|
@@ -621,6 +621,130 @@ c1 c2
|
||||
3 3
|
||||
4 4
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#15851528 DUPLICATE KEY ERROR ON AUTO-INC PK WITH MIXED AUTO_INCREMENT_INCREMENT CLIENTS
|
||||
#
|
||||
# This test shows that the next record to be inserted is not affected
|
||||
# by a change in auto_increment_increment.
|
||||
# In addition, current value of auto_increment_increment by the client
|
||||
# that uses the existing autoinc value with be used to set next autoinc
|
||||
# value, which will be used by next client reguardless of its own session
|
||||
# setting for auto_increment_increment.
|
||||
#
|
||||
# Client 1: Insert a record with auto_increment_increment=2
|
||||
CREATE TABLE t(
|
||||
a SERIAL PRIMARY KEY,
|
||||
b VARCHAR(200)) ENGINE=InnoDB;
|
||||
SET SESSION auto_increment_increment=2;
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(b) VALUES('S1');
|
||||
SELECT a,b FROM t;
|
||||
a b
|
||||
1 S1
|
||||
# Client 2: Insert records with auto_increment_increment 2,1
|
||||
SET SESSION auto_increment_increment=2;
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(b) VALUES('S2');
|
||||
SELECT a,b FROM t;
|
||||
a b
|
||||
1 S1
|
||||
3 S2
|
||||
SET SESSION auto_increment_increment=1;
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(b) VALUES('S2');
|
||||
SELECT a,b FROM t;
|
||||
a b
|
||||
1 S1
|
||||
3 S2
|
||||
4 S2
|
||||
# Client 1: Insert a record with auto_increment_increment=1
|
||||
SET SESSION auto_increment_increment=1;
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(b) VALUES('S1');
|
||||
SELECT a,b FROM t;
|
||||
a b
|
||||
1 S1
|
||||
3 S2
|
||||
4 S2
|
||||
5 S1
|
||||
DROP TABLE t;
|
||||
# Autoincrement behaviour with mixed insert.
|
||||
CREATE TABLE t(
|
||||
a TINYINT AUTO_INCREMENT PRIMARY KEY,
|
||||
b VARCHAR(200)) ENGINE=InnoDB;
|
||||
SET SESSION auto_increment_increment=10;
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` tinyint(4) NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(b) VALUES('S0'),('S1');
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` tinyint(4) NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(a,b) VALUES(28,'S2');
|
||||
SET SESSION auto_increment_increment=1;
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` tinyint(4) NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(b) VALUES('S3');
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` tinyint(4) NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t(b) VALUES('S4');
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
1 S0
|
||||
11 S1
|
||||
22 S3
|
||||
23 S4
|
||||
28 S2
|
||||
SHOW CREATE TABLE t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` tinyint(4) NOT NULL AUTO_INCREMENT,
|
||||
`b` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=5;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
|
@@ -381,6 +381,66 @@ INSERT INTO t1 VALUES(NULL, 4);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#15851528 DUPLICATE KEY ERROR ON AUTO-INC PK WITH MIXED AUTO_INCREMENT_INCREMENT CLIENTS
|
||||
--echo #
|
||||
--echo # This test shows that the next record to be inserted is not affected
|
||||
--echo # by a change in auto_increment_increment.
|
||||
--echo # In addition, current value of auto_increment_increment by the client
|
||||
--echo # that uses the existing autoinc value with be used to set next autoinc
|
||||
--echo # value, which will be used by next client reguardless of its own session
|
||||
--echo # setting for auto_increment_increment.
|
||||
--echo #
|
||||
|
||||
--connection default
|
||||
--echo # Client 1: Insert a record with auto_increment_increment=2
|
||||
CREATE TABLE t(
|
||||
a SERIAL PRIMARY KEY,
|
||||
b VARCHAR(200)) ENGINE=InnoDB;
|
||||
SET SESSION auto_increment_increment=2;
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(b) VALUES('S1');
|
||||
SELECT a,b FROM t;
|
||||
--connect(con1,localhost,root,,)
|
||||
|
||||
--connection con1
|
||||
--echo # Client 2: Insert records with auto_increment_increment 2,1
|
||||
SET SESSION auto_increment_increment=2;
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(b) VALUES('S2');
|
||||
SELECT a,b FROM t;
|
||||
SET SESSION auto_increment_increment=1;
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(b) VALUES('S2');
|
||||
SELECT a,b FROM t;
|
||||
disconnect con1;
|
||||
|
||||
--connection default
|
||||
--echo # Client 1: Insert a record with auto_increment_increment=1
|
||||
SET SESSION auto_increment_increment=1;
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(b) VALUES('S1');
|
||||
SELECT a,b FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo # Autoincrement behaviour with mixed insert.
|
||||
CREATE TABLE t(
|
||||
a TINYINT AUTO_INCREMENT PRIMARY KEY,
|
||||
b VARCHAR(200)) ENGINE=InnoDB;
|
||||
SET SESSION auto_increment_increment=10;
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(b) VALUES('S0'),('S1');
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(a,b) VALUES(28,'S2');
|
||||
SET SESSION auto_increment_increment=1;
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(b) VALUES('S3');
|
||||
SHOW CREATE TABLE t;
|
||||
INSERT INTO t(b) VALUES('S4');
|
||||
SELECT * FROM t;
|
||||
SHOW CREATE TABLE t;
|
||||
DROP TABLE t;
|
||||
|
||||
#
|
||||
# Bug# 42714: AUTOINC column calculated next value not greater than highest
|
||||
# value stored in table.
|
||||
|
Reference in New Issue
Block a user