1. 06 Feb, 2009 1 commit
    • Mats Kindahl's avatar
      Bug #36763 · bd53d214
      Mats Kindahl authored
      TRUNCATE TABLE fails to replicate when stmt-based binlogging is not supported.
      
      There were two separate problems with the code, both of which are fixed with
      this patch:
      
      1. An error was printed by InnoDB for TRUNCATE TABLE in statement mode when
         the in isolation levels READ COMMITTED and READ UNCOMMITTED since InnoDB
         does permit statement-based replication for DML statements. However,
         the TRUNCATE TABLE is not transactional, but is a DDL, and should therefore
         be allowed to be replicated as a statement.
      
      2. The statement was not logged in mixed mode because of the error above, but
         the error was not reported to the client.
      
      This patch fixes the problem by treating TRUNCATE TABLE a DDL, that is, it is
      always logged as a statement and not reporting an error from InnoDB for TRUNCATE
      TABLE.
      
      
      mysql-test/extra/binlog_tests/binlog_truncate.test:
        Adding new test to check that TRUNCATE TABLE is written correctly
        to the binary log.
      mysql-test/extra/rpl_tests/rpl_truncate.test:
        Removing redundant testing by eliminating settings of BINLOG_FORMAT.
      mysql-test/extra/rpl_tests/rpl_truncate_helper.test:
        Replacing slave and master reset code with include file.
        Removing settings of BINLOG_FORMAT.
        Replacing printing of table contents to compare master and slave
        with diff_tables.inc.
      mysql-test/suite/binlog/t/binlog_truncate_innodb.test:
        Adding test for testing that TRUNCATE TABLE is logged correctly for InnoDB
        in all isolation levels.
      mysql-test/suite/binlog/t/binlog_truncate_myisam.test:
        Adding test for testing that TRUNCATE TABLE is logged correctly for MyISAM.
      mysql-test/suite/binlog/t/disabled.def:
        Disabling binlog_truncate_innodb since it does not work (yet).
      sql/sql_base.cc:
        Correcting setting of capabilities flags to make the comparison with 0
        later in the code work correctly.
      sql/sql_delete.cc:
        Re-organizing code to ensure that TRUNCATE TABLE is logged in statement
        format and that row format is not used unless there are rows to log (which
        there are not when delete_all_rows() is called, so this has to be logged
        as a statement).
      bd53d214
  2. 16 Jan, 2009 10 commits
  3. 15 Jan, 2009 17 commits
  4. 14 Jan, 2009 8 commits
    • MySQL Build Team's avatar
    • Ramil Kalimullin's avatar
      bug#33094: Error in upgrading from 5.0 to 5.1 when table contains triggers · 7a23cfaa
      Ramil Kalimullin authored
      Post-fix test failure: fixed mysqlcheck.test on Windows platforms.
      
      
      mysql-test/r/mysqlcheck.result:
        fixed mysqlcheck.test on Windows platforms.
      mysql-test/t/mysqlcheck.test:
        fixed mysqlcheck.test on Windows platforms.
      7a23cfaa
    • unknown's avatar
      Raise version number after cloning 5.0.76 · ea75d582
      unknown authored
      ea75d582
    • Chad MILLER's avatar
      Merge from bugteam trunk. · 041d0984
      Chad MILLER authored
      041d0984
    • Timothy Smith's avatar
      Auto-merge from upstream 5.1-bugteam · 57a083d5
      Timothy Smith authored
      57a083d5
    • Ramil Kalimullin's avatar
      Fix for · 53e42d9e
      Ramil Kalimullin authored
      bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
      triggers
      and
      #41385: Crash when attempting to repair a #mysql50# upgraded table
      with triggers.
      
      Problem:
      1. trigger code didn't assume a table name may have
      a "#mysql50#" prefix, that may lead to a failing ASSERT().
      2. "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME" failed
      for databases with "#mysql50#" prefix if any trigger.
      3. mysqlcheck --fix-table-name didn't use UTF8 as a default
      character set that resulted in (parsing) errors for tables with
      non-latin symbols in their names and definitions of triggers.
      
      Fix:
      1. properly handle table/database names with "#mysql50#" prefix.
      2. handle --default-character-set mysqlcheck option;
      if mysqlcheck is launched with --fix-table-name or --fix-db-name
      set default character set to UTF8 if no --default-character-set
      option given.
      
      Note: if given --fix-table-name or --fix-db-name option,
      without --default-character-set mysqlcheck option
      default character set is UTF8.
      
      
      client/mysqlcheck.c:
        Fix for
        bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
        triggers
        and
        #41385: Crash when attempting to repair a #mysql50# upgraded table
        with triggers.
          - check and set default charset if --default-character-set option
            given.
          - set default charset to "utf8" if there's
            --fix-table-name or --fix-db-name and no --default-character-set.
      mysql-test/r/mysqlcheck.result:
        Fix for
        bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
        triggers
        and
        #41385: Crash when attempting to repair a #mysql50# upgraded table
        with triggers.
          - test result.
      mysql-test/t/mysqlcheck.test:
        Fix for
        bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
        triggers
        and
        #41385: Crash when attempting to repair a #mysql50# upgraded table
        with triggers.
          - test case.
      sql/mysql_priv.h:
        Fix for
        bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
        triggers
        and
        #41385: Crash when attempting to repair a #mysql50# upgraded table
        with triggers.
          - check_n_cut_mysql50_prefix() introduced.
      sql/sql_table.cc:
        Fix for
        bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
        triggers
        and
        #41385: Crash when attempting to repair a #mysql50# upgraded table
        with triggers.
          - tablename_to_filename() code split into 2 parts
          - check_n_cut_mysql50_prefix() introduced to cut #mysql50# prefixes,
            used in the trigger code as well.
      sql/sql_trigger.cc:
        Fix for
        bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
        triggers
        and
        #41385: Crash when attempting to repair a #mysql50# upgraded table
        with triggers.
          - Table_triggers_list::check_n_load() - checking triggers assume
            a table/database name given may have "#mysql50#" prefix in some cases.
          - Table_triggers_list::change_table_name_in_triggers() -
            create .TRG file in new database directory and delete it in old one,
            as they may differ in case of
            "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME"
          - Table_triggers_list::change_table_name_in_trignames() - remove stale .TRN
            files in #mysql50#dbname directory in case of database upgrade
          - Table_triggers_list::change_table_name() - allow changing trigger's
            database in case of its upgrading
      sql/sql_trigger.h:
        Fix for
        bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
        triggers
        and
        #41385: Crash when attempting to repair a #mysql50# upgraded table
        with triggers.
          - new old_db_name parameter added in
            Table_triggers_list::change_table_name_in_trignames() and
            Table_triggers_list::change_table_name_in_triggers()
      53e42d9e
    • He Zhenxing's avatar
      Auto merge · 45140a8e
      He Zhenxing authored
      45140a8e
    • He Zhenxing's avatar
      BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables · f2c122bf
      He Zhenxing authored
      The next number (AUTO_INCREMENT) field of the table for write
      rows events are not initialized, and cause some engines (innodb)
      not correctly update the tables's auto_increment value.
      
      This patch fixed this problem by honor next number fields if present.
      
      mysql-test/extra/rpl_tests/rpl_auto_increment.test:
        Add test code for BUG#41986
      mysql-test/suite/rpl/r/rpl_auto_increment.result:
        update test result file for BUG#41986
      sql/log_event.cc:
        set next_number_field before writing rows, and reset next_number_field after finished writing rows
      f2c122bf
  5. 13 Jan, 2009 4 commits
    • Timothy Smith's avatar
      Fix Bug #35261: date_format test fails if new variables LIKE '%e_format' are added · 80e659a2
      Timothy Smith authored
      Use SELECT FROM INFORMATION_SCHEMA instead of SHOW VARIABLES LIKE to restrict
      values correctly.
      80e659a2
    • Timothy Smith's avatar
      Apply test case changes for Bug #41671 (innodb-semi-consistent.test) also to · 50958a34
      Timothy Smith authored
      partition_innodb_semi_consistent.test, which was overlooked in the
      innodb-5.1-ss3603 snapshot.
      50958a34
    • Davi Arnaut's avatar
      Bug#36326: nested transaction and select · 3d6cea32
      Davi Arnaut authored
      The problem is that the query cache stores packets containing
      the server status of the time when the cached statement was run.
      This might lead to a wrong transaction status in the client side
      if a statement is cached during a transaction and is later served
      outside a transaction context (and vice-versa).
      
      The solution is to take into account the transaction status when
      storing in and serving from the query cache.
      
      mysql-test/r/innodb_cache.result:
        Update test case result.
      mysql-test/r/query_cache.result:
        Add test case result for Bug#36326
      mysql-test/t/query_cache.test:
        Add test case for Bug#36326
      sql/mysql_priv.h:
        Add new flags.
      sql/sql_cache.cc:
        Remember the transaction and autocommit status stored in the packet.
      tests/mysql_client_test.c:
        Add test case for Bug#36326
      3d6cea32
    • Chad MILLER's avatar
      Merge fix for bug 38364. · 97523591
      Chad MILLER authored
      97523591