~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

  • Committer: Monty Taylor
  • Date: 2008-10-02 01:31:53 UTC
  • mfrom: (398.1.6 codestyle-new)
  • Revision ID: monty@inaugust.com-20081002013153-b097om921cd3j1pn
MergedĀ fromĀ stdint-includes-fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1177
1177
*/
1178
1178
 
1179
1179
int Field::store_time(DRIZZLE_TIME *ltime,
1180
 
                      timestamp_type type_arg __attribute__((unused)))
 
1180
                      enum enum_drizzle_timestamp_type type_arg __attribute__((unused)))
1181
1181
{
1182
1182
  char buff[MAX_DATE_STRING_REP_LENGTH];
1183
1183
  uint length= (uint) my_TIME_to_str(ltime, buff);
1363
1363
{
1364
1364
  const CHARSET_INFO * const cs= &my_charset_bin;
1365
1365
  uint length;
1366
 
  uint mlength=max(field_length+1,5*cs->mbmaxlen);
 
1366
  uint mlength=cmax(field_length+1,5*cs->mbmaxlen);
1367
1367
  val_buffer->alloc(mlength);
1368
1368
  char *to=(char*) val_buffer->ptr();
1369
1369
 
2143
2143
        and 19 as length of 4.1 compatible representation.
2144
2144
      */
2145
2145
      length= ((length+1)/2)*2; /* purecov: inspected */
2146
 
      length= min(length, (uint32_t)MAX_DATETIME_COMPRESSED_WIDTH); /* purecov: inspected */
 
2146
      length= cmin(length, (uint32_t)MAX_DATETIME_COMPRESSED_WIDTH); /* purecov: inspected */
2147
2147
    }
2148
2148
    flags|= UNSIGNED_FLAG;
2149
2149
    if (fld_default_value)
2526
2526
Field::set_datetime_warning(DRIZZLE_ERROR::enum_warning_level level, 
2527
2527
                            unsigned int code, 
2528
2528
                            const char *str, uint str_length, 
2529
 
                            timestamp_type ts_type, int cuted_increment)
 
2529
                            enum enum_drizzle_timestamp_type ts_type, int cuted_increment)
2530
2530
{
2531
2531
  THD *thd= table ? table->in_use : current_thd;
2532
2532
  if ((thd->really_abort_on_warning() &&
2554
2554
 
2555
2555
void 
2556
2556
Field::set_datetime_warning(DRIZZLE_ERROR::enum_warning_level level, uint code, 
2557
 
                            int64_t nr, timestamp_type ts_type,
 
2557
                            int64_t nr, enum enum_drizzle_timestamp_type ts_type,
2558
2558
                            int cuted_increment)
2559
2559
{
2560
2560
  THD *thd= table ? table->in_use : current_thd;
2585
2585
 
2586
2586
void 
2587
2587
Field::set_datetime_warning(DRIZZLE_ERROR::enum_warning_level level, uint code, 
2588
 
                            double nr, timestamp_type ts_type)
 
2588
                            double nr, enum enum_drizzle_timestamp_type ts_type)
2589
2589
{
2590
2590
  THD *thd= table ? table->in_use : current_thd;
2591
2591
  if (thd->really_abort_on_warning() ||