diff options
author | aelkin/andrei@mysql1000.(none) <> | 2008-03-19 18:44:50 +0200 |
---|---|---|
committer | aelkin/andrei@mysql1000.(none) <> | 2008-03-19 18:44:50 +0200 |
commit | b581227f89883da5185c38e364032dee1b5f4c04 (patch) | |
tree | 51178a12ca585907874608cebef66e7bd695c34f /sql/ha_blackhole.cc | |
parent | 1322371fb21d6efb85181e2518d1a6cf198bd95d (diff) | |
download | mariadb-git-b581227f89883da5185c38e364032dee1b5f4c04.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.
Diffstat (limited to 'sql/ha_blackhole.cc')
-rw-r--r-- | sql/ha_blackhole.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index e477686d18e..01ede3d3bd2 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -115,7 +115,7 @@ const char *ha_blackhole::index_type(uint key_number) int ha_blackhole::write_row(byte * buf) { DBUG_ENTER("ha_blackhole::write_row"); - DBUG_RETURN(0); + DBUG_RETURN(table->next_number_field ? update_auto_increment() : 0); } int ha_blackhole::rnd_init(bool scan) |