Commit 24c48af7 authored by msvensson@shellback.(none)'s avatar msvensson@shellback.(none)

Merge neptunus:mysql/mysql-5.1

into  shellback.(none):/home/msvensson/mysql/mysql-5.1-new-maint
parents 38f27490 f4920b70
...@@ -455,6 +455,16 @@ sub collect_one_test_case($$$$$$$) { ...@@ -455,6 +455,16 @@ sub collect_one_test_case($$$$$$$) {
"Test case '$tname' is skipped."); "Test case '$tname' is skipped.");
} }
} }
else
{
mtr_options_from_test_file($tinfo,"$testdir/${tname}.test");
if ( ! $tinfo->{'innodb_test'} )
{
# mtr_report("Adding '--skip-innodb' to $tinfo->{'name'}");
push(@{$tinfo->{'master_opt'}}, "--skip-innodb");
}
}
# We can't restart a running server that may be in use # We can't restart a running server that may be in use
...@@ -463,7 +473,39 @@ sub collect_one_test_case($$$$$$$) { ...@@ -463,7 +473,39 @@ sub collect_one_test_case($$$$$$$) {
{ {
$tinfo->{'skip'}= 1; $tinfo->{'skip'}= 1;
} }
} }
sub mtr_options_from_test_file($$$) {
my $tinfo= shift;
my $file= shift;
open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!");
my @args;
while ( <FILE> )
{
chomp;
# Check if test uses innodb
if ( defined mtr_match_substring($_,"include/have_innodb.inc"))
{
$tinfo->{'innodb_test'} = 1;
}
# If test sources another file, open it as well
my $value= mtr_match_prefix($_, "--source");
if ( defined $value)
{
$value=~ s/^\s+//; # Remove leading space
$value=~ s/\s+$//; # Remove ending space
my $sourced_file= "$::glob_mysql_test_dir/$value";
mtr_options_from_test_file($tinfo, $sourced_file);
}
}
close FILE;
}
1; 1;
...@@ -876,6 +876,7 @@ sub command_line_setup () { ...@@ -876,6 +876,7 @@ sub command_line_setup () {
start_timeout => 400, # enough time create innodb tables start_timeout => 400, # enough time create innodb tables
ndbcluster => 1, # ndbcluster not started ndbcluster => 1, # ndbcluster not started
master_opt => [],
}; };
$master->[1]= $master->[1]=
...@@ -2143,6 +2144,14 @@ sub run_testcase ($) { ...@@ -2143,6 +2144,14 @@ sub run_testcase ($) {
{ {
$do_restart= 1; $do_restart= 1;
} }
# Check that running master was started with same options
# as the current test requires
elsif (! mtr_same_opts($master->[0]->{'master_opt'},
$tinfo->{'master_opt'}) )
{
$do_restart= 1;
}
if ( $do_restart ) if ( $do_restart )
{ {
...@@ -2222,6 +2231,8 @@ sub run_testcase ($) { ...@@ -2222,6 +2231,8 @@ sub run_testcase ($) {
report_failure_and_restart($tinfo); report_failure_and_restart($tinfo);
return; return;
} }
# Remember options used to start
$master->[0]->{'master_opt'}= $tinfo->{'master_opt'};
} }
if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} ) if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} )
{ {
......
...@@ -772,9 +772,3 @@ t1 CREATE TABLE `t1` ( ...@@ -772,9 +772,3 @@ t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL `i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
drop table t1; drop table t1;
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
character set utf8 collate utf8_general_ci;
Warnings:
Warning 1071 Specified key was too long; max key length is 765 bytes
insert into t1 values('aaa');
drop table t1;
...@@ -54,3 +54,9 @@ c.c_id = 218 and expiredate is null; ...@@ -54,3 +54,9 @@ c.c_id = 218 and expiredate is null;
slai_id slai_id
12 12
drop table t1, t2; drop table t1, t2;
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
character set utf8 collate utf8_general_ci;
Warnings:
Warning 1071 Specified key was too long; max key length is 765 bytes
insert into t1 values('aaa');
drop table t1;
...@@ -643,11 +643,6 @@ partition by list (a) ...@@ -643,11 +643,6 @@ partition by list (a)
alter table t1 rebuild partition; alter table t1 rebuild partition;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
drop table t1; drop table t1;
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t2 (s1 int not null auto_increment, primary key (s1)) partition by list (s1) (partition p1 values in (1),partition p2 values in (2),partition p3 values in (3),partition p4 values in (4)); create table t2 (s1 int not null auto_increment, primary key (s1)) partition by list (s1) (partition p1 values in (1),partition p2 values in (2),partition p3 values in (3),partition p4 values in (4));
insert into t2 values (null),(null),(null); insert into t2 values (null),(null),(null);
select * from t2; select * from t2;
......
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
...@@ -314,16 +314,6 @@ select * from db_bug14533.t1; ...@@ -314,16 +314,6 @@ select * from db_bug14533.t1;
ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 't1' ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 't1'
drop user user_bug14533@localhost; drop user user_bug14533@localhost;
drop database db_bug14533; drop database db_bug14533;
CREATE DATABASE db_bug7787;
use db_bug7787;
CREATE PROCEDURE p1()
SHOW INNODB STATUS;
Warnings:
Warning 1541 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead.
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost;
DROP DATABASE db_bug7787;
drop user user_bug7787@localhost;
use test;
---> connection: root ---> connection: root
DROP DATABASE IF EXISTS mysqltest; DROP DATABASE IF EXISTS mysqltest;
......
...@@ -4796,22 +4796,6 @@ i ...@@ -4796,22 +4796,6 @@ i
0 0
drop table t3| drop table t3|
drop procedure bug16887| drop procedure bug16887|
create table t3 (f1 int, f2 varchar(3), primary key(f1)) engine=innodb|
insert into t3 values (1,'aaa'),(2,'bbb'),(3,'ccc')|
CREATE FUNCTION bug13575 ( p1 integer )
returns varchar(3)
BEGIN
DECLARE v1 VARCHAR(10) DEFAULT null;
SELECT f2 INTO v1 FROM t3 WHERE f1 = p1;
RETURN v1;
END|
select distinct f1, bug13575(f1) from t3 order by f1|
f1 bug13575(f1)
1 aaa
2 bbb
3 ccc
drop function bug13575;
drop table t3|
drop procedure if exists bug16474_1| drop procedure if exists bug16474_1|
drop procedure if exists bug16474_2| drop procedure if exists bug16474_2|
delete from t1| delete from t1|
......
...@@ -530,3 +530,29 @@ count(*) ...@@ -530,3 +530,29 @@ count(*)
drop table t3, t4| drop table t3, t4|
drop procedure bug14210| drop procedure bug14210|
set @@session.max_heap_table_size=default| set @@session.max_heap_table_size=default|
CREATE DATABASE db_bug7787|
use db_bug7787|
CREATE PROCEDURE p1()
SHOW INNODB STATUS; |
Warnings:
Warning 1541 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead.
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost|
DROP DATABASE db_bug7787|
drop user user_bug7787@localhost|
use test|
create table t3 (f1 int, f2 varchar(3), primary key(f1)) engine=innodb|
insert into t3 values (1,'aaa'),(2,'bbb'),(3,'ccc')|
CREATE FUNCTION bug13575 ( p1 integer )
returns varchar(3)
BEGIN
DECLARE v1 VARCHAR(10) DEFAULT null;
SELECT f2 INTO v1 FROM t3 WHERE f1 = p1;
RETURN v1;
END|
select distinct f1, bug13575(f1) from t3 order by f1|
f1 bug13575(f1)
1 aaa
2 bbb
3 ccc
drop function bug13575|
drop table t3|
...@@ -667,12 +667,5 @@ alter table t1 max_rows=100000000000; ...@@ -667,12 +667,5 @@ alter table t1 max_rows=100000000000;
show create table t1; show create table t1;
drop table t1; drop table t1;
#
# Bug#17530: Incorrect key truncation on table creation caused server crash.
#
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
character set utf8 collate utf8_general_ci;
insert into t1 values('aaa');
drop table t1;
# End of 5.0 tests # End of 5.0 tests
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# simple test of all group functions # simple test of all group functions
# #
--source include/have_innodb.inc
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2;
--enable_warnings --enable_warnings
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# The queries in this file test query execution via QUICK_GROUP_MIN_MAX_SELECT. # The queries in this file test query execution via QUICK_GROUP_MIN_MAX_SELECT.
# #
--source include/have_innodb.inc
# #
# TODO: # TODO:
# Add queries with: # Add queries with:
......
...@@ -57,3 +57,12 @@ where ...@@ -57,3 +57,12 @@ where
c.c_id = 218 and expiredate is null; c.c_id = 218 and expiredate is null;
drop table t1, t2; drop table t1, t2;
#
# Bug#17530: Incorrect key truncation on table creation caused server crash.
#
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
character set utf8 collate utf8_general_ci;
insert into t1 values('aaa');
drop table t1;
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# test of left outer join # test of left outer join
# #
--source include/have_innodb.inc
--disable_warnings --disable_warnings
drop table if exists t0,t1,t2,t3,t4,t5; drop table if exists t0,t1,t2,t3,t4,t5;
--enable_warnings --enable_warnings
......
...@@ -756,13 +756,6 @@ alter table t1 rebuild partition; ...@@ -756,13 +756,6 @@ alter table t1 rebuild partition;
drop table t1; drop table t1;
#
# Bug #14673: Wrong InnoDB default row format
#
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
drop table t1;
# #
# Bug #14526: Partitions: indexed searches fail # Bug #14526: Partitions: indexed searches fail
# #
......
--source include/have_innodb.inc
#
# Bug #14673: Wrong InnoDB default row format
#
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
drop table t1;
...@@ -526,29 +526,6 @@ drop user user_bug14533@localhost; ...@@ -526,29 +526,6 @@ drop user user_bug14533@localhost;
drop database db_bug14533; drop database db_bug14533;
#
# BUG#7787: Stored procedures: improper warning for "grant execute" statement
#
# Prepare.
CREATE DATABASE db_bug7787;
use db_bug7787;
# Test.
CREATE PROCEDURE p1()
SHOW INNODB STATUS;
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost;
# Cleanup.
DROP DATABASE db_bug7787;
drop user user_bug7787@localhost;
use test;
# #
# WL#2897: Complete definer support in the stored routines. # WL#2897: Complete definer support in the stored routines.
# #
......
...@@ -5636,23 +5636,6 @@ call bug16887()| ...@@ -5636,23 +5636,6 @@ call bug16887()|
drop table t3| drop table t3|
drop procedure bug16887| drop procedure bug16887|
#
# Bug#13575 SP funcs in select with distinct/group and order by can
# produce bad data
#
create table t3 (f1 int, f2 varchar(3), primary key(f1)) engine=innodb|
insert into t3 values (1,'aaa'),(2,'bbb'),(3,'ccc')|
CREATE FUNCTION bug13575 ( p1 integer )
returns varchar(3)
BEGIN
DECLARE v1 VARCHAR(10) DEFAULT null;
SELECT f2 INTO v1 FROM t3 WHERE f1 = p1;
RETURN v1;
END|
select distinct f1, bug13575(f1) from t3 order by f1|
drop function bug13575;
drop table t3|
# #
# BUG#16474: SP crashed MySQL # BUG#16474: SP crashed MySQL
# (when using "order by localvar", where 'localvar' is just that. # (when using "order by localvar", where 'localvar' is just that.
......
...@@ -552,6 +552,45 @@ drop table t3, t4| ...@@ -552,6 +552,45 @@ drop table t3, t4|
drop procedure bug14210| drop procedure bug14210|
set @@session.max_heap_table_size=default| set @@session.max_heap_table_size=default|
#
# BUG#7787: Stored procedures: improper warning for "grant execute" statement
#
# Prepare.
CREATE DATABASE db_bug7787|
use db_bug7787|
# Test.
CREATE PROCEDURE p1()
SHOW INNODB STATUS; |
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost|
# Cleanup.
DROP DATABASE db_bug7787|
drop user user_bug7787@localhost|
use test|
#
# Bug#13575 SP funcs in select with distinct/group and order by can
# produce bad data
#
create table t3 (f1 int, f2 varchar(3), primary key(f1)) engine=innodb|
insert into t3 values (1,'aaa'),(2,'bbb'),(3,'ccc')|
CREATE FUNCTION bug13575 ( p1 integer )
returns varchar(3)
BEGIN
DECLARE v1 VARCHAR(10) DEFAULT null;
SELECT f2 INTO v1 FROM t3 WHERE f1 = p1;
RETURN v1;
END|
select distinct f1, bug13575(f1) from t3 order by f1|
drop function bug13575|
drop table t3|
# #
# BUG#NNNN: New bug synopsis # BUG#NNNN: New bug synopsis
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment