An error occurred fetching the project authors.
  1. 06 Jul, 2009 1 commit
    • Alfranio Correia's avatar
      BUG#44581 Slave stops when transaction with non-transactional table gets lock wait · 7f95e0c9
      Alfranio Correia authored
      timeout
                  
      In STMT and MIXED modes, a statement that changes both non-transactional and
      transactional tables must be written to the binary log whenever there are
      changes to non-transactional tables. This means that the statement gets into the
      binary log even when the changes to the transactional tables fail. In particular
      , in the presence of a failure such statement is annotated with the error number
      and wrapped in a begin/rollback. On the slave, while applying the statement, it
      is expected the same failure and the rollback prevents the transactional changes
      to be persisted.
                  
      Unfortunately, statements that fail due to concurrency issues (e.g. deadlocks,
      timeouts) are logged in the same way causing the slave to stop as the statements
      are applied sequentially by the SQL Thread. To fix this bug, we automatically
      ignore concurrency failures on the slave. Specifically, the following failures
      are ignored: ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK and ER_XA_RBDEADLOCK.
      7f95e0c9
  2. 29 Jun, 2009 1 commit
  3. 11 Jun, 2009 1 commit
    • Alfranio Correia's avatar
      BUG#34687 Error in bin-log after shutdown restart binlog was not closed properly · 2928942a
      Alfranio Correia authored
      While reading a binary log that is being used by a master or was not properly
      closed, most likely due to a crash, the following warning message is being
      printed out: "Warning: this binlog was not closed properly. Most probably mysqld
      crashed writing it.". This was scaring our users as the message was not taking
      into account the possibility of the file is being just used by the master.
      
      To avoid unnecessarily scaring our users, we replace the original message by the
      following one: Warning: "this binlog is either is use or was not closed properly.".
      2928942a
  4. 09 Jun, 2009 2 commits
    • Staale Smedseng's avatar
      Bug #43414 Parenthesis (and other) warnings compiling MySQL · eb545e64
      Staale Smedseng authored
      with gcc 4.3.2
            
      Compiling MySQL with gcc 4.3.2 and later produces a number of 
      warnings, many of which are new with the recent compiler
      versions.
            
      This bug will be resolved in more than one patch to limit the
      size of changesets. This is the first patch, fixing a number 
      of the warnings, predominantly "suggest using parentheses 
      around && in ||", and empty for and while bodies.
      eb545e64
    • Staale Smedseng's avatar
      Bug #43414 Parenthesis (and other) warnings compiling MySQL · 9d67536f
      Staale Smedseng authored
      with gcc 4.3.2
      
      Compiling MySQL with gcc 4.3.2 and later produces a number of 
      warnings, many of which are new with the recent compiler
      versions.
      
      This bug will be resolved in more than one patch to limit the
      size of changesets. This is the first patch, fixing a number 
      of the warnings, predominantly "suggest using parentheses 
      around && in ||", and empty for and while bodies.
      9d67536f
  5. 31 May, 2009 1 commit
    • He Zhenxing's avatar
      BUG#43263 BEGIN skipped in some replicate-do-db cases · e5788d86
      He Zhenxing authored
      BEGIN/COMMIT/ROLLBACK was subject to replication db rules, and
      caused the boundary of a transaction not recognized correctly 
      when these queries were ignored by the rules.
      
      Fixed the problem by skipping replication db rules for these
      statements.
      
      
      sql/log_event.cc:
        Skip checking replication db rules for BEGIN/COMMIT/ROLLBACK statements
      e5788d86
  6. 30 May, 2009 1 commit
    • He Zhenxing's avatar
      BUG#41948 Query_log_event constructor needlessly contorted · 38e27260
      He Zhenxing authored
      Make the caller of Query_log_event, Execute_load_log_event
      constructors and THD::binlog_query to provide the error code
      instead of having the constructors to figure out the error code.
      
      sql/log_event.cc:
        Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument instead of figuring it out by itself
      sql/log_event.h:
        Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument
      38e27260
  7. 12 May, 2009 1 commit
    • Luis Soares's avatar
      BUG#42749: infinite loop writing to row based binlog - processlist shows · 1d406fba
      Luis Soares authored
      "freeing items"
      
      The calculation of the table map log event in the event constructor
      was one byte shorter than what would be actually written. This would
      lead to a mismatch between the number of bytes written and the event
      end_log_pos, causing bad event alignment in the binlog (corrupted
      binlog) or in the transaction cache while fixing positions
      (MYSQL_BIN_LOG::write_cache). This could lead to impossible to read
      binlog or even infinite loops in MYSQL_BIN_LOG::write_cache.
      
      This patch addresses this issue by correcting the expected event
      length in the Table_map_log_event constructor, when the field metadata
      size exceeds 255.
      
      sql/log_event.cc:
        Added the extra byte as net_store_length imposes.
      1d406fba
  8. 11 May, 2009 1 commit
    • Mats Kindahl's avatar
      Bug #44442: Incident events are silent in mysqlbinlog output · 014dc99c
      Mats Kindahl authored
            
      In the output from mysqlbinlog, incident log events were
      represented as just a comment. Since the incident log event
      represents an incident that could cause the contents of the
      database to change without being logged to the binary log,
      it means that if the SQL is applied to a server, it could
      potentially lead to that the databases are out of sync.
      
      In order to handle that, this patch adds the statement "RELOAD
      DATABASE" to the SQL output for the incident log event. This will
      require a DBA to edit the file and handle the case as apropriate
      before applying the output to a server.
      
      mysql-test/suite/binlog/t/binlog_incident-master.opt:
        Options file to cause server to generate an incident log
        event when executing a REPLACE.
      mysql-test/suite/binlog/t/binlog_incident.test:
        Test to check that the incident log event is represented
        correctly in the output from mysqlbinlog.
      sql/log_event.cc:
        The incident log event now ouput a "RELOAD DATABASE" instead
        of just a comment. RELOAD DATABASE is not an existing command
        and will generate a syntax error.
      014dc99c
  9. 21 Apr, 2009 1 commit
    • Alfranio Correia's avatar
      BUG#44378 rpl_binlog_corruption fails with warning messages in Valgrind · 97ab2ff1
      Alfranio Correia authored
            
      The rpl_binlog_corruption test case was inject failures, specifically,
      incidents with invalid numbers to see if the replication was failing
      gracefully. However, this test was causing the following warning message
      in Valgrind: "Conditional jump or move depends on uninitialised value(s)"
            
      The patch fixes the problem by correctly initializing the m_inicident 
      number.
      97ab2ff1
  10. 09 Apr, 2009 1 commit
    • He Zhenxing's avatar
      Post fix of BUG#37145 · 32ac2ade
      He Zhenxing authored
      Binlog the CREATE EVENT unless the created event been successfully dropped
      
      Modified Query_log_event constructor to make sure that error_code
      is not set to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED errors
      when NOT_KILLED
      
      sql/events.cc:
        binlog the create event unless it's been successfully dropped
      sql/log_event.cc:
        Modified Query_log_event constructor to make sure that error_code
        is not set to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED errors
        when NOT_KILLED
      32ac2ade
  11. 05 Apr, 2009 1 commit
    • Alfranio Correia's avatar
      BUG#39393 slave-skip-errors does not work when using ROW based replication · fa51b569
      Alfranio Correia authored
                                    
      RBR was not considering the option --slave-skip-errors.
                                    
      To fix the problem, we are reporting the ignored ERROR(s) as warnings thus avoiding 
      stopping the SQL Thread. Besides, it fixes the output of "SHOW VARIABLES LIKE 
      'slave_skip_errors'" which was showing nothing when the value "all" was assigned 
      to --slave-skip-errors.
                        
      @sql/log_event.cc
        skipped rbr errors when the option skip-slave-errors is set.
      @sql/slave.cc
        fixed the output of for SHOW VARIABLES LIKE 'slave_skip_errors'"
      @test-cases
        fixed the output of rpl.rpl_idempotency
        updated the test case rpl_skip_error
      fa51b569
  12. 27 Mar, 2009 1 commit
    • He Zhenxing's avatar
      BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053 · 11cd6177
      He Zhenxing authored
      When the thread executing a DDL was killed after finished its
      execution but before writing the binlog event, the error code in
      the binlog event could be set wrongly to ER_SERVER_SHUTDOWN or
      ER_QUERY_INTERRUPTED.
      
      This patch fixed the problem by ignoring the kill status when
      constructing the event for DDL statements.
      
      This patch also included the following changes in order to
      provide the test case.
      
       1) modified mysqltest to support variable for connection command
      
       2) modified mysql-test-run.pl, add new variable MYSQL_SLAVE to
          run mysql client against the slave mysqld.
      11cd6177
  13. 26 Mar, 2009 2 commits
    • Andrei Elkin's avatar
      bug#42977 · 039074ea
      Andrei Elkin authored
      compilation warning fixed
      039074ea
    • Andrei Elkin's avatar
      Bug#38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUP · edf25c0a
      Andrei Elkin authored
      Bug#319  if while a non-transactional slave is replicating a transaction possible problem 
      
      It is impossible to roll back a mixed engines transaction when one of the engine is
      non-transaction. In replication that fact is crucial because the slave can not safely
      re-apply a transction that was interrupted with STOP SLAVE.
      
      Fixed with making STOP SLAVE not be effective immediately in the case the current
      group of replication events has modified a non-transaction table. In order for slave to leave
      either the group needs finishing or the user issues KILL QUERY|CONNECTION slave_thread_id.
      
      
      mysql-test/suite/bugs/r/rpl_bug38205.result:
        bug#38205 non-deterministic part of tests results.
      mysql-test/suite/bugs/t/rpl_bug38205.test:
        bug#38205 non-deterministic part of tests.
      mysql-test/suite/rpl/r/rpl_start_stop_slave.result:
        bug#38205 deterministic part of tests results.
      mysql-test/suite/rpl/t/rpl_start_stop_slave-slave.opt:
        increasing `innodb_lock_wait_timeout' to make the test pass on slow env w/o
        timeout expired issue.
      mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
        bug#38205 deterministic part of tests.
      sql/log_event.cc:
        Augmenting row-based events applying with the notion of 
        thd->transaction.{all,stmt}.modified_non_trans_table.
        The pair is set and reset according to its specification
        for the mixed transaction processing.
        Particualry, once `modified_non_trans_table' is set in the row-events
        processing loop, it will remain till the commit of the transaction.
      sql/slave.cc:
        Consulting `thd->transaction.all.modified_non_trans_table' to decide
        whether to terminate by the sql thread or to continue even though
        the sql thread might have been STOP-ed (rli->abort_slave).
      edf25c0a
  14. 25 Mar, 2009 1 commit
    • Andrei Elkin's avatar
      Bug#42977 RBR logs for rows with more than 250 column results in corrupt binlog · 6df3b6fe
      Andrei Elkin authored
                  
      The issue happened to be two-fold.
      The table map event was recorded into binlog having
      an incorrect size when number of columns exceeded 251. 
      The Row-based event had incorrect recording and restoring m_width member within
      the same as above conditions.
      
      Fixed with correcting m_data_size and m_width.
      
      
      mysql-test/suite/rpl/r/rpl_row_wide_table.result:
        the new test results.
      mysql-test/suite/rpl/t/rpl_row_wide_table.test:
        regression test for bug#42977.
      sql/log_event.cc:
        0. all buffers that used in net_store_length() are augmented with 1 for safety
        to be able to contain the magic and the content of ulonglong as well;
        1. Rows_log_event::get_data_size() yieled incorrect size |m_width/8| whereas 
           it should be m_width;
        2. Table_map_log_event::Table_map_log_event yieled incorrect value for
           `m_data_size' probably presuming 1-byte integer max for the column number;
      sql/rpl_utility.h:
        DBUG_PRINT_BITSET() macro is left 256-cols limited but has made safe and commented.
      6df3b6fe
  15. 20 Mar, 2009 1 commit
  16. 18 Mar, 2009 1 commit
    • Alfranio Correia's avatar
      Bug #42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave · cd4623bc
      Alfranio Correia authored
      Compiling with debug and assigning an invalid directory to --slave-load-tmpdir
      was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() ||
      can_overwrite_status). This assertion assumes that a thread can change its
      state once (i.e. ok,error, etc) before aborting, cleaning/resuming or completing
      its execution unless the overwrite flag (i.e. can_overwrite_status) is true.
      
      The Append_block_log_event::do_apply_event which is responsible for creating
      temporary file(s) was not cleaning the thread state. Thus a failure while
      trying to create a file in an invalid temporary directory was causing the crash.
      
      To fix the problem we check if the temporary directory is valid before starting
      the SQL Thread and reset the thread state before creating a file in
      Append_block_log_event::do_apply_event.
      cd4623bc
  17. 16 Mar, 2009 1 commit
    • Leonard Zhou's avatar
      BUG#22504 load data infile sql statement in replication architecture get error · 057d90b0
      Leonard Zhou authored
      The problem is issued because we set wrong start position and stop position of query string into binlog.
      That two values are stored as part of head info of query string.
      When we parse binlog, we first get position values then get the query string according position values.
      But seems that two values are not calculated correctly after the parse of Yacc.
      
      We don't want to touch so much of yacc because it may influence other codes.
      So just add one space after 'INTO' key word when parsing.
      This can easily resolve the problem.
      
      mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
        Test result
      mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
        Test case
      sql/log_event.cc:
        Add space after 'INTO'.
      057d90b0
  18. 05 Mar, 2009 1 commit
  19. 24 Feb, 2009 1 commit
  20. 21 Feb, 2009 1 commit
    • Alfranio Correia's avatar
      BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode · 98502312
      Alfranio Correia authored
                        
      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.
      98502312
  21. 20 Feb, 2009 1 commit
    • Andrei Elkin's avatar
      Bug #37313 BINLOG Contains Incorrect server id · e2e6e14c
      Andrei Elkin authored
        
      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).
      e2e6e14c
  22. 10 Feb, 2009 1 commit
  23. 04 Feb, 2009 2 commits
    • Andrei Elkin's avatar
      Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash · 4b8ba115
      Andrei Elkin authored
      fixing build issue, caused by the previous push.
      
      sql/log_event.cc:
        moving a new declaration out of mysqlbinlog compilation scope.
      4b8ba115
    • Andrei Elkin's avatar
      Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash · 0ed77f3a
      Andrei Elkin authored
                  
      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.
      0ed77f3a
  24. 22 Jan, 2009 1 commit
    • Andrei Elkin's avatar
      Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails · 9e1299a9
      Andrei Elkin authored
      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()
      9e1299a9
  25. 14 Jan, 2009 1 commit
    • He Zhenxing's avatar
      BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables · 04672c1b
      He Zhenxing authored
      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
      04672c1b
  26. 09 Jan, 2009 1 commit
    • Sven Sandberg's avatar
      BUG#41961: Some log_event types do not skip post-header when reading · 2d3a1a63
      Sven Sandberg authored
      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.
      2d3a1a63
  27. 29 Dec, 2008 1 commit
    • Sven Sandberg's avatar
      BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event · dc3ad27a
      Sven Sandberg authored
      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.
      dc3ad27a
  28. 16 Dec, 2008 1 commit
    • Davi Arnaut's avatar
      Fix warnings and bug spotted by gcc-4.3. · 36792ff5
      Davi Arnaut authored
      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.
      36792ff5
  29. 10 Nov, 2008 1 commit
  30. 20 Oct, 2008 1 commit
    • Mats Kindahl's avatar
      Bug #40004 Replication failure with no PK + no indexes · 6a387b7f
      Mats Kindahl authored
      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.
      6a387b7f
  31. 07 Oct, 2008 1 commit
    • Ramil Kalimullin's avatar
      Fix for bug#38269: pushbuild gives valgrind error in · 7d47329f
      Ramil Kalimullin authored
      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.
      7d47329f
  32. 02 Oct, 2008 1 commit
    • Mats Kindahl's avatar
      Bug #38360: BLACKHOLE replication with RBR is broken · a5429f3e
      Mats Kindahl authored
      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).
      a5429f3e
  33. 28 Sep, 2008 1 commit
    • He Zhenxing's avatar
      BUG#38734 rpl_server_id2 sync_with_master failed · a4cd8862
      He Zhenxing authored
      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
      a4cd8862
  34. 26 Sep, 2008 1 commit
  35. 03 Sep, 2008 1 commit
    • Andrei Elkin's avatar
      Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog · 9166c5f1
      Andrei Elkin authored
            
      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.
      9166c5f1
  36. 26 Aug, 2008 1 commit
  37. 25 Aug, 2008 1 commit
    • Alexander Barkov's avatar
      Additional ffix for bug#31455 · a35b92f4
      Alexander Barkov authored
      - fixing double problem on big endian machines
      - modifying regex_replace to replace negative numbers
        Previously only positive numbers where replaced.
      a35b92f4