summaryrefslogtreecommitdiff
path: root/mysql-test/r/ndb_limit.result
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2004-09-30 21:36:25 +0000
committerunknown <tomas@poseidon.ndb.mysql.com>2004-09-30 21:36:25 +0000
commitf5f55979f492908efa8d0aeeb8f289138e3775d9 (patch)
treeec7ecf106e7653549817ab34bf90690a9692194d /mysql-test/r/ndb_limit.result
parent8a63a0b587c15c5ca87fb290d8e2c330acdcc6c0 (diff)
downloadmariadb-git-f5f55979f492908efa8d0aeeb8f289138e3775d9.tar.gz
bug#5782
Diffstat (limited to 'mysql-test/r/ndb_limit.result')
-rw-r--r--mysql-test/r/ndb_limit.result41
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_limit.result b/mysql-test/r/ndb_limit.result
index 6574aa0bb1a..da1ec3b61c3 100644
--- a/mysql-test/r/ndb_limit.result
+++ b/mysql-test/r/ndb_limit.result
@@ -29,3 +29,44 @@ count(*)
select * from t2 limit 0;
a b c
drop table t2;
+CREATE TABLE `t2` (
+`views` int(11) NOT NULL default '0',
+`clicks` int(11) NOT NULL default '0',
+`day` date NOT NULL default '0000-00-00',
+`hour` tinyint(4) NOT NULL default '0',
+`bannerid` smallint(6) NOT NULL default '0',
+`zoneid` smallint(6) NOT NULL default '0',
+`source` varchar(50) NOT NULL default '',
+PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`),
+KEY `bannerid_day` (`bannerid`,`day`),
+KEY `zoneid` (`zoneid`)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
+INSERT INTO `t2` VALUES
+( 1,0,'2004-09-17', 5,100,100,''),
+( 1,0,'2004-09-18', 7,100,100,''),
+( 17,0,'2004-09-27',20,132,100,''),
+( 4,0,'2004-09-16',23,132,100,''),
+( 86,0,'2004-09-18', 7,196,196,''),
+( 11,0,'2004-09-16',16,132,100,''),
+(140,0,'2004-09-18', 0,100,164,''),
+( 2,0,'2004-09-17', 7,132,100,''),
+(846,0,'2004-09-27',11,132,164,''),
+( 1,0,'2004-09-18', 8,132,100,''),
+( 22,0,'2004-09-27', 9,164,132,''),
+(711,0,'2004-09-27', 9,100,164,''),
+( 11,0,'2004-09-18', 0,196,132,''),
+( 41,0,'2004-09-27',15,196,132,''),
+( 57,0,'2004-09-18', 2,164,196,'');
+SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y')
+as date_formatted FROM t2 GROUP BY day ORDER BY day DESC;
+date date_formatted
+20040927 27-09-2004
+20040918 18-09-2004
+20040917 17-09-2004
+20040916 16-09-2004
+SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y')
+as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2;
+date date_formatted
+20040927 27-09-2004
+20040918 18-09-2004
+drop table t2;