~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.cc

  • Committer: Monty Taylor
  • Date: 2009-01-28 04:37:46 UTC
  • mto: (779.7.3 devel)
  • mto: This revision was merged to the branch mainline in revision 816.
  • Revision ID: mordred@inaugust.com-20090128043746-d2yukekishwn3ftm
TurnedĀ onĀ -Wshadow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
880
880
      }
881
881
      yylval->lex_str=get_token(lip, 0, length);
882
882
 
883
 
      /*
884
 
         Note: "SELECT _bla AS 'alias'"
885
 
         _bla should be considered as a IDENT if charset haven't been found.
886
 
         So we don't use MYF(MY_WME) with get_charset_by_csname to avoid
887
 
         producing an error.
888
 
      */
889
 
 
890
 
      if (yylval->lex_str.str[0] == '_')
891
 
      {
892
 
        const CHARSET_INFO * const cs= get_charset_by_csname(yylval->lex_str.str + 1,
893
 
                                                             MY_CS_PRIMARY, MYF(0));
894
 
        if (cs)
895
 
        {
896
 
          yylval->charset= cs;
897
 
          lip->m_underscore_cs= cs;
898
 
 
899
 
          lip->body_utf8_append(lip->m_cpp_text_start,
900
 
                                lip->get_cpp_tok_start() + length);
901
 
          return(UNDERSCORE_CHARSET);
902
 
        }
903
 
      }
904
 
 
905
883
      lip->body_utf8_append(lip->m_cpp_text_start);
906
884
 
907
885
      lip->body_utf8_append_literal(session, &yylval->lex_str, cs,