~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/r/lowercase_view.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
 
2
drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
 
3
drop database if exists MySQLTest;
 
4
create database MySQLTest;
 
5
use MySQLTest;
 
6
create table TaB (Field int);
 
7
create view ViE as select * from TAb;
 
8
show create table VIe;
 
9
View    Create View     character_set_client    collation_connection
 
10
vie     CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vie` AS select `tab`.`Field` AS `Field` from `tab`     latin1  latin1_swedish_ci
 
11
drop database MySQLTest;
 
12
use test;
 
13
create table t1Aa (col1 int);
 
14
create table t2aA (col1 int);
 
15
create view v1Aa as select * from t1aA;
 
16
create view v2aA as select * from v1aA;
 
17
create view v3Aa as select v2Aa.col1 from v2aA,t2Aa where v2Aa.col1 = t2aA.col1;
 
18
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;
 
118
create table t1Aa (col1 int);
 
119
create view v1Aa as select col1 from t1Aa as AaA;
 
120
show create view v1AA;
 
121
View    Create View     character_set_client    collation_connection
 
122
v1aa    CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `aaa`       latin1  latin1_swedish_ci
 
123
drop view v1AA;
 
124
select Aaa.col1 from t1Aa as AaA;
 
125
col1
 
126
create view v1Aa as select Aaa.col1 from t1Aa as AaA;
 
127
drop view v1AA;
 
128
create view v1Aa as select AaA.col1 from t1Aa as AaA;
 
129
show create view v1AA;
 
130
View    Create View     character_set_client    collation_connection
 
131
v1aa    CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `aaa`       latin1  latin1_swedish_ci
 
132
drop view v1AA;
 
133
drop table t1Aa;
 
134
CREATE TABLE  t1 (a int, b int);
 
135
select X.a from t1 AS X group by X.b having (X.a = 1);
 
136
a
 
137
select X.a from t1 AS X group by X.b having (x.a = 1);
 
138
a
 
139
select X.a from t1 AS X group by X.b having (x.b = 1);
 
140
a
 
141
CREATE OR REPLACE VIEW v1 AS
 
142
select X.a from t1 AS X group by X.b having (X.a = 1);
 
143
SHOW CREATE VIEW v1;
 
144
View    Create View     character_set_client    collation_connection
 
145
v1      CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `x`.`a` AS `a` from `t1` `x` group by `x`.`b` having (`x`.`a` = 1)       latin1  latin1_swedish_ci
 
146
SELECT * FROM v1;
 
147
a
 
148
DROP VIEW v1;
 
149
DROP TABLE t1;
 
150
End of 5.0 tests.