1. 17 Jan, 2007 1 commit
    • unknown's avatar
      BUG#23171 (Illegal slave restart position): · 4b00b3f0
      unknown authored
      Third patch of the bug fix where the code for skipping events and for
      executing events is factored out into three functions:
      - shall_skip() to decide if the event shall be skipped and the
        reason for it;
      - do_apply_event(), where the event is applied to the database; and
      - do_update_pos(), which updates the actual relay log position and
        group positions.
      
      
      mysql-test/r/rpl_row_tabledefs_2myisam.result:
        Result change.
      mysql-test/r/rpl_row_tabledefs_3innodb.result:
        Result change.
      sql/log_event.cc:
        Creating shall_skip(), do_update_pos(), and do_apply_event()
        functions for each event by factoring out the previous code.
        Adding debug code and fixing some error codes that were not correct.
      sql/rpl_rli.cc:
        Renaming unsafe_to_stop_at into last_event_start_time.
        Adding debug code.
      sql/rpl_rli.h:
        Renaming unsafe_to_stop_at into last_event_start_time.
      sql/slave.cc:
        Renaming unsafe_to_stop_at into last_event_start_time.
      4b00b3f0
  2. 10 Nov, 2006 1 commit
    • unknown's avatar
      BUG#23171 (Illegal slave restart group position): · baaa102d
      unknown authored
      Second patch to fix skipping code. Moving relay and binary log 
      position changing code from do_apply_event [old exec_event()] into
      do_update_pos() and doing other changes necessary to support that.
      
      Fixing a bug that can cause deadlock if rotating binary log when committing
      a changes to a transactional table that is not inside a transaction and
      cause a rotate log.
      
      
      sql/log.cc:
        Changing condition in binlog_commit() to skip calling
        binlog_end_trans() twice to match condition in binlog_end_trans().
      sql/log_event.cc:
        Name change: apply_event_impl() -> do_apply_event()
        Name change: advance_coord_impl() -> do_update_pos()
        
        do_apply_event() now uses pointer to constant RELAY_LOG_INFO to prevent
        inadvertandly changing the position in the code. Doing this would make
        the skipping code loose track of where it is. All position changing code
        shall now be in do_update_pos().
        
        Factoring out relay and binary log position updating code from
        do_apply_event() [previously exec_event()] into do_update_pos().
        Using a safe approach to make it work: will refine the refactoring
        when the skipping code is implemented.
        
        Adding const casts where needed.
        
        Changing signature to use pointers to constant objects where needed.
      sql/rpl_rli.cc:
        Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
        
        Debriding code.
      sql/rpl_rli.h:
        Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
        
        Debriding code.
      sql/rpl_utility.cc:
        Using pointer to const RELAY_LOG_INFO to make it work with other code.
      sql/rpl_utility.h:
        Using pointer to const RELAY_LOG_INFO to make it work with other code.
      sql/slave.cc:
        Using pointer to const RELAY_LOG_INFO to make it work with other code.
        
        Adding const cast where necessary.
      sql/slave.h:
        Using pointer to const RELAY_LOG_INFO to make it work with other code.
      baaa102d
  3. 04 Nov, 2006 1 commit
  4. 03 Nov, 2006 9 commits
    • unknown's avatar
      Post-merge fixes. · 4c3283b3
      unknown authored
      
      sql/log_event.cc:
        Fixing comment
      sql/rpl_rli.cc:
        Removing code that was moved to other file.
      4c3283b3
    • unknown's avatar
      Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl · 42904cdf
      unknown authored
      into  romeo.(none):/home/bk/b18581-mysql-5.1-new-rpl
      
      
      sql/log_event.cc:
        Auto merged
      sql/rpl_rli.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      42904cdf
    • unknown's avatar
      Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl · ae00d51b
      unknown authored
      into  romeo.(none):/home/bkroot/mysql-5.1-new-rpl
      
      
      ae00d51b
    • unknown's avatar
      Has issues with original tree, so had to pull new tree and copy test over.... · 77b1bb84
      unknown authored
      Has issues with original tree, so had to pull new tree and copy test over. Running last test now and will push after
      
      
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
      mysql-test/t/rpl_extraCol_innodb-master.opt:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/t/rpl_extraCol_innodb-master.opt
      mysql-test/t/rpl_extraCol_innodb-slave.opt:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/t/rpl_extraCol_innodb-slave.opt
      mysql-test/t/rpl_extraCol_innodb.test:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/t/rpl_extraCol_innodb.test
      mysql-test/t/rpl_extraCol_myisam.test:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/t/rpl_extraCol_myisam.test
      mysql-test/r/rpl_extraCol_innodb.result:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/r/rpl_extraCol_innodb.result
      mysql-test/r/rpl_extraCol_myisam.result:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/r/rpl_extraCol_myisam.result
      mysql-test/r/rpl_ndb_extraCol.result:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/r/rpl_ndb_extraCol.result
      mysql-test/t/rpl_ndb_extraCol.test:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/t/rpl_ndb_extraCol.test
      mysql-test/extra/rpl_tests/rpl_ndb_ddl.test:
        BitKeeper file /data0/mysql-5.1-new-rpl/mysql-test/extra/rpl_tests/rpl_ndb_ddl.test
      77b1bb84
    • unknown's avatar
      Merge mysql.com:/usr/home/bar/mysql-5.1.b22823 · 88b5cf40
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.1-rpl
      
      
      88b5cf40
    • unknown's avatar
      After merge fix. · fcb7576f
      unknown authored
      
      mysql-test/r/lowercase_table.result:
        Adjusting to 5.1: DEFAULT is now printed in upper case.
      mysql-test/t/rpl_ignore_table.test:
        After merge fix
      fcb7576f
    • unknown's avatar
      Merge mysql.com:/usr/home/bar/mysql-5.0-rpl · 33dfb4ea
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.1-rpl
      
      
      BitKeeper/etc/collapsed:
        auto-union
      include/m_ctype.h:
        Auto merged
      mysql-test/r/ctype_utf8.result:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_string.cc:
        Auto merged
      storage/myisam/mi_open.c:
        Auto merged
      strings/ctype-bin.c:
        Auto merged
      strings/ctype-mb.c:
        Auto merged
      strings/ctype-simple.c:
        Auto merged
      strings/ctype-ucs2.c:
        Auto merged
      strings/ctype-utf8.c:
        Auto merged
      mysql-test/t/rpl_ignore_table.test:
        After merge fix.
      sql/slave.cc:
        After merge fix
      33dfb4ea
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl · 3ff00986
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.1-rpl
      
      
      3ff00986
    • unknown's avatar
      After merge fix for BUG#18908 ERROR 1406 (22001): Data too long for column :: using utf8 · b5d53f20
      unknown authored
      
      strings/ctype-utf8.c:
        Fix for compilation warning -
        forgot to add a new structure member
        in one of the previous changes.
      b5d53f20
  5. 02 Nov, 2006 2 commits
  6. 01 Nov, 2006 7 commits
    • unknown's avatar
      Changes to the code are necessary to compile on Windows. Typecasts are needed... · 70111f50
      unknown authored
      Changes to the code are necessary to compile on Windows. Typecasts are needed in several DBUG_DUMP statements. CAB 01 Nov 2006
      
      
      sql/log_event.cc:
        The changes are so that the code will compile on Windows. Typecasts are needed on the DBUG_DUMP statements to cast a byte * to a char *.
      sql/sql_class.cc:
        The changes are necessary to get the code to compile on Windows. The DBUG_DUMP statements need a typecast.
      70111f50
    • unknown's avatar
      BUG#23735 Test rpl_row_mysqlbinlog fails on Windows. The errors report a file... · f0041180
      unknown authored
      BUG#23735 Test rpl_row_mysqlbinlog fails on Windows. The errors report a file discrepency on reading a binlog from the command line.
      
      
      client/mysqlbinlog.cc:
        BUG#23735 Test rpl_row_mysqlbinlog fails on Windows.
      f0041180
    • unknown's avatar
      BUG#23171 (Illegal slave restart group position): · c078453f
      unknown authored
      First patch preparing for restructuring the event execution and event
      skipping. This patch renames the existing (virtual) function exec_event()
      to be a primitive for implementing the real patch. Also, the virtual function
      advance_coord_impl() is added to advance the binary/relay log coordinates,
      and two non-virtual functions exec_event() [sic] and skip_event() is added
      that will contain the business logic for executing and skipping events
      respectively.
      
      
      sql/log.cc:
        Renaming exec_event()
      sql/log_event.cc:
        Renaming exec_event()
      sql/log_event.h:
        Renaming exec_event() to apply_event_impl()
        Addng new non-virtual exec_event() that will contain business logic
        for event execution.
        Adding new non-virtual skip_event() that will contain business logic
        for skipping an event.
        Adding new virtual advance_coord_impl() as primitive to advance
        binary/relay log coordinates according to the event's needs.
      c078453f
    • unknown's avatar
      Merge mysql.com:/usr/home/bar/mysql-5.0.b18908 · bfdc9c12
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.1-rpl
      
      
      BitKeeper/etc/collapsed:
        auto-union
      mysql-test/r/ctype_recoding.result:
        Auto merged
      mysql-test/r/ctype_utf8.result:
        Auto merged
      mysql-test/r/fulltext.result:
        Auto merged
      mysql-test/r/strict_autoinc_1myisam.result:
        Auto merged
      mysql-test/r/strict_autoinc_2innodb.result:
        Auto merged
      mysql-test/r/strict_autoinc_3heap.result:
        Auto merged
      mysql-test/r/strict_autoinc_4bdb.result:
        Auto merged
      mysql-test/r/strict_autoinc_5ndb.result:
        Auto merged
      sql/sql_string.cc:
        Auto merged
      sql/sql_string.h:
        Auto merged
      sql/field.cc:
        SCCS merged
      bfdc9c12
    • unknown's avatar
      BUG#18581 (Creation of system tables recorded in binlog causing slave failure): · 66a04036
      unknown authored
      Not replicating the mysql database *at all* any more. All changes to
      mysql tables are replicated by replicating the statements that do
      the changes.
      
      
      mysql-test/r/rpl_do_grant.result:
        Result change
      mysql-test/t/rpl_do_grant.test:
        Deleting grants on both master and server since the mysql
        database is not replicated any more.
      sql/handler.cc:
        Removing code that selectively checks what tables in the mysql
        database to ignore. The entire mysql database is not replicated
        any more.
      sql/log_event.cc:
        Disabling code to reload grants and access when certain tables are
        touched.
      sql/rpl_rli.h:
        Removing unused code.
      sql/slave.cc:
        Removing unused code.
      sql/sql_class.cc:
        Mysql queries (i.e., queries that affects tables in the mysql database)
        are now replicated by statement instead of replicating the tables in
        the mysql database.
      66a04036
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · fff7e919
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.0.b22877
      
      
      BitKeeper/etc/collapsed:
        auto-union
      sql/sql_parse.cc:
        Auto merged
      fff7e919
    • unknown's avatar
      Bug#22877 replication character sets get out of · c755a7a1
      unknown authored
      sync using replicate-wild-ignore-table
      Problem: changes in character set variables
      before an action on an replication-ignored table
      makes slave to forget new variable values.
      Fix: initialize one_shot variables only when
      4.1 -> 5.x replication is running.
      
      
      mysql-test/r/rpl_ignore_table.result:
        Adding test case
      mysql-test/t/rpl_ignore_table-slave.opt:
        Don't replicate tables with names starting with "tmptbl"
      mysql-test/t/rpl_ignore_table.test:
        Adding test case
      sql/sql_parse.cc:
        Reset one_shot variables only if we do 4.1->5.x replication.
        In other cases we cannot do that: resetting thd->variables out of sync with
        st_relay_log_info::cached_charset, which makes
        st_relay_log_info::cached_charset_compare() not to notice
        character set related variables changes afterwards.
      c755a7a1
  7. 31 Oct, 2006 3 commits
    • unknown's avatar
      Refactoring: Moved master info functionality into rpl_mi.cc to · 82e8dfd5
      unknown authored
      make code easier to maintain.
      
      
      sql/CMakeLists.txt:
        New file
      sql/Makefile.am:
        New file
      sql/rpl_rli.h:
        Changed master_info into a class
      sql/slave.cc:
        Moved master info functionality into rpl_mi.cc
      sql/slave.h:
        Moved master info functionality into rpl_mi.cc
      sql/rpl_mi.cc:
        Moved master info functionality into rpl_mi.cc
      sql/rpl_mi.h:
        Moved master info functionality into rpl_mi.cc
      82e8dfd5
    • unknown's avatar
      Added new file · a78bdf82
      unknown authored
      a78bdf82
    • unknown's avatar
      Refactoring: Moved rli code to new file rpl_rli.cc. The idea being that rli · 69d92fb1
      unknown authored
      should be a separate module (i.e. a class) to make it easier to maintain the 
      code, e.g. by having checks within the rli checking sanity of data and making 
      member variables private.  This will also ease implementation of multi-source 
      and, at least in my fantasies :), make it possible in some future to have 
      separate replication servers.
      
      
      sql/Makefile.am:
        Added file rpl_rli.cc
      sql/repl_failsafe.cc:
        Move function
      sql/rpl_rli.h:
        moved functions
      sql/slave.cc:
        Moved rli code into rpl_rli.cc
      sql/sql_repl.cc:
        Changed function to be member function
      sql/rpl_rli.cc:
        Code for rli
      69d92fb1
  8. 30 Oct, 2006 5 commits
    • unknown's avatar
      BUG#20697 slave fails to rollback replicated transaction hang over innodb_lock_wait_timeou · b7d43470
      unknown authored
      post-merge fixes in test/result
      
      
      mysql-test/extra/rpl_tests/rpl_deadlock.test:
        recalculating BEGIN's event position.
      mysql-test/r/rpl_deadlock_innodb.result:
        results changed
      b7d43470
    • unknown's avatar
      Merge dsl-hkigw8-feaef900-46.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0-merge · 9fdc9acb
      unknown authored
      into  dsl-hkigw8-feaef900-46.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/merge_50
      
      
      mysql-test/r/rpl_deadlock_innodb.result:
        results changed
      mysql-test/extra/rpl_tests/rpl_deadlock.test:
        taking a fix for testing timed-out behaviour.
      sql/slave.cc:
        just comments are fixed due to changes in behavior of timed-out msta.
      9fdc9acb
    • unknown's avatar
      Bug#20404: SHOW CREATE TABLE fails with Turkish I · e463ee94
      unknown authored
        
        Problem: SHOW CREATE TABLE printed garbage in table
        name for tables having TURKISH I
        (i.e. LATIN CAPITABLE LETTER I WITH DOT ABOVE)
        when lower-case-table-name=1.
        
        Reason: In some cases during lower/upper conversion in utf8,
        the result string can be shorter the original string
        (including the above letter). Old implementation of caseup_str()
        and casedn_str() didn't handle the result length properly,
        assuming that length cannot change.
        
        This fix changes the result type of cs->cset->casedn_str()
        and cs->cset->caseup_str() from VOID to UINT, to return
        the result length, as well as put '\0' terminator on a 
        proper place.
        
        Also, my_caseup_str_utf8() and my_casedn_str_utf8() were 
        rewritten not to use strlen() for performance purposes.
        It was done with help of adding of new functions - my_utf8_uni_no_range()
        and my_uni_utf8_no_range() - for null terminated strings.
      
      
      
      include/m_ctype.h:
        Changeing return type from void to int for caseup_str() and casedn_str()
      mysql-test/r/lowercase_table.result:
        Adding test case
      mysql-test/t/lowercase_table.test:
        Adding test case
      sql/sql_parse.cc:
        Set table->table.length to result of my_casedn_str().
      strings/ctype-bin.c:
        Changeing return type from void to int for caseup_str() and casedn_str()
      strings/ctype-mb.c:
        Changeing return type from void to int for caseup_str() and casedn_str()
      strings/ctype-simple.c:
        Changeing return type from void to int for caseup_str() and casedn_str()
      strings/ctype-ucs2.c:
        Changeing return type from void to int for caseup_str() and casedn_str()
      strings/ctype-utf8.c:
        Changeing return type from void to int for caseup_str() and casedn_str().
            Optimization, to get rid of strlen():
            Adding my_utf8_uni_no_range() and my_uni_utf8_no_range() - for null
            terninated strings.
      e463ee94
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · 4453dc48
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.0.b18908
      
      
      BitKeeper/etc/collapsed:
        auto-union
      mysql-test/r/ctype_utf8.result:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/sql_string.cc:
        Auto merged
      4453dc48
    • unknown's avatar
      Bug#18908: ERROR 1406 (22001): Data too long for column :: using utf8 · 00c1c19e
      unknown authored
      Problem: Too confusing error message when cannot convert
      between string and column character sets on INSERT and UPDATE.
      Fix: producing a better error message, instead of "Data too long"
      in such cases
      Additional changes: Adding "DROP TABLE IF EXISTS" into several
      tests to be safe against failures in previous tests. 
      
      
      mysql-test/include/strict_autoinc.inc:
        Adding DROP TABLE to be safe against previous tests failure.
      mysql-test/r/ctype_recoding.result:
        Fixing test results
      mysql-test/r/ctype_utf8.result:
        Fixing test results
      mysql-test/r/fulltext.result:
        Fixing test results
      mysql-test/r/strict_autoinc_1myisam.result:
        Adding DROP TABLE to be safe against previous tests failure.
      mysql-test/r/strict_autoinc_2innodb.result:
        Adding DROP TABLE to be safe against previous tests failure.
      mysql-test/r/strict_autoinc_3heap.result:
        Adding DROP TABLE to be safe against previous tests failure.
      mysql-test/r/strict_autoinc_4bdb.result:
        Adding DROP TABLE to be safe against previous tests failure.
      mysql-test/r/strict_autoinc_5ndb.result:
        Adding DROP TABLE to be safe against previous tests failure.
      sql/field.cc:
        - producing better error messages than
          "DATA TRUNCATED" or "DATA TOO LONG" (in strict mode)
          in case of "not well formed source" and
          "cannot convert to field character set"
        - Performance improvements: copying directly to
          the target, instead of using an intermediate
          String.
        - Moving duplicate code into report_data_too_long() function.
      sql/sql_string.cc:
        Adding a new function to convert strings between character sets,
        but not more than "nchar" characters - a helper function for
        Field_string::store(), Field_varstring::store() and Field_blob::store().
      sql/sql_string.h:
        Adding new function prototype.
      00c1c19e
  9. 25 Oct, 2006 4 commits
  10. 23 Oct, 2006 4 commits
    • unknown's avatar
      Bug #22027 CREATE TABLE IF NOT EXISTS SELECT logged improperly with row-based binlog · a76c3814
      unknown authored
      results of binlog_stm_binlog in sync
      
      
      mysql-test/r/binlog_stm_binlog.result:
        results changed
      a76c3814
    • unknown's avatar
      Bug #22762 create talbe if not exists like a-temp-table binlogged w/o "if not exists" · 5f858aad
      unknown authored
      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.
      
      
      mysql-test/extra/binlog_tests/binlog.test:
        eliminating format-description line in show binlog events.
      mysql-test/r/binlog_row_binlog.result:
        results changed
      5f858aad
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl · 5438ab9c
      unknown authored
      into  dsl-hkigw8-febefb00-148.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.1/bug22027_create_select_exists
      
      
      sql/sql_show.cc:
        Auto merged
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        SCCS merged
      5438ab9c
    • unknown's avatar
      Bug#22823 gt and lt operators appear to be reversed in ExtractValue() command · 7595cb06
      unknown authored
      Problem: "greater than" and "less than" XPath operators appeared to have been implemented in reverse.
      Fix: swap arguments to eq_func() and eq_func_reverse() to provide correct operation result.
      
      
      mysql-test/r/xml.result:
        Adding test case
      mysql-test/t/xml.test:
        Adding test case
      sql/item_xmlfunc.cc:
        Pass argumemtns to eq_func() and eq_func_reverse() in correct order:
        nodeset argument first, then scalar argument.
        Also, fixing eq_func_reverse() to do correct conversion, e.g:
        "scalar > nodeset" into "nodeset < scalar" instead of wrong "nodeset <= scalar"
        "scalar >= nodeset" into "nodeset <= scalar" instead of wrong "nodeset < scalar".
      7595cb06
  11. 20 Oct, 2006 3 commits
    • unknown's avatar
      Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl · fcdee0cd
      unknown authored
      into  romeo.(none):/home/bk/mytap-mysql-5.1-new
      
      
      unittest/mytap/tap.c:
        Auto merged
      unittest/README.txt:
        Manual merge
      unittest/mytap/tap.h:
        Manual merge
      fcdee0cd
    • unknown's avatar
      Documentation changes to MyTAP. · ba53dc35
      unknown authored
      
      unittest/README.txt:
        Adding reference to generated documentation
      unittest/mytap/Doxyfile:
        Some configuration changes to make Doxygen generate better documentation.
      unittest/mytap/tap.c:
        Adding documentation and tags
      unittest/mytap/tap.h:
        Adding tags to provide document-internal references.
      ba53dc35
    • unknown's avatar
      Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt · 9852dfbc
      unknown authored
      into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
      
      
      mysql-test/r/myisam.result:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      9852dfbc