List:Internals« Previous MessageNext Message »
From:guilhem Date:October 24 2005 7:29pm
Subject:bk commit into 5.0 tree (gbichot:1.2016) BUG#12857
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gbichot. When gbichot 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
  1.2016 05/10/24 21:29:26 gbichot@stripped +9 -0
  * re-enabling rpl_sp004 as can't repeat this
  BUG#12857 "RBR (ps-protocol) slave core in call to myisam_index_read"
  * small test fixes
  * removed pending event flush from binlog_end_trans() because
  it's already done in log_query().
  * NOTE: create_select_tmp segfaults in RBR, but this is not due to my changes.

  mysql-test/r/rpl_row_sp011.result
    1.1 05/10/24 21:27:31 gbichot@stripped +69 -0

  sql/sql_class.cc
    1.217 05/10/24 21:27:31 gbichot@stripped +4 -6
    comment, style

  sql/sp_head.cc
    1.191 05/10/24 21:27:31 gbichot@stripped +3 -0
    comment

  sql/log.cc
    1.183 05/10/24 21:27:31 gbichot@stripped +0 -18
    as discussed with Mats there is no need to flush the pending event
    in binlog_end_trans, because binlog_query() has already done it.

  mysql-test/t/rpl_row_stop_middle.test
    1.2 05/10/24 21:27:31 gbichot@stripped +3 -3
    need to be sure the table was created on slave

  mysql-test/r/rpl_row_sp011.result
    1.0 05/10/24 21:27:31 gbichot@stripped +0 -0
    BitKeeper file /nfstmp1/guilhem/mysql-5.0-wl1012/mysql-test/r/rpl_row_sp011.result

  mysql-test/t/disabled.def
    1.35 05/10/24 21:27:30 gbichot@stripped +1 -1
    re-enabling test

  mysql-test/r/rpl_sp004.result
    1.2 05/10/24 21:27:30 gbichot@stripped +2 -0
    I get a warning and it's normal given the content of the test

  mysql-test/r/rpl_row_stop_middle.result
    1.2 05/10/24 21:27:30 gbichot@stripped +1 -1
    result update

  mysql-test/r/rpl_row_delayed_ins.result
    1.7 05/10/24 21:27:29 gbichot@stripped +1 -1
    version-independent result

# 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:	gbichot
# Host:	production.mysql.com
# Root:	/nfstmp1/guilhem/mysql-5.0-wl1012

--- 1.182/sql/log.cc	2005-10-21 11:12:47 +02:00
+++ 1.183/sql/log.cc	2005-10-24 21:27:31 +02:00
@@ -95,22 +95,6 @@
   int error=0;
   DBUG_ENTER("binlog_end_trans");
 
-  /*
-    We need to flush the pending event at the end of the transaction -
-    or the end of the statement, if autocommit is on - but before we
-    unlock the tables involved in the transaction.
-
-    For transactions, we flush the pending event here. This function
-    is called from binlog_commit() and binlog_rollback(), but not from
-    binlog_savepoint_rollback(), so we add a flush there as well.
-
-    In autocommit mode, the pending event is flushed in the
-    binlog_query() function, which will flush the pending event and,
-    if using statement-based replication, write the statement to the
-    binary log.
-   */
-  thd->binlog_flush_pending_rows_event(true);
-
   if (end_ev)
     error= mysql_bin_log.write(thd, trans_log, end_ev);
 
@@ -218,8 +202,6 @@
   IO_CACHE *trans_log= (IO_CACHE*)thd->ha_data[binlog_hton.slot];
   DBUG_ENTER("binlog_savepoint_rollback");
   DBUG_ASSERT(mysql_bin_log.is_open() && my_b_tell(trans_log));
-
-  thd->binlog_flush_pending_rows_event(true);
 
   /*
     Write ROLLBACK TO SAVEPOINT to the binlog cache if we have updated some

--- 1.216/sql/sql_class.cc	2005-10-21 11:12:47 +02:00
+++ 1.217/sql/sql_class.cc	2005-10-24 21:27:31 +02:00
@@ -2148,9 +2148,9 @@
       return NULL;
     ev->server_id= serv_id; // I don't like this, it's too easy to forget.
     /*
-       ... and then flush the pending event and replace it with the
-       newly created event.
-     */
+      ... and then flush the pending event and replace it with the
+      newly created event.
+    */
     if (unlikely(binlog_flush_and_set_pending_rows_event(ev)))
     {
       delete ev;
@@ -2509,10 +2509,8 @@
   {
   case THD::ROW_QUERY_TYPE:
     if (binlog_row_based)
-    {
       return prepare_for_commit();
-    }
-    else
+    /* otherwise we fall through */
   case THD::STMT_QUERY_TYPE:
     {
       Query_log_event qinfo(this, query, query_len, is_trans, suppress_use);
--- New file ---
+++ mysql-test/r/rpl_row_sp011.result	05/10/24 21:27:31
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
DROP PROCEDURE IF EXISTS test.p1;
DROP PROCEDURE IF EXISTS test.p2;
DROP PROCEDURE IF EXISTS test.p3;
DROP PROCEDURE IF EXISTS test.p4;
DROP PROCEDURE IF EXISTS test.p5;
DROP PROCEDURE IF EXISTS test.p6;
DROP PROCEDURE IF EXISTS test.p7;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
CREATE TABLE test.t1 (a int, PRIMARY KEY(a));
INSERT INTO test.t1 VALUES (1);
CREATE PROCEDURE test.p1()
BEGIN
ALTER TABLE test.t1 ADD COLUMN b CHAR(4) AFTER a;
UPDATE test.t1 SET b = 'rbr' WHERE a = 1; 
CALL test.p2();
END|
CREATE PROCEDURE test.p2()
BEGIN
ALTER TABLE test.t1 ADD COLUMN f FLOAT AFTER b;
UPDATE test.t1 SET f = RAND() WHERE a = 1; 
CALL test.p3();
END|
CREATE PROCEDURE test.p3()
BEGIN
ALTER TABLE test.t1 RENAME test.t2;
CALL test.p4();
END|
CREATE PROCEDURE test.p4()
BEGIN
ALTER TABLE test.t2 ADD INDEX (f);
ALTER TABLE test.t2 CHANGE a a INT UNSIGNED NOT NULL AUTO_INCREMENT;
INSERT INTO test.t2 VALUES (NULL,'TEST',RAND());
CALL test.p5();
END|
CREATE PROCEDURE test.p5()
BEGIN
ALTER TABLE test.t2 ORDER BY f;
INSERT INTO test.t2 VALUES (NULL,'STM',RAND());
CALL test.p6();
END|
CREATE PROCEDURE test.p6()
BEGIN
ALTER TABLE test.t2 ADD COLUMN b2 CHAR(4) FIRST;
ALTER TABLE test.t2 ADD COLUMN to_drop BIT(8) AFTER b2;
INSERT INTO test.t2 VALUES ('new',1,NULL,'STM',RAND());
CALL test.p7();
END|
CREATE PROCEDURE test.p7()
BEGIN
ALTER TABLE test.t2 DROP COLUMN to_drop;
INSERT INTO test.t2 VALUES ('gone',NULL,'STM',RAND());
END|
CALL test.p1();
DROP PROCEDURE IF EXISTS test.p1;
DROP PROCEDURE IF EXISTS test.p2;
DROP PROCEDURE IF EXISTS test.p3;
DROP PROCEDURE IF EXISTS test.p4;
DROP PROCEDURE IF EXISTS test.p5;
DROP PROCEDURE IF EXISTS test.p6;
DROP PROCEDURE IF EXISTS test.p7;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;


--- 1.6/mysql-test/r/rpl_row_delayed_ins.result	2005-10-21 11:14:13 +02:00
+++ 1.7/mysql-test/r/rpl_row_delayed_ins.result	2005-10-24 21:27:29 +02:00
@@ -14,7 +14,7 @@
 3
 show binlog events;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	4	Format_desc	1	102	Server ver: 5.0.15-rc-debug-log, Binlog ver: 4
+master-bin.000001	4	Format_desc	1	102	Server ver: VERSION, Binlog ver: 4
 master-bin.000001	102	Query	1	222	use `test`; create table t1(a int not null primary key) engine=myisam
 master-bin.000001	222	Table_map	1	259	test.t1
 master-bin.000001	259	Write_rows	1	301	

--- 1.1/mysql-test/r/rpl_row_stop_middle.result	2005-09-15 15:29:57 +02:00
+++ 1.2/mysql-test/r/rpl_row_stop_middle.result	2005-10-24 21:27:30 +02:00
@@ -4,8 +4,8 @@
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-stop slave;
 create table t1 (a int not null auto_increment primary key, b int, key(b));
+stop slave;
 INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
 INSERT INTO t1 (a) SELECT null FROM t1;
 INSERT INTO t1 (a) SELECT null FROM t1;

--- 1.1/mysql-test/t/rpl_row_stop_middle.test	2005-09-15 15:29:57 +02:00
+++ 1.2/mysql-test/t/rpl_row_stop_middle.test	2005-10-24 21:27:31 +02:00
@@ -7,11 +7,11 @@
 source include/have_binlog_format_row.inc;
 source include/master-slave.inc;
 
-connection slave;
-stop slave;
-
 connection master;
 create table t1 (a int not null auto_increment primary key, b int, key(b));
+sync_slave_with_master;
+stop slave;
+connection master;
 INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
 INSERT INTO t1 (a) SELECT null FROM t1;
 INSERT INTO t1 (a) SELECT null FROM t1;

--- 1.1/mysql-test/r/rpl_sp004.result	2005-08-25 13:02:15 +02:00
+++ 1.2/mysql-test/r/rpl_sp004.result	2005-10-24 21:27:30 +02:00
@@ -60,6 +60,8 @@
 Tables_in_test
 t3
 CALL test.p1();
+Warnings:
+Note	1050	Table 't3' already exists
 SELECT * FROM test.t1;
 a
 1

--- 1.34/mysql-test/t/disabled.def	2005-10-22 18:19:14 +02:00
+++ 1.35/mysql-test/t/disabled.def	2005-10-24 21:27:30 +02:00
@@ -29,5 +29,5 @@
 rpl_row_trig003:Bug 12574 CORE
 rpl_row_view01:Bug 12687
 rpl_row_NOW:Bug 12574 
-rpl_sp004:Bug 12857
+#rpl_sp004:Bug 12857
 rpl_bit_npk:Bug 13418

--- 1.190/sql/sp_head.cc	2005-09-30 18:00:16 +02:00
+++ 1.191/sql/sp_head.cc	2005-10-24 21:27:31 +02:00
@@ -667,6 +667,9 @@
 
 /*
   StoredRoutinesBinlogging
+  This paragraph applies only to statement-based binlogging. Row-based
+  binlogging does not need anything special like this.
+
   Top-down overview:
 
   1. Statements
Thread
bk commit into 5.0 tree (gbichot:1.2016) BUG#12857guilhem24 Oct