diff options
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 38d05ae84fe..0905fc0109b 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1673,9 +1673,9 @@ INSERT INTO t2 VALUES (4,3,'n'); INSERT INTO t2 VALUES (6,1,'n'); INSERT INTO t2 VALUES (8,1,'y'); CREATE VIEW v1 AS SELECT * FROM t1; -SELECT a.col1,a.col2,b.col2,b.col3 +SELECT a.col1,a.col2,b.col2,b.col3 FROM t1 a LEFT JOIN t2 b ON a.col1=b.col1 -WHERE b.col2 IS NULL OR +WHERE b.col2 IS NULL OR b.col2=(SELECT MAX(col2) FROM t2 b WHERE b.col1=a.col1); col1 col2 col2 col3 1 trudy 2 y @@ -1687,9 +1687,9 @@ col1 col2 col2 col3 7 carsten NULL NULL 8 ranger 1 y 10 matt NULL NULL -SELECT a.col1,a.col2,b.col2,b.col3 +SELECT a.col1,a.col2,b.col2,b.col3 FROM v1 a LEFT JOIN t2 b ON a.col1=b.col1 -WHERE b.col2 IS NULL OR +WHERE b.col2 IS NULL OR b.col2=(SELECT MAX(col2) FROM t2 b WHERE b.col1=a.col1); col1 col2 col2 col3 1 trudy 2 y @@ -1743,7 +1743,7 @@ A A 2 2 3 3 create table t3 as select a a,a b from t2; -create view v2 as select * from t3 where +create view v2 as select * from t3 where a in (select * from t1) or b in (select * from t2); select * from v2 A, v2 B where A.a = B.b; a b a b @@ -1999,7 +1999,7 @@ dkjhgd drop view v1; create table t1 (f59 int, f60 int, f61 int); insert into t1 values (19,41,32); -create view v1 as select f59, f60 from t1 where f59 in +create view v1 as select f59, f60 from t1 where f59 in (select f59 from t1); update v1 set f60=2345; ERROR HY000: The target table v1 of the UPDATE is not updatable @@ -2115,7 +2115,7 @@ pid int NOT NULL INSERT INTO t1 VALUES(1,'a','b'), (2,'c','d'); INSERT INTO t2 values (1,1), (2,1), (2,2); CREATE VIEW v1 AS SELECT t1.*,t2.pid FROM t1,t2 WHERE t1.aid = t2.aid; -SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2 +SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2 WHERE t1.aid = t2.aid GROUP BY pid; pid GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) 1 a b,c d @@ -2217,7 +2217,7 @@ group_name varchar(32) NOT NULL ) engine = InnoDB; create table t2 ( r_object_id char(16) NOT NULL, -i_position int(11) NOT NULL, +i_position int(11) NOT NULL, users_names varchar(32) default NULL ) Engine = InnoDB; create view v1 as select r_object_id, group_name from t1; @@ -2230,7 +2230,7 @@ insert into t1 values('120001a080000542','tstgroup1'); insert into t2 values('120001a080000542',-1, 'guser01'); insert into t2 values('120001a080000542',-2, 'guser02'); select v1.r_object_id, v2.users_names from v1, v2 -where (v1.group_name='tstgroup1') and v2.r_object_id=v1.r_object_id +where (v1.group_name='tstgroup1') and v2.r_object_id=v1.r_object_id order by users_names; r_object_id users_names 120001a080000542 guser01 @@ -2380,8 +2380,8 @@ create table t4 (x int, y int, z int); create view v1 as select t1.x from ( -(t1 join t2 on ((t1.y = t2.y))) -join +(t1 join t2 on ((t1.y = t2.y))) +join (t3 left join t4 on (t3.y = t4.y) and (t3.z = t4.z)) ); prepare stmt1 from "select count(*) from v1 where x = ?"; @@ -2557,12 +2557,12 @@ Warnings: Warning 1052 Column 'x' in group statement is ambiguous DROP VIEW v1; DROP TABLE t1; -drop table if exists t1; -drop view if exists v1; -create table t1 (id int); -create view v1 as select * from t1; -drop table t1; -show create view v1; +drop table if exists t1; +drop view if exists v1; +create table t1 (id int); +create view v1 as select * from t1; +drop table t1; +show create view v1; drop view v1; // View Create View character_set_client collation_connection @@ -2609,7 +2609,7 @@ DROP VIEW v2; DROP TABLE t1, t2; CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, td date DEFAULT NULL, KEY idx(td)); -INSERT INTO t1 VALUES +INSERT INTO t1 VALUES (1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'), (4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'), (7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06'); @@ -2973,10 +2973,10 @@ drop view v1; drop table t1; CREATE TABLE t1(pk int PRIMARY KEY); CREATE TABLE t2(pk int PRIMARY KEY, fk int, ver int, org int); -CREATE ALGORITHM=MERGE VIEW v1 AS +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT t1.* -FROM t1 JOIN t2 -ON t2.fk = t1.pk AND +FROM t1 JOIN t2 +ON t2.fk = t1.pk AND t2.ver = (SELECT MAX(t.ver) FROM t2 t WHERE t.org = t2.org); SHOW WARNINGS; Level Code Message @@ -3306,7 +3306,7 @@ name char(10) NOT NULL INSERT INTO t1 (lid, name) VALUES (1, 'YES'), (2, 'NO'); CREATE TABLE t2 ( -id int NOT NULL PRIMARY KEY, +id int NOT NULL PRIMARY KEY, gid int NOT NULL, lid int NOT NULL, dt date @@ -3405,8 +3405,8 @@ 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 +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; @@ -3514,7 +3514,7 @@ role_name varchar(100) default NULL, app_name varchar(40) NOT NULL, INDEX idx_app_name(app_name) ); -CREATE VIEW v1 AS +CREATE VIEW v1 AS SELECT profile.person_id AS person_id FROM t1 profile, t2 userrole, t3 role WHERE userrole.person_id = profile.person_id AND @@ -3526,7 +3526,7 @@ INSERT INTO t1 VALUES (-717462680,'ENTS Ta','0'), (-904346964,'ndard SQL\n','0'); INSERT INTO t2 VALUES (1,3,6),(2,4,7),(3,5,8),(4,6,9),(5,1,6),(6,1,7),(7,1,8),(8,1,9),(9,1,10); -INSERT INTO t3 VALUES +INSERT INTO t3 VALUES (1,'NUCANS_APP_USER','NUCANSAPP'),(2,'NUCANS_TRGAPP_USER','NUCANSAPP'), (3,'IA_INTAKE_COORDINATOR','IACANS'),(4,'IA_SCREENER','IACANS'), (5,'IA_SUPERVISOR','IACANS'),(6,'IA_READONLY','IACANS'), @@ -3552,7 +3552,7 @@ i 2 3 4 -select table_name, is_updatable from information_schema.views +select table_name, is_updatable from information_schema.views where table_name = 'v1'; table_name is_updatable v1 NO @@ -3598,8 +3598,8 @@ DROP VIEW v2; DROP VIEW v3; DROP TABLE t1; # -# Bug#29477: Not all fields of the target table were checked to have -# a default value when inserting into a view. +# Bug#29477 Not all fields of the target table were checked to have +# a default value when inserting into a view. # create table t1(f1 int, f2 int not null); create view v1 as select f1 from t1; @@ -3616,7 +3616,7 @@ drop table t1; create table t1 (a int, key(a)); create table t2 (c int); create view v1 as select a b from t1; -create view v2 as select 1 a from t2, v1 where c in +create view v2 as select 1 a from t2, v1 where c in (select 1 from t1 where b = a); insert into t1 values (1), (1); insert into t2 values (1), (1); @@ -3638,7 +3638,7 @@ MAX(a) COUNT(DISTINCT a) DROP VIEW v1; DROP TABLE t1; # ----------------------------------------------------------------- -# -- Bug#34337: Server crash when Altering a view using a table name. +# -- Bug#34337 Server crash when Altering a view using a table name. # ----------------------------------------------------------------- DROP TABLE IF EXISTS t1; @@ -3655,8 +3655,8 @@ DROP TABLE t1; # -- End of test case for Bug#34337. # ----------------------------------------------------------------- -# -- Bug#35193: VIEW query is rewritten without "FROM DUAL", -# -- causing syntax error +# -- Bug#35193 VIEW query is rewritten without "FROM DUAL", +# -- causing syntax error # ----------------------------------------------------------------- CREATE VIEW v1 AS SELECT 1 FROM DUAL WHERE 1; @@ -3723,7 +3723,7 @@ DROP DATABASE `d-1`; USE test; # -# Bug#26676: VIEW using old table schema in a session. +# Bug#26676 VIEW using old table schema in a session. # DROP VIEW IF EXISTS v1; @@ -3765,7 +3765,7 @@ DROP TABLE t1; # End of test case for Bug#26676. # ----------------------------------------------------------------- -# -- Bug#32538: View definition picks up character set, but not collation +# -- Bug#32538 View definition picks up character set, but not collation # ----------------------------------------------------------------- DROP VIEW IF EXISTS v1; |