~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Andrey Hristov
  • Date: 2008-08-06 00:04:45 UTC
  • mto: (264.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: ahristov@mysql.com-20080806000445-84urmltikgwk9v5d
Constify the usage of CHARSET_INFO almost to the last place in the code.
99% of the parameters are const CHARSET_INFO * const cs.
Wherever possible stack variables are also double consted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3046
3046
                       Item *default_value, Item *on_update_value,
3047
3047
                       LEX_STRING *comment,
3048
3048
                       char *change,
3049
 
                       List<String> *interval_list, CHARSET_INFO *cs)
 
3049
                       List<String> *interval_list, const CHARSET_INFO * const cs)
3050
3050
{
3051
3051
  register Create_field *new_field;
3052
3052
  LEX  *lex= thd->lex;
4401
4401
 
4402
4402
 
4403
4403
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
4404
 
                              uint max_char_length, CHARSET_INFO *cs,
 
4404
                              uint max_char_length, const CHARSET_INFO * const cs,
4405
4405
                              bool no_error)
4406
4406
{
4407
4407
  int well_formed_error;
4426
4426
    so they should be prohibited until such support is done.
4427
4427
    This is why we use the 3-byte utf8 to check well-formedness here.
4428
4428
  */
4429
 
  CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
 
4429
  const CHARSET_INFO * const cs= &my_charset_utf8mb3_general_ci;
4430
4430
#else
4431
 
  CHARSET_INFO *cs= system_charset_info;
 
4431
  const CHARSET_INFO * const cs= system_charset_info;
4432
4432
#endif
4433
4433
  int well_formed_error;
4434
4434
  uint res= cs->cset->well_formed_len(cs, str->str, str->str + str->length,