2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
drop table if exists t1,v1;
8
drop view if exists t1,v1;
10
create table t1 (a int);
11
insert into t1 values (1);
12
create view v1 as select a from t1;
13
insert into v1 values (2);
14
select * from v1 order by a;
18
select * from v1 order by a;
22
update v1 set a=3 where a=1;
23
select * from v1 order by a;
27
select * from v1 order by a;
31
delete from v1 where a=2;
32
select * from v1 order by a;
35
select * from v1 order by a;
38
alter view v1 as select a as b from t1;
39
select * from v1 order by 1;
43
select * from v1 order by a;
44
ERROR 42S02: Table 'test.v1' doesn't exist
47
---> Test for BUG#20438
49
---> Preparing environment...
50
---> connection: master
51
DROP TABLE IF EXISTS t1;
52
DROP VIEW IF EXISTS v1;
54
---> Synchronizing slave with master...
56
---> connection: master
58
---> Creating objects...
59
CREATE TABLE t1(c INT);
60
/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */;
62
---> Inserting value...
63
INSERT INTO t1 VALUES(1);
65
---> Checking on master...
70
---> Synchronizing slave with master...
71
---> connection: master
73
---> Checking on slave...
78
---> connection: master
83
create table t1(a int, b int);
84
insert into t1 values (1, 1), (1, 2), (1, 3);
85
create view v1(a, b) as select a, sum(b) from t1 group by a;
87
Field Type Null Key Default Extra
89
b decimal(32,0) YES NULL
91
View Create View character_set_client collation_connection
92
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a` latin1 latin1_swedish_ci
98
CREATE TABLE t1(a INT);
99
CREATE VIEW v1 AS SELECT * FROM t1;
100
CREATE VIEW v1 AS SELECT * FROM t1;
101
ERROR 42S01: Table 'v1' already exists