~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/time_functions.cc

  • Committer: Lee Bieber
  • Date: 2010-01-30 23:42:02 UTC
  • mto: This revision was merged to the branch mainline in revision 1282.
  • Revision ID: lbieber@lee-biebers-macbook-pro.local-20100130234202-sxmqfteqwiq15ptg
add target to japanese tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "drizzled/session.h"
28
28
#include "drizzled/time_functions.h"
29
29
 
30
 
namespace drizzled
31
 
{
32
 
 
33
30
/* Some functions to calculate dates */
34
31
 
 
32
#ifndef TESTTIME
35
33
 
36
34
int calc_weekday(long daynr,bool sunday_first_day_of_week)
37
35
{
131
129
                          uint32_t flags)
132
130
{
133
131
  int was_cut;
 
132
  Session *session= current_session;
134
133
  enum enum_drizzle_timestamp_type ts_type;
135
 
  Session *session= current_session;
136
134
 
137
135
  ts_type= str_to_datetime(str, length, l_time,
138
136
                           (flags | (session->variables.sql_mode &
140
138
                                      MODE_NO_ZERO_DATE))),
141
139
                           &was_cut);
142
140
  if (was_cut || ts_type <= DRIZZLE_TIMESTAMP_ERROR)
143
 
    make_truncated_value_warning(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
141
    make_truncated_value_warning(current_session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
144
142
                                 str, length, ts_type,  NULL);
145
143
  return ts_type;
146
144
}
216
214
      break;
217
215
  }
218
216
  if (field_name)
219
 
  {
220
217
    cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
221
218
                       ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
222
219
                       type_str, str.c_ptr(), field_name,
223
220
                       (uint32_t) session->row_count);
224
 
  }
225
221
  else
226
222
  {
227
223
    if (time_type > DRIZZLE_TIMESTAMP_ERROR)
286
282
  return neg;
287
283
}
288
284
 
289
 
} /* namespace drizzled */
 
285
 
 
286
#endif