~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.cc

  • Committer: Brian Aker
  • Date: 2008-10-07 15:13:28 UTC
  • mfrom: (481.1.19 codestyle)
  • Revision ID: brian@tangent.org-20081007151328-m49yev7qggqmzxg1
Mergining Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
991
991
    *value= (ulong) fix_unsigned(thd, tmp, option_limits);
992
992
  else
993
993
  {
994
 
#if SIZEOF_LONG < SIZEOF_LONG_LONG
995
 
    /* Avoid overflows on 32 bit systems */
996
 
    if (tmp > ULONG_MAX)
 
994
    if (tmp > UINT32_MAX)
997
995
    {
998
 
      tmp= ULONG_MAX;
 
996
      tmp= UINT32_MAX;
999
997
      throw_bounds_warning(thd, true, true, name,
1000
998
                           (int64_t) var->save_result.uint64_t_value);
1001
999
    }
1002
 
#endif
1003
1000
    *value= (ulong) tmp;
1004
1001
  }
1005
1002
 
1096
1093
  
1097
1094
  if (option_limits)
1098
1095
    tmp= (ulong) fix_unsigned(thd, tmp, option_limits);
1099
 
#if SIZEOF_LONG < SIZEOF_LONG_LONG
1100
 
  else if (tmp > ULONG_MAX)
 
1096
  else if (tmp > UINT32_MAX)
1101
1097
  {
1102
 
    tmp= ULONG_MAX;
 
1098
    tmp= UINT32_MAX;
1103
1099
    throw_bounds_warning(thd, true, true, name, (int64_t) var->save_result.uint64_t_value);
1104
1100
  }
1105
 
#endif
1106
1101
  
1107
1102
  if (var->type == OPT_GLOBAL)
1108
1103
     global_system_variables.*offset= (ulong) tmp;