Commit graph

562 commits

Author SHA1 Message Date
cbell/Chuck@suse.vabb.com
9f36c1c286 WL#3618 - Remove HAVE_ROW_BASED_REPLICATION from source code.
Please see worklog for details on files changed.
2006-12-07 09:18:35 -05:00
lars@black.(none)
6a85cca986 Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.1-merge
2006-11-22 02:24:16 +01:00
mats@romeo.(none)
600a6a676c BUG#24403 (valgrind complaint on uninited st_table for innodb + rbr):
Removing DBUG_DUMP printouts for valgrind builds since they trigger warnings.
Removing valgrind memory checks completely.
Removing bzero() of record when opening table that was added earlier.
2006-11-21 13:57:52 +01:00
mats@romeo.(none)
3eabde4091 BUG#24403 (valgrind complained on uninited st_table for InnoDB and RBR):
Fix to correct behaviour of find_and_fetch_row() for tables that have primary keys stored
in storage engines that support the fast method to fetch rows given a primary key. The
method uses position() to retrieve the key for a given record and rnd_pos() to position
the internal "cursor" at the row. Rnd_pos() returns the found record in table->record[0],
so the record has to be moved to table->record[1] for further processing after calling
find_and_fetch_row().
2006-11-20 21:27:39 +01:00
bar@bar.intranet.mysql.r18.ru
8c369a4700 Merge mysql.com:/usr/home/bar/mysql-5.0.b23619
into  mysql.com:/usr/home/bar/mysql-5.1.b23619
2006-11-16 12:51:49 +04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
d3603eb152 Merge mysql.com:/usr/home/bar/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b23619
2006-11-16 12:28:09 +04:00
aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi
a7c31fa761 Merge dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0
into  dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/merge_50_1
2006-11-14 13:04:40 +02:00
aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi
650a245568 bug#19402 SQL close to the size of the max_allowed_packet fails on the slave
ver 5.0 and 5.1 refinement.
adding to the MAX_SIZE_LOG_EVENT_STATUS estimation status vars and 
EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN
2006-11-14 12:48:17 +02:00
aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi
7b0eb936d1 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into  dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/merge_50
2006-11-13 12:45:47 +02:00
bar@mysql.com/bar.intranet.mysql.r18.ru
a5de478d51 Bug#23619 Incorrectly escaped multibyte characters in binary log break replication
Problem: when embedding a character string with introducer with charset X
into a SQL query which is generally in character set Y, the string constants
were escaped according to their own character set (i.e.X), then after reading
such a "mixed" query from binlog, the string constants were unescaped
using character set of the query (i.e. Y), instead of X, which gave wrong
results or even syntax errors with tricky charsets (e.g. sjis)
Fix: when embedding a string constant of charset X into a query of charset Y,
the string constant is now escaped according to character Y, instead of
its own character set X.
2006-11-09 14:27:34 +04:00
lars/lthalmann@dl145h.mysql.com
3776e9622b Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-11-07 19:26:31 +01:00
mats@romeo.(none)
efaa0f4092 Post-merge fixes. 2006-11-03 21:55:51 +01:00
mats@romeo.(none)
a726fec6e7 Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b18581-mysql-5.1-new-rpl
2006-11-03 21:11:58 +01:00
aelkin/elkin@dsl-hkigw8-feaef900-46.dhcp.inet.fi
8823b832bb Bug#16228/Bug#20697 - related.
Bug#23831  deadlock not noticed

RBR bug in that when replicated msta (multi-statement-trans-action) deadlocks
with a local at write row event or gets timed-out, the event handler did not return
the correct error code.
Wrong error code stops slave sql thread instead of to proceed with
rollback and replay.

