~mdcallag/+junk/5.1-map

« back to all changes in this revision

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

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
136
v6      CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v6` AS select `t1`.`f1` AS `f1` from `t1`
 
137
show create view testdb_1.v7;
 
138
View    Create View
 
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`
 
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
 
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`
 
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
 
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`
 
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
 
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`
 
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    
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;