Commit dcd0d1bf authored by unknown's avatar unknown
Browse files

Merge neptunus.(none):/home/msvensson/mysql/bug11835/my51-bug11835

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1


configure.in:
  Auto merged
parents ae7974b1 f6ffd3a1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -294,6 +294,13 @@ sub1 sub1
select count(*) from information_schema.ROUTINES;
count(*)
2
create view v1 as select routine_schema, routine_name from information_schema.routines 
order by routine_schema, routine_name;
select * from v1;
routine_schema	routine_name
test	sel2
test	sub1
drop view v1;
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES;
ROUTINE_NAME	ROUTINE_DEFINITION
show create function sub1;
+14 −0
Original line number Diff line number Diff line
@@ -33,4 +33,18 @@ create database `inf%`;
use `inf%`;
show tables;
Tables_in_inf%
grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost';
create table t1 (f1 int);
create function func1(curr_int int) returns int
begin
declare ret_val int;
select max(f1) from t1 into ret_val;
return ret_val;
end|
create view v1 as select f1 from t1 where f1 = func1(f1);
select * from information_schema.tables;
drop user mysqltest_1@localhost;
drop view v1;
drop function func1;
drop table t1;
drop database `inf%`;
+63 −0
Original line number Diff line number Diff line
@@ -89,6 +89,69 @@ ALTER TABLE t1
PARTITION BY KEY(a)
(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB);
drop table t1;
create table t1 (a int)
engine=ndb
partition by key(a)
(partition p0, partition p1);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = ndbcluster, PARTITION p1  ENGINE = ndbcluster)
alter table t1 engine=heap;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MEMORY, PARTITION p1  ENGINE = MEMORY)
alter table t1 engine=ndb;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = ndbcluster, PARTITION p1  ENGINE = ndbcluster)
alter table t1 engine=heap remove partitioning;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 engine=ndb
partition by key(a)
(partition p0, partition p1 engine = ndb);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = ndbcluster, PARTITION p1  ENGINE = ndbcluster)
alter table t1
partition by key (a)
(partition p0 engine=ndb, partition p1 engine=ndb);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = ndbcluster, PARTITION p1  ENGINE = ndbcluster)
alter table t1 remove partitioning;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () 
alter table t1
partition by key(a)
(partition p0 engine=ndb, partition p1);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
alter table t1
engine=ndb
partition by key(a)
(partition p0 engine=ndb, partition p1 engine = ndb);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = ndbcluster, PARTITION p1  ENGINE = ndbcluster)
drop table t1;
CREATE TABLE t1 (
c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
c2 TEXT NOT NULL,
+129 −0
Original line number Diff line number Diff line
@@ -315,6 +315,135 @@ drop table t1;
create table t1 (s1 int, unique (s1)) partition by list (s1) (partition x1 VALUES in (10), partition x2 values in (20));
alter table t1 add partition (partition x3 values in (30));
drop table t1;
create table t1 (a int)
partition by key(a)
partitions 2
(partition p0 engine=myisam, partition p1 engine=myisam);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MyISAM, PARTITION p1  ENGINE = MyISAM)
alter table t1;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MyISAM, PARTITION p1  ENGINE = MyISAM)
alter table t1 engine=myisam;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MyISAM, PARTITION p1  ENGINE = MyISAM)
alter table t1 engine=heap;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MEMORY, PARTITION p1  ENGINE = MEMORY)
alter table t1 remove partitioning;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int)
engine=myisam
partition by key(a)
partitions 2
(partition p0 engine=myisam, partition p1 engine=myisam);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MyISAM, PARTITION p1  ENGINE = MyISAM)
alter table t1 add column b int remove partitioning;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1
engine=myisam
partition by key(a)
(partition p0 engine=myisam, partition p1);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MyISAM, PARTITION p1  ENGINE = MyISAM)
alter table t1
engine=heap
partition by key(a)
(partition p0, partition p1 engine=heap);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MEMORY, PARTITION p1  ENGINE = MEMORY)
alter table t1 engine=myisam, add column c int remove partitioning;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1
engine=heap
partition by key (a)
(partition p0, partition p1);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MEMORY, PARTITION p1  ENGINE = MEMORY)
alter table t1
partition by key (a)
(partition p0, partition p1);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MEMORY, PARTITION p1  ENGINE = MEMORY)
alter table t1
engine=heap
partition by key (a)
(partition p0, partition p1);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY KEY (a) (PARTITION p0  ENGINE = MEMORY, PARTITION p1  ENGINE = MEMORY)
alter table t1
partition by key(a)
(partition p0, partition p1 engine=heap);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
alter table t1
partition by key(a)
(partition p0 engine=heap, partition p1);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
alter table t1
engine=heap
partition by key (a)
(partition p0 engine=heap, partition p1 engine=myisam);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
alter table t1
partition by key (a)
(partition p0 engine=heap, partition p1 engine=myisam);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
drop table t1;
CREATE TABLE t1 (
f_int1 INTEGER, f_int2 INTEGER,
f_char1 CHAR(10), f_char2 CHAR(10), f_charbig VARCHAR(1000)
+30 −0
Original line number Diff line number Diff line
@@ -314,4 +314,34 @@ drop procedure f2;
drop procedure f3;
drop procedure f4;
drop table t1;
reset query cache;
drop function if exists f1;
create table t1 (id int);
create function f1 ()
returns int
begin
declare i_var int;
set i_var = sleep(3);
insert into t1 values(3);
set i_var = sleep(3);
return 0;
end;|
 select f1();
select sleep(4);
sleep(4)
0
select * from t1;
id
3
f1()
0
select * from t1;
id
3
reset query cache;
select * from t1;
id
3
drop table t1;
drop function f1;
set GLOBAL query_cache_size=0;
Loading