~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_timefunc.cc

  • Committer: Brian Aker
  • Date: 2008-10-20 03:40:03 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020034003-t2dcnl0ayr2ymm8k
THD -> Session rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
608
608
  uint32_t weekday;
609
609
  ulong length;
610
610
  const char *ptr, *end;
611
 
  THD *thd= current_thd;
 
611
  Session *thd= current_thd;
612
612
  MY_LOCALE *locale= thd->variables.lc_time_names;
613
613
 
614
614
  str->length(0);
1022
1022
  assert(fixed == 1);
1023
1023
  const char *month_name;
1024
1024
  uint32_t   month= (uint) val_int();
1025
 
  THD *thd= current_thd;
 
1025
  Session *thd= current_thd;
1026
1026
 
1027
1027
  if (null_value || !month)
1028
1028
  {
1162
1162
  assert(fixed == 1);
1163
1163
  uint32_t weekday=(uint) val_int();            // Always Item_func_daynr()
1164
1164
  const char *day_name;
1165
 
  THD *thd= current_thd;
 
1165
  Session *thd= current_thd;
1166
1166
 
1167
1167
  if (null_value)
1168
1168
    return (String*) 0;
1505
1505
*/
1506
1506
void Item_func_curdate_local::store_now_in_TIME(DRIZZLE_TIME *now_time)
1507
1507
{
1508
 
  THD *thd= current_thd;
 
1508
  Session *thd= current_thd;
1509
1509
  thd->variables.time_zone->gmt_sec_to_TIME(now_time, 
1510
1510
                                             (my_time_t)thd->query_start());
1511
1511
  thd->time_zone_used= 1;
1562
1562
*/
1563
1563
void Item_func_curtime_local::store_now_in_TIME(DRIZZLE_TIME *now_time)
1564
1564
{
1565
 
  THD *thd= current_thd;
 
1565
  Session *thd= current_thd;
1566
1566
  thd->variables.time_zone->gmt_sec_to_TIME(now_time, 
1567
1567
                                             (my_time_t)thd->query_start());
1568
1568
  thd->time_zone_used= 1;
1611
1611
*/
1612
1612
void Item_func_now_local::store_now_in_TIME(DRIZZLE_TIME *now_time)
1613
1613
{
1614
 
  THD *thd= current_thd;
 
1614
  Session *thd= current_thd;
1615
1615
  thd->variables.time_zone->gmt_sec_to_TIME(now_time, 
1616
1616
                                             (my_time_t)thd->query_start());
1617
1617
  thd->time_zone_used= 1;
1654
1654
*/
1655
1655
void Item_func_sysdate_local::store_now_in_TIME(DRIZZLE_TIME *now_time)
1656
1656
{
1657
 
  THD *thd= current_thd;
 
1657
  Session *thd= current_thd;
1658
1658
  thd->variables.time_zone->gmt_sec_to_TIME(now_time, (my_time_t) my_time(0));
1659
1659
  thd->time_zone_used= 1;
1660
1660
}
1750
1750
 
1751
1751
void Item_func_date_format::fix_length_and_dec()
1752
1752
{
1753
 
  THD* thd= current_thd;
 
1753
  Session* thd= current_thd;
1754
1754
  /*
1755
1755
    Must use this_item() in case it's a local SP variable
1756
1756
    (for ->max_length and ->str_value)