~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.cc

  • Committer: Brian Aker
  • Date: 2011-03-28 02:46:21 UTC
  • Revision ID: brian@tangent.org-20110328024621-wtkdtlvdplqm0ybf
Shift CHARSET_INFO to charset_info_st

Show diffs side-by-side

added added

removed removed

Lines of Context:
3127
3127
  return (int) ((*compare)(collation, base+start*size, result) == 0);
3128
3128
}
3129
3129
 
3130
 
in_string::in_string(uint32_t elements,qsort2_cmp cmp_func, const CHARSET_INFO * const cs)
 
3130
in_string::in_string(uint32_t elements,qsort2_cmp cmp_func, const charset_info_st * const cs)
3131
3131
  :in_vector(elements, sizeof(String), cmp_func, cs),
3132
3132
   tmp(buff, sizeof(buff), &my_charset_bin)
3133
3133
{}
3157
3157
  }
3158
3158
  if (!str->charset())
3159
3159
  {
3160
 
    const CHARSET_INFO *cs;
 
3160
    const charset_info_st *cs;
3161
3161
    if (!(cs= item->collation.collation))
3162
3162
      cs= &my_charset_bin;              // Should never happen for STR items
3163
3163
    str->set_charset(cs);
3298
3298
 
3299
3299
 
3300
3300
cmp_item* cmp_item::get_comparator(Item_result type,
3301
 
                                   const CHARSET_INFO * const cs)
 
3301
                                   const charset_info_st * const cs)
3302
3302
{
3303
3303
  switch (type) {
3304
3304
  case STRING_RESULT:
3569
3569
}
3570
3570
 
3571
3571
 
3572
 
static int srtcmp_in(const CHARSET_INFO * const cs, const String *x,const String *y)
 
3572
static int srtcmp_in(const charset_info_st * const cs, const String *x,const String *y)
3573
3573
{
3574
3574
  return cs->coll->strnncollsp(cs,
3575
3575
                               (unsigned char *) x->ptr(),x->length(),
4503
4503
  Item_bool_func2::cleanup();
4504
4504
}
4505
4505
 
4506
 
static unsigned char likeconv(const CHARSET_INFO *cs, unsigned char a)
 
4506
static unsigned char likeconv(const charset_info_st *cs, unsigned char a)
4507
4507
{
4508
4508
#ifdef LIKE_CMP_TOUPPER
4509
4509
  return cs->toupper(a);
4522
4522
  int            f = 0;
4523
4523
  int            g = plm1;
4524
4524
  int *const splm1 = suff + plm1;
4525
 
  const CHARSET_INFO * const cs= cmp.cmp_collation.collation;
 
4525
  const charset_info_st * const cs= cmp.cmp_collation.collation;
4526
4526
 
4527
4527
  *splm1 = pattern_len;
4528
4528
 
4620
4620
  int *end = bmBc + alphabet_size;
4621
4621
  int j;
4622
4622
  const int plm1 = pattern_len - 1;
4623
 
  const CHARSET_INFO *const cs= cmp.cmp_collation.collation;
 
4623
  const charset_info_st *const cs= cmp.cmp_collation.collation;
4624
4624
 
4625
4625
  for (i = bmBc; i < end; i++)
4626
4626
    *i = pattern_len;
4652
4652
  int shift = pattern_len;
4653
4653
  int j     = 0;
4654
4654
  int u     = 0;
4655
 
  const CHARSET_INFO * const cs= cmp.cmp_collation.collation;
 
4655
  const charset_info_st * const cs= cmp.cmp_collation.collation;
4656
4656
 
4657
4657
  const int plm1=  pattern_len - 1;
4658
4658
  const int tlmpl= text_len - pattern_len;