~maria-captains/maria/mysql-6.0-backup

« back to all changes in this revision

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

  • Committer: Thava Alagu
  • Date: 2010-03-11 19:18:17 UTC
  • mfrom: (3719.14.62 mysql-6.0-codebase)
  • Revision ID: thavamuni.alagu@sun.com-20100311191817-5nigmq884xo9fuut
Merge from mysql-6.0-codebase

Show diffs side-by-side

added added

removed removed

Lines of Context:
3906
3906
DROP VIEW v1;
3907
3907
DROP TABLE t1;
3908
3908
 
 
3909
--echo #
 
3910
--echo # Bug#48449: hang on show create view after upgrading when
 
3911
--echo #            view contains function of view
 
3912
--echo #
 
3913
 
 
3914
--disable_warnings
 
3915
DROP VIEW IF EXISTS v1,v2;
 
3916
DROP TABLE IF EXISTS t1,t2;
 
3917
DROP FUNCTION IF EXISTS f1;
 
3918
--enable_warnings
 
3919
 
 
3920
CREATE TABLE t1 (a INT);
 
3921
CREATE TABLE t2 (a INT);
 
3922
 
 
3923
delimiter //;
 
3924
CREATE FUNCTION f1() RETURNS INT
 
3925
BEGIN
 
3926
  SELECT a FROM v2 INTO @a;
 
3927
  RETURN @a;
 
3928
END//
 
3929
delimiter ;//
 
3930
 
 
3931
--echo # Trigger pre-locking when opening v2.
 
3932
CREATE VIEW v1 AS SELECT f1() FROM t1;
 
3933
 
 
3934
let $MYSQLD_DATADIR= `SELECT @@datadir`;
 
3935
copy_file std_data/bug48449.frm $MYSQLD_DATADIR/test/v2.frm;
 
3936
 
 
3937
SHOW CREATE VIEW v1;
 
3938
 
 
3939
DROP VIEW v1,v2;
 
3940
DROP TABLE t1,t2;
 
3941
DROP FUNCTION f1;
 
3942
 
 
3943
 
 
3944
#
 
3945
# Bug#48294 assertion when creating a view based on some row() construct in select query
 
3946
#
 
3947
CREATE TABLE t1(f1 INT);
 
3948
INSERT INTO t1 VALUES ();
 
3949
 
 
3950
CREATE VIEW v1 AS SELECT 1 FROM t1 WHERE
 
3951
ROW(1,1) >= ROW(1, (SELECT 1 FROM t1 WHERE  f1 >= ANY ( SELECT '1' )));
 
3952
 
 
3953
DROP VIEW v1;
 
3954
DROP TABLE t1;
3909
3955
 
3910
3956
--echo # -----------------------------------------------------------------
3911
3957
--echo # -- End of 5.1 tests.