The correct code is typed in error log and stored for error handling rotine
to conduct rollback and replay of the transaction. The handling for the rbr
remains the same as for the sbr events.
Particularly, timed-out transaction still is rolled back - look at the related bugs.
2006-11-03 14:26:40 +02:00
cbell/Chuck@mysql_cab.
367a41c308 Changes to the code are necessary to compile on Windows. Typecasts are needed in several DBUG_DUMP statements. CAB 01 Nov 2006 2006-11-01 11:52:32 -05:00
mats@romeo.(none)
83f8e17258 BUG#18581 (Creation of system tables recorded in binlog causing slave failure):
Not replicating the mysql database *at all* any more. All changes to
mysql tables are replicated by replicating the statements that do
the changes.
2006-11-01 09:49:03 +01:00
kent@mysql.com/c-584072d5.010-2112-6f72651.cust.bredbandsbolaget.se
f0bb52ab13 log_event.cc, sql_class.cc:
VisualStudio needs cast from (byte*) to (const char*), 3rd arg to _db_dump_()
2006-10-13 03:32:38 +02:00
mats@romeo.(none)
1023aecb1c Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b21474-mysql-5.1-new-rpl
2006-10-10 15:26:02 +02:00
mats@romeo.(none)
6c3b1f6eb0 BUG#21474 (There is a rotation before the last table map):
Removing code to step the group log position and just stepping
the event log position.  If the group log position were stepped
one time too many, it might be that the group starts at a position
that is not possible, e.g., at a Rows_log_event, or between an
Intvar_log_event and the following associated Query_log_event.
2006-10-10 15:18:21 +02:00
mats@romeo.(none)
799585c5ac Fixes to make replication team tree build on Windows. 2006-10-10 14:58:40 +02:00
mats@romeo.(none)
d4d26ba7d5 Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b19459-mysql-5.1-new
2006-10-06 15:31:05 +02:00
mats@romeo.(none)
e762328b54 BUG#19459 (BINLOG RBR command does not lock tables correctly causing
crash for, e.g., NDB):

Before, mysqlbinlog printed table map events as a separate statement, so
when executing the event, the opened table was subsequently closed
when the statement ended. Instead, the row-based events that make up
a statement are now printed as *one* BINLOG statement, which means
that the table maps and the following *_rows_log_event events are
executed fully before the statement ends.

Changing implementation of BINLOG statement to be able to read the 
emitted format, which now consists of several chunks of BASE64-encoded
data.
2006-10-06 10:17:02 +02:00
kroki/tomash@moonlight.intranet
5ea8adfae7 BUG#21726: Incorrect result with multiple invocations of LAST_INSERT_ID
Non-upper-level INSERTs (the ones in the body of stored procedure,
stored function, or trigger) into a table that have AUTO_INCREMENT
column didn't affected the result of LAST_INSERT_ID() on this level.

The problem was introduced with the fix of bug 6880, which in turn was
introduced with the fix of bug 3117, where current insert_id value was
remembered on the first call to LAST_INSERT_ID() (bug 3117) and was
returned from that function until it was reset before the next
_upper-level_ statement (bug 6880).

The fix for bug#21726 brings back the behaviour of version 4.0, and
implements the following: remember insert_id value at the beginning
of the statement or expression (which at that point equals to
the first insert_id value generated by the previous statement), and
return that remembered value from LAST_INSERT_ID() or @@LAST_INSERT_ID.

Thus, the value returned by LAST_INSERT_ID() is not affected by values
generated by current statement, nor by LAST_INSERT_ID(expr) calls in
this statement.

