Commit graph

10 commits

Author SHA1 Message Date
mats@romeo.(none)
7c187c2c9b WL#3464: Add replication event to denote gap in replication
Adding an event that can be used to denote that an incident occured
on the master. The event can be used to denote a gap in the replication
stream, but can also be used to denote other incidents.

In addition, the injector interface is extended with functions to
generate an incident event. The function will also rotate the binary
log after generating an incident event to get a fresh binary log.
2007-03-29 20:31:09 +02:00
aelkin/elkin@dsl-hkigw8-febefb00-148.dhcp.inet.fi
4e14e0a35d Bug #22762 create talbe if not exists like a-temp-table binlogged w/o "if not exists"
Bug #22027 CREATE TABLE IF NOT EXISTS SELECT logged improperly with row-based binlog
    
post-merge fix, also making results free from server's version number.
2006-10-23 15:09:04 +03:00
aelkin/elkin@dsl-hkigw8-feb9fb00-191.dhcp.inet.fi
5962886dce bug#22027: CREATE TABLE IF NOT EXISTS SELECT logged improperly with rbr binlog,
and #22762: create talbe if not exists like a-temp-table binlogged w/o "if not exists"
    These are rbr bugs.
    store_create_info, which generates the create statement e.g for binlogging,
    did not account a lex option HA_LEX_CREATE_IF_NOT_EXISTS.
    
    The fix makes the generated query to include the parent's statement option
if
  that was supplied.
2006-09-28 18:51:27 +03:00
aelkin/elkin@dsl-hkigw8-feb9fb00-191.dhcp.inet.fi
a2f5edebfc One more fix for binlog_row_binlog due to interminism of checking with
SHOW BINLOG event. The latter should be either fixed or replaced to favor
reading from binlog as the check.
2006-09-27 13:05:29 +03:00
aelkin/elkin@dsl-hkigw8-feb9fb00-191.dhcp.inet.fi
86fa300a69 binlog_row_binlog test gained some indeterministic checks with changes due to
ChangeSet@1.2309.1.12, 2006-09-12 15:42:13+02:00, guilhem@gbichot3.local +14 -0
  Fixing problems I identified in my auto_increment work pushed in July
  (as part of the auto_increment cleanup of WL #3146; ...
The problem is in that show binlog events in indeterministic, row events can be compressed,
so that 2 seconds original delay does not guard from inconsistency.

We syncronize test's current inserted rows counter with system insert delayed thread
per each query.

From another side there is no requirement for binlog to be event per row and then 
to verify if binlog has recorded what was recently inserted is better
via reading from it instead of 'show binlog events'.
2006-09-23 15:24:45 +03:00
guilhem@gbichot3.local
a8836b7dde Fixing problems I identified in my auto_increment work pushed in July
(as part of the auto_increment cleanup of WL#3146; let's not be
sad, that monster push still removed serious bugs):
one problem with INSERT DELAYED (unexpected interval releases),
one with stored functions (wrong auto_inc binlogging).
These bugs were not released.
2006-09-12 15:42:13 +02:00
brian@zim.(none)
b93a5c5f04 Updated row result, and fix for Windows build. 2006-08-14 03:26:53 -07:00
guilhem@gbichot3.local
0594e1b84b WL#3146 "less locking in auto_increment":
this is a cleanup patch for our current auto_increment handling:
new names for auto_increment variables in THD, new methods to manipulate them
(see sql_class.h), some move into handler::, causing less backup/restore
work when executing substatements. 
This makes the logic hopefully clearer, less work is is needed in
mysql_insert().
By cleaning up, using different variables for different purposes (instead
of one for 3 things...), we fix those bugs, which someone may want to fix
in 5.0 too:
BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate
statement-based"
BUG#20341 "stored function inserting into one auto_increment puts bad
data in slave"
BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE"
(now if a row is updated, LAST_INSERT_ID() will return its id)
and re-fixes:
BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT"
(already fixed differently by Ramil in 4.1)
Test of documented behaviour of mysql_insert_id() (there was no test).
The behaviour changes introduced are:
- LAST_INSERT_ID() now returns "the first autogenerated auto_increment value
successfully inserted", instead of "the first autogenerated auto_increment
value if any row was successfully inserted", see auto_increment.test.
Same for mysql_insert_id(), see mysql_client_test.c.
- LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY
UPDATE, see auto_increment.test. Same for mysql_insert_id(), see
mysql_client_test.c.
- LAST_INSERT_ID() does not change if no autogenerated value was successfully 
inserted (it used to then be 0), see auto_increment.test.
- if in INSERT SELECT no autogenerated value was successfully inserted,
mysql_insert_id() now returns the id of the last inserted row (it already
did this for INSERT VALUES), see mysql_client_test.c.
- if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X
(it already did this for INSERT VALUES), see mysql_client_test.c.
- NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE,
the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID
influences not only the first row now.

Additionally, when unlocking a table we check that the thread is not keeping
a next_insert_id (as the table is unlocked that id is potentially out-of-date);
forgetting about this next_insert_id is done in a new
handler::ha_release_auto_increment().

Finally we prepare for engines capable of reserving finite-length intervals
of auto_increment values: we store such intervals in THD. The next step
(to be done by the replication team in 5.1) is to read those intervals from
THD and actually store them in the statement-based binary log. NDB
will be a good engine to test that.
2006-07-09 17:52:19 +02:00
mats@mysql.com
101edab125 WL#3023 (RBR: Use locks in a statement-like manner):
Adaptions to make it work with NDB.
2006-02-24 16:19:55 +01:00
lars@mysql.com
ad126d90e0 WL#1012: All changes as one single changeset.
This includes both code and test cases.
2005-12-22 06:39:02 +01:00