mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
mysql-5.1 -> mysql-5.5 merge
This commit is contained in:
@@ -665,6 +665,19 @@ SELECT * FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (18446744073709551615);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
|
10
mysql-test/suite/innodb/t/innodb_bug56716.test
Normal file
10
mysql-test/suite/innodb/t/innodb_bug56716.test
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Bug #56716 InnoDB locks a record gap without locking the table
|
||||
#
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
CREATE TABLE bug56716 (a INT PRIMARY KEY,b INT,c INT,INDEX(b)) ENGINE=InnoDB;
|
||||
|
||||
SELECT * FROM bug56716 WHERE b<=42 ORDER BY b DESC FOR UPDATE;
|
||||
|
||||
DROP TABLE bug56716;
|
36
mysql-test/suite/innodb/t/innodb_bug57255.test
Normal file
36
mysql-test/suite/innodb/t/innodb_bug57255.test
Normal file
@@ -0,0 +1,36 @@
|
||||
# Test Bug #57255. Cascade deletes that affect different rows should not
|
||||
# result in DB_FOREIGN_EXCEED_MAX_CASCADE error
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
create table A(id int not null primary key) engine=innodb;
|
||||
|
||||
create table B(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references A(id) on delete cascade) engine=innodb;
|
||||
|
||||
create table C(id int not null auto_increment primary key, f1 int not null, foreign key(f1) references B(id) on delete cascade) engine=innodb;
|
||||
|
||||
insert into A values(1), (2);
|
||||
|
||||
--disable_query_log
|
||||
let $i=257;
|
||||
while ($i)
|
||||
{
|
||||
insert into B(f1) values(1);
|
||||
dec $i;
|
||||
}
|
||||
let $i=486;
|
||||
while ($i)
|
||||
{
|
||||
insert into C(f1) values(2);
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
# Following Deletes should not report error
|
||||
DELETE FROM A where id = 1;
|
||||
DELETE FROM C where f1 = 2;
|
||||
DELETE FROM A where id = 1;
|
||||
|
||||
DROP TABLE C;
|
||||
DROP TABLE B;
|
||||
DROP TABLE A;
|
@@ -746,6 +746,59 @@ UNLOCK TABLES;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55826: create table .. select crashes with when KILL_BAD_DATA
|
||||
--echo # is returned
|
||||
--echo #
|
||||
CREATE TABLE t1(a INT) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SET SQL_MODE='STRICT_ALL_TABLES';
|
||||
--error ER_TRUNCATED_WRONG_VALUE
|
||||
CREATE TABLE t2
|
||||
SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
|
||||
DROP TABLE t1;
|
||||
SET SQL_MODE=DEFAULT;
|
||||
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55580: segfault in read_view_sees_trx_id
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT) ENGINE=Innodb;
|
||||
CREATE TABLE t2 (a INT) ENGINE=Innodb;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
|
||||
connect (con1,localhost,root,,test);
|
||||
connect (con2,localhost,root,,test);
|
||||
|
||||
connection con1;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t2 LOCK IN SHARE MODE;
|
||||
|
||||
connection con2;
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 LOCK IN SHARE MODE;
|
||||
|
||||
connection con1;
|
||||
let $conn_id= `SELECT CONNECTION_ID()`;
|
||||
--send SELECT * FROM t1 FOR UPDATE
|
||||
|
||||
connection con2;
|
||||
let $wait_timeout= 2;
|
||||
let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
WHERE ID=$conn_id AND STATE='Sending data';
|
||||
--source include/wait_condition.inc
|
||||
--echo # should not crash
|
||||
--error ER_LOCK_DEADLOCK
|
||||
SELECT * FROM t1 GROUP BY (SELECT a FROM t2 LIMIT 1 FOR UPDATE) + t1.a;
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55656: mysqldump can be slower after bug #39653 fix
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user