~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_timestamp.test

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-21 01:02:23 UTC
  • mto: (960.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 961.
  • Revision ID: osullivan.padraig@gmail.com-20090321010223-j8cph7eeyt1u3xol
Fixed function object to ensure it correctly returns a boolean type since
memcmp returns an integer. Added some more comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
--enable_warnings
8
8
 
9
9
# Set timezone to GMT-3, to make it possible to use "interval 3 hour"
10
 
set time_zone="+03:00";
11
 
 
12
 
create table t1 (Zeit time, Tag int not null, Monat int not null,
 
10
create table t1 (Tag int not null, Monat int not null,
13
11
Jahr int not null, index(Tag), index(Monat), index(Jahr) );
14
 
insert into t1 values ("09:26:00",16,9,1998),("09:26:00",16,9,1998);
15
 
SELECT CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit) AS Date,
16
 
   UNIX_TIMESTAMP(CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit)) AS Unix
 
12
insert into t1 values (16,9,1998),(16,9,1998);
 
13
SELECT CONCAT(Jahr,'-',Monat,'-',Tag) AS Date,
 
14
   UNIX_TIMESTAMP(CONCAT(Jahr,'-',Monat,'-',Tag)) AS Unix
17
15
FROM t1;
18
16
drop table t1;
19
17
 
20
18
# End of 4.1 tests
21
 
 
22
 
# Restore timezone to default
23
 
set time_zone= @@global.time_zone;