~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
DROP TABLE IF EXISTS t1;
 
2
SET TIME_ZONE="+03:00";
 
3
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
 
4
SET TIMESTAMP=1171346973;
 
5
INSERT INTO t1 (c1) VALUES(NOW());
 
6
Warnings:
 
7
Note    1265    Data truncated for column 'c1' at row 1
 
8
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
9
Warnings:
 
10
Note    1265    Data truncated for column 'c1' at row 1
 
11
INSERT INTO t1 (c1) VALUES(NOW());
 
12
ERROR 23000: Duplicate entry '2007-02-13' for key 'PRIMARY'
 
13
SELECT * FROM t1;
 
14
c1
 
15
2007-02-13
 
16
2007-02-14
 
17
DROP TABLE t1;
 
18
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
19
INSERT INTO t1 (c1) VALUES(1999);
 
20
INSERT INTO t1 (c1) VALUES(2000);
 
21
INSERT INTO t1 (c1) VALUES(1999);
 
22
ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
 
23
SELECT * FROM t1;
 
24
c1
 
25
1999
 
26
2000
 
27
DROP TABLE t1;
 
28
CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY);
 
29
SET TIMESTAMP=1171346973;
 
30
INSERT INTO t1 (c1) VALUES(NOW());
 
31
Warnings:
 
32
Note    1265    Data truncated for column 'c1' at row 1
 
33
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
34
Warnings:
 
35
Note    1265    Data truncated for column 'c1' at row 1
 
36
INSERT INTO t1 (c1) VALUES(NOW());
 
37
ERROR 23000: Duplicate entry '09:09:33' for key 'PRIMARY'
 
38
SELECT * FROM t1;
 
39
c1
 
40
09:09:33
 
41
10:10:34
 
42
DROP TABLE t1;
 
43
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
44
INSERT INTO t1 (c1) VALUES(1999);
 
45
INSERT INTO t1 (c1) VALUES(2000);
 
46
INSERT INTO t1 (c1) VALUES(1999);
 
47
ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
 
48
SELECT * FROM t1;
 
49
c1
 
50
1999
 
51
2000
 
52
DROP TABLE t1;
 
53
CREATE TABLE t1(c1 DATETIME NOT NULL PRIMARY KEY);
 
54
SET TIMESTAMP=1171346973;
 
55
INSERT INTO t1 (c1) VALUES(NOW());
 
56
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
57
INSERT INTO t1 (c1) VALUES(NOW());
 
58
ERROR 23000: Duplicate entry '2007-02-13 09:09:33' for key 'PRIMARY'
 
59
SELECT * FROM t1;
 
60
c1
 
61
2007-02-13 09:09:33
 
62
2007-02-14 10:10:34
 
63
DROP TABLE t1;
 
64
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
65
INSERT INTO t1 (c1) VALUES(1999);
 
66
INSERT INTO t1 (c1) VALUES(2000);
 
67
INSERT INTO t1 (c1) VALUES(1999);
 
68
ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
 
69
SELECT * FROM t1;
 
70
c1
 
71
1999
 
72
2000
 
73
DROP TABLE t1;
 
74
CREATE TABLE t1(c1 TIMESTAMP NOT NULL PRIMARY KEY);
 
75
SET TIMESTAMP=1171346973;
 
76
INSERT INTO t1 (c1) VALUES(NOW());
 
77
INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
 
78
INSERT INTO t1 (c1) VALUES(NOW());
 
79
ERROR 23000: Duplicate entry '2007-02-13 09:09:33' for key 'PRIMARY'
 
80
SELECT * FROM t1;
 
81
c1
 
82
2007-02-13 09:09:33
 
83
2007-02-14 10:10:34
 
84
DROP TABLE t1;
 
85
CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
 
86
INSERT INTO t1 (c1) VALUES(1999);
 
87
INSERT INTO t1 (c1) VALUES(2000);
 
88
INSERT INTO t1 (c1) VALUES(1999);
 
89
ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
 
90
SELECT * FROM t1;
 
91
c1
 
92
1999
 
93
2000
 
94
DROP TABLE t1;
 
95
SET TIME_ZONE= @@global.time_zone;