1. 31 Mar, 2010 1 commit
    • Alfranio Correia's avatar
      BUG#51291 Unfortunate effect around variable binlog_direct_non_transactional_updates · 41c642e6
      Alfranio Correia authored
      BUG#46364 introduced the flag binlog_direct_non_transactional_updates which
      would make N-changes to be written to the binary log upon committing the
      statement when "ON". On the other hand, when "OFF" the option was supposed
      to mimic the behavior in 5.1. However, the implementation was not mimicking
      the behavior correctly and the following bugs popped up:
      
        Case #1: N-changes executed within a transaction would go into
                 the S-cache. When later in the same transaction a
                 T-change occurs, N-changes following it were written
                 to the T-cache instead of the S-cache. In some cases,
                 this raises problems. For example, a
                 Table_map_log_event being written initially into the
                 S-cache, together with the initial N-changes, would be
                 absent from the T-cache. This would log N-changes
                 orphaned from a Table_map_log_event (thence discarded
                 at the slave). (MIXED and ROW)
      
         Case #2: When rolling back a transaction, the N-changes that
                  might be in the T-cache were disregarded and
                  truncated along with the T-changes. (MIXED and ROW)
      
         Case #3: When a MIXED statement (TN) is ahead of any other
                  T-changes in the transaction and it fails, it is kept
                  in the T-cache until the transaction ends. This is
                  not the case in 5.1 or Betony (5.5.2). In these, the
                  failed TN statement would be written to the binlog at
                  the same instant it had failed and not deferred until
                  transaction end. (SBR)
      
      To fix these problems, we have decided to do what follows:
      
         For Case #1 and #2, we circumvent them:
      
            1. by not letting binlog_direct_non_transactional_updates
               affect MIXED and RBR. These modes will keep the behavior
               provided by WL#2687. Although this will make Celosia to
               behave differently from 5.1, an execution will be always
               safe under such modes in the sense that slaves will never
               go out sync. In 5.1, using either MIXED or ROW while
               mixing N-statements and T-statements was not safe.
      
         For Case #3, we don't actually fix it. We:
      
            1. keep it and make all MIXED statements whether they end
               up failing or not or whether they are up front in the
               transaction or after some transactional change to always
               be stored in the T-cache. This means that it is written
               to the binary log on transaction commit/rollback only.
      
            2. We make the warning message even more specific about the
               MIXED statement and SBR.
      
      mysql-test/extra/rpl_tests/rpl_mixing_engines.test:
        Updated the test case to avoid checking inconsistencies between the master and slave
        when session.binlog_direct_non_transactional_updates is ON and the format is statement.
        
        In this scenario, they will diverge because a counter (within a triger) is incremented
        and associated to the issued statement. However, an n-statement is logged ahead of
        the transaction and thus is not executed by the same order in the slave and thus gets
        a different value from the counter.
      mysql-test/suite/binlog/r/binlog_multi_engine.result:
        Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
        Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      mysql-test/suite/ndb/r/ndb_binlog_format.result:
        Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      mysql-test/suite/rpl/r/rpl_concurrency_error.result:
        Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result:
        Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result:
        Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result:
        Updated the test case with the new error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      sql/log.cc:
        Checked if either a trx-cache or a non-trx-cache should be used. 
        
        If bin_log_direct_non_trans_update is active or the format is either
        MIXED or ROW, the cache to be used depends on the flag is_transactional.
        
        When the format is STMT, the non-trx-cache should be used if the statement
        is non-transactional and the trx-cache is empty, i.e. if any transactional
        statement has not committed yet. Otherwise, the trx-cache should be used.
      sql/share/errmsg-utf8.txt:
        Added the new unsafe error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      sql/sql_class.cc:
        Started printing ER_BINLOG_UNSAFE_MIXED_STATEMENT, when there
        is a mixed-statement.
        
        Organized the names of the variables and added comments.
      sql/sql_lex.cc:
        Added the new unsafe error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      sql/sql_lex.h:
        Added the new unsafe error ER_BINLOG_UNSAFE_MIXED_STATEMENT.
      41c642e6
  2. 10 Mar, 2010 1 commit
  3. 22 Feb, 2010 1 commit
    • Alfranio Correia's avatar
      BUG#49019 Mixing self-logging eng. and regular eng. does not switch to row in mixed mode · 3fad4e8d
      Alfranio Correia authored
      Reading from a self-logging engine and updating a transactional engine such as Innodb
      generates changes that are written to the binary log in the statement format and may
      make slaves diverge. In the mixed mode, such changes should be written to the binary
      log in the row format.
      
      Note that the issue does not happen if we mix a self-logging engine and MyIsam
      as this case is caught by checking the mixture of non-transactional and transactional
      engines.
      
      So, we classify a mixed statement where one reads from NDB and writes into another 
      engine as unsafe:
      
      if (multi_engine && flags_some_set & HA_HAS_OWN_BINLOGGING)
        lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE);
      
      mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result:
        Augmented test case to check mixed statements
      mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test:
        Augmented test case to check mixed statements
      sql/share/errmsg-utf8.txt:
        Added ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE
      sql/sql_class.cc:
        Redefined flags' name in order to have two sets of flags: (i) flags that are checked when there
        is a write operation; (ii) flags that are checked regardless of the type of the operation.
        
        Classified a mixed statement where one reads from NDB and writes into another engine as unsafe:
        
          if (multi_engine && flags_some_set & HA_HAS_OWN_BINLOGGING)
            lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE);
      sql/sql_lex.cc:
        Added error ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE
      sql/sql_lex.h:
        Added BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE
      3fad4e8d
  4. 21 Feb, 2010 1 commit
  5. 20 Feb, 2010 9 commits
  6. 19 Feb, 2010 2 commits
  7. 18 Feb, 2010 4 commits
  8. 17 Feb, 2010 14 commits
    • Magne Mahre's avatar
      Bug#47017 rpl_timezone fails on PB-2 with mismatch error · de554de6
      Magne Mahre authored
      This is a post-fix cleanup to move rpl.rpl_timezone out
      of 'experimental' state.
      de554de6
    • unknown's avatar
      Merge from mysql-5.1.44-release · 0a7b5fb0
      unknown authored
      0a7b5fb0
    • unknown's avatar
      configure.in · 62db6839
      unknown authored
       - Changes to the banner text
       - Use older AC_PROG_LIBTOOL (Bug#51009)
      
      scripts/mysql_install_db.sh
       - Changes to banner text
      62db6839
    • Bjorn Munch's avatar
      Bug #51135 Please increase the maximum number of connections allowed in mysqltest · 90c3ace0
      Bjorn Munch authored
      Added --max-connections= argument to mysqltest and mtr
      Small fix to first patch: forgot to check before free'ing connections array
      90c3ace0
    • Bjorn Munch's avatar
      merge 44054 · b471134b
      Bjorn Munch authored
      b471134b
    • Bjorn Munch's avatar
      merge 44054 · dedad8ae
      Bjorn Munch authored
      dedad8ae
    • Alexander Nozdrin's avatar
      Re-adding 'include/probes_mysql_nodtrace.h' removed by accident · d2af6c43
      Alexander Nozdrin authored
      in 'kostja@sun.com-20091210084103-l4f8u62u4evoy3dc'.
      
      This file is necessary for Windows builds.
      d2af6c43
    • Bjorn Munch's avatar
      Bug #44054 MTR2: --no-reorder does not prevent reordering · 5b7306e2
      Bjorn Munch authored
      Some logic would group by suite always
      Disable this if using --noreorder
      Also fix getting array from collect_one_suite() in this case
      Amended according to previous comment
      5b7306e2
    • Alexey Botchkov's avatar
      Bug#38959 archive_gis fails due to rounding difference · df460f4e
      Alexey Botchkov authored
          Multi_polygon::centroid() has an error in the implementation
            
      per-file messages:
        sql/spatial.cc
      Bug#38959      archive_gis fails due to rounding difference
              multi_polygon::centroid() implementation fixed
      df460f4e
    • Magne Mahre's avatar
      Merge from mysql-trunk-bugfixing · 1191483b
      Magne Mahre authored
      1191483b
    • Bjorn Munch's avatar
      Bug #51248 Server start fails with MTR_VERSION=1 and code with WL5154 · 6e5a6259
      Bjorn Munch authored
      Replaced --default-character-set with --character-set-server
      Replaced --language with --lc-messages-dir
      NB full test suite not tested yet
      6e5a6259
    • Magne Mahre's avatar
      WL#5182 Remove more deprecated 4.1/5.0 features · 68b5c12d
      Magne Mahre authored
      WL#5154 was a task for formally deprecating and removing items that
      were mentioned in the manual as having been deprecated since MySQL
      4.1 or 5.0, but that had never been removed.
      
      Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and
      mysqldump.c reveals additional deprecations not mentioned in the
      manual. (In some cases, the items are simply not mentioned in the
      5.1+ manuals.)
      
      This is a follow-on task to deprecate and remove these additional
      items.
      
      The deprecation happened in MySQL 5.1, and the options/variables
      are now removed from the code.
      
      
      
      client/mysql.cc:
        --no-tee is now removed
      client/mysqldump.c:
        --all is now removed
        -a now points to --create-options
      sql/mysqld.cc:
        delay-key-write-for-all-tables is removed
        --enable-locking is removed
        --log-update is removed
        --skip-locking is removed
        --skip-symlink is removed
        --sql-bin-update-same is removed
        --warnings is removed
        --record-buffer is removed
      68b5c12d
    • Magne Mahre's avatar
      WL#5154 Remove deprecated 4.1 features · 7178879c
      Magne Mahre authored
      A set of program options and variables was deprecated in
      MySQL 5.1, and is hereby removed.
      
      
      
      client/mysql.cc:
        --no-auto-rehash (-A)  is no longer deprecated
        --no-named-commands (-g) is now removed
        --skip-line-numbers (-L) is no longer deprecated
        --set-variable (-O) is now removed
        --no-pager is now removed
      client/mysqlbinlog.cc:
        --position is now removed (use --start-position)
        -j is now equivalent with --start-position
      client/mysqldump.c:
        --first-slave is now removed
        --no-set-names (-N) is now removed
        --set-variable (-O) is now removed
      mysql-test/include/default_mysqld.cnf:
        default-character-set is removed as an option
        character-set-server is equivalent.
      mysql-test/t/bug47671-master.opt:
        default-character-set option is removed
        character-set-server is equivalent
      mysql-test/t/ctype_latin1_de-master.opt:
        default-character-set option is removed
        character-set-server is equivalent
      mysql-test/t/ctype_ucs2_def-master.opt:
        default-collation is removed
        collation-server is equicalent
      scripts/mysqld_multi.sh:
        --config-file has been superseded by
        --defaults-extra-file
      sql/mysql_priv.h:
        Removed the version number in the deprecation
        warning text, as decided by ServerPT.
      sql/mysqld.cc:
        --default-character-set (-C) is removed
        --default-collation is removed
        --log-long-format (-0) is removed
        --safe-show-database is removed
        --set-variable (-O) is removed
      sql/sql_yacc.yy:
        The FRAC_SECOND keyword is removed
      sql/sys_vars.cc:
        The sql_log_update system variable is removed
      7178879c
    • Alexander Barkov's avatar
      Merging from mysql-next-mr · 8780277b
      Alexander Barkov authored
      8780277b
  9. 16 Feb, 2010 7 commits