~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/unix_timestamp.cc

  • Committer: Lee Bieber
  • Date: 2010-12-23 23:11:00 UTC
  • mfrom: (2024.1.1 clean)
  • Revision ID: kalebral@gmail.com-20101223231100-0rqirgz7ugkl10yp
Merge Brian - session list cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
int64_t Item_func_unix_timestamp::val_int()
32
32
{
33
 
  type::Time ltime;
 
33
  DRIZZLE_TIME ltime;
34
34
 
35
35
  assert(fixed == 1);
36
36
  if (arg_count == 0)
37
 
    return (int64_t) current_session->getCurrentTimestampEpoch();
 
37
    return (int64_t) current_session->query_start();
38
38
 
39
39
  if (args[0]->type() == FIELD_ITEM)
40
40
  {                                             // Optimize timestamp field
43
43
      return ((field::Epoch::pointer) field)->get_timestamp(&null_value);
44
44
  }
45
45
 
46
 
  if (get_arg0_date(ltime, 0))
 
46
  if (get_arg0_date(&ltime, 0))
47
47
  {
48
48
    /*
49
49
      We have to set null_value again because get_arg0_date will also set it