Commit graph

883 commits

Author SHA1 Message Date
Alexey Kopytov
144763db0c Manual merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-23 17:16:46 +02:00
Alfranio Correia
d822ab8957 BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode
If secure-file-priv was set on slave, it became unable to execute
LOAD DATA INFILE statements sent from master using mixed or
statement-based replication.
                  
This patch fixes the issue by ignoring this security restriction
and checking if the files are created and read by the slave in the
--slave-load-tmpdir while executing the SQL Thread.
2009-02-21 09:36:07 +00:00
Andrei Elkin
4712e6b9b8 Bug #37313 BINLOG Contains Incorrect server id
Signed integer format specifier forced to print the binlog header with server_id
negative if the unsigned value sets the sign-bit ON.
  
Fixed with correcting the specifier to correspond to typeof(server_id) == ulong.

mysql-test/r/mysqlbinlog.result:
  results changed.
mysql-test/t/mysqlbinlog.test:
  displaying the expected unsignedly formatted server_id value, bug#37313.
sql/log_event.cc:
  Format specifier is corrected to correspond to typeof(server_id).
2009-02-20 13:55:43 +02:00
Andrei Elkin
5aef51b5d3 Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
fixing build issue, caused by the previous push.

sql/log_event.cc:
  moving a new declaration out of mysqlbinlog compilation scope.
2009-02-04 13:08:27 +02:00
Andrei Elkin
9b11bc02ae Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
The bug happened because filtering-out a STMT_END_F-flagged event so that
the transaction COMMIT finds traces of incomplete statement commit.
Such situation is only possible with ndb circular replication. The filtered-out
rows event is one that immediately preceeds the COMMIT query event.
      
Fixed with deploying an the rows-log-event statement commit at executing
of the transaction COMMIT event. 
Resources that were allocated by other than STMT_END_F-flagged event of
the last statement are clean up prior execution of the commit logics.


mysql-test/suite/rpl_ndb/t/disabled.def:
  re-enabling two tests.
sql/log_event.cc:
  Adding the statement cleanup to execute at the transaction commit time.
  The statement might not be ended with execution of STMT_END_F-flagged event because of
  the event was filtered out by SERVER_ID rules.
  Small refactoring for Rows_log_event::do_update_pos() to be split on two parts:
  the statement commit that releases its execution time allocated resources, and
  the relay log update.
2009-02-04 12:13:54 +02:00
Georgi Kodinov
87eb2cb938 merged 5.1-main -> 5.1-bugteam 2009-01-30 15:44:49 +02:00
Luis Soares
df8543868d merge: 5.1 -> 5.1-rpl
conflicts:
  Text conflict in client/mysqltest.cc
  Text conflict in mysql-test/include/wait_until_connected_again.inc
  Text conflict in mysql-test/lib/mtr_report.pm
  Text conflict in mysql-test/mysql-test-run.pl
  Text conflict in mysql-test/r/events_bugs.result
  Text conflict in mysql-test/r/log_state.result
  Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
  Text conflict in mysql-test/r/mysqlcheck.result
  Text conflict in mysql-test/r/query_cache.result
  Text conflict in mysql-test/r/status.result
  Text conflict in mysql-test/suite/binlog/r/binlog_index.result
  Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
  Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
  Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
  Text conflict in mysql-test/t/disabled.def
  Text conflict in mysql-test/t/events_bugs.test
  Text conflict in mysql-test/t/log_state.test
  Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
  Text conflict in mysql-test/t/mysqlcheck.test
  Text conflict in mysql-test/t/query_cache.test
  Text conflict in mysql-test/t/rpl_init_slave_func.test
  Text conflict in mysql-test/t/status.test
2009-01-23 13:22:05 +01:00
Andrei Elkin
8c3389f386 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
It's a regression issue.
The reason of the bug appeared to be an error introduced into 5.1 source code.
A piece of code in Create_file_log_event::do_apply_event() did not have test
coverage which made make test and pb unaware.
      
