~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/weekday.result

  • Committer: Jay Pipes
  • Date: 2009-01-30 15:31:56 UTC
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090130153156-kq2bis6mwh48qi1w
Fixes the WEEKDAY() function use the new temporal system and enable proper error throwing on bad datetimes.  Adds test case for the WEEKDAY() function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SELECT WEEKDAY(NULL);
 
2
WEEKDAY(NULL)
 
3
NULL
 
4
SELECT WEEKDAY();
 
5
ERROR 42000: Incorrect parameter count in the call to native function 'WEEKDAY'
 
6
SELECT WEEKDAY(1, 0);
 
7
ERROR 42000: Incorrect parameter count in the call to native function 'WEEKDAY'
 
8
SELECT WEEKDAY("xxx");
 
9
ERROR HY000: Received an invalid datetime value 'xxx'.
 
10
SELECT WEEKDAY("0000-00-00");
 
11
ERROR HY000: Received an invalid datetime value '0000-00-00'.
 
12
SELECT WEEKDAY("0000-01-01");
 
13
ERROR HY000: Received an invalid datetime value '0000-01-01'.
 
14
SELECT WEEKDAY("0001-00-01");
 
15
ERROR HY000: Received an invalid datetime value '0001-00-01'.
 
16
SELECT WEEKDAY("0001-01-00");
 
17
ERROR HY000: Received an invalid datetime value '0001-01-00'.
 
18
SELECT WEEKDAY("2000-02-30");
 
19
ERROR HY000: Received an invalid datetime value '2000-02-30'.
 
20
SELECT WEEKDAY("1900-02-29");
 
21
ERROR HY000: Received an invalid datetime value '1900-02-29'.
 
22
SELECT WEEKDAY('1976-15-15');
 
23
ERROR HY000: Received an invalid datetime value '1976-15-15'.
 
24
SELECT WEEKDAY("2009-01-12");
 
25
WEEKDAY("2009-01-12")
 
26
0
 
27
SELECT WEEKDAY("70-12-31");
 
28
WEEKDAY("70-12-31")
 
29
3
 
30
SELECT WEEKDAY("99-12-31");
 
31
WEEKDAY("99-12-31")
 
32
4
 
33
SELECT WEEKDAY("69-12-31");
 
34
WEEKDAY("69-12-31")
 
35
1
 
36
SELECT WEEKDAY("0001-12-31");
 
37
WEEKDAY("0001-12-31")
 
38
0
 
39
SELECT WEEKDAY("9999-12-31");
 
40
WEEKDAY("9999-12-31")
 
41
4
 
42
SELECT WEEKDAY('07/31/2009');
 
43
WEEKDAY('07/31/2009')
 
44
4