Commit 4e46f2db authored by unknown's avatar unknown
Browse files

I had forgotten to delete an already disabled line of C++ code.

---
BUG#20265 (Replication of CREATE-SELECT does not work correctly):
Fixing bug by making binary log handle statement transactions.
The binary log transaction cache can now be truncated to remove 
events inserted during this statement or transaction. Also, the
binary log participate in XA transaction handling, although not
as a full 2pc resource.


mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Result change
sql/log.cc:
  Making change to binlog_end_trans() to support that it can be called
  for statement transactions as well.
sql/sql_class.h:
  Adding function THD::binlog_start_trans_and_stmt() to start a real transaction
  (if necessary) and also a statement transaction.
sql/sql_insert.cc:
  I had forgotten to delete this line (it was already disabled using //;
  this line was not needed because we do the empty() every time
  we write to the binlog (in MYSQL_LOG::write());
  t/binlog_stm_binlog.test already tests that the empty() indeed happens
  for INSERT DELAYED.
  ---
  Changes to use the statement transactions that the binary log now can handle.
parent 9cb377f9
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -359,15 +359,6 @@ show binlog events from 102;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	1	#	use `test`; BEGIN
master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE `t2` (
  `a` int(11) NOT NULL DEFAULT '0',
  `b` int(11) DEFAULT NULL,
  PRIMARY KEY (`a`)
) ENGINE=InnoDB
master-bin.000001	#	Table_map	1	#	table_id: # (test.t2)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Xid	1	#	COMMIT /* xid= */
master-bin.000001	#	Query	1	#	use `test`; DROP TABLE if exists t2
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
@@ -375,15 +366,6 @@ master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t2
master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Query	1	#	use `test`; BEGIN
master-bin.000001	#	Query	1	#	use `test`; CREATE TABLE `t2` (
  `a` int(11) NOT NULL DEFAULT '0',
  `b` int(11) DEFAULT NULL,
  PRIMARY KEY (`a`)
) ENGINE=InnoDB
master-bin.000001	#	Table_map	1	#	table_id: # (test.t2)
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Xid	1	#	COMMIT /* xid= */
master-bin.000001	#	Query	1	#	use `test`; TRUNCATE table t2
master-bin.000001	#	Xid	1	#	COMMIT /* xid= */
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
+404 −133

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -929,6 +929,7 @@ class THD :public Statement,
  /*
    Public interface to write RBR events to the binlog
  */
  void binlog_start_trans_and_stmt();
  int binlog_write_table_map(TABLE *table, bool is_transactional);
  int binlog_write_row(TABLE* table, bool is_transactional,
                       MY_BITMAP const* cols, my_size_t colcnt,
+97 −55

File changed.

Preview size limit exceeded, changes collapsed.