~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 05:57:49 UTC
  • Revision ID: brian@tangent.org-20081006055749-svg700gciuqi0zu1
Remove all of uchar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
469
469
  @param arg   a dummy parameter, is not used here
470
470
*/
471
471
 
472
 
bool Item::cleanup_processor(uchar *arg __attribute__((unused)))
 
472
bool Item::cleanup_processor(unsigned char *arg __attribute__((unused)))
473
473
{
474
474
  if (fixed)
475
475
    cleanup();
524
524
    pointer to newly allocated item is returned.
525
525
*/
526
526
 
527
 
Item* Item::transform(Item_transformer transformer, uchar *arg)
 
527
Item* Item::transform(Item_transformer transformer, unsigned char *arg)
528
528
{
529
529
  return (this->*transformer)(arg);
530
530
}
581
581
  return;
582
582
}
583
583
 
584
 
bool Item_ident::remove_dependence_processor(uchar * arg)
 
584
bool Item_ident::remove_dependence_processor(unsigned char * arg)
585
585
{
586
586
  if (depended_from == (st_select_lex *) arg)
587
587
    depended_from= 0;
607
607
    for the subsequent items.
608
608
*/
609
609
 
610
 
bool Item_field::collect_item_field_processor(uchar *arg)
 
610
bool Item_field::collect_item_field_processor(unsigned char *arg)
611
611
{
612
612
  List<Item_field> *item_list= (List<Item_field>*) arg;
613
613
  List_iterator<Item_field> item_list_it(*item_list);
638
638
    false otherwise
639
639
*/
640
640
 
641
 
bool Item_field::find_item_in_field_list_processor(uchar *arg)
 
641
bool Item_field::find_item_in_field_list_processor(unsigned char *arg)
642
642
{
643
643
  KEY_PART_INFO *first_non_group_part= *((KEY_PART_INFO **) arg);
644
644
  KEY_PART_INFO *last_part= *(((KEY_PART_INFO **) arg) + 1);
661
661
    column read set or to register used fields in a view
662
662
*/
663
663
 
664
 
bool Item_field::register_field_in_read_map(uchar *arg)
 
664
bool Item_field::register_field_in_read_map(unsigned char *arg)
665
665
{
666
666
  Table *table= (Table *) arg;
667
667
  if (field->table == table || !table)
1885
1885
}
1886
1886
 
1887
1887
 
1888
 
Item_decimal::Item_decimal(const uchar *bin, int precision, int scale)
 
1888
Item_decimal::Item_decimal(const unsigned char *bin, int precision, int scale)
1889
1889
{
1890
1890
  binary2my_decimal(E_DEC_FATAL_ERROR, bin,
1891
1891
                    &decimal_value, precision, scale);
2120
2120
 
2121
2121
static void
2122
2122
default_set_param_func(Item_param *param,
2123
 
                       uchar **pos __attribute__((unused)),
 
2123
                       unsigned char **pos __attribute__((unused)),
2124
2124
                       ulong len __attribute__((unused)))
2125
2125
{
2126
2126
  param->set_null();
3771
3771
    false  otherwise
3772
3772
*/
3773
3773
 
3774
 
bool Item_field::subst_argument_checker(uchar **arg)
 
3774
bool Item_field::subst_argument_checker(unsigned char **arg)
3775
3775
{
3776
3776
  return (result_type() != STRING_RESULT) || (*arg);
3777
3777
}
3801
3801
    - pointer to the field item, otherwise.
3802
3802
*/
3803
3803
 
3804
 
Item *Item_field::equal_fields_propagator(uchar *arg)
 
3804
Item *Item_field::equal_fields_propagator(unsigned char *arg)
3805
3805
{
3806
3806
  if (no_const_subst)
3807
3807
    return this;
3834
3834
  See comments in Arg_comparator::set_compare_func() for details.
3835
3835
*/
3836
3836
 
3837
 
bool Item_field::set_no_const_sub(uchar *arg __attribute__((unused)))
 
3837
bool Item_field::set_no_const_sub(unsigned char *arg __attribute__((unused)))
3838
3838
{
3839
3839
  if (field->charset() != &my_charset_bin)
3840
3840
    no_const_subst=1;
3867
3867
    - this - otherwise.
3868
3868
*/
3869
3869
 
3870
 
Item *Item_field::replace_equal_field(uchar *arg __attribute__((unused)))
 
3870
Item *Item_field::replace_equal_field(unsigned char *arg __attribute__((unused)))
3871
3871
{
3872
3872
  if (item_equal)
3873
3873
  {
4079
4079
  /*
4080
4080
    The field functions defines a field to be not null if null_ptr is not 0
4081
4081
  */
4082
 
  uchar *null_ptr= maybe_null ? (uchar*) "" : 0;
 
4082
  unsigned char *null_ptr= maybe_null ? (unsigned char*) "" : 0;
4083
4083
  Field *field;
4084
4084
 
4085
4085
  switch (field_type()) {
4086
4086
  case DRIZZLE_TYPE_NEWDECIMAL:
4087
 
    field= new Field_new_decimal((uchar*) 0, max_length, null_ptr, 0,
 
4087
    field= new Field_new_decimal((unsigned char*) 0, max_length, null_ptr, 0,
4088
4088
                                 Field::NONE, name, decimals, 0,
4089
4089
                                 unsigned_flag);
4090
4090
    break;
4091
4091
  case DRIZZLE_TYPE_TINY:
4092
 
    field= new Field_tiny((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
 
4092
    field= new Field_tiny((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4093
4093
                          name, 0, unsigned_flag);
4094
4094
    break;
4095
4095
  case DRIZZLE_TYPE_LONG:
4096
 
    field= new Field_long((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
 
4096
    field= new Field_long((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4097
4097
                          name, 0, unsigned_flag);
4098
4098
    break;
4099
4099
  case DRIZZLE_TYPE_LONGLONG:
4100
 
    field= new Field_int64_t((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
 
4100
    field= new Field_int64_t((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4101
4101
                              name, 0, unsigned_flag);
4102
4102
    break;
4103
4103
  case DRIZZLE_TYPE_DOUBLE:
4104
 
    field= new Field_double((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
 
4104
    field= new Field_double((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4105
4105
                            name, decimals, 0, unsigned_flag);
4106
4106
    break;
4107
4107
  case DRIZZLE_TYPE_NULL:
4108
 
    field= new Field_null((uchar*) 0, max_length, Field::NONE,
 
4108
    field= new Field_null((unsigned char*) 0, max_length, Field::NONE,
4109
4109
                          name, &my_charset_bin);
4110
4110
    break;
4111
4111
  case DRIZZLE_TYPE_NEWDATE:
4503
4503
 
4504
4504
  uint64_t value=0;
4505
4505
  for (; ptr != end ; ptr++)
4506
 
    value=(value << 8)+ (uint64_t) (uchar) *ptr;
 
4506
    value=(value << 8)+ (uint64_t) (unsigned char) *ptr;
4507
4507
  return (int64_t) value;
4508
4508
}
4509
4509
 
4557
4557
  str->append("0x");
4558
4558
  for (; ptr != end ; ptr++)
4559
4559
  {
4560
 
    str->append(_dig_vec_lower[((uchar) *ptr) >> 4]);
4561
 
    str->append(_dig_vec_lower[((uchar) *ptr) & 0x0F]);
 
4560
    str->append(_dig_vec_lower[((unsigned char) *ptr) >> 4]);
 
4561
    str->append(_dig_vec_lower[((unsigned char) *ptr) & 0x0F]);
4562
4562
  }
4563
4563
}
4564
4564
 
4597
4597
Item_bin_string::Item_bin_string(const char *str, uint str_length)
4598
4598
{
4599
4599
  const char *end= str + str_length - 1;
4600
 
  uchar bits= 0;
 
4600
  unsigned char bits= 0;
4601
4601
  uint power= 1;
4602
4602
 
4603
4603
  max_length= (str_length + 7) >> 3;
4762
4762
    this field    otherwise
4763
4763
*/
4764
4764
 
4765
 
Item *Item_field::update_value_transformer(uchar *select_arg)
 
4765
Item *Item_field::update_value_transformer(unsigned char *select_arg)
4766
4766
{
4767
4767
  SELECT_LEX *select= (SELECT_LEX*)select_arg;
4768
4768
  assert(fixed);
5605
5605
  same time it can replace some nodes in the tree.
5606
5606
*/ 
5607
5607
 
5608
 
Item *Item_default_value::transform(Item_transformer transformer, uchar *args)
 
5608
Item *Item_default_value::transform(Item_transformer transformer, unsigned char *args)
5609
5609
{
5610
5610
  Item *new_item= arg->transform(transformer, args);
5611
5611
  if (!new_item)
6374
6374
  /*
6375
6375
    The field functions defines a field to be not null if null_ptr is not 0
6376
6376
  */
6377
 
  uchar *null_ptr= maybe_null ? (uchar*) "" : 0;
 
6377
  unsigned char *null_ptr= maybe_null ? (unsigned char*) "" : 0;
6378
6378
  Field *field;
6379
6379
 
6380
6380
  switch (fld_type) {
6381
6381
  case DRIZZLE_TYPE_ENUM:
6382
6382
    assert(enum_set_typelib);
6383
 
    field= new Field_enum((uchar *) 0, max_length, null_ptr, 0,
 
6383
    field= new Field_enum((unsigned char *) 0, max_length, null_ptr, 0,
6384
6384
                          Field::NONE, name,
6385
6385
                          get_enum_pack_length(enum_set_typelib->count),
6386
6386
                          enum_set_typelib, collation.collation);