~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/item_func.cc

  • Committer: Brian Aker
  • Date: 2008-07-22 18:31:32 UTC
  • Revision ID: brian@tangent.org-20080722183132-ne2ntl7g7mdf2eez
uint32 -> uin32_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
578
578
 
579
579
void Item_func::count_real_length()
580
580
{
581
 
  uint32 length= 0;
 
581
  uint32_t length= 0;
582
582
  decimals= 0;
583
583
  max_length= 0;
584
584
  for (uint i=0 ; i < arg_count ; i++)
888
888
int64_t Item_func_signed::val_int_from_str(int *error)
889
889
{
890
890
  char buff[MAX_FIELD_WIDTH], *end, *start;
891
 
  uint32 length;
 
891
  uint32_t length;
892
892
  String tmp(buff,sizeof(buff), &my_charset_bin), *res;
893
893
  int64_t value;
894
894
 
912
912
  if (*error > 0 || end != start+ length)
913
913
  {
914
914
    char err_buff[128];
915
 
    String err_tmp(err_buff,(uint32) sizeof(err_buff), system_charset_info);
 
915
    String err_tmp(err_buff,(uint32_t) sizeof(err_buff), system_charset_info);
916
916
    err_tmp.copy(start, length, system_charset_info);
917
917
    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
918
918
                        ER_TRUNCATED_WRONG_VALUE,
1068
1068
  str->append(STRING_WITH_LEN(" as decimal("));
1069
1069
 
1070
1070
  end=int10_to_str(precision, len_buf,10);
1071
 
  str->append(len_buf, (uint32) (end - len_buf));
 
1071
  str->append(len_buf, (uint32_t) (end - len_buf));
1072
1072
 
1073
1073
  str->append(',');
1074
1074
 
1075
1075
  end=int10_to_str(decimals, len_buf,10);
1076
 
  str->append(len_buf, (uint32) (end - len_buf));
 
1076
  str->append(len_buf, (uint32_t) (end - len_buf));
1077
1077
 
1078
1078
  str->append(')');
1079
1079
  str->append(')');
2095
2095
    TODO: do not do reinit 'rand' for every execute of PS/SP if
2096
2096
    args[0] is a constant.
2097
2097
  */
2098
 
  uint32 tmp= (uint32) arg->val_int();
2099
 
  randominit(rand, (uint32) (tmp*0x10001L+55555555L),
2100
 
             (uint32) (tmp*0x10000001L));
 
2098
  uint32_t tmp= (uint32_t) arg->val_int();
 
2099
  randominit(rand, (uint32_t) (tmp*0x10001L+55555555L),
 
2100
             (uint32_t) (tmp*0x10000001L));
2101
2101
}
2102
2102
 
2103
2103
 
2624
2624
  if (use_mb(res->charset()))
2625
2625
  {
2626
2626
    register const char *str=res->ptr();
2627
 
    register uint32 n=0, l=my_ismbchar(res->charset(),str,str+res->length());
 
2627
    register uint32_t n=0, l=my_ismbchar(res->charset(),str,str+res->length());
2628
2628
    if (!l)
2629
2629
      return (int64_t)((uchar) *str);
2630
2630
    while (l--)
2631
 
      n=(n<<8)|(uint32)((uchar) *str++);
 
2631
      n=(n<<8)|(uint32_t)((uchar) *str++);
2632
2632
    return (int64_t) n;
2633
2633
  }
2634
2634
#endif