diff options
author | unknown <andrey@example.com> | 2006-08-23 15:50:06 +0200 |
---|---|---|
committer | unknown <andrey@example.com> | 2006-08-23 15:50:06 +0200 |
commit | 14b8924b7e57184184c6ca8fbbbf953a2c37ca8c (patch) | |
tree | deaa93e8d4a073308e6b694ab970c3eaccae03bc /mysql-test/t/ps_grant.test | |
parent | f7bf4adfa9bc5d98d6cfe175dc775be063d897fc (diff) | |
download | mariadb-git-14b8924b7e57184184c6ca8fbbbf953a2c37ca8c.tar.gz |
Fix for bug #20665 All commands supported in Stored Procedures
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)
mysql-test/r/ps.result:
update result
mysql-test/r/ps_1general.result:
update result
mysql-test/r/ps_grant.result:
update result
mysql-test/r/sp-dynamic.result:
update result
mysql-test/t/ps.test:
Add more statements, probably all currently missing which are possible in
a SP but not preparable.
Every statement is tested in a SP, in a SF and attempted to prepare.
mysql-test/t/ps_1general.test:
- Enable some of the statements, which are already possible in SP.
- 1295 -> ER_UNSUPPORTED_PS
mysql-test/t/ps_grant.test:
Enable statements already possible in SP.
sql/sp_head.cc:
- Reorder to keep some alphabet order.
- Add missing SHOW_SCHEDULER_STATUS.
sql/sql_prepare.cc:
Add possibility to prepare statements, which are already allowed in SP.
Diffstat (limited to 'mysql-test/t/ps_grant.test')
-rw-r--r-- | mysql-test/t/ps_grant.test | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/mysql-test/t/ps_grant.test b/mysql-test/t/ps_grant.test index 81c842de459..4c48b4d151f 100644 --- a/mysql-test/t/ps_grant.test +++ b/mysql-test/t/ps_grant.test @@ -117,15 +117,12 @@ drop database mysqltest; # # grant/revoke + drop user # ---error 1295 prepare stmt3 from ' grant all on test.t1 to drop_user@localhost identified by ''looser'' '; grant all on test.t1 to drop_user@localhost identified by 'looser' ; ---error 1295 prepare stmt3 from ' revoke all privileges on test.t1 from drop_user@localhost '; revoke all privileges on test.t1 from drop_user@localhost ; ---error 1295 prepare stmt3 from ' drop user drop_user@localhost '; drop user drop_user@localhost; |