mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
Bug#22043 MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS"
- Merge patch. - Test case needed update because event number were off. - Error code has changed because db name validation rules changes between 5.0 and 5.1
This commit is contained in:
parent
81420d5e38
commit
ea6a91757b
2 changed files with 13 additions and 18 deletions
|
@ -467,7 +467,7 @@ DROP FUNCTION f1;
|
|||
drop table t1;
|
||||
set global log_bin_trust_function_creators=0;
|
||||
set global log_bin_trust_function_creators=0;
|
||||
|
||||
End of 5.0 tests
|
||||
drop database if exists mysqltest;
|
||||
drop database if exists mysqltest2;
|
||||
create database mysqltest;
|
||||
|
@ -476,22 +476,16 @@ 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;
|
||||
show binlog events in 'master-bin.000001' from 8657;
|
||||
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 )
|
||||
master-bin.000001 8657 Query 1 8760 drop database if exists mysqltest2
|
||||
master-bin.000001 8760 Query 1 8853 create database mysqltest
|
||||
master-bin.000001 8853 Query 1 8948 create database mysqltest2
|
||||
master-bin.000001 8948 Query 1 9045 use `mysqltest2`; create table t ( t integer )
|
||||
master-bin.000001 9045 Query 1 9184 use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end
|
||||
master-bin.000001 9184 Query 1 9279 use `mysqltest2`; insert into t values ( 1 )
|
||||
create procedure `\\`.test() begin end;
|
||||
ERROR 42000: Incorrect database name '\\'
|
||||
ERROR 42000: Unknown database '\\'
|
||||
drop database mysqltest;
|
||||
drop database mysqltest2;
|
||||
End of 5.0 tests
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -526,6 +526,8 @@ sync_slave_with_master;
|
|||
set global log_bin_trust_function_creators=0;
|
||||
connection master;
|
||||
set global log_bin_trust_function_creators=0;
|
||||
--echo End of 5.0 tests
|
||||
|
||||
#
|
||||
# Bug22043: MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS"
|
||||
#
|
||||
|
@ -540,13 +542,12 @@ 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;
|
||||
--error ER_WRONG_DB_NAME
|
||||
show binlog events in 'master-bin.000001' from 8657;
|
||||
--error ER_BAD_DB_ERROR
|
||||
create procedure `\\`.test() begin end;
|
||||
# Clean up
|
||||
drop database mysqltest;
|
||||
drop database mysqltest2;
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue