1. 08 Jan, 2007 3 commits
    • unknown's avatar
      Manual merge of the fix for BUG#19725 "Calls to SF in other database are not replicated · e1b0f07c
      unknown authored
      correctly in some cases", from 5.0.
      In short, calls to a stored function located in another database
      than the default database, may fail to replicate if the call was made
      by SET, SELECT, or DO.
      sp_head.cc automerged, only the test and test's result had to be hand-merged.
      
      
      mysql-test/r/rpl_sp.result:
        manual merge of the result of the test for BUG#19725
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        the bugfix changes results as expected
      mysql-test/t/rpl_sp.test:
        manual merge of the test for BUG#19725
      e1b0f07c
    • unknown's avatar
      Merge gbichot3.local:/home/mysql_src/mysql-5.0-rpl-19725 · d101463e
      unknown authored
      into  gbichot3.local:/home/mysql_src/mysql-5.1-rpl-19725
      
      
      sql/sp_head.cc:
        Auto merged
      mysql-test/r/rpl_sp.result:
        using 5.1's version, will merge by hand after running the new test
      mysql-test/t/rpl_sp.test:
        using 5.1's version, will re-insert the new test portion by hand
      d101463e
    • unknown's avatar
      Fix for BUG#19725 "Calls to SF in other database are not replicated · 3a05847a
      unknown authored
      correctly in some cases".
      In short, calls to a stored function located in another database
      than the default database, may fail to replicate if the call was made
      by SET, SELECT, or DO.
      Longer: when a stored function is called from a statement which does not go
      to binlog ("SET @A=somedb.myfunc()", "SELECT somedb.myfunc()",
      "DO somedb.myfunc()"), this crafted statement is binlogged:
      "SELECT myfunc();" (accompanied with a mention of the default database
      if there is one). So, if "somedb" is not the default database,
      the slave would fail to find myfunc(). The fix is to specify the
      function's database name in the crafted binlogged statement, like this:
      "SELECT somedb.myfunc();". Test added in rpl_sp.test.
      
      
      mysql-test/r/rpl_sp.result:
        Because I moved the SHOW BINLOG EVENTS down a bit, big portions of its
        output move. Also, the function's database name appears in
        SELECT statements.
      mysql-test/t/rpl_sp.test:
        Adding test for BUG#19725.
        Moving the SHOW BINLOG EVENTS down, it is run at the very end to
        test everything.
      sql/sp_head.cc:
        When binlogging a "SELECT myfunc()" (when a stored function is executed
        inside a statement which does not go to the binlog (like a SET,
        SELECT, DO), we need to write "SELECT db_of_myfunc().myfunc()",
        because the function may be in a database which is not the default
        database.
      3a05847a
  2. 03 Jan, 2007 1 commit
    • unknown's avatar
      fix for bug #18981 event_logs_tests failure · 7dba7404
      unknown authored
      On loaded boxes it is possible a INSERT with sleep of 1.5s to take
      more time.
      
      
      mysql-test/r/events_logs_tests.result:
        update result file
      mysql-test/t/events_logs_tests.test:
        fix test case to be proof of loaded boxes. 20 seconds is reasonable time
        not to get a sleep of 1.5s to sleep for 20s
      7dba7404
  3. 29 Dec, 2006 4 commits
  4. 22 Dec, 2006 4 commits
  5. 21 Dec, 2006 2 commits
    • unknown's avatar
      Merge romeo.(none):/home/bk/b22864-mysql-5.1-new-rpl · c3315ccc
      unknown authored
      into  romeo.(none):/home/bk/merge-b22864-myql-5.1-new-rpl
      
      
      sql/log.h:
        Auto merged
      sql/log_event.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/log.cc:
        Merge with mysql-5.1-new-rpl
      sql/slave.cc:
        Merge with mysql-5.1-new-rpl
      sql/sql_insert.cc:
        Merge with mysql-5.1-new-rpl
      c3315ccc
    • 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
  6. 14 Dec, 2006 5 commits
    • unknown's avatar
      After merge fix for Bug N22645 · 6d310813
      unknown authored
      6d310813
    • unknown's avatar
      Merge mysql.com:/usr/home/bar/mysql-5.0.b22645 · e3ce6c4d
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.1.b22645
      
      
      mysql-test/t/mysqlbinlog.test:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/log_event.h:
        Auto merged
      mysql-test/t/disabled.def:
        SCCS merged
      e3ce6c4d
    • unknown's avatar
      After merge fix for bug N22645 · 76bd00a9
      unknown authored
      
      mysql-test/t/mysqlbinlog.test:
        After merge fix
      sql/log_event.cc:
        Fixing comment, thanks to Andrei for suggestion
      76bd00a9
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · c8b678ac
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.0.b22645
      
      
      mysql-test/t/disabled.def:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/log_event.h:
        Auto merged
      mysql-test/r/mysqlbinlog.result:
        After merge fix
      mysql-test/t/mysqlbinlog.test:
        After merge fix
      c8b678ac
    • unknown's avatar
      Bug#17642 mysqlbinlog: Restore from row-based binlog fails · e653222d
      unknown authored
      Problem: mysqlbinlog_base64 failed sporadically.
      
      Reason: Missing "flush logs" before running $MYSQL_BINLOG,
      which could start dumping the log file before server
      has finished writting into it.
      Fix:
      - implementing --force-if-open option to "mysqlbinlog"
      - adding --disable-force-if-open to make $MYSQL_BINLOG
        fail on non-closed log files, to garantee that nobody
        will forget "flush logs" in the future.
      - adding "flush logs" into all affected tests.
      
      
      client/mysqlbinlog.cc:
        Implementing --force-if-open option with TRUE by default
      mysql-test/mysql-test-run.pl:
        Using --disable-force-if-open for all tests to avoid
        sporadic test failures because of running "mysqlbinlog"
        on a non-flushed binlog files.
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        FLush log before running dumping.
      mysql-test/r/binlog_stm_mix_innodb_myisam.result:
        FLush log before running dumping.
      mysql-test/r/mysqlbinlog.result:
        FLush log before running dumping.
      mysql-test/r/mysqlbinlog2.result:
        FLush log before running dumping.
      mysql-test/r/mysqlbinlog_base64.result:
        FLush log before running dumping.
      mysql-test/r/user_var-binlog.result:
        FLush log before running dumping.
      mysql-test/t/binlog_row_mix_innodb_myisam.test:
        FLush log before running dumping.
      mysql-test/t/binlog_stm_mix_innodb_myisam.test:
        FLush log before running dumping.
      mysql-test/t/mysqlbinlog.test:
        FLush log before running dumping.
        
        Adding new tests:
        - checking that $MYSQL_BINLOG returns an error on a non-closed binlog
        file because of --disable-force-if-open
        - checking that it does not return an error with --force-if-open
      mysql-test/t/mysqlbinlog2.test:
        FLush log before running dumping.
      mysql-test/t/mysqlbinlog_base64.test:
        FLush log before running dumping.
      mysql-test/t/user_var-binlog.test:
        FLush log before running dumping.
      e653222d
  7. 11 Dec, 2006 5 commits
  8. 08 Dec, 2006 14 commits
    • unknown's avatar
      Merge mysql.com:/home/bk/MERGE/mysql-5.0-merge · 009c88db
      unknown authored
      into  mysql.com:/home/bk/MERGE/mysql-5.1-merge
      
      
      client/mysqlbinlog.cc:
        Auto merged
      client/mysqldump.c:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/r/rpl_timezone.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysys/my_thr_init.c:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      include/my_pthread.h:
        Manual merge
      009c88db
    • unknown's avatar
      Merge mysql.com:/home/bk/MERGE/mysql-4.1-merge · 750dd5ed
      unknown authored
      into  mysql.com:/home/bk/MERGE/mysql-5.0-merge
      
      
      sql/item_timefunc.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      750dd5ed
    • unknown's avatar
      Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl · 26b6dc42
      unknown authored
      into  mysql.com:/home/bk/MERGE/mysql-5.1-merge
      
      
      client/mysqlbinlog.cc:
        Auto merged
      client/mysqldump.c:
        Auto merged
      config/ac-macros/ha_ndbcluster.m4:
        Auto merged
      configure.in:
        Auto merged
      include/my_global.h:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/r/rpl_timezone.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item_create.cc:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/log.h:
        Auto merged
      sql/log_event.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/rpl_injector.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/t/mysqldump.test:
        Manual merge
      sql/log_event.cc:
        manual merge
      26b6dc42
    • unknown's avatar
      Merge mysql.com:/home/bkroot/mysql-5.0-rpl · cacaef6e
      unknown authored
      into  mysql.com:/home/bk/MERGE/mysql-5.0-merge
      
      
      client/mysqldump.c:
        Auto merged
      include/my_pthread.h:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/r/rpl_timezone.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysys/my_thr_init.c:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      cacaef6e
    • unknown's avatar
      Merge mysql.com:/home/bkroot/mysql-4.1-rpl · 5aa8705a
      unknown authored
      into  mysql.com:/home/bk/MERGE/mysql-4.1-merge
      
      
      sql/item_timefunc.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      5aa8705a
    • unknown's avatar
      Minor fix · a7985804
      unknown authored
      
      include/my_pthread.h:
        Fixed missing \ in #if directive.
      a7985804
    • unknown's avatar
      Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl · 42b2cb86
      unknown authored
      into  quant.(none):/ext/mysql/bk/mysql-5.0-bug24507
      
      
      sql/sql_acl.cc:
        Auto merged
      42b2cb86
    • unknown's avatar
      Merge mysql.com:/usr/home/bar/mysql-5.0.b24158 · b8ff601e
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.1.b20396
      
      
      mysql-test/r/rpl_do_grant.result:
        Auto merged
      mysql-test/t/rpl_do_grant.test:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      b8ff601e
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · 6aa09b4c
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.0.b24158
      
      
      6aa09b4c
    • unknown's avatar
      After merge fix · 55c10a09
      unknown authored
      55c10a09
    • unknown's avatar
      Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl · df2af6cd
      unknown authored
      into  quant.(none):/ext/mysql/bk/mysql-5.0-bug24507
      
      
      client/mysqlbinlog.cc:
        Auto merged
      client/mysqldump.c:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      df2af6cd
    • unknown's avatar
      BUG#24507 (rpl_log.test crash slave): · 9f37ea45
      unknown authored
      The problem was located to lie inside current NPTL pthread_exit() 
      implementation. Race conditions in this code can lead to segmentation
      fault. Hovewer, this can happen only in a race between first thread 
      calling pthread_exit() and other threads. 
      
      Workaround implemented in this patch spawns a dummy thread, which
      exits immediately, during thread lib initialization. This will exclude
      segment violations when further threads exit.
       
      
      
      include/my_pthread.h:
        define macro NPTL_PTHREAD_EXIT_BUG which controls whether workaround
        in my_thread_global_init() is included or not.
      mysys/my_thr_init.c:
        Spawn a dummy thread in my_thread_global_init() to initialize pthread 
        lib internal variables.
      9f37ea45
    • unknown's avatar
      After merge fix · 75127a69
      unknown authored
      
      client/mysqlbinlog.cc:
        Auto merged
      mysql-test/r/user_var-binlog.result:
        Auto merged
      mysql-test/t/mysqlbinlog.test:
        Auto merged
      BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17:
        Auto merged
      mysql-test/r/binlog_stm_mix_innodb_myisam.result:
        Auto merged
      mysql-test/r/rpl_stm_charset.result:
        Auto merged
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
        after merge fix.
      75127a69
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl · b93baf48
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.0.b20396
      
      
      b93baf48
  9. 07 Dec, 2006 2 commits