~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2011-01-20 15:27:43 UTC
  • mfrom: (2097.1.7 drizzle-build)
  • Revision ID: brian@tangent.org-20110120152743-x88aq1sj1k9andwm
Merge of all of the time fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
{
42
42
  assert(fixed == 1);
43
43
  store_now_in_TIME(&ltime);
44
 
  buff_length= (uint) my_datetime_to_str(&ltime, buff);
45
 
  str_value.set(buff, buff_length, &my_charset_bin);
 
44
 
 
45
  size_t length= type::Time::MAX_STRING_LENGTH;
 
46
  ltime.convert(buff, length);
 
47
  buff_length= length;
 
48
  str_value.set(buff, length, &my_charset_bin);
 
49
 
46
50
  return &str_value;
47
51
}
48
52
 
70
74
}
71
75
 
72
76
 
73
 
bool Item_func_sysdate_local::get_date(type::Time *res,
74
 
                                       uint32_t )
 
77
bool Item_func_sysdate_local::get_date(type::Time *res, uint32_t )
75
78
{
76
79
  store_now_in_TIME(&ltime);
77
80
  *res= ltime;
83
86
{
84
87
  store_now_in_TIME(&ltime);
85
88
  to->set_notnull();
86
 
  to->store_time(&ltime, DRIZZLE_TIMESTAMP_DATETIME);
 
89
  to->store_time(&ltime, type::DRIZZLE_TIMESTAMP_DATETIME);
 
90
 
87
91
  return 0;
88
92
}
89
93