Fixed with inverting the old value of the return value from 
Create_file_log_event::do_apply_event().
The rpl test suite is extended with `rpl_cross_version' the file to hold 
regression cases similar to the current.


mysql-test/suite/rpl/r/rpl_cross_version.result:
  new results file
mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  options to the server to be able to start replication to itself
mysql-test/suite/rpl/t/rpl_cross_version.test:
  regression test for bug#31240.
sql/log_event.cc:
  Correcting the return value from  Create_file_log_event::do_apply_event()
2009-01-22 16:55:14 +02:00
He Zhenxing
45140a8ea3 Auto merge 2009-01-14 17:32:25 +08:00
He Zhenxing
f2c122bf90 BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables
The next number (AUTO_INCREMENT) field of the table for write
rows events are not initialized, and cause some engines (innodb)
not correctly update the tables's auto_increment value.

This patch fixed this problem by honor next number fields if present.

mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Add test code for BUG#41986
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  update test result file for BUG#41986
sql/log_event.cc:
  set next_number_field before writing rows, and reset next_number_field after finished writing rows
2009-01-14 16:27:32 +08:00
Sven Sandberg
b0fadb57ec merge fix of BUG#41961 in 5.1-bugteam with recent changes in 5.1-bugteam 2009-01-09 11:35:26 +01:00
Sven Sandberg
5c92f27f63 BUG#41961: Some log_event types do not skip post-header when reading
Problem: when the server reads a log_event from file, it should read
the post-header lengths from the format_description_log_event. Some
event types which currently have post-header length 0 did not do this,
and instead had a hard-coded zero length for the post-header. That
means the current server version will not be able to read future
versions of these events.
Fix: make the reader functions read the post-header.


sql/log_event.cc:
   - Made Format_description_log_event constructor initialize all
     post-header lengths explicitly, to make it easier to find them
     in the source code.
   - After this, it is no longer necessary to pass the MY_ZEROFILL
     flag to my_malloc. I removed the flag and added a sanity-check
     that will be executed only in debug-mode.
   - Made INTVAR, RAND, USER_VAR, and XID events skip post_header_len
     when reading from file.
sql/log_event.h:
  Added explicit defines for the lengths of all event types.
2009-01-09 10:48:01 +01:00
Luis Soares
b2cdc3b6cb merge: 5.1 -> 5.1-rpl
conflicts:
  Text conflict in mysql-test/lib/mtr_report.pm
  Text conflict in mysql-test/mysql-test-run.pl
2009-01-08 19:03:56 +00:00
Georgi Kodinov
f97ef7a40e merged 5.1-main -> 5.1-bugteam 2009-01-05 18:10:20 +02:00
Sven Sandberg
ba835f89ba BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
Problem: When an Incident_log_event contains a bad incident number on disk,
the server crashes with an assertion.
Fix: Don't validate input with assertions. Use errors.

mysql-test/include/cleanup_fake_relay_log.inc:
  Added auxiliary file to restore things that setup_fake_relay_log.inc did.
mysql-test/include/setup_fake_relay_log.inc:
  Added auxiliary file to setup replication from an existing relay log.
mysql-test/std_data/bug40482-bin.000001:
  Binlog file for rpl.rpl_binlog_corruption
mysql-test/suite/rpl/t/rpl_binlog_corruption.test:
  New test file.
sql/log_event.cc:
  Check that the incident number is correct at the time the event is constructed.
  Do not assert it at the time it is printed.
sql/log_event.h:
  Incident_log_event::is_valid() should verify that the incident number is valid.
sql/rpl_constants.h:
  Incident numbers should be hard-coded, since they may appear in files.
2008-12-29 17:04:10 +01:00
Davi Arnaut
3ce026ec2f Fix warnings and bug spotted by gcc-4.3.
Related to operator precedence and associativity.
Make the expressions as explicit as possible.

sql/field.h:
  Silence gcc-4.3 warning: be more explicit.
sql/item.cc:
  Silence gcc-4.3 warning: be more explicit.
sql/item_sum.cc:
  Silence gcc-4.3 warning: be more explicit.
sql/log_event.cc:
  Silence gcc-4.3 warning: be more explicit.
sql/spatial.h:
  Silence gcc-4.3 warning: be more explicit.
sql/sql_lex.cc:
  Silence gcc-4.3 warning: be more explicit.
sql/table.h:
  Silence gcc-4.3 warning: be more explicit.
storage/federated/ha_federated.cc:
  Fix operator precedence bug.
storage/heap/ha_heap.cc:
  Silence gcc-4.3 warning: be more explicit.
2008-12-16 10:12:22 -02:00
Andrei Elkin
ca2d184695 merging 5.1 -> 5.1 rpl. 3 of 4 conflicts are resolved similarly to 6.0->6.0-rpl merging.
mysql_upgrade results changed due to the error messesge of mysqlcheck has changed.
2008-11-12 19:51:47 +02:00
Build Team
e85fe79430 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Mats Kindahl
32c161f3ea Merging 5.1 main into 5.1-rpl 2008-10-23 21:27:09 +02:00
Mats Kindahl
2019f17276 Bug #40004 Replication failure with no PK + no indexes
In certain situations, a scan of the table will return the error
code HA_ERR_RECORD_DELETED, and this error code is not 
correctly caught in the Rows_log_event::find_row() function, which
causes an error to be returned for this case.

This patch fixes the problem by adding code to either ignore the
record and continuing with the next one, the the event of a table
scan, or change the error code to HA_ERR_KEY_NOT_FOUND, in the event
that a key lookup is attempted.
2008-10-20 20:50:08 +02:00
Ramil Kalimullin
b4c5cafeb0 Fix for bug#38269: pushbuild gives valgrind error in
ha_statistic_increment for rpl_temporary

Problem: in some cases master send a special event to reconnecting
slave to keep slave's temporary tables (see #17284) and they still 
have references to the "old" SQL slave thread and use them to access
thread's data.

Fix: set temporary tables thread references to the actual SQL slave
thread in such cases.


mysql-test/suite/rpl/t/disabled.def:
  Fix for bug#38269: pushbuild gives valgrind error in 
  ha_statistic_increment for rpl_temporary
    - rpl_temporary test enabled.
sql/log_event.cc:
  Fix for bug#38269: pushbuild gives valgrind error in 
  ha_statistic_increment for rpl_temporary
    - if we keep slave's temporary tables after reconnect,
  set their thread pointers (->in_use) to the current SQL thread.
2008-10-07 18:21:17 +05:00
Mats Kindahl
bcaf5e0cf5 Merging 5.1 main into 5.1-rpl. 2008-10-06 10:27:36 +02:00
Mats Kindahl
f2a7af7b5f Merging with 5.1-5.1.29-rc. 2008-10-03 09:36:22 +02:00
Mats Kindahl
8d9cf89e96 Bug #38360: BLACKHOLE replication with RBR is broken
The Blackhole engine did not support row-based replication
since the delete_row(), update_row(), and the index and range
searching functions were not implemented.

This patch adds row-based replication support for the
Blackhole engine by implementing the two functions mentioned
above, and making the engine pretend that it has found the
correct row to delete or update when executed from the slave
SQL thread by implementing index and range searching functions.

It is necessary to only pretend this for the SQL thread, since
a SELECT executed on the Blackhole engine will otherwise never
return EOF, causing a livelock.


mysql-test/extra/binlog_tests/blackhole.test:
  Blackhole now handles row-based replication.
mysql-test/extra/rpl_tests/rpl_blackhole.test:
  Test helper file for testing that blackhole actually
  writes something to the binary log on the slave.
mysql-test/suite/binlog/t/binlog_multi_engine.test:
  Replication now handles row-based replcation.
mysql-test/suite/rpl/t/rpl_blackhole.test:
  Test that Blackhole works with primary key, index, or none.
sql/log_event.cc:
  Correcting code to only touch filler bits and leave
  all other bits alone. It is necessary since there is
  no guarantee that the engine will be able to fill in
  the bits correctly (e.g., the blackhole engine).
storage/blackhole/ha_blackhole.cc:
  Adding definitions for update_row() and delete_row() to return OK
  when executed from the slave SQL thread with thd->query == NULL
  (indicating that row-based replication events are being processed).
  
  Changing rnd_next(), index_read(), index_read_idx(), and
  index_read_last() to return OK when executed from the slave SQL
  thread (faking that the row has been found so that processing
  proceeds to update/delete the row).
storage/blackhole/ha_blackhole.h:
  Enabling row capabilities for engine.
  Defining write_row(), update_row(), and delete_row().
  Making write_row() private (as it should be).
2008-10-02 11:02:38 +02:00
He Zhenxing
08399602a6 Auto Merge 2008-09-29 13:36:42 +08:00
He Zhenxing
bd35cfe22e BUG#38734 rpl_server_id2 sync_with_master failed
Rotate event is automatically generated and written when rotating binary
log or relay log. Rotate events for relay logs are usually ignored by slave
SQL thread becuase they have the same server id as that of the slave.
However, if --replicate-same-server-id is enabled, rotate event
for relay log would be treated as if it's a rotate event from master, and
would be executed by slave to update the rli->group_master_log_name and
rli->group_master_log_pos to a wrong value and cause the MASTER_POS_WAIT
function to fail and return NULL.

This patch fixed this problem by setting a flag bit (LOG_EVENT_RELAY_LOG_F)
in the event to tell the SQL thread to ignore these Rotate events generated
for relay logs.

This patch also added another binlog event flag bit (LOG_EVENT_ARTIFICIAL_F)
to distinquish faked events, the method used before this was by checking if
log_pos was zero.


sql/log.h:
  Add a member to MYSQL_BIN_LOG to distinguish binary log from relay log.
sql/log_event.cc:
  Change artificial_event member to LOG_EVENT_ARTIFICIAL_F flag
  
  If LOG_EVENT_RELAY_LOG_F is set in the event flags for a rotate event, ignore it when updating position
  
  Refactored the code in Rotate_log_event::do_update_pos
sql/log_event.h:
  Add LOG_EVENT_RELAY_LOG_F flag to Log_event flags
  Add RELAY_LOG flag to Rotate_log_event flags
sql/sql_repl.cc:
  Set LOG_EVENT_ARTIFICIAL_F for fake rotate events
2008-09-28 15:34:25 +08:00
He Zhenxing
a2841cf1c1 BUG#35843 Slow replication slave when using partitioned myisam table
In order to improve the performance when replicating to partitioned
myisam tables with row-based format, the number of rows of current 
rows log event is estimated and used to setup storage engine for bulk
inserts.
2008-09-26 17:39:47 +08:00
He Zhenxing
b17458dcc1 Merge 5.1 main -> 5.1-rpl 2008-09-06 08:51:17 +08:00
Andrei Elkin
2f8c0a1675 Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog
The replication filtering rules were inappropiately applied when
executing BINLOG pseudo-query.  The rules are supposed to be active
only at times when the slave's sql thread executes an event.
            
Fixed with correcting a condition to call replication rules only if
the slave sql thread executes the event.

mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result:
  new result file
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt:
  a filtering option that would refuse to replicate a row event of the main test on
  slave
mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test:
  a regression test for the bug
sql/log_event.cc:
  avoiding to call the filtering rules if the execution thread is not a slave.
2008-09-03 13:01:18 +03:00
Mats Kindahl
84b81e6c95 Merging 5.1 into 5.1-rpl-merge 2008-08-27 20:52:44 +02:00
He Zhenxing
923f61039e Cherry picking patch for BUG#37051 2008-08-26 18:01:49 +08:00
Alexander Barkov
8706222b33 Additional ffix for bug#31455
- fixing double problem on big endian machines
- modifying regex_replace to replace negative numbers
  Previously only positive numbers where replaced.
2008-08-25 12:58:29 +05:00
Alexander Barkov
1f61af5ad1 Additional fix for bug#31455.
Exchanging "m_cols" and "m_cols_ai".

Very confusing variable naming :(
2008-08-22 10:17:52 +05:00
Alexander Barkov
762df2d05c Additional fix for bug#31455 (rpl decoder)
- Implementing --base64-format=decode-rows, to display
  SQL-alike decoded row events without their BINLOG statements.
- Adding --base64-format=decode-rows into tests when
  calling mysqlbinlog to avoid non-deterministic results
- Removing resetting of last_table_id in "RESET MASTER",
  which appeared to be dangerous.
2008-08-21 16:47:23 +05:00
Alexander Barkov
0c5bc2eafc Bug#31455 mysqlbinlog don't print user readable info about RBR events
Implementing -v command line parameter to mysqlbinlog
to decode and print row events.

mysql-test/include/mysqlbinlog_row_engine.inc
mysql-test/r/mysqlbinlog_row.result
mysql-test/r/mysqlbinlog_row_big.result
mysql-test/r/mysqlbinlog_row_innodb.result
mysql-test/r/mysqlbinlog_row_myisam.result
mysql-test/r/mysqlbinlog_row_trans.result
mysql-test/t/mysqlbinlog_row.test
mysql-test/t/mysqlbinlog_row_big.test
mysql-test/t/mysqlbinlog_row_innodb.test
mysql-test/t/mysqlbinlog_row_myisam.test
mysql-test/t/mysqlbinlog_row_trans.test
  Adding tests 

client/Makefile.am
  Adding new files to symlink
  
client/mysqlbinlog.cc
  Adding -v option

sql/log_event.cc
  Impelentations of the new methods

sql/log_event.h
  Declaration of the new methods and member

sql/mysql_priv.h
  Adding new function prototype

sql/rpl_tblmap.cc
  Adding pre-processor conditions 

sql/rpl_tblmap.h
  Adding pre-processor conditions 

sql/rpl_utility.h
  Adding pre-processor conditions 

sql/sql_base.cc
  Adding reset_table_id_sequence() function.

sql/sql_repl.cc
  Resetting table_id on "RESET MASTER"
  
.bzrignore
  Ignoring new symlinked files
2008-08-20 19:06:31 +05:00
He Zhenxing
bca856c5b3 Auto merge 2008-08-06 18:41:27 +08:00
Sven Sandberg
4cf30d44ef merged 5.1 main to 5.1-rpl
manually resolved conflicts:
Text conflict in client/mysqltest.c
Contents conflict in mysql-test/include/have_bug25714.inc
Text conflict in mysql-test/include/have_ndbapi_examples.inc
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/suite/parts/inc/partition_check_drop.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check1.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check2.inc
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_basic_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_engine_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_syntax_myisam.result
Text conflict in mysql-test/suite/rpl_ndb/t/disabled.def
Text conflict in mysql-test/t/disabled.def
2008-08-04 07:04:47 +02:00
He Zhenxing
a018e98cba BUG#37051 Replication rules not evaluated correctly
The problem of this bug is that we need to get the list of tables
to be updated for a multi-table update statement, which requires to
open all the tables referenced by the statement and resolve all
the fields involved in update in order to figure out the list of
tables for update. However if there are replicate filter rules,
some tables might not exist on slave and result in a failure
before we could examine the filter rules.

I think the whole problem can not be solved on slave alone,
the master must record and send the information of tables
involved for update to slave, so that the slave do not need to
open all the tables referenced by the multi-table update statement to
figure out which tables are involved for update.

So a status variable is added to Query_log event to store the
value of table map for update on master. And on slave, it will
try to get the value of this variable and use it to examine
filter rules without opening any tables on slave, if this values
is not available, the old approach is used and thus the bug will
still occur for when replicating from old masters.


sql/sql_class.h:
  add member table_map_for_update to THD
sql/sql_parse.cc:
  check filter rules by using table_map_for_update value
sql/sql_update.cc:
  save the value of table_map_for_update
2008-07-31 14:24:27 +08:00
Mats Kindahl
40e095e7de Manual merge of mysql-5.0-bugteam -> mysql-5.1-bugteam 2008-07-08 13:18:34 +02:00
Mats Kindahl
914cae3a2d Bug #37150 Risk for crash in User_var_log_event::exec_event()
On certain kinds of errors (e.g., out of stack), a call to Item_func_
set_user_var::fix_fields() might fail.  Since the return value of this
call was not checked inside User_var_log_event::exec_event(), continuing
execution after this will cause a crash inside Item_func_set_user_var::
update_hash().

The bug is fixed by aborting execution of the event with an error if
fix_fields() fails, since it is not possible to continue execution anyway.


sql/log_event.cc:
  Aborting execution of event if fix_fields() fails since execution
  of update_hash() might cause a crash.
2008-07-07 09:58:27 +02:00
Magnus Svensson
867b60e08b Merge 5.1->5.1-rpl
Fix paths and name of a few files to make it work with new mtr.pl
2008-05-30 11:12:07 +02:00
unknown
dac6ffb958 BUG#36197: flush tables (or little table cache) can cause crash on slave
When flushing tables, there were a slight chance that the flush was occuring
between processing of two table map events. Since the tables are opened
one by one, it might result in that the tables were not valid and that sub-
sequent locking of tables would cause the slave to crash.

The problem is solved by opening and locking all tables at once using
simple_open_n_lock_tables(). Also, the patch contain a change to open_tables()
so that pre-locking only takes place when the trg_event_map is not zero, which
was not the case before (this caused the lock to be placed in thd->locked_tables
instead of thd->lock since the assumption was that triggers would be called
later and therefore the tables should be pre-locked).


mysql-test/suite/rpl/r/rpl_found_rows.result:
  Result change
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
  Result change
mysql-test/suite/rpl/t/rpl_found_rows.test:
  Adding drop of table that was created in test.
mysql-test/suite/rpl/t/rpl_slave_status.test:
  Adding waits for slave start and stop to ensure that test works.
sql/log_event.cc:
  Replacing table-by-table open and lock with a single call
  to simple_open_n_lock_tables(), which in turn required some
  changes to other code.
sql/log_event_old.cc:
  Replacing table-by-table open and lock with a single call
  to simple_open_n_lock_tables(), which in turn required some
  changes to other code.
sql/sql_base.cc:
  Extending check inside open_tables() so that pre-locking in only done if
  tables->trg_egent_map is non-zero.
mysql-test/include/wait_for_slave_sql_to_start.inc:
  New BitKeeper file ``mysql-test/include/wait_for_slave_sql_to_start.inc''
2008-05-12 19:50:53 +02:00
unknown
49134a7ed9 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge


mysql-test/suite/binlog/r/binlog_base64_flag.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
  Auto merged
sql/log_event.cc:
  Auto merged
2008-04-02 12:36:38 +02:00
unknown
edb7733c83 BUG#34541: mysqlbinlog prints 'set;' in stm mode after changing autocommit mode
Problem: a typo in the code. When autocommit, foreign_key_checks,
sql_auto_is_null, or unique_checks changes, it prints "SET", and then a
comma-separated list of assignments. However, it does not print the
assignment to the @@autocommit variable.
Fix: print the @@autocommit variable.


mysql-test/r/mysqlbinlog.result:
  Updated result file since output of mysqlbinlog changed.
mysql-test/r/mysqlbinlog2.result:
  Updated result file since output of mysqlbinlog changed.
mysql-test/r/user_var-binlog.result:
  Updated result file since output of mysqlbinlog changed.
mysql-test/suite/binlog/r/binlog_base64_flag.result:
  Updated result file since output of mysqlbinlog changed.
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
  Updated result file since output of mysqlbinlog changed.
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
  Updated result file since output of mysqlbinlog changed.
sql/log_event.cc:
  Just a typo: mysqlbinlog should print the autocommit flag
  when the value of the flag changes.
  Also fixed nearby indentation.
2008-04-02 16:49:22 +07:00
unknown
2e12a17d17 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into  mats-laptop.(none):/home/bk/b29020-mysql-5.1-rpl


mysql-test/suite/binlog/r/binlog_base64_flag.result:
  Auto merged
mysql-test/suite/binlog/t/binlog_base64_flag.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_create_table.result:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2008-03-28 14:52:33 +01:00
unknown
f56d77dadf BUG#29020 (Event results not correctly replicated to slave in RBR):
The bug allow multiple executing transactions working with non-transactional
to interfere with each others by interleaving the events of different trans-
actions.

Bug is fixed by writing non-transactional events to the transaction cache and
flushing the cache to the binary log at statement commit. To mimic the behavior
of normal statement-based replication, we flush the transaction cache in row-
based mode when there is no committed statements in the transaction cache,
which means we are committing the first one. This means that it will be written
to the binary log as a "mini-transaction" with just the rows for the statement.

Note that the changes here does not take effect when building the server with
HAVE_TRANSACTIONS set to false, but it is not clear if this was possible before
this patch either.

For row-based logging, we also have that when AUTOCOMMIT=1, the code now always
generates a BEGIN/COMMIT pair for single statements, or BEGIN/ROLLBACK pair in the
case of non-transactional changes in a statement that was rolled back. Note that
for the case where changes to a non-transactional table causes a rollback due
to error, the statement will now be logged with a BEGIN/ROLLBACK pair, even
though some changes has been committed to the non-transactional table.


mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
  Removing SHOW BINLOG EVENTS causing test to be non-deterministic.
mysql-test/r/ctype_cp932_binlog_row.result:
  Result change.
mysql-test/suite/binlog/r/binlog_base64_flag.result:
  Result change.
mysql-test/suite/binlog/r/binlog_multi_engine.result:
  Result file change.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Result file change.
mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result:
  Result file change.
mysql-test/suite/binlog/r/binlog_row_insert_select.result:
  Result file change.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  Result file change.
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  Result file change.
mysql-test/suite/binlog/t/binlog_base64_flag.test:
  Removing table that will be used in test to prevent failing if preceeding
  tests forgot to drop the table.
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_create_table.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_delayed_ins.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_log.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_row_until.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_slave_skip.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Result file change.
mysql-test/suite/rpl/r/rpl_truncate_2myisam.result:
  Result file change.
mysql-test/suite/rpl/t/rpl_row_create_table.test:
  Binlog position change.
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
  Binlog position change.
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
  Binlog position change. Added stop position to mysqlbinlog argments to prevent
  extreneous output.
mysql-test/suite/rpl/t/rpl_row_until.test:
  Binlog position change.
mysql-test/suite/rpl/t/rpl_slave_skip.test:
  Binlog position change.
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Removing extreneous SHOW BINLOG EVENTS causing test to be non-deterministic.
mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result:
  Result change.
sql/log.cc:
  Adding variable at_least_one_stmt to denote that there is at least one
  statement committed to the transaction cache (but there might be more).
  
  Removing duplicate checks from binlog_end_trans(). The transaction cache
  should always be committed or rolled back when this function is called.
  
  Correcting conditions for binlog_rollback() and binlog_commit() and removing
  the previous "invisible commit" in favor of always using explicit commits
  in the binary log.
sql/log_event.cc:
  Marking table map event to be cached. Removing Muted_query_log_event from code.
sql/log_event.h:
  Removing unused class Muted_query_log_event.
sql/sql_insert.cc:
  Adding missing call to ha_autocommit_or_rollback() for delayed thread. Marking
  CREATE-SELECT statements as transactional, since they don't need to be logged.
2008-03-28 13:16:41 +01:00
unknown
03c110ea21 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/lib/mtr_report.pl:
  SCCS merged
2008-03-26 10:27:00 +01:00
unknown
eb9f258e18 Merge stella.local:/home2/mydev/mysql-5.0-axmrg
into  stella.local:/home2/mydev/mysql-5.1-axmrg


configure.in:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
2008-03-20 11:33:34 +01:00
unknown
7343db297a Make gcov happy. 2008-03-18 16:38:12 +04:00
unknown
7b5da0aa77 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1


configure.in:
  Auto merged
include/mysql/plugin.h:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/partition_innodb.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/partition_innodb.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
2008-03-07 13:46:29 -08:00