1. 21 Dec, 2006 1 commit
    • unknown's avatar
      BUG#22864 (Rollback following CREATE... SELECT discards 'CREATE TABLE' · 3d68c135
      unknown authored
      from log):
      When row-based logging is used, the CREATE-SELECT is written as two
      parts: as a CREATE TABLE statement and as the rows for the table. For
      both transactional and non-transactional tables, the CREATE TABLE
      statement was written to the transaction cache, as were the rows, and
      on statement end, the entire transaction cache was written to the binary
      log if the table was non-transactional. For transactional tables, the
      events were kept in the transaction cache until end of transaction (or
      statement that were not part of a transaction).
      
      For the case when AUTOCOMMIT=0 and we are creating a transactional table
      using a create select, we would then keep the CREATE TABLE statement and
      the rows for the CREATE-SELECT, while executing the following statements.
      On a rollback, the transaction cache would then be cleared, which would
      also remove the CREATE TABLE statement. Hence no table would be created
      on the slave, while there is an empty table on the master.
      
      This relates to BUG#22865 where the table being created exists on the
      master, but not on the slave during insertion of rows into the newly
      created table. This occurs since the CREATE TABLE statement were still
      in the transaction cache until the statement finished executing, and
      possibly longer if the table was transactional.
      
      This patch changes the behaviour of the CREATE-SELECT statement by
      adding an implicit commit at the end of the statement when creating
      non-temporary tables. Hence, non-temporary tables will be written to the
      binary log on completion, and in the even of AUTOCOMMIT=0, a new
      transaction will be started. Temporary tables do not commit an ongoing
      transaction: neither as a pre- not a post-commit.
      
      The events for both transactional and non-transactional tables are
      saved in the transaction cache, and written to the binary log at end
      of the statement.
      
      
      mysql-test/r/rpl_row_create_table.result:
        Result change
      mysql-test/t/rpl_row_create_table.test:
        Requring InnoDB for slave as well.
        Adding test CREATE-SELECT that is rolled back explicitly.
        Changing binlog positions.
      sql/log.cc:
        Adding helper class to handle lock/unlock of mutexes using RAII.
        Factoring out code into write_cache() function to transaction cache
          to binary log.
        Adding function THD::binlog_flush_transaction_cache() to flush the
          transaction cache to the binary log file.
        Factoring out code into binlog_set_stmt_begin() to set the beginning
          of statement savepoint.
        Clearing before statement point when transaction cache is truncated
         so that these points are out of range.
      sql/log.h:
        Adding method MYSQL_BIN_LOG::write_cache()
      sql/log_event.h:
        Replicating OPTION_NOT_AUTOCOMMIT flag (see changeset comment)
      sql/mysql_priv.h:
        Although left-shifting signed integer values is well-defined,
        it has potential for strange errors. Using unsigned long long
        instead of signed long long since this is the type of the options
        flags.
      sql/slave.cc:
        Adding printout of transaction-critical thread flags.
      sql/sql_class.h:
        Adding function THD::binlog_flush_transaction_cache()
        Adding function THD::binlog_set_stmt_begin()
      sql/sql_insert.cc:
        Adding code to cache events for a CREATE-SELECT statement.
        Disabling binlog for SBR (but not RBR) when sending error for select part
        of CREATE-SELECT statement.
        Adding implicit commit at end of statement for non-temporary tables.
      mysql-test/t/rpl_row_create_table-slave.opt:
        New BitKeeper file ``mysql-test/t/rpl_row_create_table-slave.opt''
      3d68c135
  2. 12 Oct, 2006 1 commit
    • unknown's avatar
      Merge mysql.com:/usr/home/bar/mysql-5.0-rpl.b22052 · 27bbf36f
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.1-rpl
      
      
      mysql-test/r/ctype_ucs.result:
        Auto merged
      mysql-test/t/ctype_ucs.test:
        Auto merged
      storage/myisam/mi_key.c:
        Auto merged
      storage/myisam/mi_open.c:
        Auto merged
      27bbf36f
  3. 11 Oct, 2006 1 commit
  4. 10 Oct, 2006 13 commits
    • unknown's avatar
      Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl · c34940a0
      unknown authored
      into  mysql.com:/home/bk/MERGE/mysql-5.1-merge
      
      
      include/my_sys.h:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      storage/ndb/src/mgmapi/mgmapi.cpp:
        Auto merged
      c34940a0
    • unknown's avatar
      Merge mysql.com:/home/bkroot/mysql-5.0-rpl · 687f44fe
      unknown authored
      into  mysql.com:/home/bk/MERGE/mysql-5.0-merge
      
      
      687f44fe
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/51-work · ef0ee764
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      storage/ndb/tools/restore/restore_main.cpp:
        Auto merged
      ef0ee764
    • unknown's avatar
      ndb - · ff604cb7
      unknown authored
        ndb_restore Return OK even if temporary errors
          (otherwise mysql-test-run/ndb_restore can fail on really slow machines)
      
      
      storage/ndb/tools/restore/restore_main.cpp:
        Return OK even if temporary errors
      ff604cb7
    • unknown's avatar
      Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl · 3f3ffdcc
      unknown authored
      into  romeo.(none):/home/bk/b21474-mysql-5.1-new-rpl
      
      
      sql/log_event.cc:
        Auto merged
      3f3ffdcc
    • unknown's avatar
      BUG#21474 (There is a rotation before the last table map): · 55ce4471
      unknown authored
      Removing code to step the group log position and just stepping
      the event log position.  If the group log position were stepped
      one time too many, it might be that the group starts at a position
      that is not possible, e.g., at a Rows_log_event, or between an
      Intvar_log_event and the following associated Query_log_event.
      
      
      sql/log_event.cc:
        Removing code to step the group log position and just stepping
        the event log position.  If the group log position were stepped
        one time too many, it might be that the group starts at a position
        that is not possible, e.g., at a Rows_log_event, or between an
        Intvar_log_event and the following associated Query_log_event.
      sql/slave.cc:
        Removing code to step the group log position and just stepping
        the event log position when executing a Format_description_log_event.
        If the group log position were stepped one time too many, it might be that the group starts at a position
        that is not possible, e.g., at a Rows_log_event, or between an
        Intvar_log_event and the following associated Query_log_event.
      55ce4471
    • unknown's avatar
      Fixes to make replication team tree build on Windows. · 010edb7e
      unknown authored
      
      sql/log_event.cc:
        Adding casts to make it compile on Windows.
      010edb7e
    • unknown's avatar
      Fix to make it build on all platforms. · 95d29d0d
      unknown authored
      Replacing C++ code with C code in a C file.
      
      
      mysys/mf_iocache2.c:
        There shall not be C++ code in C files.
      95d29d0d
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1 · e833ecae
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      client/mysqldump.c:
        Auto merged
      client/mysqltest.c:
        Auto merged
      mysql-test/r/csv.result:
        Auto merged
      mysql-test/r/ctype_utf8.result:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/t/csv.test:
        Auto merged
      mysql-test/t/ctype_utf8.test:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      storage/csv/ha_tina.cc:
        Auto merged
      storage/innobase/btr/btr0btr.c:
        Auto merged
      storage/innobase/buf/buf0buf.c:
        Auto merged
      storage/innobase/dict/dict0dict.c:
        Auto merged
      storage/innobase/fil/fil0fil.c:
        Auto merged
      storage/innobase/fsp/fsp0fsp.c:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      storage/innobase/include/btr0cur.ic:
        Auto merged
      storage/innobase/log/log0log.c:
        Auto merged
      storage/innobase/log/log0recv.c:
        Auto merged
      storage/innobase/os/os0file.c:
        Auto merged
      storage/innobase/row/row0mysql.c:
        Auto merged
      storage/innobase/row/row0sel.c:
        Auto merged
      storage/innobase/srv/srv0start.c:
        Auto merged
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      e833ecae
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/51-work · 6407b771
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      6407b771
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · 7037b809
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/51-work
      
      
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        Auto merged
      storage/ndb/test/ndbapi/testTimeout.cpp:
        Auto merged
      7037b809
    • unknown's avatar
      ndb - bug#23107 · 6b4507b9
      unknown authored
        fix bug in test prg
      
      
      6b4507b9
    • unknown's avatar
      ndb - bug#23107 · e486c517
      unknown authored
        fix bug in handling of inactive timeout for scan, when all is delivered
      
      
      ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        1) set timeout if all scans are at api
        2) Use c_appl_timeout_value when getting scan timeout
      ndb/test/ndbapi/testTimeout.cpp:
        test program
      e486c517
  5. 09 Oct, 2006 1 commit
    • unknown's avatar
      Post-merge fixes. · 45c30c7f
      unknown authored
      
      mysql-test/t/view.test:
        Switching to using symbolic error numbers instead of numbers.
        Using numbers caused test to fail.
      45c30c7f
  6. 08 Oct, 2006 3 commits
  7. 06 Oct, 2006 15 commits
    • unknown's avatar
      Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl · 5e81d130
      unknown authored
      into  romeo.(none):/home/bk/b19459-mysql-5.1-new
      
      
      client/mysqlbinlog.cc:
        Auto merged
      include/my_sys.h:
        Auto merged
      mysys/base64.c:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/log_event.h:
        Auto merged
      storage/ndb/src/mgmapi/mgmapi.cpp:
        Auto merged
      sql/share/errmsg.txt:
        SCCS merged
      5e81d130
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-5.0-engines · 4d7a6cf7
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-5.1-engines
      
      
      storage/myisammrg/ha_myisammrg.cc:
        Auto merged
      4d7a6cf7
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-4.1-engines · 12fb87ac
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-5.0-engines
      
      
      sql/ha_myisammrg.cc:
        Manual merge.
      12fb87ac
    • unknown's avatar
      Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines · a6a93d6f
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-4.1-engines
      
      
      a6a93d6f
    • unknown's avatar
      BUG#22937 - Valgrind failure in 'merge' test (ha_myisammrg.cc:329) · 47a70282
      unknown authored
      This is addition to fix for bug21617. Valgrind reports an error when
      opening merge table that has underlying tables with less indexes than
      in a merge table itself.
      
      Copy at most min(file->keys, table->key_parts) elements from rec_per_key array.
      This fixes problems when merge table and subtables have different number of keys.
      
      
      sql/ha_myisammrg.cc:
        Copy at most min(file->keys, table->key_parts) elements from rec_per_key array.
        This fixes problems when merge table and subtables have different number of keys.
      47a70282
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.0-engines · 98209543
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.1-engines
      
      
      mysql-test/r/ndb_update.result:
        SCCS merged
      98209543
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-4.1-engines · 0caaf1d1
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.0-engines
      
      
      mysql-test/r/ndb_update.result:
        Auto merged
      mysql-test/t/ndb_update.test:
        Auto merged
      0caaf1d1
    • unknown's avatar
    • unknown's avatar
      BUG#19459 (BINLOG RBR command does not lock tables correctly causing · d8be3113
      unknown authored
      crash for, e.g., NDB):
      
      Before, mysqlbinlog printed table map events as a separate statement, so
      when executing the event, the opened table was subsequently closed
      when the statement ended. Instead, the row-based events that make up
      a statement are now printed as *one* BINLOG statement, which means
      that the table maps and the following *_rows_log_event events are
      executed fully before the statement ends.
      
      Changing implementation of BINLOG statement to be able to read the 
      emitted format, which now consists of several chunks of BASE64-encoded
      data.
      
      
      client/mysqlbinlog.cc:
        Using IO_CACHE to print events instead of directly to file.
        Factoring out code to write event header and base64 representation into
        separate function.
      mysys/mf_iocache2.c:
        Correcting name in documentation.
      sql/log_event.cc:
        Adding class Write_on_release_cache that holds an IO_CACHE and that
        will write contents of IO_CACHE to a designated file on destruction.
        
        Changing signature of event printing functions print_header() and print_base64()
        to write to IO_CACHE and changing *all* calls in those functions in accordance.
        This means that all printing functions now print to an IO_CACHE instead of to a file,
        and that the IO_CACHE is then copied to the file.
        
        The print() function have the same signature as before, but since it is
        using print_header() and print_base64(), the data will now be printed
        to an IO_CACHE and then copied to the file.
        
        Changing row-based replication events to incrementally build one
        BINLOG statement for all events making up a statement.
      sql/log_event.h:
        Changing signature of event printing functions print_header() and
        print_base64() to write to an IO_CACHE instead of a file.
        
        Changing row-based replication events to incrementally build one
        BINLOG statement for all events making up a statement.
        
        Adding a head_cache and a body_cache to cache statement comment 
        and statement body respectively. In addition, the head_cache is used
        when printing other events than the RBR events.
      sql/sql_binlog.cc:
        Changing code to be able to decode several pieces of base64-encoded data
        for a BINLOG statement. The BINLOG statement now consists of several pieces
        of BASE64-encoded data, so once a block has been decoded and executed, the
        next block has to be read from the statement until there is no more
        data to read.
      d8be3113
    • unknown's avatar
      Fix to build on 64-bit systems where sizeof(unsigned long long) · cc4435ad
      unknown authored
      > sizeof(unsigned long).
      
      
      sql/log.cc:
        Replacing enum constant that contained an unsigned long long constant
        on some platforms with a macro (an enumeration constant is limited
        to the range of values covered by signed or unsigned long).
      cc4435ad
    • unknown's avatar
      Addition to fix for bug#10974. Fixed spelling. · 62e91f6d
      unknown authored
      62e91f6d
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-5.0-engines · 44dd7f6d
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-5.1-engines
      
      
      mysql-test/r/merge.result:
        Manual merge.
      sql/share/errmsg.txt:
        Manual merge.
      44dd7f6d
    • unknown's avatar
      Addition to fix for bug#10974. Fixed spelling. · 15d2a32c
      unknown authored
      15d2a32c
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-4.1-engines · ada458cc
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-5.0-engines
      
      
      BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
        Auto merged
      mysql-test/r/merge.result:
        Manual merge.
      ada458cc
    • unknown's avatar
      Addition to fix for bug#10974. Fixed spelling. · f463cb38
      unknown authored
      f463cb38
  8. 05 Oct, 2006 5 commits