diff options
author | unknown <msvensson@neptunus.(none)> | 2006-03-09 12:08:23 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-03-09 12:08:23 +0100 |
commit | 2acff5c36d99b9726b152bcf8b5286fb46849d88 (patch) | |
tree | 0bc1241affb989710293bc7a3c22d376b1ade8ab /mysql-test/r/sp_trans.result | |
parent | 91b3447c2d8f87f104f9772557302c662f7f0cb2 (diff) | |
download | mariadb-git-2acff5c36d99b9726b152bcf8b5286fb46849d88.tar.gz |
Bug#10656 Stored Procedure - Create index and Truncate table command error
-Add test case
Move testcase that needs innodb from sp.test => sp_trans.test
mysql-test/r/sp.result:
Move test cases tyhat requires innodb to sp_trans.test
mysql-test/r/sp_trans.result:
Move test cases tyhat requires innodb to sp_trans.test
Add test case for bug#10656
mysql-test/t/sp.test:
Move test cases tyhat requires innodb to sp_trans.test
mysql-test/t/sp_trans.test:
Add test case for bug#10656
Move test cases that require innodb to sp_trans.test
Diffstat (limited to 'mysql-test/r/sp_trans.result')
-rw-r--r-- | mysql-test/r/sp_trans.result | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index e9289cf01c7..564e31c9e32 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -425,3 +425,108 @@ x y drop procedure bug14840_1| drop procedure bug14840_2| drop table t3| +drop procedure if exists bug10656_create_index| +drop procedure if exists bug10656_myjoin| +drop procedure if exists bug10656_truncate_table| +CREATE TABLE t3 ( +`ID` int(11) default NULL, +`txt` char(5) default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1| +INSERT INTO t3 (`ID`,`txt`) VALUES +(1,'a'), (2,'b'), (3,'c'), (4,'d')| +CREATE TABLE t4 ( +`ID` int(11) default NULL, +`txt` char(5) default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1| +INSERT INTO t4 (`ID`,`txt`) VALUES +(1,'a'), (2,'b'), (3,'c'), (4,'d')| +create procedure bug10656_create_index() +begin +create index bug10656_my_index on t3 (ID); +end| +call bug10656_create_index()| +create procedure bug10656_myjoin() +begin +update t3, t4 set t3.txt = t4.txt where t3.id = t4.id; +end| +call bug10656_myjoin()| +create procedure bug10656_truncate_table() +begin +truncate table t3; +end| +call bug10656_truncate_table()| +drop procedure bug10656_create_index| +drop procedure bug10656_myjoin| +drop procedure bug10656_truncate_table| +drop table t3, t4| +create table t3 ( +a int primary key, +ach char(1) +) engine = innodb| +create table t4 ( +b int primary key, +bch char(1) +) engine = innodb| +insert into t3 values (1 , 'aCh1' ) , ('2' , 'aCh2')| +Warnings: +Warning 1265 Data truncated for column 'ach' at row 1 +Warning 1265 Data truncated for column 'ach' at row 2 +insert into t4 values (1 , 'bCh1' )| +Warnings: +Warning 1265 Data truncated for column 'bch' at row 1 +drop procedure if exists bug3448| +create procedure bug3448() +select * from t3 inner join t4 on t3.a = t4.b| +select * from t3 inner join t4 on t3.a = t4.b| +a ach b bch +1 a 1 b +call bug3448()| +a ach b bch +1 a 1 b +call bug3448()| +a ach b bch +1 a 1 b +drop procedure bug3448| +drop table t3, t4| +drop procedure if exists bug14210| +set @@session.max_heap_table_size=16384| +select @@session.max_heap_table_size| +@@session.max_heap_table_size +16384 +create table t3 (a char(255)) engine=InnoDB| +create procedure bug14210_fill_table() +begin +declare table_size, max_table_size int default 0; +select @@session.max_heap_table_size into max_table_size; +delete from t3; +insert into t3 (a) values (repeat('a', 255)); +repeat +insert into t3 select a from t3; +select count(*)*255 from t3 into table_size; +until table_size > max_table_size*2 end repeat; +end| +call bug14210_fill_table()| +drop procedure bug14210_fill_table| +create table t4 like t3| +create procedure bug14210() +begin +declare a char(255); +declare done int default 0; +declare c cursor for select * from t3; +declare continue handler for sqlstate '02000' set done = 1; +open c; +repeat +fetch c into a; +if not done then +insert into t4 values (upper(a)); +end if; +until done end repeat; +close c; +end| +call bug14210()| +select count(*) from t4| +count(*) +256 +drop table t3, t4| +drop procedure bug14210| +set @@session.max_heap_table_size=default| |