~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/dayofyear.result

  • Committer: Monty Taylor
  • Date: 2009-01-29 20:42:53 UTC
  • mfrom: (819 testable)
  • mto: (779.3.19 devel)
  • mto: This revision was merged to the branch mainline in revision 823.
  • Revision ID: mordred@inaugust.com-20090129204253-9kcnyaxldhy7fyym
Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SELECT DAYOFYEAR(NULL);
 
2
DAYOFYEAR(NULL)
 
3
NULL
 
4
SELECT DAYOFYEAR();
 
5
ERROR 42000: Incorrect parameter count in the call to native function 'DAYOFYEAR'
 
6
SELECT DAYOFYEAR(1, 0);
 
7
ERROR 42000: Incorrect parameter count in the call to native function 'DAYOFYEAR'
 
8
SELECT DAYOFYEAR("xxx");
 
9
ERROR HY000: Received an invalid datetime value 'xxx'.
 
10
SELECT DAYOFYEAR("0000-00-00");
 
11
ERROR HY000: Received an invalid datetime value '0000-00-00'.
 
12
SELECT DAYOFYEAR("0000-01-01");
 
13
ERROR HY000: Received an invalid datetime value '0000-01-01'.
 
14
SELECT DAYOFYEAR("0001-00-01");
 
15
ERROR HY000: Received an invalid datetime value '0001-00-01'.
 
16
SELECT DAYOFYEAR("0001-01-00");
 
17
ERROR HY000: Received an invalid datetime value '0001-01-00'.
 
18
SELECT DAYOFYEAR("2000-02-30");
 
19
ERROR HY000: Received an invalid datetime value '2000-02-30'.
 
20
SELECT DAYOFYEAR("1900-02-29");
 
21
ERROR HY000: Received an invalid datetime value '1900-02-29'.
 
22
SELECT DAYOFYEAR('1976-15-15');
 
23
ERROR HY000: Received an invalid datetime value '1976-15-15'.
 
24
SELECT DAYOFYEAR("2009-01-01");
 
25
DAYOFYEAR("2009-01-01")
 
26
1
 
27
SELECT DAYOFYEAR("2009-01-12");
 
28
DAYOFYEAR("2009-01-12")
 
29
12
 
30
SELECT DAYOFYEAR("70-12-31");
 
31
DAYOFYEAR("70-12-31")
 
32
365
 
33
SELECT DAYOFYEAR("00-12-31");
 
34
DAYOFYEAR("00-12-31")
 
35
366
 
36
SELECT DAYOFYEAR("0001-01-31");
 
37
DAYOFYEAR("0001-01-31")
 
38
31
 
39
SELECT DAYOFYEAR('07/31/2009');
 
40
DAYOFYEAR('07/31/2009')
 
41
212
 
42
SELECT DAYOFYEAR('20090916');
 
43
DAYOFYEAR('20090916')
 
44
259
 
45
SELECT DAYOFYEAR('20090916091528');
 
46
DAYOFYEAR('20090916091528')
 
47
259
 
48
SELECT DAYOFYEAR("20090916091528.000000");
 
49
DAYOFYEAR("20090916091528.000000")
 
50
259
 
51
SELECT DAYOFYEAR('09-09-16');
 
52
DAYOFYEAR('09-09-16')
 
53
259
 
54
SELECT DAYOFYEAR('09.09.16');
 
55
DAYOFYEAR('09.09.16')
 
56
259
 
57
SELECT DAYOFYEAR('09/09/16');
 
58
DAYOFYEAR('09/09/16')
 
59
259
 
60
SELECT DAYOFYEAR('09-09-16');
 
61
DAYOFYEAR('09-09-16')
 
62
259
 
63
SELECT DAYOFYEAR('09-9-2');
 
64
DAYOFYEAR('09-9-2')
 
65
245
 
66
SELECT DAYOFYEAR(20090916);
 
67
DAYOFYEAR(20090916)
 
68
259
 
69
SELECT DAYOFYEAR(20090916091528);
 
70
DAYOFYEAR(20090916091528)
 
71
259
 
72
SELECT DAYOFYEAR(20090916091528.000000);
 
73
ERROR HY000: Received an invalid datetime value '20090916091528.000000'.
 
74
USE test;
 
75
DROP TABLE IF EXISTS t1;
 
76
CREATE TABLE t1 (
 
77
int_fld INT NOT NULL
 
78
, date_fld DATE NOT NULL
 
79
, datetime_fld DATETIME NOT NULL
 
80
, timestamp_fld TIMESTAMP NOT NULL
 
81
, char_fld CHAR(22) NOT NULL
 
82
, varchar_fld VARCHAR(22) NOT NULL
 
83
, text_fld TEXT NOT NULL
 
84
, blob_fld BLOB NOT NULL
 
85
);
 
86
INSERT INTO t1 VALUES (
 
87
20071130
 
88
, "2007-11-30"
 
89
, "2007-11-30 16:30:19"
 
90
, "2007-11-30T16:30:19"
 
91
, "2007-11-30 16:30:19"
 
92
, "2007-11-30 16:30:19"
 
93
, "2007-11-30T16:30:19"
 
94
, "2007-11-30T16:30:19"
 
95
);
 
96
SELECT DAYOFYEAR(int_fld) FROM t1;
 
97
DAYOFYEAR(int_fld)
 
98
334
 
99
SELECT DAYOFYEAR(date_fld) FROM t1;
 
100
DAYOFYEAR(date_fld)
 
101
334
 
102
SELECT DAYOFYEAR(datetime_fld) FROM t1;
 
103
DAYOFYEAR(datetime_fld)
 
104
334
 
105
SELECT DAYOFYEAR(timestamp_fld) FROM t1;
 
106
DAYOFYEAR(timestamp_fld)
 
107
334
 
108
SELECT DAYOFYEAR(char_fld) FROM t1;
 
109
DAYOFYEAR(char_fld)
 
110
334
 
111
SELECT DAYOFYEAR(varchar_fld) FROM t1;
 
112
DAYOFYEAR(varchar_fld)
 
113
334
 
114
SELECT DAYOFYEAR(text_fld) FROM t1;
 
115
DAYOFYEAR(text_fld)
 
116
334
 
117
SELECT DAYOFYEAR(blob_fld) FROM t1;
 
118
DAYOFYEAR(blob_fld)
 
119
334
 
120
DROP TABLE t1;