1. 19 Dec, 2008 2 commits
  2. 17 Dec, 2008 5 commits
  3. 16 Dec, 2008 4 commits
    • Mattias Jonsson's avatar
      merge · 5a05ea39
      Mattias Jonsson authored
      5a05ea39
    • Davi Arnaut's avatar
      Fix warnings and bug spotted by gcc-4.3. · 36792ff5
      Davi Arnaut authored
      Related to operator precedence and associativity.
      Make the expressions as explicit as possible.
      
      sql/field.h:
        Silence gcc-4.3 warning: be more explicit.
      sql/item.cc:
        Silence gcc-4.3 warning: be more explicit.
      sql/item_sum.cc:
        Silence gcc-4.3 warning: be more explicit.
      sql/log_event.cc:
        Silence gcc-4.3 warning: be more explicit.
      sql/spatial.h:
        Silence gcc-4.3 warning: be more explicit.
      sql/sql_lex.cc:
        Silence gcc-4.3 warning: be more explicit.
      sql/table.h:
        Silence gcc-4.3 warning: be more explicit.
      storage/federated/ha_federated.cc:
        Fix operator precedence bug.
      storage/heap/ha_heap.cc:
        Silence gcc-4.3 warning: be more explicit.
      36792ff5
    • Mattias Jonsson's avatar
      merge · 40ec2207
      Mattias Jonsson authored
      40ec2207
    • Mattias Jonsson's avatar
      post push fix for bug#40595 · dd80cfb6
      Mattias Jonsson authored
      Addition of hander function was_semi_consistent_read
      
      mysql-test/r/partition_innodb_semi_consistent.result:
        post push fix for bug#40595
        Addition of hander function was_semi_consistent_read
        
        Added test result
      mysql-test/t/partition_innodb_semi_consistent-master.opt:
        post push fix for bug#40595
        Addition of hander function was_semi_consistent_read
        
        Added test opt file
      mysql-test/t/partition_innodb_semi_consistent.test:
        post push fix for bug#40595
        Addition of hander function was_semi_consistent_read
        
        Added test case
      sql/ha_partition.cc:
        post push fix for bug#40595
        Addition of hander function was_semi_consistent_read
        
        The lack of was_semi_consistent_read opened a regression
        for bug-31310 when useing a partitioned InnoDB table
      dd80cfb6
  4. 15 Dec, 2008 5 commits
  5. 14 Dec, 2008 24 commits
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 16. Fix merge mistake which · 2e4a5242
      Timothy Smith authored
      resulted in a duplicate test case for bug 38231.
      2e4a5242
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 15. Fixes · 3d343fb1
      Timothy Smith authored
      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
      
      Detailed revision comments:
      
      r2854 | sunny | 2008-10-23 08:30:32 +0300 (Thu, 23 Oct 2008) | 13 lines
      branches/5.1: Backport changes from branches/zip r2725
      
      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.
      
      rb://16
      3d343fb1
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 14. Fixes · 425d29f1
      Timothy Smith authored
      Bug #37788: InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
      
      (Note, this bug is not only in the plugin, the overflow checks are relevant
      for MySQL's InnoDB as well.)
      
      
      Detailed revision comments:
      
      r2852 | sunny | 2008-10-23 01:42:24 +0300 (Thu, 23 Oct 2008) | 9 lines
      branches/5.1: Backport r2724 from branches/zip
      
      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.
      425d29f1
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 13. Fixes · 2326c270
      Timothy Smith authored
      Bug #40224: New AUTOINC changes mask reporting of deadlock/timeout errors
      
      
      Detailed revision comments:
      
      r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines
      branches/5.1: Return the actual error code encountered when allocating
      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
      2326c270
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 12. · 6e1f8c87
      Timothy Smith authored
      A follow-up to fix for bug #39438.  This moves some errro messages from the
      server error log to the client, to make it easier for users (especially in
      shared hosting environment) to get info about why their statement is failing.
      
      Detailed revision comments:
      
      r2832 | vasil | 2008-10-21 10:08:30 +0300 (Tue, 21 Oct 2008) | 10 lines
      branches/5.1:
      
      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
      6e1f8c87
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 11. White space changes. · 8eb9ae1c
      Timothy Smith authored
      Detailed revision comments:
      
      r2826 | vasil | 2008-10-20 14:09:01 +0300 (Mon, 20 Oct 2008) | 5 lines
      branches/5.1:
      
      Non-functional change: use a single tab instead of 12 spaces between
      variable type and variable name.
      8eb9ae1c
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 10. · 700db68f
      Timothy Smith authored
      Fix memory handling to avoid possible crash during error printout.  (Code
      review, no associated bug.)
      
      
      Detailed revision comments:
      
      r2782 | marko | 2008-10-13 14:21:02 +0300 (Mon, 13 Oct 2008) | 5 lines
      branches/5.1: Backport a fix from branches/zip r2763:
      
      row_drop_database_for_mysql(): Postpone mem_free(table_name), so that
      an error printout will not dereference freed memory.
      700db68f
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 9. Improve a comment. · c30480f9
      Timothy Smith authored
      Detailed revision comments:
      
      r2744 | marko | 2008-10-09 10:53:09 +0300 (Thu, 09 Oct 2008) | 5 lines
      branches/5.1: ha_innobase::delete_all_rows(): In response to a user asking
      <http://forums.innodb.com/read.php?4,215,215> why DELETE FROM t is not
      mapped to TRUNCATE TABLE t as it is in MyISAM, note in a comment that
      DELETE is transactional while TRUNCATE is not.
      c30480f9
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-2858, part 8. Fixes · 467d6bbe
      Timothy Smith authored
      Bug #39939: DROP TABLE/DISCARD TABLESPACE takes long time in buf_LRU_invalidate_tablespace()
      
      Detailed revision comments:
      
      r2742 | inaam | 2008-10-08 22:02:15 +0300 (Wed, 08 Oct 2008) | 11 lines
      branches/5.1:
      
      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
      467d6bbe
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-2858, part 7. · 311b2f96
      Timothy Smith authored
      A follow-up fix for Bug 38839, which exposed a pre-existing bug in the
      autoinc handling.
      
      Detailed revision comments:
      
      r2722 | sunny | 2008-10-04 02:48:04 +0300 (Sat, 04 Oct 2008) | 18 lines
      branches/5.1: This bug has always existed but was masked by other errors. The
      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
      311b2f96
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 6. · 3a1a04fa
      Timothy Smith authored
      Send error message to the client when a rollback occurs when trying to get an
      autoincrement value.  This is related to the fixes for Bug#36411 and
      Bug#35498.
      
      Detailed revision comments:
      
      r2721 | sunny | 2008-10-04 02:08:23 +0300 (Sat, 04 Oct 2008) | 6 lines
      branches/5.1: We need to send the messages to the client because
      handler::get_auto_increment() doesn't allow a way to return the
      specific error for why it failed.
      
      rb://18
      3a1a04fa
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 5. · 3f61011c
      Timothy Smith authored
      A follow-up to the previous patch, fix for Bug #39438.
      
      r2720 | vasil | 2008-10-03 19:52:39 +0300 (Fri, 03 Oct 2008) | 8 lines
      branches/5.1:
      
      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
      3f61011c
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 4. Fixes · 2e4f165f
      Timothy Smith authored
      Bug #39438: Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
      
      
      Detailed revision comments:
      
      r2719 | vasil | 2008-10-03 18:17:28 +0300 (Fri, 03 Oct 2008) | 49 lines
      branches/5.1:
      
      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.
      
      rb://20
      
      Reviewed by:	Inaam, Calvin
      Approved by:	Heikki
      2e4f165f
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 3. · 4354ff1a
      Timothy Smith authored
      branches/5.1:
      
      Silence a compilation warning in UNIV_DEBUG.
      
      Approved by:    Marko (via IM)
      4354ff1a
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 2. Fixes · 87f2f3c7
      Timothy Smith authored
      Bug#38231: Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
      
      branches/5.1:
      
      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)
      87f2f3c7
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 1. Fixes · e6574228
      Timothy Smith authored
      Bug #35498: Cannot get table test/table1 auto-inccounter value in ::info
      
      
      Detailed revison comments:
      
      r2702 | sunny | 2008-09-30 11:41:56 +0300 (Tue, 30 Sep 2008) | 13 lines
      branches/5.1: Since handler::get_auto_increment() doesn't allow us
      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.
      e6574228
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2637, part 3. Fixes · c97e8f77
      Timothy Smith authored
      Bug #39483: InnoDB hang on adaptive hash because of out of order ::open() call by MySQL
      
      
      Detailed revision comments:
      
      r2630 | inaam | 2008-09-16 19:11:26 +0300 (Tue, 16 Sep 2008) | 11 lines
      branches/5.1   bug#39483 InnoDB hang on adaptive hash because of out
      of order ::open() call by MySQL
      
      Forward port of r2629
      
      Under some conditions MySQL calls ::open with search_latch leading
      to a deadlock as we try to acquire dict_sys->mutex inside ::open
      breaking the latching order. The fix is to release search_latch.
      
      Reviewed by: Heikki
      c97e8f77
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2637, part 2. Fixes · ec4d3ba9
      Timothy Smith authored
      Bug #38839: auto increment does not work properly with InnoDB after update
      
      
      Detailed revision comments:
      
      r2609 | sunny | 2008-08-24 01:19:05 +0300 (Sun, 24 Aug 2008) | 12 lines
      branches/5.1: Fix for MySQL Bug#38839. Reset the statement level last
      value field in prebuilt. This field tracks the last value in an autoincrement
      interval. We use this value to check whether we need to update a table's
      AUTOINC counter, if the value written to a table is less than this value
      then we avoid updating the table's AUTOINC value in order to reduce
      mutex contention. If it's not reset (e.g., after a DELETE statement) then
      there is the possibility of missing updates to the table's AUTOINC counter
      resulting in a subsequent duplicate row error message under certain 
      conditions (see the test case for details).
      
      Bug #38839 - auto increment does not work properly with InnoDB after update
      ec4d3ba9
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2637, part 1. Fixes · 3efd5e42
      Timothy Smith authored
      Bug #37885: row_search_for_mysql may gap lock unnecessarily with SQL comments in query
      
      
      Detailed revision comments:
      
      r2603 | marko | 2008-08-21 16:25:05 +0300 (Thu, 21 Aug 2008) | 10 lines
      branches/5.1: Identify SELECT statements by thd_sql_command() == SQLCOM_SELECT
      instead of parsing the query string.  This fixes MySQL Bug #37885 without
      us having to implement lexical analysis of SQL comments in yet another place.
      
      thd_is_select(): A new predicate.
      
      row_search_for_mysql(): Use thd_is_select().
      
      Approved by Heikki.
      3efd5e42
    • Timothy Smith's avatar
      Complete application of InnoDB snapshot innodb-5.1-ss2545. · 74c678c3
      Timothy Smith authored
      Fix race condition which could result in freeing a struct that is
      still in use by another thread.
      
      
      Detailed revision comments:
      
      r2537 | inaam | 2008-07-15 20:46:03 +0300 (Tue, 15 Jul 2008) | 12 lines
      branches/5.1   issue# 4
      
      Fixed a timing hole where a thread dropping an index can free the
      in-memory index struct while another thread is still using
      that structure to remove entries from adaptive hash index belonging
      to one of the pages that belongs to the index being dropped.
      
      The fix is to have a reference counter in the index struct and to
      wait for this counter to drop to zero beforing freeing the struct.
      
      Reviewed by: Heikki
      
      r2543 | inaam | 2008-07-22 18:57:43 +0300 (Tue, 22 Jul 2008) | 7 lines
      branches/5.1:
      
      Removed UNIV_INLINE qualifier from btr_search_info_get_ref_count().
      Otherwise compilation failed on non-debug builds.
      
      Pointed by: Vasil
      74c678c3
    • Timothy Smith's avatar
      Complete application of InnoDB snapshot innodb-5.1-ss2485, part 2. Fixes · f46d0fae
      Timothy Smith authored
      Bug #36149: Read buffer overflow in srv0start.c found during "make test"
      
      
      Detailed revision comments:
      
      r2485 | vasil | 2008-05-28 16:01:14 +0300 (Wed, 28 May 2008) | 9 lines
      branches/5.1:
      
      Fix Bug#36149 Read buffer overflow in srv0start.c found during "make test"
      
      Use strncmp(3) instead of memcmp(3) to avoid reading past end of the string
      if it is empty (*str == '\0'). This bug is _not_ a buffer overflow.
      
      Discussed with:	Sunny (via IM)
      f46d0fae
    • Timothy Smith's avatar
      Complete application of InnoDB snapshot innodb-5.1-ss2485, part 1. Fixes · 395eae0f
      Timothy Smith authored
      Bug #36819: ut_usectime does not handle errors from gettimeofday
      
      
      Detailed revision comments:
      
      r2480 | vasil | 2008-05-27 11:40:07 +0300 (Tue, 27 May 2008) | 11 lines
      branches/5.1:
      
      Fix Bug#36819 ut_usectime does not handle errors from gettimeofday
      
      by retrying gettimeofday() several times if it fails in ut_usectime().
      If it fails on all calls then return error to the caller to be handled
      at higher level.
      
      Update the variable innodb_row_lock_time_max in SHOW STATUS output only
      if ut_usectime() was successful.
      395eae0f
    • Timothy Smith's avatar
      Complete applying InnoDB snapshot innodb-5.1-ss2479. Fixes · 4d0ad7f7
      Timothy Smith authored
      Bug #11894: innodb_file_per_table crashes w/ Windows .sym symbolic link hack
      
      
      Detailed revision comments:
      
      r2466 | calvin | 2008-05-20 01:37:14 +0300 (Tue, 20 May 2008) | 12 lines
      branches/5.1:
      
      Fix Bug#11894 innodb_file_per_table crashes w/ Windows .sym symbolic
      link hack
      
      The crash was due to un-handled error 3 (path not found). In the case
      of file per table, change the call to os_file_handle_error_no_exit()
      from os_file_handle_error(). Also, checks for full path pattern during
      table create (Windows only), which is used in symbolic link and temp
      table creation.
      
      Approved by:	Heikki
      4d0ad7f7
    • Timothy Smith's avatar
      Completing snapshot innodb-5.1-ss2438, part 3. · 5420dfa8
      Timothy Smith authored
      Changes to plug.in structure, some INNODB_CFLAGS improvements for better
      maintenance, and some comments and whitespace changes.
      
      Detailed revision comments:
      
      r2433 | vasil | 2008-04-30 12:02:35 +0300 (Wed, 30 Apr 2008) | 5 lines
      branches/5.1:
      
      Add vim modeline to hint it that plug.in is a config file
      so it can be colorized.
      r2429 | vasil | 2008-04-30 11:19:06 +0300 (Wed, 30 Apr 2008) | 10 lines
      branches/5.1:
      
      * Use INNODB_CFLAGS insead of cluttering CFLAGS with InnoDB specific
        flags. CFLAGS are used to compile every file in the MySQL source tree.
      
      * Add INNODB_DYNAMIC_CFLAGS to the flags of the dynamic plugin and use
        -prefer-non-pic to make the dynamic plugin faster on i386.
      
      Approved by:	Sunny
      
      r2430 | vasil | 2008-04-30 11:48:35 +0300 (Wed, 30 Apr 2008) | 8 lines
      branches/5.1:
      
      Use CFLAGS instead of INNODB_CFLAGS to avoid having incompatible flags
      inserted in CFLAGS and INNODB_CFLAGS and to avoid compiling mysql and
      innodb with different flags.
      
      Discussed with:	Sunny
      
      r2431 | vasil | 2008-04-30 11:54:49 +0300 (Wed, 30 Apr 2008) | 4 lines
      branches/5.1:
      
      Fix r2430, it should be CFLAGS="$CFLAGS ..." not CFLAGS="..."
      
      r2432 | vasil | 2008-04-30 11:58:38 +0300 (Wed, 30 Apr 2008) | 4 lines
      branches/5.1:
      
      Non-functional change: use tabs for indentation in plug.in.
      
      r2436 | vasil | 2008-04-30 19:15:46 +0300 (Wed, 30 Apr 2008) | 7 lines
      branches/5.1:
      
      Non-functional white space change in Makefile.am:
      Use tabs for indentation and be consistent about spaces around the
      equal sign.
      5420dfa8