1. 14 Jan, 2009 4 commits
    • 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
  2. 13 Jan, 2009 9 commits
  3. 12 Jan, 2009 12 commits
    • Patrick Crews's avatar
      Bug#41888: Test binlog.binlog_database causing binlog_innodb to fail on Pushbuild. · fed5e977
      Patrick Crews authored
      Added cleanup of status variables to the end of binlog_database.
      Re-recorded .result file to account for cleanup statement.
      NOTE:  binlog.binlog_innodb also has had an FLUSH STATUS; statement added to it as well, but
      adding this cleanup as a preventative measure.
      fed5e977
    • Timothy Smith's avatar
      Applying InnoDB snapshot innodb-5.1-ss3603 · 13927f53
      Timothy Smith authored
      Detailed description of changes:
      r3590 | marko | 2008-12-18 15:33:36 +0200 (Thu, 18 Dec 2008) | 11 lines
      branches/5.1: When converting a record to MySQL format, copy the default
      column values for columns that are SQL NULL.  This addresses failures in
      row-based replication (Bug #39648).
      
      row_prebuilt_t: Add default_rec, for the default values of the columns in
      MySQL format.
      
      row_sel_store_mysql_rec(): Use prebuilt->default_rec instead of
      padding columns.
      
      rb://64 approved by Heikki Tuuri
      13927f53
    • Timothy Smith's avatar
      Applying InnoDB snapshot innodb-5.1-ss3603 · 8759d927
      Timothy Smith authored
      Detailed description of changes:
      r3588 | inaam | 2008-12-18 14:26:54 +0200 (Thu, 18 Dec 2008) | 8 lines
      branches/5.1
      
      It is a bug in unused code. If we don't calculate the hash value when
      calculating the mutex number then two pages which map to same hash
      value can get two different mutex numbers.
      
      Approved by: Marko
      8759d927
    • Timothy Smith's avatar
      Applying InnoDB snapshot innodb-5.1-ss3603 · 14c7d56b
      Timothy Smith authored
      Detailed description of changes:
      r3412 | vasil | 2008-12-05 10:46:18 +0200 (Fri, 05 Dec 2008) | 7 lines
      branches/5.1:
      
      Add the traditional 2 spaces after the timestamp so the message does
      not look like:
      
      070223 13:26:01InnoDB: Warning: canno....
      14c7d56b
    • Timothy Smith's avatar
      Applying InnoDB snapshot innodb-5.1-ss3603 · fc3b2bfc
      Timothy Smith authored
      Detailed description of changes:
      r3257 | inaam | 2008-11-24 22:06:50 +0200 (Mon, 24 Nov 2008) | 13 lines
      branches/5.1 bug#40760
      
      The config param innodb_thread_concurrency is dynamically set and is
      read when a thread enters/exits innodb. If the value is changed between
      the enter and exit time the behaviour becomes erratic.
      The fix is not to use srv_thread_concurrency when exiting, instead use
      the flag trx->declared_to_be_inside_innodb.
      
      rb://57
      
      Approved by: Marko
      fc3b2bfc
    • Timothy Smith's avatar
      Applying InnoDB snapshot innodb-5.1-ss3603 · 9eddf576
      Timothy Smith authored
      Detailed description of changes:
      
      r2981 | marko | 2008-11-07 14:54:10 +0200 (Fri, 07 Nov 2008) | 6 lines
      branches/5.1: row_mysql_store_col_in_innobase_format(): Correct a misleading
      comment. In the UTF-8 encoding, ASCII takes 1 byte per character, while
      the "latin1" character set (normally ISO-8859-1, but in MySQL it actually
      refers to the Windows Code Page 1252 a.k.a. CP1252, WinLatin1)
      takes 1 to 3 bytes (1 to 2 bytes for the ISO-8859-1 subset).
      
      r3114 | calvin | 2008-11-14 20:31:48 +0200 (Fri, 14 Nov 2008) | 8 lines
      branches/5.1: fix bug#40386: Not flushing query cache after truncate
      
      ha_statistics.records can not be 0 unless the table is empty, set to
      1 instead. The original problem of bug 29507 is fixed in the server.
      
      Additional test was done with the fix of bug 29507 in the server.
      
      Approved by: Heikki (on IM)
      9eddf576
    • Timothy Smith's avatar
      Applying InnoDB snapshot innodb-5.1-ss3603 · 897d00ce
      Timothy Smith authored
      Detailed description of changes:
      r2929 | marko | 2008-10-29 21:26:14 +0200 (Wed, 29 Oct 2008) | 13 lines
      branches/5.1: dtype_get_sql_null_size(): return the correct storage
      size of a SQL NULL column. (Bug #40369)
      
      When MySQL Bug #20877 was fixed in r834, this function was
      accidentally modified to return 0 or 1. Apparently, the only impact of
      this bug is that fixed-length columns cannot be updated in-place from
      or to SQL NULL, even in ROW_FORMAT=REDUNDANT.  After this fix,
      fixed-length columns in ROW_FORMAT=REDUNDANT will have a constant
      storage size as they should, no matter if NULL or non-NULL.  The bug
      caused fixed-length NULL columns to occupy 1 byte.
      
      rb://37 approved by Heikki over IM.
      897d00ce
    • Timothy Smith's avatar
      Applying InnoDB snapshot innodb-5.1-ss3603 · 293e9c49
      Timothy Smith authored
      Detailed description of changes:
      r2902 | vasil | 2008-10-28 12:10:25 +0200 (Tue, 28 Oct 2008) | 10 lines
      branches/5.1:
      
      Fix Bug#38189 innodb_stats_on_metadata missing
      
      Make the variable innodb_stats_on_metadata visible to the users and
      also settable at runtime. Previously it was only "visible" as a command
      line startup option to mysqld.
      
      Approved by:	Marko (https://svn.innodb.com/rb/r/36)
      293e9c49
    • Georgi Kodinov's avatar
      Fixed a warning in sql_profile.cc · b91bbba2
      Georgi Kodinov authored
      b91bbba2
    • Georgi Kodinov's avatar
      merged 41453 to 5.1-bugteam · e0df7f1c
      Georgi Kodinov authored
      e0df7f1c
    • Davi Arnaut's avatar
      Post-merge fix for bug 37016: Update test case for row-based logging. · d1323f43
      Davi Arnaut authored
      mysql-test/r/commit_1innodb.result:
        Increase commit count for row-based logging.
      d1323f43
    • Tatiana A. Nurnberg's avatar
      Bug#31177: Server variables can't be set to their current values · 95e0d3bd
      Tatiana A. Nurnberg authored
      Bounds-checks and blocksize corrections were applied to user-input,
      but constants in the server were trusted implicitly. If these values
      did not actually meet the requirements, the user could not set change
      a variable, then set it back to the (wonky) factory default or maximum
      by explicitly specifying it (SET <var>=<value> vs SET <var>=DEFAULT).
      
      Now checks also apply to the server's presets. Wonky values and maxima
      get corrected at startup. Consequently all non-offsetted values the user
      sees are valid, and users can set the variable to that exact value if
      they so desire.
      
      mysql-test/r/read_buffer_size_basic.result:
        test sets out of bounds value; we now throw a warning for this.
        This is a side-effect: before, the maximum was higher than the
        value we set here. The value was corrected to block-size, the
        maximum was not, hence the value was smaller than the maximum
        in this particular case. Now that we align the maxima at startup,
        the value in SET is larger than the (corrected) maximum, and we
        see a warning in this particular case. "This means we're doing it right."
      mysql-test/r/read_rnd_buffer_size_basic.result:
        test sets out of bounds value; we now throw a warning for this.
        This is a side-effect: before, the maximum was higher than the
        value we set here. The value was corrected to block-size, the
        maximum was not, hence the value was smaller than the maximum
        in this particular case. Now that we align the maxima at startup,
        the value in SET is larger than the (corrected) maximum, and we
        see a warning in this particular case. "This means we're doing it right."
      mysys/my_getopt.c:
        Do bounds-checking at start-up time so we'll catch and correct
        wonky default values and upper limits.
      sql/mysqld.cc:
        If 0 is a legal value per the docs, not to mention the default, we shouldn't give 1 as
        the lower limit.
      storage/innobase/handler/ha_innodb.cc:
        We are setting upper bounds here.
        ~0L gives -1. That is NOT what we want!
      95e0d3bd
  4. 09 Jan, 2009 15 commits