~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/update.test

  • Committer: Monty Taylor
  • Date: 2010-04-15 19:14:53 UTC
  • mto: This revision was merged to the branch mainline in revision 1476.
  • Revision ID: mordred@inaugust.com-20100415191453-ril2x8qdo78fny9w
Replaced test_authz with a plugin implementing a hard-coded simple
multi-tennancy policy. The policy describes:
- A root user exists which can do anything
- A user may only see a schema that is named the same has his user name
- A user may see data_dictionary and information_schema (data_dictionary
  required for show databases to work)

This way, we can more clearly test the results of the authorization
interface while providing an optional plugin that is actually useful to some
human.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
# Some strange updates to test some otherwise unused code
15
15
update t1 set a=a+100 where a=1 and a=2;
16
 
--error ER_BAD_FIELD_ERROR
 
16
--error 1054
17
17
update t1 set a=b+100 where a=1 and a=2; 
18
 
--error ER_BAD_FIELD_ERROR
 
18
--error 1054
19
19
update t1 set a=b+100 where c=1 and a=2; 
20
 
--error ER_BAD_FIELD_ERROR
 
20
--error 1054
21
21
update t1 set d=a+100 where a=1;
22
22
select * from t1;
23
23
drop table t1;
152
152
#
153
153
create table t1(f1 int);
154
154
select DATABASE();
155
 
--error ER_INVALID_GROUP_FUNC_USE
 
155
--error 1111
156
156
update t1 set f1=1 where count(*)=1;
157
157
select DATABASE();
158
 
--error ER_INVALID_GROUP_FUNC_USE
 
158
--error 1111
159
159
delete from t1 where count(*)=1;
160
160
drop table t1;
161
161
 
233
233
# Bug#25126: Wrongly resolved field leads to a crash
234
234
#
235
235
create table t1(f1 int);
236
 
--error ER_BAD_FIELD_ERROR
 
236
--error 1054
237
237
update t1 set f2=1 order by f2;
238
238
drop table t1;
239
239
# End of 4.1 tests