~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to mysql-test/t/ps.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mto: (1.2.1) (37.1.1 lucid-security)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20120222223355-ku1tb4r70osci6v2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1991
1991
execute stmt using @arg;
1992
1992
deallocate prepare stmt;
1993
1993
 
 
1994
--echo #
 
1995
--echo # Bug#48508: Crash on prepared statement re-execution.
 
1996
--echo #
 
1997
create table t1(b int);
 
1998
insert into t1 values (0);
 
1999
create view v1 AS select 1 as a from t1 where b;
 
2000
prepare stmt from "select * from v1 where a";
 
2001
execute stmt;
 
2002
execute stmt;
 
2003
deallocate prepare stmt;
 
2004
drop table t1;
 
2005
drop view v1;
 
2006
 
 
2007
create table t1(a bigint);
 
2008
create table t2(b tinyint);
 
2009
insert into t2 values (null);
 
2010
prepare stmt from "select 1 from t1 join  t2 on a xor b where b > 1  and a =1";
 
2011
execute stmt;
 
2012
execute stmt;
 
2013
deallocate prepare stmt;
 
2014
drop table t1,t2;
 
2015
--echo #
 
2016
 
 
2017
 
 
2018
--echo #
 
2019
--echo # Bug #49570: Assertion failed: !(order->used & map)
 
2020
--echo # on re-execution of prepared statement
 
2021
--echo #
 
2022
CREATE TABLE t1(a INT PRIMARY KEY);
 
2023
INSERT INTO t1 VALUES(0), (1);
 
2024
PREPARE stmt FROM 
 
2025
  "SELECT 1 FROM t1 JOIN t1 t2 USING(a) GROUP BY t2.a, t1.a";
 
2026
EXECUTE stmt;
 
2027
EXECUTE stmt;
 
2028
EXECUTE stmt;
 
2029
DEALLOCATE PREPARE stmt;
 
2030
DROP TABLE t1;
 
2031
 
 
2032
 
1994
2033
--echo End of 5.0 tests.
1995
2034
 
1996
2035
#
3009
3048
drop table t1;
3010
3049
deallocate prepare stmt;
3011
3050
 
 
3051
--echo #
 
3052
--echo # Bug#49141: Encode function is significantly slower in 5.1 compared to 5.0
 
3053
--echo #
 
3054
 
 
3055
prepare encode from "select encode(?, ?) into @ciphertext";
 
3056
prepare decode from "select decode(?, ?) into @plaintext";
 
3057
set @str="abc", @key="cba";
 
3058
execute encode using @str, @key;
 
3059
execute decode using @ciphertext, @key;
 
3060
select @plaintext;
 
3061
set @str="bcd", @key="dcb";
 
3062
execute encode using @str, @key;
 
3063
execute decode using @ciphertext, @key;
 
3064
select @plaintext;
 
3065
deallocate prepare encode;
 
3066
deallocate prepare decode;
 
3067
 
 
3068
--echo #
 
3069
--echo # Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
 
3070
--echo #
 
3071
CREATE TABLE t1 (a DATETIME NOT NULL, b TINYINT);
 
3072
INSERT INTO t1 VALUES (0, 0),(0, 0);
 
3073
PREPARE stmt FROM "SELECT 1 FROM t1 WHERE
 
3074
ROW(a, b) >= ROW('1', (SELECT 1 FROM t1 WHERE a > 1234))";
 
3075
--disable_warnings
 
3076
EXECUTE stmt;
 
3077
EXECUTE stmt;
 
3078
--enable_warnings
 
3079
DEALLOCATE PREPARE stmt;
 
3080
DROP TABLE t1;
 
3081
 
 
3082
--echo #
 
3083
--echo # Bug#54494 crash with explain extended and prepared statements
 
3084
--echo #
 
3085
CREATE TABLE t1(a INT);
 
3086
INSERT INTO t1 VALUES (1),(2);
 
3087
PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1';
 
3088
EXECUTE stmt;
 
3089
EXECUTE stmt;
 
3090
DEALLOCATE PREPARE stmt;
 
3091
DROP TABLE t1;
 
3092
 
 
3093
--echo #
 
3094
--echo # Bug#54488 crash when using explain and prepared statements with subqueries
 
3095
--echo #
 
3096
CREATE TABLE t1(f1 INT);
 
3097
INSERT INTO t1 VALUES (1),(1);
 
3098
PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 WHERE (SELECT (SELECT 1 FROM t1 GROUP BY f1))';
 
3099
EXECUTE stmt;
 
3100
EXECUTE stmt;
 
3101
DEALLOCATE PREPARE stmt;
 
3102
DROP TABLE t1;
3012
3103
 
3013
3104
--echo End of 5.1 tests.