Version 5.1 does not have this bug (it was fixed by WL 3146).
2006-10-02 14:28:23 +04:00
mats@romeo.(none)
3b9b6e6544 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  romeo.(none):/home/bkroot/mysql-5.1-new-rpl
2006-09-21 18:11:35 +02:00
mats@romeo.(none)
f5b8614fc7 BUG#22550 (Replication of BIT column failing):
Using move_field_offset() to move field pointer to other record before
calling pack()/unpack().
2006-09-21 18:05:02 +02:00
lars/lthalmann@dl145j.mysql.com
57a74ea4af Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-09-21 00:23:20 +02:00
kaa@polly.local
46f2a4dbc6 Fixed the faulty merge 2006-09-13 21:25:33 +04:00
mats@romeo.(none)
ca50d070a0 WL#3259 (RBR with more columns on slave than master):
Incorporating changes from review.
Fixing one bug that surfaced.
2006-09-13 19:25:12 +02:00
kaa@polly.local
b9811a6df1 Fixed the faulty merge 2006-09-13 19:32:21 +04:00
kaa@polly.local
61e3f8eae1 Merge polly.local:/tmp/20924/bug20294/my50-bug20294
into  polly.local:/tmp/20924/bug20294/my51-bug20294
2006-09-13 16:00:15 +04:00
kaa@polly.local
e812ae873d Merge polly.local:/tmp/20924/bug20294/my41-bug20294
into  polly.local:/tmp/20924/bug20294/my50-bug20294
2006-09-13 15:18:14 +04:00
kaa@polly.local
397f0df9ad Cset exclude: kaa@polly.local|ChangeSet|20060912122540|09861
Cset exclude: kaa@polly.local|ChangeSet|20060908100829|09983
2006-09-13 14:41:28 +04:00
kaa@polly.local
ca48b7af0c Merge polly.local:/tmp/20924/bug20294/my50-bug20294
into  polly.local:/tmp/20924/bug20294/my51-bug20294
2006-09-12 18:43:38 +04:00
kaa@polly.local
e03faff3e4 Merge polly.local:/tmp/20924/bug20294/my41-bug20294
into  polly.local:/tmp/20924/bug20294/my50-bug20294
2006-09-12 17:57:15 +04:00
kaa@polly.local
5df7611caa Post-review fixes for bug #20924 2006-09-12 16:25:40 +04:00
mats@romeo.(none)
26c831f75d Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/w3259-mysql-5.1-new-rpl
2006-09-08 11:41:19 +02:00
mats@romeo.(none)
090e020921 Patches to fix problems on Windows 2006-09-08 10:20:14 +02:00
mats@romeo.(none)
eea3e3d6b1 Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b17620-mysql-5.1-new-rpl
2006-09-06 19:34:02 +02:00
mats@romeo.(none)
6ba388d17c BUG#17620: Row-based replication fails when query cache enabled on slave
Invalidating query cache when processing rows for a statement on the slave.
2006-09-06 17:45:27 +02:00
mats@romeo.(none)
dbc98766b0 WL#3259 (RBR with more columns on slave than on master):
Post-merge fixes.
2006-08-22 10:36:11 +02:00
mats@romeo.(none)
c2d7f7c392 Merge romeo.(none):/home/bkroot/mysql-5.1-wl3228
into  romeo.(none):/home/bk/w3259-mysql-5.1-new-rpl
2006-08-21 10:54:41 +02:00
kostja@bodhi.local
a38b418436 Post-merge fixes. 2006-07-13 17:34:49 +04:00
kostja@bodhi.local
99fefab169 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
2006-07-13 11:43:52 +04:00
kostja@bodhi.local
56353959e7 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-07-13 00:18:59 +04:00
mkindahl@dl145k.mysql.com
9415b24139 Merge dl145k.mysql.com:/data0/mkindahl/bkroot/mysql-5.1-new-rpl
into  dl145k.mysql.com:/data0/mkindahl/bk/MERGE/mysql-5.1-merge
2006-07-11 12:17:19 +02:00
guilhem@gbichot3.local
1cc3c80070 fixes after merge. Updates to test's results.
We now reset the THD members related to auto_increment+binlog in
MYSQL_LOG::write(). This is better than in THD::cleanup_after_query(),
which was not able to distinguish between SELECT myfunc1(),myfunc2()
and INSERT INTO t SELECT myfunc1(),myfunc2() from a binlogging point
of view.
Rows_log_event::exec_event() now calls lex_start() instead of
mysql_init_query() because the latter now does too much (it resets
the binlog format).
2006-07-10 18:41:03 +02:00
guilhem@gbichot3.local
bca3fc7800 Merge gbichot3.local:/home/mysql_src/mysql-5.1-interval-move-next-insert-id
into  gbichot3.local:/home/mysql_src/mysql-5.1
2006-07-09 22:50:02 +02: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@romeo.(none)
c18b7d191a Fixing usage of my_strndup() to new prototype. 2006-07-07 21:03:19 +02:00
dlenev@jabberwock.site
e4a9f06a8b Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  jabberwock.site:/home/dlenev/mysql-5.1-bg18437
2006-07-07 23:01:28 +04:00