~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • 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:
339
339
  enum enum_tx_isolation tx_isolation;
340
340
  enum Cast_target cast_type;
341
341
  enum ha_choice choice;
342
 
  CHARSET_INFO *charset;
 
342
  const CHARSET_INFO *charset;
343
343
  thr_lock_type lock_type;
344
344
  struct st_table_lock_info table_lock_info;
345
345
  interval_type interval, interval_time_st;
5870
5870
          {
5871
5871
            LEX_STRING tmp;
5872
5872
            THD *thd= YYTHD;
5873
 
            CHARSET_INFO *cs_con= thd->variables.collation_connection;
5874
 
            CHARSET_INFO *cs_cli= thd->variables.character_set_client;
 
5873
            const CHARSET_INFO * const cs_con= thd->variables.collation_connection;
 
5874
            const CHARSET_INFO * const cs_cli= thd->variables.character_set_client;
5875
5875
            uint repertoire= thd->lex->text_string_is_7bit &&
5876
5876
                             my_charset_is_ascii_based(cs_cli) ?
5877
5877
                             MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30;
5902
5902
                 If the string has been pure ASCII so far,
5903
5903
                 check the new part.
5904
5904
              */
5905
 
              CHARSET_INFO *cs= YYTHD->variables.collation_connection;
 
5905
              const CHARSET_INFO * const cs= YYTHD->variables.collation_connection;
5906
5906
              item->collation.repertoire|= my_string_repertoire(cs,
5907
5907
                                                                $2.str,
5908
5908
                                                                $2.length);
6209
6209
 
6210
6210
            if (thd->charset_is_system_charset)
6211
6211
            {
6212
 
              CHARSET_INFO *cs= system_charset_info;
 
6212
              const CHARSET_INFO * const cs= system_charset_info;
6213
6213
              int dummy_error;
6214
6214
              uint wlen= cs->cset->well_formed_len(cs, $1.str,
6215
6215
                                                   $1.str+$1.length,