~vkolesnikov/pbxt/pbxt-preload-test-bug

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/r/information_schema_db.result

  • Committer: paul-mccullagh
  • Date: 2008-03-10 11:36:34 UTC
  • Revision ID: paul-mccullagh-417ebf175a9c8ee6e5b3777d9e2398e1fb197391
Implemented full durability

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
select table_name, table_type, table_comment from information_schema.tables
75
75
where table_schema='inf%' and func2();
76
76
table_name      table_type      table_comment
77
 
v1      VIEW    View 'inf%.v1' references invalid table(s) or column(s) or function(s) or define
 
77
v1      VIEW    VIEW
78
78
select table_name, table_type, table_comment from information_schema.tables
79
79
where table_schema='inf%' and func2();
80
80
table_name      table_type      table_comment
81
 
v1      VIEW    View 'inf%.v1' references invalid table(s) or column(s) or function(s) or define
 
81
v1      VIEW    VIEW
82
82
drop view v1;
83
83
drop function func1;
84
84
drop function func2;
98
98
table_name      table_type      table_comment
99
99
t1      BASE TABLE      
100
100
v1      VIEW    VIEW
101
 
v2      VIEW    View 'test.v2' references invalid table(s) or column(s) or function(s) or define
 
101
v2      VIEW    VIEW
102
102
drop table t1;
103
103
select table_name, table_type, table_comment from information_schema.tables
104
104
where table_schema='test';
105
105
table_name      table_type      table_comment
106
 
v1      VIEW    View 'test.v1' references invalid table(s) or column(s) or function(s) or define
107
 
v2      VIEW    View 'test.v2' references invalid table(s) or column(s) or function(s) or define
 
106
v1      VIEW    VIEW
 
107
v2      VIEW    VIEW
108
108
drop function f1;
109
109
drop function f2;
110
110
drop view v1, v2;
117
117
create table t1 (f1 char(4));
118
118
create view v1 as select f1 from t1;
119
119
grant insert on v1 to testdb_2@localhost;
 
120
create view v5 as select f1 from t1;
 
121
grant show view on v5 to testdb_2@localhost;
 
122
create definer=`no_such_user`@`no_such_host` view v6 as select f1 from t1;
 
123
ERROR 42000: Access denied; you need the SUPER privilege for this operation
 
124
use testdb_1;
 
125
create view v6 as select f1 from t1;
 
126
grant show view on v6 to testdb_2@localhost;
 
127
create table t2 (f1 char(4));
 
128
create definer=`no_such_user`@`no_such_host` view v7 as select * from t2;
 
129
Warnings:
 
130
Note    1449    There is no 'no_such_user'@'no_such_host' registered
 
131
show fields from testdb_1.v6;
 
132
Field   Type    Null    Key     Default Extra
 
133
f1      char(4) YES             NULL    
 
134
show create view testdb_1.v6;
 
135
View    Create View     character_set_client    collation_connection
 
136
v6      CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v6` AS select `t1`.`f1` AS `f1` from `t1`      latin1  latin1_swedish_ci
 
137
show create view testdb_1.v7;
 
138
View    Create View     character_set_client    collation_connection
 
139
v7      CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2`        latin1  latin1_swedish_ci
 
140
Warnings:
 
141
Warning 1356    View 'testdb_1.v7' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
 
142
show fields from testdb_1.v7;
 
143
Field   Type    Null    Key     Default Extra
 
144
f1      null    YES             NULL    
 
145
Warnings:
 
146
Note    1449    There is no 'no_such_user'@'no_such_host' registered
120
147
create table t3 (f1 char(4), f2 char(4));
121
148
create view v3 as select f1,f2 from t3;
122
149
grant insert(f1), insert(f2) on v3 to testdb_2@localhost;
123
150
create view v2 as select f1 from testdb_1.v1;
124
151
create view v4 as select f1,f2 from testdb_1.v3;
 
152
show fields from testdb_1.v5;
 
153
Field   Type    Null    Key     Default Extra
 
154
f1      char(4) YES             NULL    
 
155
show create view testdb_1.v5;
 
156
View    Create View     character_set_client    collation_connection
 
157
v5      CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_1`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v5` AS select `testdb_1`.`t1`.`f1` AS `f1` from `testdb_1`.`t1` latin1  latin1_swedish_ci
 
158
show fields from testdb_1.v6;
 
159
Field   Type    Null    Key     Default Extra
 
160
f1      char(4) YES             NULL    
 
161
show create view testdb_1.v6;
 
162
View    Create View     character_set_client    collation_connection
 
163
v6      CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v6` AS select `testdb_1`.`t1`.`f1` AS `f1` from `testdb_1`.`t1`     latin1  latin1_swedish_ci
 
164
show fields from testdb_1.v7;
 
165
Field   Type    Null    Key     Default Extra
 
166
f1      null    YES             NULL    
 
167
Warnings:
 
168
Note    1449    There is no 'no_such_user'@'no_such_host' registered
 
169
show create view testdb_1.v7;
 
170
View    Create View     character_set_client    collation_connection
 
171
v7      CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2`        latin1  latin1_swedish_ci
 
172
Warnings:
 
173
Warning 1356    View 'testdb_1.v7' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
125
174
revoke insert(f1) on v3 from testdb_2@localhost;
 
175
revoke show view on v5 from testdb_2@localhost;
 
176
use testdb_1;
 
177
revoke show view on v6 from testdb_2@localhost;
 
178
show fields from testdb_1.v5;
 
179
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5'
 
180
show create view testdb_1.v5;
 
181
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5'
 
182
show fields from testdb_1.v6;
 
183
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6'
 
184
show create view testdb_1.v6;
 
185
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6'
 
186
show fields from testdb_1.v7;
 
187
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7'
 
188
show create view testdb_1.v7;
 
189
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7'
126
190
show create view v4;
127
191
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
128
192
show fields from v4;
129
 
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
 
193
Field   Type    Null    Key     Default Extra
 
194
f1      null    YES             NULL    
 
195
f2      char(4) YES             NULL    
130
196
show fields from v2;
131
197
Field   Type    Null    Key     Default Extra
132
198
f1      char(4) YES             NULL    
134
200
Field   Type    Null    Key     Default Extra
135
201
f1      char(4) YES             NULL    
136
202
show create view v2;
137
 
View    Create View
138
 
v2      CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `test`.`v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
 
203
View    Create View     character_set_client    collation_connection
 
204
v2      CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `test`.`v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1`        latin1  latin1_swedish_ci
139
205
show create view testdb_1.v1;
140
206
ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'v1'
141
207
select table_name from information_schema.columns a 
145
211
select view_definition from information_schema.views a 
146
212
where a.table_name = 'v2';
147
213
view_definition
148
 
/* ALGORITHM=UNDEFINED */ select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
 
214
select f1 from testdb_1.v1
149
215
select view_definition from information_schema.views a 
150
216
where a.table_name = 'testdb_1.v1';
151
217
view_definition
152
218
select * from v2;
153
219
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
154
 
drop view testdb_1.v1,v2, testdb_1.v3, v4;
 
220
use test;
 
221
drop view testdb_1.v1, v2, testdb_1.v3, v4;
155
222
drop database testdb_1;
156
223
drop user testdb_1@localhost;
157
224
drop user testdb_2@localhost;