Debian Codegraph @

mysql-test/suite/ndb/t/ndb_view.test

raw
1 -- source include/have_ndb.inc
2
3 --disable_warnings
4 DROP TABLE IF EXISTS t1,t2,t3;
5 DROP VIEW IF EXISTS v1,v2,v3;
6 --enable_warnings
7
8 #
9 # simple operations via view
10 #
11
12 create table t1 (a int, b int, c int, d int) engine=ndb;
13 insert into t1 values (1,2,3,4),(5,6,7,8);
14
15 create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1;
16 select * from v1 order by a,b,c;
17
18 update v1 set a=a+100 where b=1;
19 select * from v1 order by a,b,c;
20
21 drop view v1;
22
23 create view v1 as select t1.c as a from t1;
24 insert into v1 values (200);
25 select * from t1 order by a,b,c,d;
26
27 drop view v1;
28 drop table t1;