~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/t/de_calendar_range.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-05-11 18:47:32 UTC
  • mto: (2.1.2 sid) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100511184732-jhn055kfhxze24kt
Tags: upstream-5.1.46
ImportĀ upstreamĀ versionĀ 5.1.46

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--disable_warnings
 
2
DROP TABLE IF EXISTS t1,t2,t3;
 
3
--enable_warnings
 
4
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
 
5
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
 
6
INSERT INTO t1 (c1) VALUES(NOW());
 
7
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
8
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'2 02:01:01'));
 
9
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'3 03:01:01'));
 
10
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'4 04:01:01'));
 
11
SELECT * FROM t1 ORDER BY c1;
 
12
DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01');
 
13
SELECT * FROM t1 ORDER BY c1;
 
14
DROP TABLE t1;
 
15
CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY);
 
16
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
 
17
INSERT INTO t1 (c1) VALUES(NOW());
 
18
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
19
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'2 02:01:01'));
 
20
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'3 03:01:01'));
 
21
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'4 04:01:01'));
 
22
SELECT * FROM t1 ORDER BY c1;
 
23
DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01');
 
24
SELECT * FROM t1 ORDER BY c1;
 
25
DROP TABLE t1;
 
26
CREATE TABLE t1(c1 DATETIME NOT NULL PRIMARY KEY);
 
27
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
 
28
INSERT INTO t1 (c1) VALUES(NOW());
 
29
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
30
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'2 02:01:01'));
 
31
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'3 03:01:01'));
 
32
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'4 04:01:01'));
 
33
SELECT * FROM t1 ORDER BY c1;
 
34
DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01');
 
35
SELECT * FROM t1 ORDER BY c1;
 
36
DROP TABLE t1;
 
37
CREATE TABLE t1(c1 TIMESTAMP NOT NULL PRIMARY KEY);
 
38
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
 
39
INSERT INTO t1 (c1) VALUES(NOW());
 
40
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
41
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'2 02:01:01'));
 
42
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'3 03:01:01'));
 
43
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'4 04:01:01'));
 
44
SELECT * FROM t1 ORDER BY c1;
 
45
DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01');
 
46
SELECT * FROM t1 ORDER BY c1;
 
47
DROP TABLE t1;
 
48