Commit 7a8b1bae authored by aelkin/andrei@mysql1000.(none)'s avatar aelkin/andrei@mysql1000.(none)
Browse files

Merge mysqldev@production.mysql.com:my/mysql-5.1-release

into  mysql1000.(none):/home/andrei/MySQL/BARE/mysql-5.1-release
parents 9b6ac078 725d07d5
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -417,3 +417,17 @@ Log_name Pos Event_type Server_id End_log_pos Info
SELECT * FROM t2 ORDER BY a;
a
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(1);
CREATE TABLE t2 (a INT UNIQUE) ENGINE=INNODB SELECT * FROM t1;
ERROR 23000: Duplicate entry '1' for key 'a'
INSERT INTO t1 VALUES (2);
*** the proof of the fix:
select must show that the last insert performed on the slave ***
SELECT * FROM t1;
a
1
1
2
DROP TABLE t1;
end of the tests
+27 −0
Original line number Diff line number Diff line
@@ -234,3 +234,30 @@ SELECT * FROM t2 ORDER BY a;
connection master;
DROP TABLE t1,t2;
sync_slave_with_master;

#
# bug#35762 Failing CREATE-SELECT produces bad binlog in row mode
#

connection master;

CREATE TABLE t1 (a INT);

INSERT INTO t1 VALUES (1),(1);
--error ER_DUP_ENTRY
CREATE TABLE t2 (a INT UNIQUE) ENGINE=INNODB SELECT * FROM t1;
INSERT INTO t1 VALUES (2);

sync_slave_with_master;
# connection slave;

--echo *** the proof of the fix:
--echo     select must show that the last insert performed on the slave ***
SELECT * FROM t1;

connection master;
DROP TABLE t1;
sync_slave_with_master;


--echo end of the tests
+1 −1
Original line number Diff line number Diff line
@@ -3720,7 +3720,7 @@ void select_create::abort()
  select_insert::abort();
  thd->transaction.stmt.modified_non_trans_table= FALSE;
  reenable_binlog(thd);

  thd->binlog_flush_pending_rows_event(TRUE);

  if (m_plock)
  {