820
CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci,
821
s2 CHAR(5) COLLATE latin1_swedish_ci);
822
INSERT INTO t1 VALUES ('z','?');
823
select * from t1 where s1 > (select max(s2) from t1);
824
select * from t1 where s1 > any (select max(s2) from t1);
820
#CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci,
821
# s2 CHAR(5) COLLATE latin1_swedish_ci);
822
#INSERT INTO t1 VALUES ('z','?');
824
#select * from t1 where s1 > (select max(s2) from t1);
826
#select * from t1 where s1 > any (select max(s2) from t1);
828
830
# aggregate functions reinitialization
1587
1587
# Item_int_with_ref check (BUG#10020)
1590
`itemid` bigint unsigned NOT NULL auto_increment,
1591
`sessionid` bigint unsigned default NULL,
1592
`time` int unsigned NOT NULL default '0',
1593
`data` text collate latin1_general_ci NOT NULL,
1594
PRIMARY KEY (`itemid`)
1596
INSERT INTO `t1` VALUES (1, 1, 1, '');
1598
`sessionid` bigint unsigned NOT NULL auto_increment,
1599
`pid` int unsigned NOT NULL default '0',
1600
`date` int unsigned NOT NULL default '0',
1601
`ip` varchar(15) collate latin1_general_ci NOT NULL default '',
1602
PRIMARY KEY (`sessionid`)
1604
INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
1605
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;
1589
#CREATE TABLE `t1` (
1590
# `itemid` bigint unsigned NOT NULL auto_increment,
1591
# `sessionid` bigint unsigned default NULL,
1592
# `time` int unsigned NOT NULL default '0',
1593
# `data` text collate latin1_general_ci NOT NULL,
1594
# PRIMARY KEY (`itemid`)
1596
#INSERT INTO `t1` VALUES (1, 1, 1, '');
1597
#CREATE TABLE `t2` (
1598
# `sessionid` bigint unsigned NOT NULL auto_increment,
1599
# `pid` int unsigned NOT NULL default '0',
1600
# `date` int unsigned NOT NULL default '0',
1601
# `ip` varchar(15) collate latin1_general_ci NOT NULL default '',
1602
# PRIMARY KEY (`sessionid`)
1604
#INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
1605
#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;
1608
1608
# BUG#11821 : Select from subselect using aggregate function on an enum