summaryrefslogtreecommitdiff
path: root/mysql-test/r/mysqlbinlog.result
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2008-05-15 19:13:24 -0400
committerunknown <cmiller@zippy.cornsilk.net>2008-05-15 19:13:24 -0400
commit55012e427bc4b3b6a5ffa070e229c519c8cd0b98 (patch)
tree9d471bf2b51fee92b75f3377d183d2a680bb91c9 /mysql-test/r/mysqlbinlog.result
parentab6e91cf3af9ef3d69e80420eef1ada05d66b9f7 (diff)
downloadmariadb-git-55012e427bc4b3b6a5ffa070e229c519c8cd0b98.tar.gz
Bug#36570: Parse error of CREATE PROCEDURE stmt with comments on \
slave The stored-routine code took the contents of the (lowest) parser and copied it directly to the binlog, which causes problems if there is a special case of interpretation at the parser level -- which there is, in the "/*!VER */" comments. The trailing "*/" caused errors on the slave, naturally. Now, since by that point we have /properly/ created parse-tree (as the rest of the server should do!) for the stored-routine CREATE, we can construct a perfect statement from that information, instead of writing uncertain information from an unknown parser state. Fortunately, there's already a function nearby that does exactly that. --- Update for Bug#36570. Qualify routine names with db name when writing to the binlog ONLY if the source text is qualified. mysql-test/r/binlog_innodb.result: Offsets changed due to quoting. --- New offset to account for db-qualified names. mysql-test/r/ctype_cp932_binlog.result: Offsets changed due to quoting. --- Qualify routine names with DB. Offsets change also. mysql-test/r/mysqlbinlog.result: Case changed in result due to interpretation of data instead of literal recitation. --- Qualify procedure name with db. mysql-test/r/rpl_sp.result: Offsets changed due to quoting. Added tests. --- Qualify routine names with DB if qualified in query. Offsets change also. mysql-test/t/rpl_sp.test: Add version-limiting quotes to exercise bug#36570. Test that backtick-quoted identifiers and labels work also. --- Use different db to show qualification works. Qualify routine names with DB if qualified in query. sql/sp.cc: In create_string, we may not have a sp_name parameter yet, so instead pass the char* and length of the only member we'd get out of it. Having done that, we can use the same function to write the CREATE (FUNC|TRIG|PROC) statement to the binlog as we always used to display the statement to the user. --- Make the db name part of the CREATE string if it is specified. Specify it in part of writing to the binlog when creating a new routine. sql/sp_head.cc: Set the sp_head m_explicit_name member as the sp_name member is set. We can not peek at this later, as the sp_name is gone by then. sql/sp_head.h: Add a member to track whether the name is qualified with the database.
Diffstat (limited to 'mysql-test/r/mysqlbinlog.result')
-rw-r--r--mysql-test/r/mysqlbinlog.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index 469250a6fa2..4fd87861ded 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -268,7 +268,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq
SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-CREATE DEFINER=`root`@`localhost` procedure p1()
+CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
begin
select 1;
end