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 | 7a37eeae62b63f90f630ad0f6618d27d72c2f54b (patch) | |
tree | deaa93e8d4a073308e6b694ab970c3eaccae03bc /mysql-test/r/ps_1general.result | |
parent | 96aef62c73d35a4a1c1efe6a782f515419fd18c1 (diff) | |
download | mariadb-git-7a37eeae62b63f90f630ad0f6618d27d72c2f54b.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/r/ps_1general.result')
-rw-r--r-- | mysql-test/r/ps_1general.result | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index c94df7f5c2a..67959920248 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -308,17 +308,11 @@ prepare stmt4 from ' show engine bdb logs '; execute stmt4; prepare stmt4 from ' show grants for user '; prepare stmt4 from ' show create table t2 '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' show master status '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' show master logs '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' show slave status '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' show warnings limit 20 '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' show errors limit 20 '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' show storage engines '; execute stmt4; drop table if exists t5; @@ -387,10 +381,8 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp prepare stmt4 from ' use test ' ; ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from ' create database mysqltest '; -ERROR HY000: This command is not supported in the prepared statement protocol yet create database mysqltest ; prepare stmt3 from ' drop database mysqltest '; -ERROR HY000: This command is not supported in the prepared statement protocol yet drop database mysqltest ; prepare stmt3 from ' describe t2 '; execute stmt3; @@ -412,7 +404,6 @@ execute stmt1 ; prepare stmt1 from ' optimize table t1 ' ; prepare stmt1 from ' analyze table t1 ' ; prepare stmt1 from ' checksum table t1 ' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt1 from ' repair table t1 ' ; prepare stmt1 from ' restore table t1 from ''data.txt'' ' ; ERROR HY000: This command is not supported in the prepared statement protocol yet @@ -440,11 +431,8 @@ execute stmt5; 1 SET sql_mode=""; prepare stmt1 from ' flush local privileges ' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt1 from ' reset query cache ' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt1 from ' KILL 0 '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt1 from ' explain select a from t1 order by b '; execute stmt1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr |