diff options
author | unknown <thek@kpdesk.mysql.com> | 2006-11-28 16:03:53 +0100 |
---|---|---|
committer | unknown <thek@kpdesk.mysql.com> | 2006-11-28 16:03:53 +0100 |
commit | 9a87702b033bc9bab337e716a52532c4e4599057 (patch) | |
tree | 25ad4a70172e5f683c2c197fdd1163ad383b295c /mysql-test/r/rpl_sp.result | |
parent | 838b5378cb1998b27b106273f5e9043838888d39 (diff) | |
download | mariadb-git-9a87702b033bc9bab337e716a52532c4e4599057.tar.gz |
Bug#22043 MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE EXISTS"
- CREATE PROCEDURE stores database name based on query context instead
of 'current database' as set by 'USE' according to manual.
The bug reporter interpret the filtering statements as bug for
DROP PROCEDURE based on this behavior.
- Removed the code which changes db context.
- Added code to check that a valid db was supplied.
mysql-test/r/rpl_sp.result:
- Added test case (result)
mysql-test/t/rpl_sp.test:
- Added test case
sql/sp.cc:
- Removed code for changing current db context.
sql/sql_parse.cc:
- Added code to check if a valid db was supplied.
Diffstat (limited to 'mysql-test/r/rpl_sp.result')
-rw-r--r-- | mysql-test/r/rpl_sp.result | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result index 7b096b27733..d6f9880de17 100644 --- a/mysql-test/r/rpl_sp.result +++ b/mysql-test/r/rpl_sp.result @@ -465,3 +465,28 @@ RETURN 0 DROP PROCEDURE p1; DROP FUNCTION f1; drop table t1; +drop database if exists mysqltest; +drop database if exists mysqltest2; +create database mysqltest; +create database mysqltest2; +use mysqltest2; +create table t ( t integer ); +create procedure mysqltest.test() begin end; +insert into t values ( 1 ); +show binlog events in 'master-bin.000001' from 8186; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 8186 Query 1 8317 use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION f1() RETURNS INT RETURN 0 +master-bin.000001 8317 Query 1 8397 use `test`; DROP PROCEDURE p1 +master-bin.000001 8397 Query 1 8476 use `test`; DROP FUNCTION f1 +master-bin.000001 8476 Query 1 8552 use `test`; drop table t1 +master-bin.000001 8552 Query 1 8653 drop database if exists mysqltest +master-bin.000001 8653 Query 1 8756 drop database if exists mysqltest2 +master-bin.000001 8756 Query 1 8849 create database mysqltest +master-bin.000001 8849 Query 1 8944 create database mysqltest2 +master-bin.000001 8944 Query 1 9041 use `mysqltest2`; create table t ( t integer ) +master-bin.000001 9041 Query 1 9180 use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end +master-bin.000001 9180 Query 1 9275 use `mysqltest2`; insert into t values ( 1 ) +create procedure `\\`.test() begin end; +ERROR 42000: Incorrect database name '\\' +drop database mysqltest; +drop database mysqltest2; |