~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/order_by.result

Phase 1 - temporal changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
2007
2007
19      1.3333
2008
2008
9       2.6667
2009
2009
drop table t1;
2010
 
CREATE TABLE t1 (a INT NOT NULL, b TIME);
2011
 
INSERT INTO t1 (a) VALUES (100000), (0), (100), (1000000),(10000), (1000), (10);
2012
 
UPDATE t1 SET b = SEC_TO_TIME(a);
2013
 
SELECT a, b FROM t1 ORDER BY b DESC;
2014
 
a       b
2015
 
1000000 277:46:40
2016
 
100000  27:46:40
2017
 
10000   02:46:40
2018
 
1000    00:16:40
2019
 
100     00:01:40
2020
 
10      00:00:10
2021
 
0       00:00:00
2022
 
SELECT a, b FROM t1 ORDER BY SEC_TO_TIME(a) DESC;
2023
 
a       b
2024
 
1000000 277:46:40
2025
 
100000  27:46:40
2026
 
10000   02:46:40
2027
 
1000    00:16:40
2028
 
100     00:01:40
2029
 
10      00:00:10
2030
 
0       00:00:00
2031
 
DROP TABLE t1;
2032
2010
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE KEY b (b));
2033
2011
INSERT INTO t1 VALUES (1,1),(2,2);
2034
2012
CREATE TABLE t2 (a INT, b INT, KEY a (a,b));