diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-05-31 14:02:50 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-05-31 14:02:50 +0500 |
commit | 7312fd0c2faf663a75ee40a39303059f65c2c2b5 (patch) | |
tree | c22f0cd948976cf2cfdc4c98aa29c3b906fc3537 /mysql-test/r/view.result | |
parent | 73f436b5781bb46b8e67e17f7be90ddbd8821d95 (diff) | |
parent | 9f670c86fa663cb8c2b068040b3b2860a468e6ef (diff) | |
download | mariadb-git-7312fd0c2faf663a75ee40a39303059f65c2c2b5.tar.gz |
Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into gleb.loc:/home/uchum/work/bk/mysql-5.1-opt
mysql-test/r/view.result:
Merge with 5.0-opt.
mysql-test/t/view.test:
Merge with 5.0-opt.
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index cecffe6997e..9116695bbea 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3139,16 +3139,6 @@ code COUNT(DISTINCT country) 100 2 DROP VIEW v1; DROP TABLE t1; -CREATE TABLE t1 (id int); -CREATE TABLE t2 (id int, c int DEFAULT 0); -INSERT INTO t1 (id) VALUES (1); -INSERT INTO t2 (id) VALUES (1); -CREATE VIEW v1 AS -SELECT t2.c FROM t1, t2 -WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; -UPDATE v1 SET c=1; -DROP VIEW v1; -DROP TABLE t1,t2; DROP VIEW IF EXISTS v1; SELECT * FROM (SELECT 1) AS t; 1 @@ -3369,6 +3359,23 @@ SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col` DROP VIEW v1; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT, c INT DEFAULT 0); +INSERT INTO t1 (a) VALUES (1), (2); +INSERT INTO t2 (b) VALUES (1), (2); +CREATE VIEW v1 AS SELECT t2.b,t2.c FROM t1, t2 +WHERE t1.a=t2.b AND t2.b < 3 WITH CHECK OPTION; +SELECT * FROM v1; +b c +1 0 +2 0 +UPDATE v1 SET c=1 WHERE b=1; +SELECT * FROM v1; +b c +1 1 +2 0 +DROP VIEW v1; +DROP TABLE t1,t2; CREATE TABLE t1 (id int); CREATE TABLE t2 (id int, c int DEFAULT 0); INSERT INTO t1 (id) VALUES (1); |