~posulliv/drizzle/memcached_applier

« back to all changes in this revision

Viewing changes to tests/r/derived.result

Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2,t3;
2
 
Warnings:
3
 
Note    1051    Unknown table 't1'
4
 
Note    1051    Unknown table 't2'
5
 
Note    1051    Unknown table 't3'
6
2
select * from (select 2) b;
7
3
2
8
4
2
209
205
1
210
206
create table t1 (a int);
211
207
insert into t1 values (1),(2),(3);
212
 
update (select * from t1) as t1 set a = 5;
213
 
ERROR HY000: The target table t1 of the UPDATE is not updatable
214
208
delete from (select * from t1);
215
209
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '(select * from t1)' at line 1
216
210
insert into  (select * from t1) values (5);
248
242
3       UNION   t1      ALL     NULL    NULL    NULL    NULL    2       
249
243
NULL    UNION RESULT    <union2,3>      ALL     NULL    NULL    NULL    NULL    NULL    
250
244
drop table t1;
251
 
CREATE TABLE `t1` (
252
 
`N` int NOT NULL default '0',
253
 
`M` int default '0'
254
 
);
255
 
INSERT INTO `t1` (N, M) VALUES (1, 0),(1, 0),(1, 0),(2, 0),(2, 0),(3, 0);
256
 
UPDATE `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2;
257
 
select * from t1;
258
 
N       M
259
 
1       2
260
 
1       2
261
 
1       2
262
 
2       2
263
 
2       2
264
 
3       0
265
 
UPDATE `t1` AS P1 INNER JOIN (SELECT aaaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2;
266
 
ERROR 42S22: Unknown column 'aaaa' in 'field list'
267
 
delete P1.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N;
268
 
select * from t1;
269
 
N       M
270
 
3       0
271
 
delete P1.* from `t1` AS P1 INNER JOIN (SELECT aaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS p2 ON P1.N = p2.N;
272
 
ERROR 42S22: Unknown column 'aaa' in 'field list'
273
 
drop table t1;
274
245
CREATE TEMPORARY TABLE t1 (
275
246
OBJECTID int NOT NULL default 0,
276
247
SORTORDER int NOT NULL auto_increment,