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

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/t/in_calendar_pk_constraint_ignore.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;
 
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
--error ER_DUP_ENTRY
 
9
INSERT INTO t1 (c1) VALUES(NOW());
 
10
SELECT * FROM t1;
 
11
DROP TABLE t1;
 
12
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
13
INSERT INTO t1 (c1) VALUES(1999);
 
14
INSERT INTO t1 (c1) VALUES(2000);
 
15
--error ER_DUP_ENTRY
 
16
INSERT INTO t1 (c1) VALUES(1999);
 
17
SELECT * FROM t1;
 
18
DROP TABLE t1;
 
19
CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY);
 
20
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
 
21
INSERT INTO t1 (c1) VALUES(NOW());
 
22
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
23
--error ER_DUP_ENTRY
 
24
INSERT INTO t1 (c1) VALUES(NOW());
 
25
SELECT * FROM t1;
 
26
DROP TABLE t1;
 
27
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
28
INSERT INTO t1 (c1) VALUES(1999);
 
29
INSERT INTO t1 (c1) VALUES(2000);
 
30
--error ER_DUP_ENTRY
 
31
INSERT INTO t1 (c1) VALUES(1999);
 
32
SELECT * FROM t1;
 
33
DROP TABLE t1;
 
34
CREATE TABLE t1(c1 DATETIME NOT NULL PRIMARY KEY);
 
35
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
 
36
INSERT INTO t1 (c1) VALUES(NOW());
 
37
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
38
--error ER_DUP_ENTRY
 
39
INSERT INTO t1 (c1) VALUES(NOW());
 
40
SELECT * FROM t1;
 
41
DROP TABLE t1;
 
42
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
43
INSERT INTO t1 (c1) VALUES(1999);
 
44
INSERT INTO t1 (c1) VALUES(2000);
 
45
--error ER_DUP_ENTRY
 
46
INSERT INTO t1 (c1) VALUES(1999);
 
47
SELECT * FROM t1;
 
48
DROP TABLE t1;
 
49
CREATE TABLE t1(c1 TIMESTAMP NOT NULL PRIMARY KEY);
 
50
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
 
51
INSERT INTO t1 (c1) VALUES(NOW());
 
52
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
53
--error ER_DUP_ENTRY
 
54
INSERT INTO t1 (c1) VALUES(NOW());
 
55
SELECT * FROM t1;
 
56
DROP TABLE t1;
 
57
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
58
INSERT INTO t1 (c1) VALUES(1999);
 
59
INSERT INTO t1 (c1) VALUES(2000);
 
60
--error ER_DUP_ENTRY
 
61
INSERT INTO t1 (c1) VALUES(1999);
 
62
SELECT * FROM t1;
 
63
DROP TABLE t1;
 
64