mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge mysql-5.1-bugteam -> mysql-5.1-innodb
This commit is contained in:
5
mysql-test/collections/mysql-5.1-bugteam.daily
Normal file
5
mysql-test/collections/mysql-5.1-bugteam.daily
Normal file
@ -0,0 +1,5 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental
|
4
mysql-test/collections/mysql-5.1-bugteam.push
Normal file
4
mysql-test/collections/mysql-5.1-bugteam.push
Normal file
@ -0,0 +1,4 @@
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --suite=main --embedded --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
|
@ -1343,4 +1343,18 @@ SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #52160: crash and inconsistent results when grouping
|
||||
# by a function and column
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(10) NOT NULL);
|
||||
INSERT INTO t1 VALUES (''),('');
|
||||
SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a);
|
||||
COUNT(*)
|
||||
2
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -899,6 +899,16 @@ TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1
|
||||
TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2
|
||||
DROP TABLE t1;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
use mysql;
|
||||
drop table if exists renamed_general_log;
|
||||
drop table if exists renamed_slow_log;
|
||||
RENAME TABLE general_log TO renamed_general_log;
|
||||
ERROR HY000: Cannot rename 'general_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'general_log'
|
||||
RENAME TABLE slow_log TO renamed_slow_log;
|
||||
ERROR HY000: Cannot rename 'slow_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'slow_log'
|
||||
use test;
|
||||
flush tables with read lock;
|
||||
unlock tables;
|
||||
SET @@session.long_query_time= @old_long_query_time;
|
||||
SET @@global.log_output= @old_log_output;
|
||||
SET @@global.slow_query_log= @old_slow_query_log;
|
||||
|
@ -3001,4 +3001,42 @@ EXECUTE stmt;
|
||||
1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54494 crash with explain extended and prepared statements
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1';
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54488 crash when using explain and prepared statements with subqueries
|
||||
#
|
||||
CREATE TABLE t1(f1 INT);
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 WHERE (SELECT (SELECT 1 FROM t1 GROUP BY f1))';
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
|
@ -974,3 +974,14 @@ ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967
|
||||
explain select convert(1, binary(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295)
|
||||
End of 5.0 tests
|
||||
# Bug #52160: crash and inconsistent results when grouping
|
||||
# by a function and column
|
||||
CREATE FUNCTION f1() RETURNS TINYBLOB RETURN 1;
|
||||
CREATE TABLE t1(a CHAR(1));
|
||||
INSERT INTO t1 VALUES ('0'), ('0');
|
||||
SELECT COUNT(*) FROM t1 GROUP BY f1(), a;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
10
mysql-test/suite/innodb/r/innodb_bug57255.result
Normal file
10
mysql-test/suite/innodb/r/innodb_bug57255.result
Normal file
@ -0,0 +1,10 @@
|
||||
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);
|
||||
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;
|
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;
|
10
mysql-test/suite/innodb_plugin/r/innodb_bug57255.result
Normal file
10
mysql-test/suite/innodb_plugin/r/innodb_bug57255.result
Normal file
@ -0,0 +1,10 @@
|
||||
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);
|
||||
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;
|
36
mysql-test/suite/innodb_plugin/t/innodb_bug57255.test
Normal file
36
mysql-test/suite/innodb_plugin/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_plugin.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;
|
@ -849,4 +849,14 @@ INSERT INTO t1 VALUES (0),(9.216e-096);
|
||||
SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #52160: crash and inconsistent results when grouping
|
||||
--echo # by a function and column
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a CHAR(10) NOT NULL);
|
||||
INSERT INTO t1 VALUES (''),('');
|
||||
SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -1027,6 +1027,25 @@ DROP TABLE t1;
|
||||
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
|
||||
#
|
||||
# Bug #47924 main.log_tables times out sporadically
|
||||
#
|
||||
|
||||
use mysql;
|
||||
# Should result in error
|
||||
--disable_warnings
|
||||
drop table if exists renamed_general_log;
|
||||
drop table if exists renamed_slow_log;
|
||||
--enable_warnings
|
||||
--error ER_CANT_RENAME_LOG_TABLE
|
||||
RENAME TABLE general_log TO renamed_general_log;
|
||||
--error ER_CANT_RENAME_LOG_TABLE
|
||||
RENAME TABLE slow_log TO renamed_slow_log;
|
||||
|
||||
use test;
|
||||
flush tables with read lock;
|
||||
unlock tables;
|
||||
|
||||
SET @@session.long_query_time= @old_long_query_time;
|
||||
|
||||
SET @@global.log_output= @old_log_output;
|
||||
|
@ -3079,4 +3079,26 @@ EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54494 crash with explain extended and prepared statements
|
||||
--echo #
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1';
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54488 crash when using explain and prepared statements with subqueries
|
||||
--echo #
|
||||
CREATE TABLE t1(f1 INT);
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 WHERE (SELECT (SELECT 1 FROM t1 GROUP BY f1))';
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
@ -612,3 +612,19 @@ explain select convert(1, binary(4294967296));
|
||||
explain select convert(1, binary(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo # Bug #52160: crash and inconsistent results when grouping
|
||||
--echo # by a function and column
|
||||
|
||||
CREATE FUNCTION f1() RETURNS TINYBLOB RETURN 1;
|
||||
|
||||
CREATE TABLE t1(a CHAR(1));
|
||||
INSERT INTO t1 VALUES ('0'), ('0');
|
||||
|
||||
SELECT COUNT(*) FROM t1 GROUP BY f1(), a;
|
||||
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
Reference in New Issue
Block a user