1590
1590
`itemid` bigint unsigned NOT NULL auto_increment,
1591
1591
`sessionid` bigint unsigned default NULL,
1592
1592
`time` int unsigned NOT NULL default '0',
1593
`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT
1595
1593
`data` text collate latin1_general_ci NOT NULL,
1596
1594
PRIMARY KEY (`itemid`)
1597
1595
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
1598
INSERT INTO `t1` VALUES (1, 1, 1, 'D', '');
1596
INSERT INTO `t1` VALUES (1, 1, 1, '');
1599
1597
CREATE TABLE `t2` (
1600
1598
`sessionid` bigint unsigned NOT NULL auto_increment,
1601
1599
`pid` int unsigned NOT NULL default '0',
1955
1953
DROP TABLE t1,t2,t3;
1958
# Item_int_with_ref check (BUG#10020)
1961
`itemid` bigint unsigned NOT NULL auto_increment,
1962
`sessionid` bigint unsigned default NULL,
1963
`time` int unsigned NOT NULL default '0',
1964
`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT
1966
`data` text collate latin1_general_ci NOT NULL,
1967
PRIMARY KEY (`itemid`)
1968
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
1969
INSERT INTO `t1` VALUES (1, 1, 1, 'D', '');
1971
`sessionid` bigint unsigned NOT NULL auto_increment,
1972
`pid` int unsigned NOT NULL default '0',
1973
`date` int unsigned NOT NULL default '0',
1974
`ip` varchar(15) collate latin1_general_ci NOT NULL default '',
1975
PRIMARY KEY (`sessionid`)
1976
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
1977
INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
1978
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;
1982
1956
# Correct building of equal fields list (do not include outer
1983
1957
# fields) (BUG#6384)