1. 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
  2. 29 Aug, 2008 3 commits
  3. 27 Aug, 2008 1 commit
  4. 25 Aug, 2008 2 commits
  5. 22 Aug, 2008 1 commit
    • Mats Kindahl's avatar
      Fixning compiler warnings. Fixing build failure for valgrind platform. · d2371154
      Mats Kindahl authored
      
      include/my_global.h:
        Moving YESNO() macro here from log.cc (it prints either "yes" or "no" depending on a boolean value).
      sql/log.cc:
        Moving YESNO() function to my_global.h.
      sql/sql_class.cc:
        Adding default case to printout function to avoid warning.
        Only defining function for debug builds since it isn't used 
        in non-debug build (hence produce a warning).
      sql/sql_class.h:
        Printing yes/no answer instead of memory address since the
        case produces an error/warning on valgrind platform.
      d2371154
  6. 20 Aug, 2008 2 commits
    • Mats Kindahl's avatar
      Merging with 5.1-rpl. · b277ed34
      Mats Kindahl authored
      b277ed34
    • Mats Kindahl's avatar
      Bug #38773: DROP DATABASE cause switch to stmt-mode when there are temporary tables open · 8805fda0
      Mats Kindahl authored
      When executing a DROP DATABASE statement in ROW mode and having temporary
      tables open at the same time, the existance of temporary tables prevent
      the server from switching back to row mode after temporarily switching to
      statement mode to handle the logging of the statement.
      
      Fixed the problem by removing the code to switch to statement mode and added
      code to temporarily disable the binary log while dropping the objects in the
      database.
      
      mysql-test/extra/binlog_tests/database.test:
        Added test to ensure that DROP DATABASE does not affect the replication mode.
      mysql-test/suite/binlog/r/binlog_database.result:
        Result file change.
      sql/sql_db.cc:
        Removed code that clears the current_stmt_binlog_row_based flag.
        Added code to disable the binary log while dropping the objects
        in a database.
      8805fda0
  7. 19 Aug, 2008 2 commits
    • Mats Kindahl's avatar
      Merging with 5.1-rpl · 6dd9048c
      Mats Kindahl authored
      6dd9048c
    • Mats Kindahl's avatar
      Bug #34707: Row based replication: slave creates table within wrong database · 2bcec934
      Mats Kindahl authored
      The failure was caused by executing a CREATE-SELECT statement that creates a
      table in another database than the current one. In row-based logging, the
      CREATE statement was written to the binary log without the database, hence
      creating the table in the wrong database, causing the following inserts to
      fail since the table didn't exist in the given database.
      
      Fixed the bug by adding a parameter to store_create_info() that will make
      the function print the database name before the table name and used that
      in the calls that write the CREATE statement to the binary log. The database
      name is only printed if it is different than the currently selected database.
      
      The output of SHOW CREATE TABLE has not changed and is still printed without
      the database name.
      
      mysql-test/suite/rpl/r/rpl_row_create_table.result:
        Result file change.
      mysql-test/suite/rpl/t/rpl_row_create_table.test:
        Added test to check that CREATE-SELECT into another database than the
        current one replicates.
      sql/sql_insert.cc:
        Adding parameter to calls to store_create_info().
      sql/sql_show.cc:
        Adding parameter to calls to store_create_info().
        
        Extending store_create_info() with parameter 'show_database' that will cause
        the database to be written before the table name.
      sql/sql_show.h:
        Adding parameter to call to store_create_info() to tell if the database should be shown or not.
      sql/sql_table.cc:
        Adding parameter to calls to store_create_info().
      2bcec934
  8. 15 Aug, 2008 1 commit
    • He Zhenxing's avatar
      post fixes after merge · 429b8954
      He Zhenxing authored
      mysql-test/suite/binlog/r/binlog_killed_simulate.result:
        update result
      mysql-test/suite/rpl/r/rpl_stm_log.result:
        update result
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test:
        correct a typo
      429b8954
  9. 14 Aug, 2008 6 commits
  10. 13 Aug, 2008 5 commits
  11. 12 Aug, 2008 4 commits
  12. 11 Aug, 2008 12 commits