~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/time_functions.cc

  • Committer: Stewart Smith
  • Date: 2010-03-18 12:01:34 UTC
  • mto: (1666.2.3 build)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: stewart@flamingspork.com-20100318120134-45fdnsw8g3j6c7oy
move RAND() into a plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
                          uint32_t flags)
132
132
{
133
133
  int was_cut;
 
134
  Session *session= current_session;
134
135
  enum enum_drizzle_timestamp_type ts_type;
135
 
  Session *session= current_session;
136
136
 
137
137
  ts_type= str_to_datetime(str, length, l_time,
138
138
                           (flags | (session->variables.sql_mode &
140
140
                                      MODE_NO_ZERO_DATE))),
141
141
                           &was_cut);
142
142
  if (was_cut || ts_type <= DRIZZLE_TIMESTAMP_ERROR)
143
 
    make_truncated_value_warning(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
143
    make_truncated_value_warning(current_session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
144
144
                                 str, length, ts_type,  NULL);
145
145
  return ts_type;
146
146
}
216
216
      break;
217
217
  }
218
218
  if (field_name)
219
 
  {
220
219
    cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
221
220
                       ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
222
221
                       type_str, str.c_ptr(), field_name,
223
222
                       (uint32_t) session->row_count);
224
 
  }
225
223
  else
226
224
  {
227
225
    if (time_type > DRIZZLE_TIMESTAMP_ERROR)