~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/subselect.result

More cleanup/test fixup around utf8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1339
1339
update t1 set  s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
1340
1340
ERROR 42S22: Unknown column 'x.s1' in 'field list'
1341
1341
DROP TABLE t1, t2;
1342
 
CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci,
1343
 
s2 CHAR(5) COLLATE latin1_swedish_ci);
1344
 
INSERT INTO t1 VALUES ('z','?');
1345
 
select * from t1 where s1 > (select max(s2) from t1);
1346
 
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>'
1347
 
select * from t1 where s1 > any (select max(s2) from t1);
1348
 
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>'
1349
 
drop table t1;
1350
1342
create table t1(toid int,rd int);
1351
1343
create table t2(userid int,pmnew int,pmtotal int);
1352
1344
insert into t2 values(1,0,0),(2,0,0);
2527
2519
select (select * from t1) = (1,2,3);
2528
2520
ERROR 21000: Operand should contain 2 column(s)
2529
2521
drop table t1;
2530
 
CREATE TABLE `t1` (
2531
 
`itemid` bigint unsigned NOT NULL auto_increment,
2532
 
`sessionid` bigint unsigned default NULL,
2533
 
`time` int unsigned NOT NULL default '0',
2534
 
`data` text collate latin1_general_ci NOT NULL,
2535
 
PRIMARY KEY  (`itemid`)
2536
 
);
2537
 
INSERT INTO `t1` VALUES (1, 1, 1, '');
2538
 
CREATE TABLE `t2` (
2539
 
`sessionid` bigint unsigned NOT NULL auto_increment,
2540
 
`pid` int unsigned NOT NULL default '0',
2541
 
`date` int unsigned NOT NULL default '0',
2542
 
`ip` varchar(15) collate latin1_general_ci NOT NULL default '',
2543
 
PRIMARY KEY  (`sessionid`)
2544
 
);
2545
 
INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
2546
 
SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30;
2547
 
ip      count( e.itemid )
2548
 
10.10.10.1      1
2549
 
drop tables t1,t2;
2550
2522
create table t1 (fld enum('0','1'));
2551
2523
insert into t1 values ('1');
2552
2524
select * from (select max(fld) from t1) as foo;