~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Olaf van der Spek
  • Date: 2011-10-17 23:13:25 UTC
  • mto: This revision was merged to the branch mainline in revision 2443.
  • Revision ID: olafvdspek@gmail.com-20111017231325-zv1nubl0jzwwn1sp
Use str_ref

Show diffs side-by-side

added added

removed removed

Lines of Context:
1549
1549
*/
1550
1550
 
1551
1551
 
1552
 
bool check_string_char_length(lex_string_t *str, const char *err_msg,
 
1552
bool check_string_char_length(str_ref str, const char *err_msg,
1553
1553
                              uint32_t max_char_length, const charset_info_st * const cs,
1554
1554
                              bool no_error)
1555
1555
{
1556
1556
  int well_formed_error;
1557
 
  uint32_t res= cs->cset->well_formed_len(cs, str->begin(), str->end(), max_char_length, &well_formed_error);
 
1557
  uint32_t res= cs->cset->well_formed_len(cs, str.begin(), str.end(), max_char_length, &well_formed_error);
1558
1558
 
1559
 
  if (!well_formed_error &&  str->size() == res)
 
1559
  if (!well_formed_error &&  str.size() == res)
1560
1560
    return false;
1561
1561
 
1562
1562
  if (!no_error)
1563
 
    my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->data(), err_msg, max_char_length);
 
1563
    my_error(ER_WRONG_STRING_LENGTH, MYF(0), str.data(), err_msg, max_char_length);
1564
1564
  return true;
1565
1565
}
1566
1566