summaryrefslogtreecommitdiff
path: root/mysql-test/r/blackhole.result
diff options
context:
space:
mode:
authorunknown <aelkin/andrei@mysql1000.(none)>2008-03-19 18:44:50 +0200
committerunknown <aelkin/andrei@mysql1000.(none)>2008-03-19 18:44:50 +0200
commit5a6996dbcde4ca833f7936413cfa090cba060af5 (patch)
tree51178a12ca585907874608cebef66e7bd695c34f /mysql-test/r/blackhole.result
parent1836625fb4e42b1629b59a4f070d6849da2ee434 (diff)
downloadmariadb-git-5a6996dbcde4ca833f7936413cfa090cba060af5.tar.gz
Bug #35178 INSERT_ID not written to binary log for inserts against BLACKHOLE backed tables
binlogging of insert into a autoincrement blackhole table ignored an explicit set insert_id. Fixed with refining of the blackhole's insert method to call update_auto_increment() that prepares binlogging the insert query with the preceeding set insert_id. Note, as the engine does not store any actual data one has to explicitly provide to the server with the value of the autoincrement column via set insert_id. Otherwise binlogging will happend with the default set insert_id=1. mysql-test/r/blackhole.result: results changed mysql-test/t/blackhole.test: a regression test for the bug added sql/ha_blackhole.cc: blackhole's insert method is refined to call update_auto_increment() that prepares binlogging the insert query with the preceeding set insert_id.
Diffstat (limited to 'mysql-test/r/blackhole.result')
-rw-r--r--mysql-test/r/blackhole.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/blackhole.result b/mysql-test/r/blackhole.result
index a4b780f9db5..51c19c29b0f 100644
--- a/mysql-test/r/blackhole.result
+++ b/mysql-test/r/blackhole.result
@@ -138,3 +138,20 @@ ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD PRIMARY KEY(a);
DELETE FROM t1 WHERE a=10;
DROP TABLE t1;
+reset master;
+create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
+insert into t1 values (11), (NULL), (NULL), (NULL);
+set insert_id= 3;
+insert into t1 values (NULL), (33), (NULL);
+set insert_id= 5;
+insert into t1 values (55), (NULL);
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole
+master-bin.000001 # Intvar 1 # INSERT_ID=1
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL)
+master-bin.000001 # Intvar 1 # INSERT_ID=3
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL)
+master-bin.000001 # Intvar 1 # INSERT_ID=5
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL)
+drop table t1;