List:Commits« Previous MessageNext Message »
From:Tatjana A Nuernberg Date:November 15 2006 2:47pm
Subject:bk commit into 5.1 tree (tnurnberg:1.2368)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tnurnberg. When tnurnberg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-11-15 15:47:29+01:00, tnurnberg@stripped +5 -0
  Merge tnurnberg@stripped:/home/bk/mysql-5.1-maint
  into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.1-maint-16456
  MERGE: 1.2358.3.1

  mysql-test/mysql-test-run.pl@stripped, 2006-11-15 15:46:43+01:00, tnurnberg@stripped +0 -0
    Auto merged
    MERGE: 1.232.1.1

  mysql-test/r/rpl_sp.result@stripped, 2006-11-15 15:47:16+01:00, tnurnberg@stripped +6 -26
    manual merge
    MERGE: 1.21.1.1

  mysql-test/t/rpl_sp.test@stripped, 2006-11-15 15:46:43+01:00, tnurnberg@stripped +0 -0
    Auto merged
    MERGE: 1.19.1.1

  sql/item_func.cc@stripped, 2006-11-15 15:46:43+01:00, tnurnberg@stripped +0 -0
    Auto merged
    MERGE: 1.330.1.1

  sql/sql_parse.cc@stripped, 2006-11-15 15:46:43+01:00, tnurnberg@stripped +0 -0
    Auto merged
    MERGE: 1.593.1.1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tnurnberg
# Host:	salvation.intern.azundris.com
# Root:	/home/tnurnberg/work/mysql-5.1-maint-16456/RESYNC

--- 1.331/sql/item_func.cc	2006-11-14 09:49:19 +01:00
+++ 1.332/sql/item_func.cc	2006-11-15 15:46:43 +01:00
@@ -4996,6 +4996,18 @@ Item_func_sp::execute_impl(THD *thd, Fie
     goto error;
 
   /*
+    Throw an error if a non-deterministic function is called while
+    statement-based replication (SBR) is active.
+  */
+  if (!m_sp->m_chistics->detistic &&
+      (mysql_bin_log.is_open() &&
+       thd->variables.binlog_format == BINLOG_FORMAT_STMT))
+  {
+    my_error(ER_BINLOG_ROW_RBR_TO_SBR, MYF(0));
+    goto error;
+  }
+
+  /*
     Disable the binlogging if this is not a SELECT statement. If this is a
     SELECT, leave binlogging on, so execute_function() code writes the
     function call into binlog.

--- 1.594/sql/sql_parse.cc	2006-11-14 18:54:01 +01:00
+++ 1.595/sql/sql_parse.cc	2006-11-15 15:46:43 +01:00
@@ -4576,6 +4576,18 @@ end_with_restore_list:
             goto error;
         }
 
+        /*
+          Throw an error if a non-deterministic procedure is called while
+          statement-based replication (SBR) is active.
+         */
+        if (!sp->m_chistics->detistic &&
+            (mysql_bin_log.is_open() &&
+             thd->variables.binlog_format == BINLOG_FORMAT_STMT))
+        {
+          my_error(ER_BINLOG_ROW_RBR_TO_SBR, MYF(0));
+          goto error;
+        }
+
 	my_bool nsok= thd->net.no_send_ok;
 	thd->net.no_send_ok= TRUE;
 	if (sp->m_flags & sp_head::MULTI_RESULTS)

--- 1.22/mysql-test/r/rpl_sp.result	2006-11-15 01:27:36 +01:00
+++ 1.23/mysql-test/r/rpl_sp.result	2006-11-15 15:47:16 +01:00
@@ -104,10 +104,10 @@ begin
 insert into t2 values(20),(20);
 end|
 call foo4();
-ERROR 23000: Duplicate entry '20' for key 'a'
+ERROR 23000: Duplicate entry '20' for key 1
 show warnings;
 Level	Code	Message
-Error	1062	Duplicate entry '20' for key 'a'
+Error	1062	Duplicate entry '20' for key 1
 select * from t2;
 a
 20
@@ -124,9 +124,6 @@ select * from mysql.proc where name="foo
 db	name	type	specific_name	language	sql_data_access	is_deterministic	security_type	param_list	returns	body	definer	created	modified	sql_mode	comment
 select * from mysql.proc where name="foo4" and db='mysqltest1';
 db	name	type	specific_name	language	sql_data_access	is_deterministic	security_type	param_list	returns	body	definer	created	modified	sql_mode	comment
-set binlog_format=STATEMENT;
-call foo();
-ERROR HY000: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events
 drop procedure foo;
 drop procedure foo2;
 drop procedure foo3;
@@ -184,7 +181,7 @@ end|
 ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
 set global log_bin_trust_routine_creators=1;
 Warnings:
-Warning	1541	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
+Warning	1287	'log_bin_trust_routine_creators' is deprecated; use 'log_bin_trust_function_creators' instead
 set global log_bin_trust_function_creators=0;
 set global log_bin_trust_function_creators=1;
 set global log_bin_trust_function_creators=1;
@@ -244,9 +241,9 @@ return 10;
 end|
 do fn1(100);
 Warnings:
-Error	1062	Duplicate entry '100' for key 'a'
+Error	1062	Duplicate entry '100' for key 1
 select fn1(20);
-ERROR 23000: Duplicate entry '20' for key 'a'
+ERROR 23000: Duplicate entry '20' for key 1
 select * from t2;
 a
 20
@@ -255,17 +252,8 @@ select * from t2;
 a
 20
 100
-set binlog_format=STATEMENT;
-create function fn16456()
-returns int
-begin
-return unix_timestamp();
-end|
-select fn16456();
-ERROR HY000: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events
-drop function fn16456;
 create trigger trg before insert on t1 for each row set new.a= 10;
-ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 't1'
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
 delete from t1;
 create trigger trg before insert on t1 for each row set new.a= 10;
 insert into t1 values (1);
@@ -376,12 +364,6 @@ return 10;
 end
 master-bin.000001	#	Query	1	#	use `mysqltest1`; SELECT `fn1`(100)
 master-bin.000001	#	Query	1	#	use `mysqltest1`; SELECT `fn1`(20)
-master-bin.000001	#	Query	1	#	use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn16456()
-returns int
-begin
-return unix_timestamp();
-end
-master-bin.000001	#	Query	1	#	use `mysqltest1`; drop function fn16456
 master-bin.000001	#	Query	1	#	use `mysqltest1`; delete from t1
 master-bin.000001	#	Query	1	#	use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10
 master-bin.000001	#	Query	1	#	use `mysqltest1`; insert into t1 values (1)
@@ -483,5 +465,5 @@ RETURN 0
 DROP PROCEDURE p1;
 DROP FUNCTION f1;
 drop table t1;
-End of 5.0 tests
-End of 5.1 tests
+set global log_bin_trust_function_creators=0;
+set global log_bin_trust_function_creators=0;

--- 1.20/mysql-test/t/rpl_sp.test	2006-11-15 01:27:36 +01:00
+++ 1.21/mysql-test/t/rpl_sp.test	2006-11-15 15:46:43 +01:00
@@ -550,6 +550,10 @@ connection master;
 drop table t1;
 sync_slave_with_master;
 
+# Restore log_bin_trust_function_creators to original value
+set global log_bin_trust_function_creators=0;
+connection master;
+set global log_bin_trust_function_creators=0;
 --echo End of 5.0 tests
 --echo End of 5.1 tests
 
Thread
bk commit into 5.1 tree (tnurnberg:1.2368)Tatjana A Nuernberg15 Nov