• unknown's avatar
    Fix for BUG#13095: Cannot create VIEWs in prepared statements · 33d5d4ad
    unknown authored
      - allow CREATE VIEW as well as DROP VIEW to use in prepared statements;
      - fix CREATE VIEW implementation to make it work in prepared statements.
    
    
    mysql-test/r/sp.result:
      Results file for the test case for BUG#13095.
    mysql-test/t/sp.test:
      Test case for BUG#13095.
    sql/sql_lex.h:
      Added a variable to remember start of whole CREATE VIEW statement
      as well as start of its SELECT part.
    sql/sql_prepare.cc:
      Allow CREATE VIEW and DROP VIEW to use in prepared statements.
    sql/sql_view.cc:
      Use stored start of whole CREATE VIEW statement instead of thd->query,
      which differs from the original when prepared statement is executing.
    sql/sql_yacc.yy:
      Remember start of whole CREATE VIEW statement as well as start of its
      SELECT part.
    33d5d4ad
sql_yacc.yy 233 KB