• andrey@example.com's avatar
    Fix for bug #20665 All commands supported in Stored Procedures · 9c8c1817
    andrey@example.com authored
    should work in Prepared Statements. Post-review changeset.
    
    Problem: There are some commands which are avaiable to be executed in SP
             but cannot be prepared. This patch fixes this and makes it possible
             prepare these statements.
    
    Changes: The commands later are made available in PS. RESET has been forbidden
             in SF/Trigger.
    
    Solution: All current server commands where checked and those missing (see later)
              we added. Tests for all of the commands with repeated executions were
              added - testing with SP, SF and PS.
    
    SHOW BINLOG EVENTS
    SHOW (MASTER | SLAVE) STATUS
    SHOW (MASTER | BINARY) LOGS
    SHOW (PROCEDURE | FUNCTION) CODE (parsable only in debug builds)
    SHOW CREATE (PROCEDURE | FUNCTION | EVENT | TABLE | VIEW)
    SHOW (AUTHORS | CONTRIBUTORS | WARNINGS | ERRORS)
    CHANGE MASTER
    RESET (MASTER | SLAVE | QUERY CACHE)
    SLAVE (START | STOP)
    CHECKSUM (TABLE | TABLES)
    INSTALL PLUGIN
    UNINSTALL PLUGIN
    CACHE INDEX
    LOAD INDEX INTO CACHE
    GRANT
    REVOKE
    KILL
    (CREATE | RENAME | DROP) DATABASE
    (CREATE | RENAME | DROP) USER
    FLUSH (TABLE | TABLES | TABLES WITH READ LOCK | HOSTS | PRIVILEGES |
           LOGS | STATUS | MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES)
    9c8c1817
sql_prepare.cc 84.2 KB