• unknown's avatar
    Bug#30904 SET PASSWORD statement is non-transactional · bf18f6d4
    unknown authored
    The SET PASSWORD statement is non-transactional (no explicit transaction
    boundaries) in nature and hence is forbidden inside stored functions and
    triggers, but it weren't being effectively forbidden.
    
    The implemented fix is to issue a implicit commit with every SET PASSWORD
    statement, effectively prohibiting these statements in stored functions
    and triggers. 
    
    
    mysql-test/r/sp-error.result:
      Add test case result for Bug#30904
    mysql-test/t/sp-error.test:
      Add test case for Bug#30904
    sql/sql_lex.h:
      Add variable to set that a statement with SET PASSWORD causes a implicit
      commit.
    sql/sql_parse.cc:
      End active transaction in SET PASSWORD.
    sql/sql_yacc.yy:
      Set the correct flag on SET PASSWORD if inside a SP, thus effectively
      prohibiting SET PASSWORD statements in stored functions and triggers.
    bf18f6d4
sql_yacc.yy 369 KB