1. 29 Jan, 2009 1 commit
  2. 26 Jan, 2009 1 commit
    • vasil's avatar
      branches/5.1: · de14b0d1
      vasil authored
      Merge a change from MySQL:
      
        ------------------------------------------------------------
        revno: 2646.161.4
        committer: Tatiana A. Nurnberg <azundris@mysql.com>
        branch nick: 51-31177v2
        timestamp: Mon 2009-01-12 06:32:49 +0100
        message:
          Bug#31177: Server variables can't be set to their current values
          
          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.
      de14b0d1
  3. 23 Jan, 2009 1 commit
    • marko's avatar
      branches/5.1: Merge r4031 from branches/5.0: · 89d343e2
      marko authored
      btr_search_drop_page_hash_when_freed(): Check if buf_page_get_gen()
      returns NULL.  The page may have been evicted from the buffer pool
      between buf_page_peek_if_search_hashed() and buf_page_get_gen(),
      because the buffer pool mutex will be released between these two calls.
      (Bug #42279)
      
      rb://82 approved by Heikki Tuuri
      89d343e2
  4. 20 Jan, 2009 2 commits
    • marko's avatar
      branches/5.1: lock_is_table_exclusive(): Acquire kernel_mutex before · 9d7ed6ee
      marko authored
      accessing table->locks and release kernel_mutex before returning from
      the function.  This fixes a portential race condition in the
      "commit every 10,000 rows" in ALTER TABLE, CREATE INDEX, DROP INDEX,
      and OPTIMIZE TABLE. (Bug #42152)
      
      rb://80 approved by Heikki Tuuri
      9d7ed6ee
    • marko's avatar
      branches/5.1: Merge r4003 from branches/5.0: · 877b996f
      marko authored
      rec_set_nth_field(): When the field already is SQL null,
      do nothing when it is being changed to SQL null. (Bug #41571)
      
      Normally, MySQL does not pass "do-nothing" updates to the storage engine.
      When it does and a column of an InnoDB table that is in ROW_FORMAT=COMPACT
      is being updated from NULL to NULL, the InnoDB buffer pool will be corrupted
      without this fix.
      
      rb://81 approved by Heikki Tuuri
      877b996f
  5. 14 Jan, 2009 1 commit
  6. 13 Jan, 2009 1 commit
    • sunny's avatar
      branches/5.1: Fix Bug#38187 Error 153 when creating savepoints · 5c4c09a2
      sunny authored
      InnoDB previously treated savepoints as a stack e.g.,
        SAVEPOINT a;
        SAVEPOINT b;
        SAVEPOINT c;
        SAVEPOINT b; <- This would delete b and c.
      
      This fix changes the behavior to:
        SAVEPOINT a;
        SAVEPOINT b;
        SAVEPOINT c;
        SAVEPOINT b; <- Does not delete savepoint c
      5c4c09a2
  7. 22 Dec, 2008 2 commits
    • marko's avatar
      branches/5.1: Make · 85d7d160
      marko authored
      SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
      a true replacement of SET GLOBAL INNODB_LOCKS_UNSAFE_FOR_BINLOG=1.
      This fixes an error that was introduced in r370, causing
      semi-consistent read not to not unlock rows in READ COMMITTED mode.
      (Bug #41671, Issue #146)
      
      rb://67 approved by Heikki Tuuri
      85d7d160
    • marko's avatar
      branches/5.1: ibuf_delete_rec(): When the record cannot be found and · 9a4e1560
      marko authored
      the tablespace has been dropped, commit the mini-transaction, so that
      InnoDB will not hold the insert buffer tree latch in exclusive mode,
      causing a potential deadlock.  This bug was introduced in the fix of
      Bug #27276 in r2924.
      9a4e1560
  8. 18 Dec, 2008 2 commits
    • marko's avatar
      branches/5.1: When converting a record to MySQL format, copy the default · 7399eef2
      marko authored
      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
      7399eef2
    • inaam's avatar
      branches/5.1 · 2f851885
      inaam authored
      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
      2f851885
  9. 10 Dec, 2008 1 commit
  10. 09 Dec, 2008 1 commit
    • vasil's avatar
      branches/5.1: · 6f1077a9
      vasil authored
      Merge a change from MySQL to fix the failing innodb_bug34300 mysql-test:
      
        main.innodb_bug34300           [ fail ]
        
        mysqltest: At line 11: query 'SET @@max_allowed_packet=16777216' failed: 1621: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
        
        Aborting: main.innodb_bug34300 failed in default mode. 
      
      The changeset is this:
      
        ------------------------------------------------------------
        revno: 2709.1.10
        committer: Staale Smedseng <staale.smedseng@sun.com>
        branch nick: b22891-51-bugteam
        timestamp: Thu 2008-11-20 08:51:48 +0100
        message:
          A fix for Bug#22891 "session level max_allowed_packet can be
          set but is ignored".
        
          This patch makes @@session.max_allowed_packed and
          @@session.net_buffer_length read-only as suggested in the bug
          report. The user will have to use SET GLOBAL (and reconnect)
          to alter the session values of these variables.
        
          The error string ER_VARIABLE_IS_READONLY is introduced.
        
          Tests are modified accordingly.
        modified:
          mysql-test/r/func_compress.result
          mysql-test/r/max_allowed_packet_basic.result
          mysql-test/r/max_allowed_packet_func.result
          mysql-test/r/net_buffer_length_basic.result
          mysql-test/r/packet.result
          mysql-test/r/union.result
          mysql-test/r/variables.result
          mysql-test/t/func_compress.test
          mysql-test/t/innodb_bug34300.test
          mysql-test/t/max_allowed_packet_basic.test
          mysql-test/t/max_allowed_packet_func.test
          mysql-test/t/net_buffer_length_basic.test
          mysql-test/t/packet.test
          mysql-test/t/union.test
          mysql-test/t/variables.test
          sql/set_var.cc
          sql/set_var.h
          sql/share/errmsg.txt
        ------------------------------------------------------------
      
      6f1077a9
  11. 05 Dec, 2008 1 commit
    • vasil's avatar
      branches/5.1: · 28cee22d
      vasil authored
      Add the traditional 2 spaces after the timestamp so the message does
      not look like:
      
      070223 13:26:01InnoDB: Warning: canno....
      28cee22d
  12. 04 Dec, 2008 1 commit
    • calvin's avatar
      branches/5.1: revert the changes in r2933 · f74e1bd0
      calvin authored
      The changes in r2933 causes test failure on Linux.
      More investigation is needed for Windows.
      
      Change the followings in innodb-autoinc.result:
        auto-increment-increment
        auto-increment-offset
      
      back to:
        auto_increment_increment
        auto_increment_offset
      f74e1bd0
  13. 24 Nov, 2008 1 commit
    • inaam's avatar
      branches/5.1: · ac4d073d
      inaam authored
      Fix Bug#40760 "set global innodb_thread_concurrency = 0;" is not safe
      
      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
      
      ac4d073d
  14. 14 Nov, 2008 1 commit
  15. 07 Nov, 2008 1 commit
  16. 30 Oct, 2008 1 commit
  17. 29 Oct, 2008 2 commits
    • marko's avatar
      branches/5.1: dtype_get_sql_null_size(): return the correct storage · b56fdd89
      marko authored
      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.
      b56fdd89
    • marko's avatar
      branches/5.1: Merge revision 2866 from branches/zip: · b0c21b2e
      marko authored
      ibuf_delete_rec(): When the cursor to the insert buffer record cannot be
      restored, do not complain if the tablespace does not exist. (Bug #27276)
      
      Approved by Sunny Bains (rb://34)
      b0c21b2e
  18. 28 Oct, 2008 1 commit
    • vasil's avatar
      branches/5.1: · 18161a98
      vasil authored
      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)
      18161a98
  19. 27 Oct, 2008 1 commit
  20. 23 Oct, 2008 1 commit
    • sunny's avatar
      branches/5.1: Backport changes from branches/zip r2725 · 190953d4
      sunny authored
      Simplify the autoinc initialization code. This removes the
      non-determinism related to reading the table's autoinc value for the first
      time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
      bytes because we don't need the dict_table_t::autoinc_inited field anymore.
      
      Bug#39830 Table autoinc value not updated on first insert.
      Bug#35498 Cannot get table test/table1 auto-inccounter value in ::info
      Bug#36411 Failed to read auto-increment value from storage engine" in 5.1.24 auto-inc
      rb://16
      
      190953d4
  21. 22 Oct, 2008 2 commits
    • sunny's avatar
      branches/5.1: Backport r2724 from branches/zip · 1f9f5bfa
      sunny authored
      Check column value against the col max value before updating the table's
      global autoinc counter value. This is part of simplifying the AUTOINC
      sub-system. We extract the type info from MySQL data structures at runtime.
      
      This fixes Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
      
      1f9f5bfa
    • sunny's avatar
      branches/5.1: Return the actual error code encountered when allocating · 165ca17f
      sunny authored
      a new autoinc value. The change in behavior (bug) was introduced in 5.1.22
      when we introduced the new AUTOINC locking model.
      
      rb://31
      
      Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout errors
      165ca17f
  22. 21 Oct, 2008 2 commits
    • vasil's avatar
      branches/5.1: · 67a913e9
      vasil authored
      Merge a change from MySQL (this fixes the failing innodb and
      innodb-semi-consistent tests):
      
        revno: 2757
        committer: Georgi Kodinov <kgeorge@mysql.com>
        branch nick: B39812-5.1-5.1.29-rc
        timestamp: Fri 2008-10-03 15:24:19 +0300
        message:
          Bug #39812: Make statement replication default for 5.1 (to match 5.0)
          
          Make STMT replication default for 5.1.
          Add a default of MIXED into the config files
          Fix the tests that needed MIXED replication mode.
        modified:
          mysql-test/include/mix1.inc
          mysql-test/r/innodb-semi-consistent.result
          mysql-test/r/innodb.result
          mysql-test/r/innodb_mysql.result
          mysql-test/r/tx_isolation_func.result
          mysql-test/t/innodb-semi-consistent.test
          mysql-test/t/innodb.test
          mysql-test/t/tx_isolation_func.test
          sql/mysqld.cc
          support-files/my-huge.cnf.sh
          support-files/my-innodb-heavy-4G.cnf.sh
          support-files/my-large.cnf.sh
          support-files/my-medium.cnf.sh
          support-files/my-small.cnf.sh
      
      67a913e9
    • vasil's avatar
      branches/5.1: · 097eadc6
      vasil authored
      In ha_innobase::info():
      
      Replace sql_print_warning() which prints to mysqld error log with
      push_warning_printf() which sends the error message to the client.
      
      Suggested by:	Marko, Sunny, Michael
      Objected by:	Inaam
      097eadc6
  23. 20 Oct, 2008 1 commit
    • vasil's avatar
      branches/5.1: · 2c754dd6
      vasil authored
      Non-functional change: use a single tab instead of 12 spaces between
      variable type and variable name.
      2c754dd6
  24. 13 Oct, 2008 1 commit
  25. 09 Oct, 2008 1 commit
  26. 08 Oct, 2008 1 commit
    • inaam's avatar
      branches/5.1: · bc0cfbd3
      inaam authored
      Fix Bug#39939 DROP TABLE/DISCARD TABLESPACE takes long time in
      buf_LRU_invalidate_tablespace()
      
      Improve implementation of buf_LRU_invalidate_tablespace by attempting
      hash index drop in batches instead of doing it one by one.
      
      Reviewed by: Heikki, Sunny, Marko
      Approved by: Heikki
      bc0cfbd3
  27. 03 Oct, 2008 4 commits
    • sunny's avatar
      branches/5.1: This bug has always existed but was masked by other errors. The · 37a0550e
      sunny authored
      fix for bug# 38839 triggered this bug. When the offset and increment are > 1
      we need to calculate the next value taking into consideration the two
      variables. Previously we simply assumed they were 1 particularly offset was
      never used. MySQL does its own calculation and that's probably why it seemed
      to work in the past. We would return what we thought was the correct next
      value and then MySQL would recalculate the actual value from that and return
      it to the caller (e.g., handler::write_row()). Several new tests have been
      added that try and catch some edge cases. The tests exposed a wrap around
      error in MySQL next value calculation which was filed as bug#39828. The tests
      will need to be updated once MySQL fix that bug.
      
      One good side effect of this fix is that dict_table_t size has been
      reduced by 8 bytes because we have moved the autoinc_increment field to
      the row_prebuilt_t structure. See review-board for a detailed discussion.
      
      rb://3
      37a0550e
    • sunny's avatar
      branches/5.1: We need to send the messages to the client because · bce80207
      sunny authored
      handler::get_auto_increment() doesn't allow a way to return the
      specific error for why it failed.
      
      rb://18
      bce80207
    • vasil's avatar
      branches/5.1: · f3d2c882
      vasil authored
      Print a warning if an attempt is made to get the free space for a table
      whose .ibd file is missing or the tablespace has been discarded. This is a
      followup to r2719.
      
      Suggested by:	Inaam
      f3d2c882
    • vasil's avatar
      branches/5.1: · 5cb733a3
      vasil authored
      Fix Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
      
      In ha_innobase::info() - do not try to get the free space for a tablespace
      which has been discarded with ALTER TABLE ... DISCARD TABLESPACE or if the
      .ibd file is missing for some other reason.
      
      ibd_file_missing and tablespace_discarded are manipulated only in
      row_discard_tablespace_for_mysql() and in row_import_tablespace_for_mysql()
      and the manipulation is protected/surrounded by
      row_mysql_lock_data_dictionary()/row_mysql_unlock_data_dictionary() thus we
      do the same in ha_innobase::info() when checking the values of those members
      to avoid race conditions. I have tested the code-path with UNIV_DEBUG and
      UNIV_SYNC_DEBUG.
      
      Looks like it is not possible to avoid mysqld printing warnings in the
      mysql-test case and thus this test innodb_bug39438 must be added to the
      list of exceptional test cases that are allowed to print warnings. For this,
      the following patch must be applied to the mysql source tree:
      
        --- cut ---
        === modified file 'mysql-test/lib/mtr_report.pl'
        --- mysql-test/lib/mtr_report.pl	2008-08-12 10:26:23 +0000
        +++ mysql-test/lib/mtr_report.pl	2008-10-01 11:57:41 +0000
        @@ -412,7 +412,10 @@
         
                         # When trying to set lower_case_table_names = 2
                         # on a case sensitive file system. Bug#37402.
        -                /lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive.  Now setting lower_case_table_names to 0 to avoid future problems./
        +                /lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive.  Now setting lower_case_table_names to 0 to avoid future problems./ or
        +
        +                # this test is expected to print warnings
        +                ($testname eq 'main.innodb_bug39438')
         		)
                     {
                       next;                       # Skip these lines
        
        --- cut ---
      
      The mysql-test is currently somewhat disabled (see inside
      innodb_bug39438.test), after the above patch has been applied to the mysql
      source tree, the test can be enabled.
      
      rb://20
      
      Reviewed by:	Inaam, Calvin
      Approved by:	Heikki
      5cb733a3
  28. 01 Oct, 2008 2 commits
    • vasil's avatar
      branches/5.1: · 74d4ad96
      vasil authored
      Silence a compilation warning in UNIV_DEBUG.
      
      Approved by:	Marko (via IM)
      74d4ad96
    • vasil's avatar
      branches/5.1: · 935cb537
      vasil authored
      Fix Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
      
      In TRUNCATE TABLE and discard tablespace: do not remove table-level S
      and X locks and do not assert on such locks not being wait locks.
      Leave such locks alone.
      
      Approved by:	Heikki (rb://14)
      935cb537
  29. 30 Sep, 2008 1 commit
    • sunny's avatar
      branches/5.1: Since handler::get_auto_increment() doesn't allow us · a1631518
      sunny authored
      to return the cause of failure we have to inform MySQL using the
      sql_print_warning() function to return the cause for autoinc failure.
      Previously we simply printed the error code, this patch prints the
      text string representing the following two error codes:
      
      DB_LOCK_WAIT_TIMEOUT
      DB_DEADLOCK.
      
      Bug#35498 Cannot get table test/table1 auto-inccounter value in ::info
      
      Approved by Marko.
      a1631518
  30. 18 Sep, 2008 1 commit
    • vasil's avatar
      export.sh: · a811adc8
      vasil authored
      Instead of doing "svn log" for every revision between $START_REV and $END_REV,
      lookup the revisions which actually contain changes to this branch and do
      "svn log" and "svn diff" only for them.
      
      This makes the script many times faster.
      
      I have checked that both old and new variant create identical snapshots.
      a811adc8