~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.cc

Removed sizeof(long) sizeof(long long) checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
998
998
    *value= (ulong) fix_unsigned(thd, tmp, option_limits);
999
999
  else
1000
1000
  {
1001
 
#if SIZEOF_LONG < SIZEOF_LONG_LONG
1002
 
    /* Avoid overflows on 32 bit systems */
1003
 
    if (tmp > ULONG_MAX)
 
1001
    if (tmp > UINT32_MAX)
1004
1002
    {
1005
 
      tmp= ULONG_MAX;
 
1003
      tmp= UINT32_MAX;
1006
1004
      throw_bounds_warning(thd, true, true, name,
1007
1005
                           (int64_t) var->save_result.uint64_t_value);
1008
1006
    }
1009
 
#endif
1010
1007
    *value= (ulong) tmp;
1011
1008
  }
1012
1009
 
1103
1100
  
1104
1101
  if (option_limits)
1105
1102
    tmp= (ulong) fix_unsigned(thd, tmp, option_limits);
1106
 
#if SIZEOF_LONG < SIZEOF_LONG_LONG
1107
 
  else if (tmp > ULONG_MAX)
 
1103
  else if (tmp > UINT32_MAX)
1108
1104
  {
1109
 
    tmp= ULONG_MAX;
 
1105
    tmp= UINT32_MAX;
1110
1106
    throw_bounds_warning(thd, true, true, name, (int64_t) var->save_result.uint64_t_value);
1111
1107
  }
1112
 
#endif
1113
1108
  
1114
1109
  if (var->type == OPT_GLOBAL)
1115
1110
     global_system_variables.*offset= (ulong) tmp;