~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.cc

  • Committer: Andrew Hutchings
  • Date: 2011-03-29 20:45:43 UTC
  • mfrom: (2257 drizzle)
  • mto: (2257.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: andrew@linuxjedi.co.uk-20110329204543-ssex0nuo8knncgwx
Merge with trunk

Show diffs side-by-side

added added

removed removed

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