lowercase_view.result 8.92 KB
Newer Older
1 2
drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
3 4 5 6 7 8
drop database if exists MySQLTest;
create database MySQLTest;
use MySQLTest;
create table TaB (Field int);
create view ViE as select * from TAb;
show create table VIe;
unknown's avatar
unknown committed
9
View	Create View
unknown's avatar
unknown committed
10
vie	CREATE ALGORITHM=UNDEFINED VIEW `mysqltest`.`vie` AS select `mysqltest`.`tab`.`Field` AS `Field` from `mysqltest`.`tab`
11
drop database MySQLTest;
unknown's avatar
unknown committed
12
use test;
13
create table t1Aa (col1 int);
14 15 16 17 18
create table t2aA (col1 int);
create view v1Aa as select * from t1aA;
create view v2aA as select * from v1aA;
create view v3Aa as select v2Aa.col1 from v2aA,t2Aa where v2Aa.col1 = t2aA.col1;
update v2aA set col1 = (select max(col1) from v1Aa);
19
ERROR HY000: The definition of table 'v1Aa' prevents operation UPDATE on table 'v2aA'.
20
update v2Aa set col1 = (select max(col1) from t1Aa);
21
ERROR HY000: The definition of table 'v2Aa' prevents operation UPDATE on table 'v2Aa'.
22
update v2aA set col1 = (select max(col1) from v2Aa);
23
ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause
24
update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v1aA) where v2aA.col1 = t2aA.col1;
25
ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 'v2aA'.
26
update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v1Aa) where t1aA.col1 = t2aA.col1;
27
ERROR HY000: The definition of table 'v1Aa' prevents operation UPDATE on table 't1aA'.
28
update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v1aA) where v1Aa.col1 = t2aA.col1;
29
ERROR HY000: You can't specify target table 'v1aA' for update in FROM clause
30
update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from v1aA) where v2Aa.col1 = t2aA.col1;
31
ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 't2Aa'.
32
update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from v1Aa) where t1Aa.col1 = t2aA.col1;
33
ERROR HY000: The definition of table 'v1Aa' prevents operation UPDATE on table 't2Aa'.
34
update t2Aa,v1aA set v1Aa.col1 = (select max(col1) from v1aA) where v1Aa.col1 = t2aA.col1;
35
ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 't2Aa'.
36
update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from t1aA) where v2aA.col1 = t2aA.col1;
37
ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 'v2aA'.
38
update t1Aa,t2Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1;
39
ERROR HY000: You can't specify target table 't1Aa' for update in FROM clause
40
update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from t1Aa) where v1aA.col1 = t2aA.col1;
41
ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 'v1aA'.
42
update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from t1aA) where v2Aa.col1 = t2aA.col1;
43
ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause
44
update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1;
45
ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause
46
update t2Aa,v1Aa set v1aA.col1 = (select max(col1) from t1Aa) where v1Aa.col1 = t2aA.col1;
47
ERROR HY000: You can't specify target table 't2Aa' for update in FROM clause
48
update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v2aA) where v2Aa.col1 = t2aA.col1;
49
ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause
50
update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v2aA) where t1aA.col1 = t2aA.col1;
51
ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 't1aA'.
52
update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v2Aa) where v1aA.col1 = t2aA.col1;
53
ERROR HY000: The definition of table 'v2Aa' prevents operation UPDATE on table 'v1aA'.
54
update t2Aa,v2aA set v2Aa.col1 = (select max(col1) from v2aA) where v2Aa.col1 = t2aA.col1;
55
ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 't2Aa'.
56
update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from v2aA) where t1Aa.col1 = t2aA.col1;
57
ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 't2Aa'.
58
update t2Aa,v1Aa set v1aA.col1 = (select max(col1) from v2Aa) where v1Aa.col1 = t2aA.col1;
59
ERROR HY000: The definition of table 'v2Aa' prevents operation UPDATE on table 't2Aa'.
60
update v3aA set v3Aa.col1 = (select max(col1) from v1aA);
61
ERROR HY000: The definition of table 'v1aA' prevents operation UPDATE on table 'v3aA'.
62
update v3aA set v3Aa.col1 = (select max(col1) from t1aA);
63
ERROR HY000: The definition of table 'v3aA' prevents operation UPDATE on table 'v3aA'.
64
update v3aA set v3Aa.col1 = (select max(col1) from v2aA);
65
ERROR HY000: The definition of table 'v2aA' prevents operation UPDATE on table 'v3aA'.
66
update v3aA set v3Aa.col1 = (select max(col1) from v3aA);
67
ERROR HY000: You can't specify target table 'v3aA' for update in FROM clause
68
delete from v2Aa where col1 = (select max(col1) from v1Aa);
69
ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 'v2Aa'.
70
delete from v2aA where col1 = (select max(col1) from t1Aa);
71
ERROR HY000: The definition of table 'v2aA' prevents operation DELETE on table 'v2aA'.
72
delete from v2Aa where col1 = (select max(col1) from v2aA);
73
ERROR HY000: You can't specify target table 'v2Aa' for update in FROM clause
74
delete v2Aa from v2aA,t2Aa where (select max(col1) from v1aA) > 0 and v2Aa.col1 = t2aA.col1;
75
ERROR HY000: The definition of table 'v1aA' prevents operation DELETE on table 'v2aA'.
76
delete t1aA from t1Aa,t2Aa where (select max(col1) from v1Aa) > 0 and t1aA.col1 = t2aA.col1;
77
ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 't1Aa'.
78
delete v1aA from v1Aa,t2Aa where (select max(col1) from v1aA) > 0 and v1Aa.col1 = t2aA.col1;
79
ERROR HY000: You can't specify target table 'v1Aa' for update in FROM clause
80
delete v2aA from v2Aa,t2Aa where (select max(col1) from t1Aa) > 0 and v2aA.col1 = t2aA.col1;
81
ERROR HY000: The definition of table 'v2Aa' prevents operation DELETE on table 'v2Aa'.
82
delete t1aA from t1Aa,t2Aa where (select max(col1) from t1aA) > 0 and t1Aa.col1 = t2aA.col1;
83
ERROR HY000: You can't specify target table 't1Aa' for update in FROM clause
84
delete v1aA from v1Aa,t2Aa where (select max(col1) from t1aA) > 0 and v1aA.col1 = t2aA.col1;
85
ERROR HY000: The definition of table 'v1Aa' prevents operation DELETE on table 'v1Aa'.
86
delete v2Aa from v2aA,t2Aa where (select max(col1) from v2Aa) > 0 and v2aA.col1 = t2aA.col1;
87
ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause
88
delete t1Aa from t1aA,t2Aa where (select max(col1) from v2Aa) > 0 and t1Aa.col1 = t2aA.col1;
89
ERROR HY000: The definition of table 'v2Aa' prevents operation DELETE on table 't1aA'.
90
delete v1Aa from v1aA,t2Aa where (select max(col1) from v2aA) > 0 and v1Aa.col1 = t2aA.col1;
91
ERROR HY000: The definition of table 'v2aA' prevents operation DELETE on table 'v1aA'.
92
insert into v2Aa values ((select max(col1) from v1aA));
93
ERROR HY000: The definition of table 'v1aA' prevents operation INSERT on table 'v2Aa'.
94
insert into t1aA values ((select max(col1) from v1Aa));
95
ERROR HY000: The definition of table 'v1Aa' prevents operation INSERT on table 't1aA'.
96
insert into v2aA values ((select max(col1) from v1aA));
97
ERROR HY000: The definition of table 'v1aA' prevents operation INSERT on table 'v2aA'.
98
insert into v2Aa values ((select max(col1) from t1Aa));
99
ERROR HY000: The definition of table 'v2Aa' prevents operation INSERT on table 'v2Aa'.
100
insert into t1aA values ((select max(col1) from t1Aa));
101
ERROR HY000: You can't specify target table 't1aA' for update in FROM clause
102
insert into v2aA values ((select max(col1) from t1aA));
103
ERROR HY000: The definition of table 'v2aA' prevents operation INSERT on table 'v2aA'.
104
insert into v2Aa values ((select max(col1) from v2aA));
105
ERROR HY000: You can't specify target table 'v2Aa' for update in FROM clause
106
insert into t1Aa values ((select max(col1) from v2Aa));
107
ERROR HY000: The definition of table 'v2Aa' prevents operation INSERT on table 't1Aa'.
108
insert into v2aA values ((select max(col1) from v2Aa));
109
ERROR HY000: You can't specify target table 'v2aA' for update in FROM clause
110
insert into v3Aa (col1) values ((select max(col1) from v1Aa));
111
ERROR HY000: The definition of table 'v1Aa' prevents operation INSERT on table 'v3Aa'.
112
insert into v3aA (col1) values ((select max(col1) from t1aA));
113
ERROR HY000: The definition of table 'v3aA' prevents operation INSERT on table 'v3aA'.
114
insert into v3Aa (col1) values ((select max(col1) from v2aA));
115
ERROR HY000: The definition of table 'v2aA' prevents operation INSERT on table 'v3Aa'.
116
drop view v3aA,v2Aa,v1aA;
117
drop table t1Aa,t2Aa;
unknown's avatar
unknown committed
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
create table t1Aa (col1 int);
create view v1Aa as select col1 from t1Aa as AaA;
show create view v1AA;
View	Create View
v1aa	CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA`
drop view v1AA;
select Aaa.col1 from t1Aa as AaA;
col1
create view v1Aa as select Aaa.col1 from t1Aa as AaA;
drop view v1AA;
create view v1Aa as select AaA.col1 from t1Aa as AaA;
show create view v1AA;
View	Create View
v1aa	CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA`
drop view v1AA;
drop table t1Aa;