An error occurred fetching the project authors.
  1. 14 Dec, 2008 13 commits
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 12. · 3d2d2d0c
      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
      3d2d2d0c
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 11. White space changes. · 3692ae36
      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.
      3692ae36
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 9. Improve a comment. · 9f8f9715
      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.
      9f8f9715
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-2858, part 7. · 22f6a842
      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
      22f6a842
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 6. · e3669212
      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
      e3669212
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 5. · c50d6085
      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
      c50d6085
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 4. Fixes · 19fed02c
      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
      19fed02c
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2858, part 1. Fixes · fae4abd7
      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.
      fae4abd7
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2637, part 3. Fixes · bb9ee6b6
      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
      bb9ee6b6
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2637, part 2. Fixes · ea912a97
      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
      ea912a97
    • Timothy Smith's avatar
      Apply InnoDB snapshot innodb-5.1-ss2637, part 1. Fixes · 2450190e
      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.
      2450190e
    • Timothy Smith's avatar
      Complete applying InnoDB snapshot innodb-5.1-ss2479. Fixes · 1945f661
      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
      1945f661
    • Timothy Smith's avatar
      Completing snapshot innodb-5.1-ss2438, part 1. Fixes · 040f3e9e
      Timothy Smith authored
      Bug #35537: Innodb doesn't increment handler_update and handler_delete
      
      
      Detailed revision comments:
      
      r2388 | vasil | 2008-03-27 14:02:34 +0200 (Thu, 27 Mar 2008) | 7 lines
      branches/5.1:
      
      Swap the order in which mysql_thd, mysql_query_str and *mysql_query_str
      are checked for non-NULL.
      
      Suggested by:	Marko
      
      r2421 | calvin | 2008-04-24 15:32:30 +0300 (Thu, 24 Apr 2008) | 6 lines
      branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
      and handler_delete
      
      Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
      and ha_innobase::update_row().
      040f3e9e
  2. 20 Aug, 2008 4 commits
  3. 14 May, 2008 1 commit
    • unknown's avatar
      revert the following CS on grounds of "right patch, wrong time": · 2c91699e
      unknown authored
        
       "Apply InnoDB snapshot innodb-5.1-ss2438.
      
        Addresses the following bugs:
      
        Change the fix for Bug#32440 to show bytes instead of kilobytes in
        INFORMATION_SCHEMA.TABLES.DATA_FREE.
      
        branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
        In InnoDB, the row count is only a rough estimate used by SQL
        optimization. InnoDB is now return row count 0 for TRUNCATE operation.
      
        branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
        and handler_delete
        Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
        and ha_innobase::update_row().
      
        Fix Bug#36169 create innodb compressed table with too large row size crash
        Sometimes it is possible that
        row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
        row_create_index_for_mysql() when the index object is freed so copy the
        table name to a safe place beforehand and use the copy.
      
        Fix Bug#36434 ha_innodb.so is installed in the wrong directory
        Change pkglib_LTLIBRARIES with pkgplugin_LTLIBRARIES which has been
        forgotten in this commit: http://lists.mysql.com/commits/40206"
      
      
      mysql-test/r/innodb.result:
        revert InnoDB snapshot innodb-5.1-ss2438
      mysql-test/r/mix2_myisam.result:
        merge-fixes: undoing previous unspecified post-merge fixes
        by kaa a/o 2008/2/13 (1.7)
      mysql-test/t/innodb.test:
        revert InnoDB snapshot innodb-5.1-ss2438
      storage/innobase/Makefile.am:
        revert InnoDB snapshot innodb-5.1-ss2438
      storage/innobase/handler/ha_innodb.cc:
        revert InnoDB snapshot innodb-5.1-ss2438
      storage/innobase/plug.in:
        revert InnoDB snapshot innodb-5.1-ss2438
      storage/innobase/row/row0mysql.c:
        revert InnoDB snapshot innodb-5.1-ss2438
      storage/innobase/row/row0sel.c:
        revert InnoDB snapshot innodb-5.1-ss2438
      2c91699e
  4. 10 May, 2008 1 commit
    • unknown's avatar
      Apply InnoDB snapshot innodb-5.1-ss2438. · 7febbe45
      unknown authored
      Addresses the following bugs:
      
        Change the fix for Bug#32440 to show bytes instead of kilobytes in
        INFORMATION_SCHEMA.TABLES.DATA_FREE.
      
        branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
        In InnoDB, the row count is only a rough estimate used by SQL
        optimization. InnoDB is now return row count 0 for TRUNCATE operation.
      
        branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
        and handler_delete
        Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
        and ha_innobase::update_row().
      
        Fix Bug#36169 create innodb compressed table with too large row size crashed
        Sometimes it is possible that
        row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
        row_create_index_for_mysql() when the index object is freed so copy the
        table name to a safe place beforehand and use the copy.
      
        Fix Bug#36434 ha_innodb.so is installed in the wrong directory
        Change pkglib_LTLIBRARIES with pkgplugin_LTLIBRARIES which has been
        forgotten in this commit: http://lists.mysql.com/commits/40206
      
      
      mysql-test/r/innodb.result:
        Apply InnoDB snapshot innodb-5.1-ss2438.
        
        Revision r2420:
        branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
        
        In InnoDB, the row count is only a rough estimate used by SQL
        optimization. InnoDB is now return row count 0 for TRUNCATE operation.
        
        Revision r2421:
        branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
        and handler_delete
        
        Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
        and ha_innobase::update_row().
      mysql-test/t/innodb.test:
        Apply InnoDB snapshot innodb-5.1-ss2438.
        
        Revision r2420:
        branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
        
        In InnoDB, the row count is only a rough estimate used by SQL
        optimization. InnoDB is now return row count 0 for TRUNCATE operation.
        
        Revision r2421:
        branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
        and handler_delete
        
        Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
        and ha_innobase::update_row().
      storage/innobase/Makefile.am:
        Apply InnoDB snapshot innodb-5.1-ss2438.
        
        Revision r2429:
        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
        
        
        Revision r2437:
        branches/5.1:
        
        Fix Bug#36434 ha_innodb.so is installed in the wrong directory
        
        Change pkglib_LTLIBRARIES with pkgplugin_LTLIBRARIES which has been
        forgotten in this commit: http://lists.mysql.com/commits/40206
        
        
        
        Revision r2430:
        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
        
        
        Revision r2434:
        branches/5.1:
        
        Merge changes from MySQL:
        
          ChangeSet@1.2645, 2007-12-19 13:24:43+00:00, jperkin@chorlton.adsl.perkin.org.uk +14 -0
            Add new pkgplugindir handling to seperate plugins from libraries,
            and allow override for binary distributions.  Extend mysql_config
            to print compiled-in plugin location for third-party plugins to
            use.  Resolves bug#31736.
        
        and
        
          ChangeSet@1.2646, 2008-01-02 13:00:46+00:00, jperkin@chorlton.adsl.perkin.org.uk +11 -0
            Use pkglibdir to simplify pkgplugindir, and fix the path in a
            couple of Makefiles.  Continuation of the fix for bug#31736.
        
        
        
        Revision r2436:
        branches/5.1:
        
        Non-functional white space change in Makefile.am:
        Use tabs for indentation and be consistent about spaces around the
        equal sign.
      storage/innobase/handler/ha_innodb.cc:
        Apply InnoDB snapshot innodb-5.1-ss2438.
        
        Revision r2419:
        branches/5.1:
        
        Change the fix for Bug#32440 to show bytes instead of kilobytes in
        INFORMATION_SCHEMA.TABLES.DATA_FREE.
        
        Suggested by:	Domas Mituzas <domas@mysql.com>
        Approved by:	Heikki
        
        
        
        Revision r2435:
        branches/5.1:
        
        Merge change from MySQL:
        
          ChangeSet@1.2563, 2008-03-18 19:42:04+04:00, gluh@mysql.com +1 -0
            Bug#35406 5.1-opt crashes on select from I_S.REFERENTIAL_CONSTRAINTS
            added intialization of f_key_info.referenced_key_name for the case when
            referenced table is dropped
        
        
        
        Revision r2420:
        branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
        
        In InnoDB, the row count is only a rough estimate used by SQL
        optimization. InnoDB is now return row count 0 for TRUNCATE operation.
        
        Revision r2421:
        branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
        and handler_delete
        
        Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
        and ha_innobase::update_row().
      storage/innobase/plug.in:
        Apply InnoDB snapshot innodb-5.1-ss2438.
        
        Revision r2429:
        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
        
        
        Revision r2432:
        branches/5.1:
        
        Non-functional change: use tabs for indentation in plug.in.
        
        
        Revision r2431:
        branches/5.1:
        
        Fix r2430, it should be CFLAGS="$CFLAGS ..." not CFLAGS="..."
        
        
        Revision r2430:
        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
        
        
        Revision r2433:
        branches/5.1:
        
        Add vim modeline to hint it that plug.in is a config file
        so it can be colorized.
      storage/innobase/row/row0mysql.c:
        Apply InnoDB snapshot innodb-5.1-ss2438.
        
        Revision r2422:
        branches/5.1:
        
        Fix Bug#36169 create innodb compressed table with too large row size crashed
        
        Sometimes it is possible that
        row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
        row_create_index_for_mysql() when the index object is freed so copy the
        table name to a safe place beforehand and use the copy.
        
        Approved by:	Sunny
      storage/innobase/row/row0sel.c:
        Apply InnoDB snapshot innodb-5.1-ss2438.
        
        Revision r2388:
        branches/5.1:
        
        Swap the order in which mysql_thd, mysql_query_str and *mysql_query_str
        are checked for non-NULL.
        
        Suggested by:	Marko
      7febbe45
  5. 27 Mar, 2008 2 commits
    • unknown's avatar
      apply snapshot innodb-5.1-ss2387 · 1f21098a
      unknown authored
      ```---------------------------------------------------------------------
      r2361 | sunny | 2008-03-12 09:08:09 +0200 (Wed, 12 Mar 2008) | 3 lines
      Changed paths:
         M /branches/5.1/include/srv0srv.h
         M /branches/5.1/os/os0file.c
         M /branches/5.1/srv/srv0srv.c
         M /branches/5.1/srv/srv0start.c
      
      branches/5.1: Remove the innodb_flush_method fdatasync option since it was
      not being used and there was a potential it could mislead users.
      ```
      
      ---------------------------------------------------------------------
      r2367 | marko | 2008-03-17 10:23:03 +0200 (Mon, 17 Mar 2008) | 5 lines
      Changed paths:
         M /branches/5.1/handler/ha_innodb.cc
      
      branches/5.1: ha_innobase::check_if_incompatible_data(): Check
      HA_CREATE_USED_ROW_FORMAT before comparing row_type.  Previously,
      the comparison was incorrectly guarded by the presence of an
      AUTO_INCREMENT attribute.
      
      ------------------------------------------------------------------------
      r2374 | vasil | 2008-03-18 09:35:30 +0200 (Tue, 18 Mar 2008) | 11 lines
      Changed paths:
         M /branches/5.1/dict/dict0dict.c
         A /branches/5.1/mysql-test/innodb_bug35220.result
         A /branches/5.1/mysql-test/innodb_bug35220.test
      
      branches/5.1:
      
      Fix Bug#35220 ALTER TABLE too picky on reserved word "foreign".
      
      In ALTER TABLE, change the internal parser to search for
      ``FOREIGN[[:space:]]'' instead of only ``FOREIGN'' when parsing
      ALTER TABLE ... DROP FOREIGN KEY ...; otherwise it could be mistaken
      with ALTER TABLE ... DROP foreign_col;
      
      Approved by:    Heikki
      
      ------------------------------------------------------------------------
      r2379 | vasil | 2008-03-19 18:48:00 +0200 (Wed, 19 Mar 2008) | 10 lines
      Changed paths:
         M /branches/5.1/os/os0file.c
      
      branches/5.1:
      
      Fix Bug#34823:
      fsync() occasionally returns ENOLCK and causes InnoDB to restart mysqld
      
      Create a wrapper to fsync(2) that retries the operation if the error is
      ENOLCK. Use that wrapper instead of fsync(2).
      
      Approved by:    Heikki
      
      ------------------------------------------------------------------------
      r2380 | sunny | 2008-03-21 05:03:56 +0200 (Fri, 21 Mar 2008) | 9 lines
      Changed paths:
         M /branches/5.1/include/trx0undo.h
         M /branches/5.1/trx/trx0trx.c
         M /branches/5.1/trx/trx0undo.c
      
      branches/5.1: Fix for Bug# 35352. We've added a heuristic that checks
      the size of the UNDO slots cache lists (insert and upate). If either of
      cached lists has more than 500 entries then we add any UNDO slots that are
      freed, to the common free list instead of the cache list, this is to avoid
      the case where all the free slots end up in only one of the lists on startup
      after a crash.
      
      Tested with test case for 26590 and passes all mysql-test(s).
      
      ------------------------------------------------------------------------
      r2383 | vasil | 2008-03-26 09:35:22 +0200 (Wed, 26 Mar 2008) | 4 lines
      Changed paths:
         M /branches/5.1/include/row0mysql.h
      
      branches/5.1:
      
      Fix typo in comment.
      
      ------------------------------------------------------------------------
      r2384 | vasil | 2008-03-26 18:26:54 +0200 (Wed, 26 Mar 2008) | 20 lines
      Changed paths:
         A /branches/5.1/mysql-test/innodb_bug34300.result
         A /branches/5.1/mysql-test/innodb_bug34300.test
         M /branches/5.1/row/row0sel.c
      
      branches/5.1:
      
      Fix Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
      
      Copy the BLOB fields, that are stored internally, to a safe place
      (prebuilt->blob_heap) when converting a row from InnoDB format to
      MySQL format in row_sel_store_mysql_rec().
      
      The bug was introduced in:
      
       ------------------------------------------------------------------------
       r587 | osku | 2006-05-23 15:35:58 +0300 (Tue, 23 May 2006) | 3 lines
      
       Optimize BLOB selects by using prebuilt->blob_heap directly instead of first
       reading BLOB data to a temporary heap and then copying it to
       prebuilt->blob_heap.
       ------------------------------------------------------------------------
      
      Approved by:    Heikki
      
      ------------------------------------------------------------------------
      r2386 | vasil | 2008-03-27 07:45:02 +0200 (Thu, 27 Mar 2008) | 22 lines
      Changed paths:
         M /branches/5.1/mysql-test/innodb.result
      
      branches/5.1:
      
      Merge change from MySQL (this fixes the failing innodb test):
      
      ChangeSet@1.1810.3601.4, 2008-02-07 02:33:21+04:00, gshchepa@host.loc +9 -0
        Fixed bug#30059.
        Server handles truncation for assignment of too-long values
        into CHAR/VARCHAR/TEXT columns in a different ways when the
        truncated characters are spaces:
        1. CHAR(N) columns silently ignore end-space truncation;
        2. TEXT columns post a truncation warning/error in the
           non-strict/strict mode.
        3. VARCHAR columns always post a truncation note in
           any mode.
      
        Space truncation processing has been synchronised over
        CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
        columns has been propagated as standard.
      
        Binary-encoded string/BLOB columns are not affected.
      
      
      ------------------------------------------------------------------------
      r2387 | vasil | 2008-03-27 08:49:05 +0200 (Thu, 27 Mar 2008) | 8 lines
      Changed paths:
         M /branches/5.1/row/row0sel.c
      
      branches/5.1:
      
      Check whether *trx->mysql_query_str is != NULL in addition to
      trx->mysql_query_str. This adds more safety.
      
      This may or may not fix Bug#35226 RBR event crashes slave.
      
      
      ------------------------------------------------------------------------
      
      
      storage/innobase/dict/dict0dict.c:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/handler/ha_innodb.cc:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/include/row0mysql.h:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/include/srv0srv.h:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/include/trx0undo.h:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/os/os0file.c:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/row/row0sel.c:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/srv/srv0srv.c:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/srv/srv0start.c:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/trx/trx0trx.c:
        apply snapshot innodb-5.1-ss2387
      storage/innobase/trx/trx0undo.c:
        apply snapshot innodb-5.1-ss2387
      1f21098a
    • unknown's avatar
      Apply innodb-5.1-ss2360 snapshot · 9aaab69a
      unknown authored
      Fixes:
      - Bug #34920: auto_increment resets to 1 on foreign key creation
        We need to use/inherit the passed in autoinc counter for ALTER TABLE
        statements too.
      
      
      mysql-test/r/innodb.result:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2345:
        branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc
        counter for ALTER TABLE statements too.
      mysql-test/t/innodb.test:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2345:
        branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc
        counter for ALTER TABLE statements too.
      storage/innobase/dict/dict0dict.c:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
      storage/innobase/handler/ha_innodb.cc:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
        
        
        Revision r2345:
        branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc
        counter for ALTER TABLE statements too.
      storage/innobase/handler/ha_innodb.h:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
      storage/innobase/include/dict0dict.h:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
      storage/innobase/include/dict0mem.h:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
      storage/innobase/include/row0sel.h:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
      storage/innobase/include/univ.i:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
      storage/innobase/row/row0sel.c:
        Apply innodb-5.1-ss2360 snapshot
        
        Revision r2353:
        branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
        new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
        the assertion where it crashed previously, since the type has now changed
        to unsigned, it doesn't make sense to check for < 0. Added new tests, to
        check for overflow, for the different INT types supported for both
        signed and unsigned.
      9aaab69a
  6. 18 Mar, 2008 1 commit
  7. 19 Feb, 2008 1 commit
    • unknown's avatar
      Applied InnoDB snapshot innodb-5.1-ss2298 · 4b25d5b1
      unknown authored
      Fixes the following bugs:
      
      - Bug #33349: possible race condition revolving around data dictionary and repartitioning
        Introduce retry/sleep logic as a workaround for a transient bug
        where ::open fails for partitioned tables randomly if we are using
        one file per table.
      
      - Bug #34053: normal users can enable innodb_monitor logging
        In CREATE TABLE and DROP TABLE check whether the table in question is one
        of the magic innodb_monitor tables and whether the user has enough rights
        to mess with it before doing anything else.
      
      - Bug #22868: 'Thread thrashing' with > 50 concurrent conns under an upd-intensive workloadw
      - Bug #29560: InnoDB >= 5.0.30 hangs on adaptive hash rw-lock 'waiting for an X-lock'
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
      
      - Bug #30930: Add auxiliary function to retrieve THD::thread_id
        Add thd_get_thread_id() function.  Also make check_global_access() function
        visible to InnoDB under INNODB_COMPATIBILITY_HOOKS #define.
      
      
      include/mysql/plugin.h:
        Add thd_get_thread_id() accessor function
      mysql-test/r/innodb.result:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2261:
        branches/5.1: Merge a change from MySQL AB:
        
        ChangeSet@2007-10-13 15:49:42+03:00, aelkin@koti.dsl.inet.fi
        
        Bug #29136 erred multi-delete on trans table does not rollback the statement
        
        innodb.test, innodb.result: trans table specific test added
      mysql-test/t/innodb.test:
        Applied InnoDB snapshot innodb-5.1-ss2298
      sql/mysql_priv.h:
        Make check_global_access() declaration available if when
        INNODB_COMPATIBILITY_HOOKS is defined.
      sql/sql_class.cc:
        Add thd_get_thread_id() accessor function.
        
        Add 'extern "C"' to definition for thd_get_xid().  Not strictly
        needed, but in keeping with our coding style.
      storage/innobase/btr/btr0cur.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2295:
        branches/5.1:
        
        Merge r2294 from branches/5.0:
        
        Fix typo and add comma in comment.
      storage/innobase/handler/ha_innodb.cc:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        - But remove the declaration of check_global_access() from ha_innodb.cc,
          because it is now visible in mysql_priv.h under INNODB_COMPATIBILITY_HOOKS
        
        Revision r2270:
        branches/5.1:
        
        Rename the user visible parameter innodb-use-adaptive-hash-indexes to
        innodb-adaptive-hash-index so that it is in sync with MySQL 5.0.
        
        Suggested by:	Heikki
        Approved by:	Heikki
        
        
        Revision r2236:
        branches/5.1: bug#33349
        
        Introduce retry/sleep logic as a workaround for a transient bug
        where ::open fails for partitioned tables randomly if we are using
        one file per table.
        
        
        Reviewed by: Heikki
        
        
        Revision r2282:
        branches/5.1:
        
        Fix Bug#34053:
        * In CREATE TABLE and DROP TABLE check whether the table in question is one
          of the magic innodb_monitor tables and whether the user has enough rights
          to mess with it before doing anything else.
        * Implement a mysql-test testcase.
        
        Approved by:	Heikki
        
        
        Revision r2246:
        branches/5.1:
        
        Fix formatting of the autoinc-lock-mode command line parameter.
        
        Old view (./mysqld --help --verbose):
        
          --innodb-autoinc-lock-mode=#
                              The AUTOINC lock modes supported by InnoDB:
          0 => Old
                              style AUTOINC locking (for backward compatibility)
          1 =>
                              New style AUTOINC locking
          2 => No AUTOINC locking
                              (unsafe for SBR)
        
        New view:
        
          --innodb-autoinc-lock-mode=#
                              The AUTOINC lock modes supported by InnoDB:
                              0 => Old style AUTOINC locking (for backward
                              compatibility)
                              1 => New style AUTOINC locking
                              2 => No AUTOINC locking (unsafe for SBR)
        
        Looks like these strings are "automatically" wrapped by MySQL in the
        following way:
        * newlines (\n) in the string are ignored
        * newline separator (\n) is inserted every 57 or so characters.
        * lots of white space is appended to each inserted new line.
        
        Approved by:	Heikki
      storage/innobase/include/os0sync.h:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/include/read0read.h:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2188:
        branches/5.1: Remove unused field can_be_too_old from read_view_struct.
      storage/innobase/include/row0mysql.h:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2282:
        branches/5.1:
        
        Fix Bug#34053:
        * In CREATE TABLE and DROP TABLE check whether the table in question is one
          of the magic innodb_monitor tables and whether the user has enough rights
          to mess with it before doing anything else.
        * Implement a mysql-test testcase.
        
        Approved by:	Heikki
        
        
        Revision r2272:
        branches/5.1:
        
        Fix typo in comment.
      storage/innobase/include/sync0arr.h:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/include/sync0rw.h:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/include/sync0rw.ic:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/include/sync0sync.h:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/include/sync0sync.ic:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/os/os0sync.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/read/read0read.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2188:
        branches/5.1: Remove unused field can_be_too_old from read_view_struct.
      storage/innobase/row/row0mysql.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2282:
        branches/5.1:
        
        Fix Bug#34053:
        * In CREATE TABLE and DROP TABLE check whether the table in question is one
          of the magic innodb_monitor tables and whether the user has enough rights
          to mess with it before doing anything else.
        * Implement a mysql-test testcase.
        
        Approved by:	Heikki
        
        
        Revision r2272:
        branches/5.1:
        
        Fix typo in comment.
      storage/innobase/srv/srv0srv.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/sync/sync0arr.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/sync/sync0rw.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      storage/innobase/sync/sync0sync.c:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2268:
        branches/5.1: Port of r2267
        
        This is a combination of changes that forward port the scalability fix applied to 5.0
        through r1001.
        It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
        scalability fix of 5.0)
        Then it applies r1001 to 5.0 which is the original scalability fix.
        Finally it applies r2082 which fixes an issue with the original fix.
        
        Reviewed by: Heikki
      mysql-test/r/innodb_bug34053.result:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2282:
        branches/5.1:
        
        Fix Bug#34053:
        * In CREATE TABLE and DROP TABLE check whether the table in question is one
          of the magic innodb_monitor tables and whether the user has enough rights
          to mess with it before doing anything else.
        * Implement a mysql-test testcase.
        
        Approved by:	Heikki
      mysql-test/t/innodb_bug34053.test:
        Applied InnoDB snapshot innodb-5.1-ss2298
        
        Revision r2282:
        branches/5.1:
        
        Fix Bug#34053:
        * In CREATE TABLE and DROP TABLE check whether the table in question is one
          of the magic innodb_monitor tables and whether the user has enough rights
          to mess with it before doing anything else.
        * Implement a mysql-test testcase.
        
        Approved by:	Heikki
      4b25d5b1
  8. 15 Jan, 2008 1 commit
    • unknown's avatar
      Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots. · d39f2048
      unknown authored
      Fixes:
      
      Bug #18942: DROP DATABASE does not drop an orphan FOREIGN KEY constraint
        Fix Bug#18942 by dropping all foreign key constraints at the end of
        DROP DATABASE. Usually, by then, there are no foreign constraints
        left because all of them are dropped when the relevant tables are
        dropped. This code is to ensure that any orphaned FKs are wiped too.
      
      Bug #29157: UPDATE, changed rows incorrect
        Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no
        columns were updated.
      
      Bug #32440: InnoDB free space info does not appear in SHOW TABLE STATUS or I_S
        Put information about the free space in a tablespace in
        INFORMATION_SCHEMA.TABLES.DATA_FREE. This information was previously
        available in INFORMATION_SCHEMA.TABLES.TABLE_COMMENT, but MySQL has
        removed it from there recently.
        The stored value is in kilobytes.
        This can be considered as a permanent workaround to
        http://bugs.mysql.com/32440. "Workaround" becasue that bug is about the
        data missing from TABLE_COMMENT and this is actually not solved.
      
      
      mysql-test/r/innodb.result:
        New tests for bugs fixed as part of snapshots innodb-5.1-ss2146 and innodb-5.1-ss2178
      mysql-test/r/partition_innodb.result:
        Update results - InnoDB now sets Data_length (show table status)
      mysql-test/t/innodb.test:
        New tests for bugs fixed as part of snapshots innodb-5.1-ss2146 and innodb-5.1-ss2178
      mysql-test/t/partition_innodb.test:
        Mask out Data_Free in show table status, because it varies depending on
        which tests have been run.
      storage/innobase/handler/ha_innodb.cc:
        Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
        
        
        Revision r2178:
        branches/5.1:
        
        Merge r2177 from trunk/:
        
        Fix Bug#29157 "UPDATE, changed rows incorrect":
        
        Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no
        columns were updated.
        
        
        Revision r2169:
        branches/5.1:
        
        Bug#32440:
        
        Put information about the free space in a tablespace in
        INFORMATION_SCHEMA.TABLES.DATA_FREE. This information was previously
        available in INFORMATION_SCHEMA.TABLES.TABLE_COMMENT, but MySQL has
        removed it from there recently.
        
        The stored value is in kilobytes.
        
        This can be considered as a permanent workaround to
        http://bugs.mysql.com/32440. "Workaround" becasue that bug is about the
        data missing from TABLE_COMMENT and this is actually not solved.
      storage/innobase/row/row0mysql.c:
        Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
        
        
        Revision r2161:
        branches/5.1:
        
        Merge r2160 from trunk/:
        
        Fix Bug#18942 by dropping all foreign key constraints at the end of
        DROP DATABASE. Usually, by then, there are no foreign constraints
        left because all of them are dropped when the relevant tables are
        dropped. This code is to ensure that any orphaned FKs are wiped too.
      storage/innobase/trx/trx0trx.c:
        Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
      d39f2048
  9. 20 Nov, 2007 1 commit
    • unknown's avatar
      Applied InnoDB snapshot innodb-5.1-ss2093 · fcd89fcc
      unknown authored
      Fixes the following bug:
      
      - Bug #32125: Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase
      
        When unknown find_flag is encountered in convert_search_mode_to_innobase()
        do not call assert(0); instead queue a MySQL error using my_error() and
        return the error code PAGE_CUR_UNSUPP. Change the functions that call
        convert_search_mode_to_innobase() to handle that error code by "canceling"
        execution and returning appropriate error code further upstream.
      
      
      storage/innobase/dict/dict0dict.c:
        Applied InnoDB snapshot innodb-5.1-ss2093
        
        Revision r2092:
        Remove the unused function innobase_convert_from_filename() that was
        inadvertently added in r590.
      storage/innobase/handler/ha_innodb.cc:
        Applied InnoDB snapshot innodb-5.1-ss2093
        
        Revision r2088:
        Fix Bug#32125 (http://bugs.mysql.com/32125)
        "Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase":
        
        When unknown find_flag is encountered in convert_search_mode_to_innobase()
        do not call assert(0); instead queue a MySQL error using my_error() and
        return the error code PAGE_CUR_UNSUPP. Change the functions that call
        convert_search_mode_to_innobase() to handle that error code by "canceling"
        execution and returning appropriate error code further upstream.
        
        Approved by:	Heikki (via IM)
        
        
        
        Revision r2093:
        convert_search_mode_to_innobase(): Add the missing case label
        HA_READ_MBR_EQUAL that was forgotten in r2088.
        
        
        Revision r2089:
        Non-functional change: convert the switch in convert_search_mode_to_innobase()
        to the InnoDB coding style.
        
        
        Revision r2092:
        Remove the unused function innobase_convert_from_filename() that was
        inadvertently added in r590.
      storage/innobase/include/page0cur.h:
        Applied InnoDB snapshot innodb-5.1-ss2093
        
        Revision r2088:
        Fix Bug#32125 (http://bugs.mysql.com/32125)
        "Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase":
        
        When unknown find_flag is encountered in convert_search_mode_to_innobase()
        do not call assert(0); instead queue a MySQL error using my_error() and
        return the error code PAGE_CUR_UNSUPP. Change the functions that call
        convert_search_mode_to_innobase() to handle that error code by "canceling"
        execution and returning appropriate error code further upstream.
        
        Approved by:	Heikki (via IM)
      fcd89fcc
  10. 07 Nov, 2007 1 commit
    • unknown's avatar
      Cast away compiler warning on Windows. · 8680f86e
      unknown authored
      storage/innobase/handler/ha_innodb.cc:
        Cast away a compiler warning; some functions return ulong or ulint for
        errors, and some use int.  Let's hope these all fit in an int.
      8680f86e
  11. 06 Nov, 2007 2 commits
    • unknown's avatar
      Apply snapshot innodb-5.1-ss2034 · bdffce05
      unknown authored
      The following bugs are fixed:
      
      Bug #31860: Server crashes after inserting into InnoDB table with auto_increment column
        In the Bug 16979 fix there was an erroneous assertion that
        autoincrement columns can't contain negative values. With the fix, the
        autoincrement table counter is set to 0 if the maximum value read from
        the autoinc column index is negative.
      
      
      mysql-test/r/innodb.result:
        Apply snapshot innodb-5.1-ss2034
        
        Revision r2034:
        Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that
        autoincrement columns can't contain negative values. With the fix, the
        autoincrement table counter is set to 0 if the maximum value read from
        the autoinc column index is negative.
        
        Add test for the bug fix but the test is not really useful as the server
        needs to be restarted half way through the test. It has been added for 
        reference only.
      mysql-test/t/innodb.test:
        Apply snapshot innodb-5.1-ss2034
        
        Revision r2034:
        Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that
        autoincrement columns can't contain negative values. With the fix, the
        autoincrement table counter is set to 0 if the maximum value read from
        the autoinc column index is negative.
        
        Add test for the bug fix but the test is not really useful as the server
        needs to be restarted half way through the test. It has been added for 
        reference only.
      storage/innobase/handler/ha_innodb.cc:
        Apply snapshot innodb-5.1-ss2034
        
        Revision r2017:
        Use "InnoDB:" prefix in error messages.
        
        
        Revision r2018:
        Remove ut_print_timestamp(), this should have been removed when the following
        changes were made by MySQL.
        
        	ChangeSet@1.1810.467.1  2005-08-11 19:19:20+03:00  jani@omakaista.fi
        
        Fix error message so that it conforms to "  InnoDB: Error: ...".
      storage/innobase/include/univ.i:
        Apply snapshot innodb-5.1-ss2034
        
        Revision r2015:
        UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Remove warnings on 64-bit systems.
      storage/innobase/row/row0sel.c:
        Apply snapshot innodb-5.1-ss2034
        
        Revision r2034:
        Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that
        autoincrement columns can't contain negative values. With the fix, the
        autoincrement table counter is set to 0 if the maximum value read from
        the autoinc column index is negative.
        
        Add test for the bug fix but the test is not really useful as the server
        needs to be restarted half way through the test. It has been added for 
        reference only.
      storage/innobase/sync/sync0sync.c:
        Apply snapshot innodb-5.1-ss2034
        
        Revision r2017:
        Use "InnoDB:" prefix in error messages.
      bdffce05
    • unknown's avatar
      Apply snapshot innodb-5.1-ss1989 · e2513bf0
      unknown authored
      Fixes the following bugs:
      
      Bug #30706: SQL thread on slave is allowed to block client queries when slave load is high
        Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
      
      Bug #30888: Innodb table + stored procedure + row deletion = server crash
        While adding code for the low level read of the AUTOINC value from the index,
        the case for MEDIUM ints which are 3 bytes was missed triggering an
        assertion.
      
      Bug #30907: Regression: "--innodb_autoinc_lock_mode=0" (off) not same as older releases
        We don't rely on *first_value to be 0 when checking whether
        get_auto_increment() has been invoked for the first time in a multi-row
        INSERT. We instead use trx_t::n_autoinc_rows. Initialize trx::n_autoinc_rows
        inside ha_innobase::start_stmt() too.
      
      Bug #31444: "InnoDB: Error: MySQL is freeing a thd" in innodb_mysql.test
        ha_innobase::external_lock(): Update prebuilt->mysql_has_locked and
        trx->n_mysql_tables_in_use only after row_lock_table_for_mysql() returns
        DB_SUCCESS.  A timeout on LOCK TABLES would lead to an inconsistent state,
        which would cause trx_free() to print a warning.
      
      Bug #31494: innodb + 5.1 + read committed crash, assertion
        Set an error code when a deadlock occurs in semi-consistent read.
      
      
      mysql-test/r/innodb.result:
        Apply snapshot innodb-5.1-ss1989
        
        Also, a test is moved into the new innodb_autoinc_lock_mode_zero
        test, because it depends on a non-default setting for a read-only
        variable.
        
        Revision r1821:
        Merge a change from MySQL AB:
        
        ChangeSet@1.2536.50.1  2007-08-02 12:45:56-07:00  igor@mysql.com
        
        Fixed bug#28404.
        This patch adds cost estimation for the queries with ORDER BY / GROUP BY
        and LIMIT.
        If there was a ref/range access to the table whose rows were required
        to be ordered in the result set the optimizer always employed this access
        though a scan by a different index that was compatible with the required
        order could be cheaper to produce the first L rows of the result set.
        Now for such queries the optimizer makes a choice between the cheapest
        ref/range accesses not compatible with the given order and index scans
        compatible with it.
        
        innodb.result: Adjusted results for test cases affected fy the fix for
        bug #28404.
        
        
        Revision r1781:
        Fix a test case that was broken after Bug#16979 fix. See r1645 and r1735.
        The variable used in the tests below was introduced in r1735.
        
        
        Revision r1792:
        innodb.result: Revert r1655, which should have been reverted as part of r1781.
        
        
        Revision r1843:
        Add test for Bug# 21409, the actual bug was fixed in r1334.
      mysql-test/t/innodb.test:
        Apply snapshot innodb-5.1-ss1989
        
        Also, a test is moved into the new innodb_autoinc_lock_mode_zero
        test, because it depends on a non-default setting for a read-only
        variable.
        
        Revision r1781:
        Fix a test case that was broken after Bug#16979 fix. See r1645 and r1735.
        The variable used in the tests below was introduced in r1735.
        
        
        Revision r1843:
        Add test for Bug# 21409, the actual bug was fixed in r1334.
      storage/innobase/buf/buf0lru.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1819:
        Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
        
        UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
        area is defined.
        
        UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
        
        UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
        writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
        in many places.
        
        mem_init_buf(): Check that the memory is writable, and declare it undefined.
        
        mem_erase_buf(): Check that the memory is writable, and declare it freed.
      storage/innobase/dict/dict0dict.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1894:
        Add debug lock checks to autoinc functions. Add lock guards around an
        invocation of dict_table_autoinc_initialize().
      storage/innobase/dict/dict0load.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1974:
        Prevent loading of tables that have unsupported features most notably
        FTS indexes.
      storage/innobase/handler/ha_innodb.cc:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1850:
        Implement this feature request:
        http://bugs.mysql.com/30706
        
        * Add a function that returns the number of microseconds since
          epoch - ut_time_us().
        
        * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
        
        * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
          until a timeout elapses.
        
        * Using all of the above, handle the replication thread specially in
          srv_conc_enter_innodb().
        
        Approved by:	Heikki
        
        
        
        Revision r1887:
        Merge changes from MySQL AB:
        
        ChangeSet@1.2528.115.25  2007-08-27 18:18:14-06:00  tsmith@hindu.god
        
        Fix some Windows compiler warnings.
        
        dict0mem.c: Fix compiler warning with a cast.
        
        ha_innodb.cc: Change type to fix a compiler warning.
        
        
        Revision r1809:
        ha_innobase::external_lock(): Update prebuilt->mysql_has_locked and
        trx->n_mysql_tables_in_use only after row_lock_table_for_mysql()
        returns DB_SUCCESS.  A timeout on LOCK TABLES would lead to an
        inconsistent state, which would cause trx_free() to print a warning.
        
        This was later reported as Bug #31444.
        
        
        Revision r1833:
        Add /*== ... === */ decoration that was missing around some auto-inc functions.
        Add a missing comment, fix the length of a decoration.  Initialize the *value
        out parameter in ha_innobase::innobase_get_auto_increment().
        
        
        Revision r1866:
        Revert r1850 as MySQL did not approve the addition.
        
        log for r1850:
        
        Implement this feature request:
        http://bugs.mysql.com/30706
        
        * Add a function that returns the number of microseconds since
          epoch - ut_time_us().
        
        * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
        
        * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
          until a timeout elapses.
        
        * Using all of the above, handle the replication thread specially in
          srv_conc_enter_innodb().
        
        
        Revision r1846:
        Add config option innodb_use_adaptive_hash_indexes to enable/disable
        adaptive hash indexes. It is enabled by default (no change in default
        behavior).
        
        Approved by:	Marko
        
        
        Revision r1974:
        Prevent loading of tables that have unsupported features most notably
        FTS indexes.
        
        
        Revision r1829:
        Add assertion to enforce check of an implicit invariant and add comment about
        retry of autoinc read semantics. We always reread the table's autoinc counter
        after attempting to initialize it i.e., we want to guarantee that a read of
        autoinc valus that is returned to the caller is always covered by the
        AUTOINC locking mechanism.
        
        
        Revision r1787:
        Move the prototype of innobase_print_identifier() from ut0ut.c to
        ha_prototypes.h.  Enclose the definitions in ha_prototypes.h in
        #ifndef UNIV_HOTBACKUP.
        
        
        Revision r1888:
        Merge a change from MySQL AB:
        
        ChangeSet@1.2528.115.30  2007-08-28 10:17:15-06:00  tsmith@hindu.god
        
        Fix another compiler warning on Windows in InnoDB.
        
        ha_innodb.cc:
        
        Fix compiler warning: ::get_auto_increment takes a ulonglong
        for nb_desired_values, but InnoDB's trx struct stores it as
        a ulint (unsigned long).  Probably harmless, as a single
        statement won't be asking for more than 2^32 rows.
        
        
        Revision r1987:
        Bug fix: The problem was that when write_row() attempted to update the max
        autoinc value, and if it was rolled back because of a deadlock, the 
        deadlock error (transaction rollback) was not being propagated back to MySQL.
        
        
        Revision r1889:
        Merge a change from MySQL AB:
        
        ChangeSet@1.2560  2007-09-21 10:15:16+02:00  gkodinov@local
        
        ha_innodb.cc: fixed type conversion warnings revealed by bug 30639 
        
        
        Revision r1989:
        Suppress printing of deadlock errors while reading the autoinc value.
        DB_DEADLOCK errors are part of normal processing and excessive printing
        of these error messages could be disconcerting for users. 
        
        
        Revision r1828:
        Fix two bugs:
        
        Bug# 30907: We don't rely on *first_value to be 0 when checking whether
        get_auto_increment() has been invoked for the first time in a multi-row
        INSERT. We instead use trx_t::n_autoinc_rows. Initialize trx::n_autoinc_rows
        inside ha_innobase::start_stmt() too.
        
        Bug# 30888: While adding code for the low level read of the AUTOINC value
        from the index, the case for MEDIUM ints which are 3 bytes was missed
        triggering an assertion.
      storage/innobase/handler/ha_innodb.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1844:
        Remove the prototypes of some functions inside #if 0.
        The function definitions were removed in r1746.
      storage/innobase/ibuf/ibuf0ibuf.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1965:
        ibuf_insert_to_index_page(): Fix typos in diagnostic output.
      storage/innobase/include/db0err.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1974:
        Prevent loading of tables that have unsupported features most notably
        FTS indexes.
      storage/innobase/include/ha_prototypes.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1787:
        Move the prototype of innobase_print_identifier() from ut0ut.c to
        ha_prototypes.h.  Enclose the definitions in ha_prototypes.h in
        #ifndef UNIV_HOTBACKUP.
      storage/innobase/include/mach0data.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1779:
        Fix a bug that handles the case where the host specific byte order matches
        the InnoDB storage byte order, which is big-endian.
      storage/innobase/include/mach0data.ic:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1779:
        Fix a bug that handles the case where the host specific byte order matches
        the InnoDB storage byte order, which is big-endian.
      storage/innobase/include/mem0dbg.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1830:
        Improve memory debugging.  This is follow-up to r1819.
        
        mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
        defined.  Previously, this function was only compiled with UNIV_DEBUG.
        
        mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
        Valgrind.  Otherwise, Valgrind would complain on the second call of
        mem_heap_empty().
        
        UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
        for failed Valgrind checks.
      storage/innobase/include/mem0mem.ic:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1830:
        Improve memory debugging.  This is follow-up to r1819.
        
        mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
        defined.  Previously, this function was only compiled with UNIV_DEBUG.
        
        mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
        Valgrind.  Otherwise, Valgrind would complain on the second call of
        mem_heap_empty().
        
        UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
        for failed Valgrind checks.
        
        
        Revision r1937:
        mem_heap_free_top(): Remove a bogus Valgrind warning.
        
        
        Revision r1819:
        Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
        
        UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
        area is defined.
        
        UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
        
        UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
        writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
        in many places.
        
        mem_init_buf(): Check that the memory is writable, and declare it undefined.
        
        mem_erase_buf(): Check that the memory is writable, and declare it freed.
      storage/innobase/include/rem0rec.ic:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1918:
        Improve Valgrind instrumentation.
        
        rec_offs_set_n_alloc(): Use UNIV_MEM_ASSERT_AND_ALLOC().
        
        UNIV_MEM_ASSERT_AND_ALLOC(): New directive, similar to
        UNIV_MEM_ASSERT_AND_FREE().
      storage/innobase/include/row0mysql.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1783:
        Correct the function comments of row_create_table_for_mysql() and
        row_drop_table_for_mysql().
      storage/innobase/include/sync0rw.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1757:
        Enclose rw_lock_validate() in #ifdef UNIV_DEBUG.  It is only called by
        debug assertions.
      storage/innobase/include/univ.i:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1827:
        Merge r1826 from branches/zip: UNIV_MEM_ASSERT_AND_FREE():
        Use UNIV_MEM_ASSERT_W() instead of UNIV_MEM_ASSERT_RW().
        The memory area need not be initialized.
        This mistake was made in r1815.
        
        
        Revision r1918:
        Improve Valgrind instrumentation.
        
        rec_offs_set_n_alloc(): Use UNIV_MEM_ASSERT_AND_ALLOC().
        
        UNIV_MEM_ASSERT_AND_ALLOC(): New directive, similar to
        UNIV_MEM_ASSERT_AND_FREE().
        
        
        Revision r1830:
        Improve memory debugging.  This is follow-up to r1819.
        
        mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
        defined.  Previously, this function was only compiled with UNIV_DEBUG.
        
        mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
        Valgrind.  Otherwise, Valgrind would complain on the second call of
        mem_heap_empty().
        
        UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
        for failed Valgrind checks.
        
        
        Revision r1819:
        Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
        
        UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
        area is defined.
        
        UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
        
        UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
        writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
        in many places.
        
        mem_init_buf(): Check that the memory is writable, and declare it undefined.
        
        mem_erase_buf(): Check that the memory is writable, and declare it freed.
        
        
        Revision r1948:
        UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display also __FILE__ and __LINE__
        when these Valgrind checks fail.
      storage/innobase/include/ut0ut.h:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1850:
        Implement this feature request:
        http://bugs.mysql.com/30706
        
        * Add a function that returns the number of microseconds since
          epoch - ut_time_us().
        
        * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
        
        * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
          until a timeout elapses.
        
        * Using all of the above, handle the replication thread specially in
          srv_conc_enter_innodb().
        
        Approved by:	Heikki
        
        
        
        Revision r1862:
        Add ut_snprintf() function. On Windows this needs to be implemented
        using auxiliary functions because there is no snprintf-variant on
        Windows that behaves exactly as specified in the standard:
        
        * Always return the number of characters that would have been printed
          if the size were unlimited (not including the final `\0').
        * Always '\0'-terminate the result
        * Do not touch the buffer if size=0, only return the number of characters
          that would have been printed. Can be used to estimate the size needed
          and to allocate it dynamically.
        
        See http://www.freebsd.org/cgi/query-pr.cgi?pr=87260 for the reason why
        2 ap variables are used.
        
        Approved by:	Heikki
        
        
        Revision r1866:
        Revert r1850 as MySQL did not approve the addition.
        
        log for r1850:
        
        Implement this feature request:
        http://bugs.mysql.com/30706
        
        * Add a function that returns the number of microseconds since
          epoch - ut_time_us().
        
        * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
        
        * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
          until a timeout elapses.
        
        * Using all of the above, handle the replication thread specially in
          srv_conc_enter_innodb().
      storage/innobase/mem/mem0dbg.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1830:
        Improve memory debugging.  This is follow-up to r1819.
        
        mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
        defined.  Previously, this function was only compiled with UNIV_DEBUG.
        
        mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
        Valgrind.  Otherwise, Valgrind would complain on the second call of
        mem_heap_empty().
        
        UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
        for failed Valgrind checks.
        
        
        Revision r1819:
        Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
        
        UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
        area is defined.
        
        UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
        
        UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
        writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
        in many places.
        
        mem_init_buf(): Check that the memory is writable, and declare it undefined.
        
        mem_erase_buf(): Check that the memory is writable, and declare it freed.
      storage/innobase/mem/mem0mem.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1819:
        Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
        
        UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
        area is defined.
        
        UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
        
        UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
        writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
        in many places.
        
        mem_init_buf(): Check that the memory is writable, and declare it undefined.
        
        mem_erase_buf(): Check that the memory is writable, and declare it freed.
      storage/innobase/row/row0mysql.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1786:
        row_create_table_for_mysql(), row_truncate_table_for_mysql(),
        row_drop_table_for_mysql(): Do not mention innodb_force_recovery
        when newraw is set.
        
        
        Revision r1790:
        row_drop_table_for_mysql(): Before calling
        dict_table_remove_from_cache(table) and thus freeing the memory
        allocated for the table, copy the table name.  This avoids reading
        freed memory when name == table->name.
        
        Approved by Sunny.
        
        
        Revision r1783:
        Correct the function comments of row_create_table_for_mysql() and
        row_drop_table_for_mysql().
        
        
        Revision r1894:
        Add debug lock checks to autoinc functions. Add lock guards around an
        invocation of dict_table_autoinc_initialize().
      storage/innobase/row/row0sel.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1782:
        Add comment that the variable dest should be word aligned. After discussion
        on IM with Heikki.
        
        
        Revision r1988:
        Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
        
        innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
        Unfortunately, these will not trigger Bug #31494, because there merely
        occur lock wait timeouts, not deadlocks.
        
        
        Revision r1820:
        Use the clustered index and not the one selected by the optimizer in the plan,
        when building a previous version of the row. This bug is triggered when
        running queries via InnoDB's internal SQL parser; when InnoDB's optimizer
        selects a secondary index for the plan.
        
        
        Revision r1828:
        Fix two bugs:
        
        Bug# 30907: We don't rely on *first_value to be 0 when checking whether
        get_auto_increment() has been invoked for the first time in a multi-row
        INSERT. We instead use trx_t::n_autoinc_rows. Initialize trx::n_autoinc_rows
        inside ha_innobase::start_stmt() too.
        
        Bug# 30888: While adding code for the low level read of the AUTOINC value
        from the index, the case for MEDIUM ints which are 3 bytes was missed
        triggering an assertion.
        
        
        Revision r1779:
        Fix a bug that handles the case where the host specific byte order matches
        the InnoDB storage byte order, which is big-endian.
      storage/innobase/sync/sync0rw.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1757:
        Enclose rw_lock_validate() in #ifdef UNIV_DEBUG.  It is only called by
        debug assertions.
      storage/innobase/ut/ut0ut.c:
        Apply snapshot innodb-5.1-ss1989
        
        Revision r1850:
        Implement this feature request:
        http://bugs.mysql.com/30706
        
        * Add a function that returns the number of microseconds since
          epoch - ut_time_us().
        
        * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
        
        * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
          until a timeout elapses.
        
        * Using all of the above, handle the replication thread specially in
          srv_conc_enter_innodb().
        
        Approved by:	Heikki
        
        
        
        Revision r1873:
        snprintf() should always return non-negative result. According to
        Microsoft documentation about _vscprintf():
        
          If format is a null pointer, the invalid parameter handler is invoked,
          as described in Parameter Validation. If execution is allowed to
          continue, the functions return -1 and set errno to EINVAL.
        
        The UNIX variant of snprintf() segfaults if format is a NULL pointer
        (similar to strlen(NULL) for example), so it is better to conform to
        this behavior and crash our custom Windows version instead of
        returning -1. Noone would expect -1 to be returned from snprintf().
        
        Cosmetic: Add a space after typecast.
        
        Approved by:	Marko
        
        
        Revision r1862:
        Add ut_snprintf() function. On Windows this needs to be implemented
        using auxiliary functions because there is no snprintf-variant on
        Windows that behaves exactly as specified in the standard:
        
        * Always return the number of characters that would have been printed
          if the size were unlimited (not including the final `\0').
        * Always '\0'-terminate the result
        * Do not touch the buffer if size=0, only return the number of characters
          that would have been printed. Can be used to estimate the size needed
          and to allocate it dynamically.
        
        See http://www.freebsd.org/cgi/query-pr.cgi?pr=87260 for the reason why
        2 ap variables are used.
        
        Approved by:	Heikki
        
        
        Revision r1866:
        Revert r1850 as MySQL did not approve the addition.
        
        log for r1850:
        
        Implement this feature request:
        http://bugs.mysql.com/30706
        
        * Add a function that returns the number of microseconds since
          epoch - ut_time_us().
        
        * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
        
        * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
          until a timeout elapses.
        
        * Using all of the above, handle the replication thread specially in
          srv_conc_enter_innodb().
        
        
        Revision r1787:
        Move the prototype of innobase_print_identifier() from ut0ut.c to
        ha_prototypes.h.  Enclose the definitions in ha_prototypes.h in
        #ifndef UNIV_HOTBACKUP.
        
        
        Revision r1789:
        ut_print_namel(): Do not assume that all '/' are separators between
        database and table names.
        
        Approved by Heikki.
        
        
        Revision r1936:
        ut_print_buf(): Add a Valgrind check that the buffer is wholly defined.
      mysql-test/r/innodb-semi-consistent.result:
        Apply snapshot innodb-5.1-ss1989
        
        
        Revision r1988:
        Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
        
        innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
        Unfortunately, these will not trigger Bug #31494, because there merely
        occur lock wait timeouts, not deadlocks.
      mysql-test/r/innodb_autoinc_lock_mode_zero.result:
        New test, using read-only setting --innodb-autoinc-lock-mode=0
      mysql-test/t/innodb-semi-consistent-master.opt:
        Apply snapshot innodb-5.1-ss1989
        
        
        Revision r1988:
        Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
        
        innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
        Unfortunately, these will not trigger Bug #31494, because there merely
        occur lock wait timeouts, not deadlocks.
      mysql-test/t/innodb-semi-consistent.test:
        Apply snapshot innodb-5.1-ss1989
        
        
        Revision r1988:
        Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
        
        innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
        Unfortunately, these will not trigger Bug #31494, because there merely
        occur lock wait timeouts, not deadlocks.
      mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt:
        New test, using read-only setting --innodb-autoinc-lock-mode=0
      mysql-test/t/innodb_autoinc_lock_mode_zero.test:
        New test, using read-only setting --innodb-autoinc-lock-mode=0
      e2513bf0
  12. 21 Sep, 2007 1 commit
  13. 13 Sep, 2007 1 commit
    • unknown's avatar
      Changes for pushbuild test runs and VSC compile warnings · fa12674c
      unknown authored
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
        Fix test results for pushbuild
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
        Fix test results for pushbuild
      mysql-test/suite/rpl/t/rpl_innodb_bug30888.test:
        Fix test results for pushbuild
      storage/innobase/handler/ha_innodb.cc:
        resolve a VSC++ typecast compile warning.
      fa12674c
  14. 12 Sep, 2007 1 commit
    • unknown's avatar
      undo unneccessary change to ha_innodb.cc · 23227604
      unknown authored
      remove 'drop database' from new tests.
      
      
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
        remove "DROP DATABASE test"
      mysql-test/suite/rpl/r/rpl_innodb_bug30888.result:
        remove "DROP DATABASE test"
      mysql-test/suite/rpl/r/rpl_innodb_bug30919.result:
        remove "DROP DATABASE test"
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
        remove "DROP DATABASE test"
      mysql-test/suite/rpl/t/rpl_innodb_bug30888.test:
        remove "DROP DATABASE test"
      mysql-test/suite/rpl/t/rpl_innodb_bug30919.test:
        remove "DROP DATABASE test"
      storage/innobase/handler/ha_innodb.cc:
        undo unneccessary edits.
      23227604
  15. 09 Sep, 2007 1 commit
    • unknown's avatar
      Bug#30919 · db1f9468
      unknown authored
        "Rows not deleted from innodb partitioned tables if --innodb_autoinc_lock_mode=0"
      
        Due to a previous bugfix which initializes a previously uninitialized
        variable, ha_partition::get_auto_increment() may fail to operate
        correctly when the storage engine reports that it is only reserving
        one value and one or more partitions have a different 'next-value'.
        Currently, only affects Innodb's new-style auto-increment code which
        reserves larger blocks of values and has less inter-thread contention.
      
      
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
        Fix results - previous results shows symptoms of Bug30919
      sql/ha_partition.cc:
        Bug30919
        
        ha_partition::write_row()
          Do not insert a row if a failure occurred while generating
          auto-increment value.
        
        ha_partition::get_auto_increment()
          If there is an empty 'intersection' of auto-increment values, perform
          a second pass before failing because partitions may have different
          auto-increment 'next-value' attributes.
      storage/innobase/handler/ha_innodb.cc:
        Bug30919
          Only set *first_value if it is less than autoinc value. This allows
          a higher value to be hinted when operating as a partitioned table.
      mysql-test/suite/rpl/r/rpl_innodb_bug30919.result:
        New BitKeeper file ``mysql-test/suite/rpl/r/rpl_innodb_bug30919.result''
      mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt:
        New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt''
      mysql-test/suite/rpl/t/rpl_innodb_bug30919.test:
        New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30919.test''
      db1f9468
  16. 08 Sep, 2007 1 commit
    • unknown's avatar
      Bug#30907 · bec076f4
      unknown authored
        "Regression: "--innodb_autoinc_lock_mode=0" (off) not same as older releases"
      Bug#28430
        "Failure in replication of innodb partitioned tables on row/mixed format"
      Bug#30888
        "Innodb table + stored procedure + row deletion = server crash"
      
        Apply Oracle patch from Sunny
        Include tests cases by Omer
        Ensure that innobase_read_and_init_auto performs table autoinc lock when lock_mode = 0
        No need for "if" guard around row_unlock_table_autoinc_for_mysql() because
        it already performs same check.
        Make autoinc_lock_mode variable read-only for duration of running mysqld process.
      
      
      storage/innobase/handler/ha_innodb.cc:
        Bug30907/28430
          "Regression: "--innodb_autoinc_lock_mode=0" (off) not same as older releases"
          "Failure in replication of innodb partitioned tables on row/mixed format"
          Apply Oracle patch from Sunny
          Ensure that innobase_read_and_init_auto performs table autoinc lock when lock_mode = 0
          No need for "if" guard around row_unlock_table_autoinc_for_mysql() because
          it already performs same check.
          Make autoinc_lock_mode variable read-only for duration of running mysqld process.
      storage/innobase/row/row0sel.c:
        Bug30888
          "Innodb table + stored procedure + row deletion = server crash"
        
          Remove endian-specific code.
          Fix function row_search_autoinc_read_column() to handle any integer size up to 8 bytes.
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
        New BitKeeper file ``mysql-test/suite/rpl/r/rpl_innodb_bug28430.result''
      mysql-test/suite/rpl/r/rpl_innodb_bug30888.result:
        New BitKeeper file ``mysql-test/suite/rpl/r/rpl_innodb_bug30888.result''
      mysql-test/suite/rpl/t/rpl_innodb-master.opt:
        New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb-master.opt''
      mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt:
        New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt''
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
        New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug28430.test''
      mysql-test/suite/rpl/t/rpl_innodb_bug30888.test:
        New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30888.test''
      bec076f4
  17. 28 Aug, 2007 2 commits
    • unknown's avatar
      Fix another compiler warning on Windows in InnoDB. · 41d33363
      unknown authored
      storage/innobase/handler/ha_innodb.cc:
        Fix compiler warning: ::get_auto_increment takes a ulonglong
        for nb_desired_values, but InnoDB's trx struct stores it as
        a ulint (unsigned long).  Probably harmless, as a single
        statement won't be asking for more than 2^32 rows.
      41d33363
    • unknown's avatar
      Fix some Windows compiler warnings. · 7ecf5c63
      unknown authored
      storage/innobase/dict/dict0mem.c:
        Fix compiler warning with a cast.
      storage/innobase/handler/ha_innodb.cc:
        Change type to fix a compiler warning.
      7ecf5c63
  18. 25 Aug, 2007 2 commits
    • unknown's avatar
      Apply InnoDB snapshot innodb-5.1-ss1751. · a859c594
      unknown authored
      Bug #16979: AUTO_INC lock in InnoDB works a table level lock
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      Bug #27950: Duplicate entry error in auto-inc after mysqld restart
        We check whether the AUTOINC sub-system has been initialized (first) by
        holding the AUTOINC mutex and if initialization is required then we
        initialize using our normal procedure.
      
      
      storage/innobase/dict/dict0boot.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/dict/dict0crea.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/dict/dict0load.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/dict/dict0mem.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      storage/innobase/handler/ha_innodb.cc:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1735:
        Add variable "innodb_autoinc_lock_mode"  to control the behavior of the
        AUTOINC locking. There are three modes, 0 for backward compatibility, 1 for the
        new style locking (default, safe for statement-based replication) and
        2 for no AUTOINC locking (unsafe for statement-based replication).
        
        
        Revision r1750:
        We check whether the AUTOINC sub-system has been initialized (first) by
        holding the AUTOINC mutex and if initialization is required then we
        initialize using our normal procedure. This change is related to Bug#27950.
        
        
        Revision r1746:
        Remove some code from ha_innodb.cc that was already enclosed in #if 0.
        The code was related to replication and group commit, and it was
        unreachable already as of MySQL 5.0.
        
        Approved by Heikki
        
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      storage/innobase/include/dict0mem.h:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
        
        
        
        Revision r1747:
        Correct an outdated comment about dict_table_t:col_names that should have
        been adjusted in r1719, or r1264 in branches/zip.
      storage/innobase/include/mem0mem.ic:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1744:
        Merge r1739 from branches/zip:
        
        mem_heap_free_heap_top(): Declare the memory freed with UNIV_MEM_FREE().
        Before this change, the memory freed by mem_heap_empty() was not completely
        flagged free in UNIV_DEBUG_VALGRIND builds.  After this change, Valgrind
        will hopefully catch all errors caught by UNIV_MEM_DEBUG.
      storage/innobase/include/sync0rw.ic:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1751:
        rw_lock_s_lock_func(): Correct a typo in a comment.
      storage/innobase/include/trx0trx.h:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1742:
        Remove some unused fields of trx_t: mysql_master_log_file_name,
        mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos.
        
        Approved by Heikki.
      storage/innobase/lock/lock0lock.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1749:
        Add a table level counter that tracks the number of AUTOINC locks that are
        pending and/or granted on a table. We peek at this value to determine whether
        a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
        acquire the AUTOINC lock or not. This change is related to Bug# 16979.
      storage/innobase/mtr/mtr0log.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/pars/pars0pars.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/srv/srv0srv.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
      storage/innobase/trx/trx0sys.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1743:
        trx_sys_print_mysql_binlog_offset_from_page(): Enclose the definition
        in #ifdef UNIV_HOTBACKUP, to match the function declaration.
      storage/innobase/trx/trx0trx.c:
        Apply InnoDB snapshot innodb-5.1-ss1751.
        
        Revision r1742:
        Remove some unused fields of trx_t: mysql_master_log_file_name,
        mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos.
        
        Approved by Heikki.
      a859c594
    • unknown's avatar
      Apply InnoDB snapshot innodb-5.1-ss1726. · 6d4b3c58
      unknown authored
      Bug #16979: AUTO_INC lock in InnoDB works a table level lock
        - this is a major change in InnoDB auto-inc handling.
      Bug #27950: Duplicate entry error in auto-inc after mysqld restart
        - Init AUTOINC from delete_row().
      Bug #28781: InnoDB increments auto-increment value incorrectly with ON DUPLICATE KEY UPDATE
        - Use value specified by MySQL, in update_row().
      
      
      mysql-test/r/innodb.result:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1655:
        Fix the innodb.test failure mentioned in r1654.
      storage/innobase/dict/dict0dict.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/dict/dict0mem.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/handler/ha_innodb.cc:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1718:
        Replace mysql_byte with uchar and remove the #define mysql_byte from
        ha_innodb.cc.  This cleanup was made possible as of r1550:
        
        
        Revision r1658:
        check_trx_exists(): Remove a redundant function call and assignment that
        was added by someone at MySQL.
        
        
        Revision r1656:
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
        
        
        Revision r1654:
        
        One test case in innodb.test fails because of auto-increment
        changes in r1562:1653:
        
        $diff innodb.result innodb.reject
        504c504
        < 3	test2		this will work
        ---
        > 4	test2		this will work
      storage/innobase/handler/ha_innodb.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1654:
        
        One test case in innodb.test fails because of auto-increment
        changes in r1562:1653:
        
        $diff innodb.result innodb.reject
        504c504
        < 3	test2		this will work
        ---
        > 4	test2		this will work
      storage/innobase/ibuf/ibuf0ibuf.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1715:
        ibuf0ibuf.c: Remove the unused prototype for dict_index_print_low()
        that was inadvertently added in r832.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/include/dict0dict.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/include/dict0mem.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
        
        
        Revision r1719:
        Merge r1264 from branches/zip: Avoid memory fragmentation when
        adding column definitions to tables.
        
        dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
        allocation.  Allow it and "name" to be NULL.  These parameters are NULL
        when creating dummy indexes.
        
        dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
        
        dict_table_get_col_name(): Allow table->col_names to be NULL.
        
        dict_table_add_system_columns(), dict_table_add_to_cache():
        Add the parameter "heap".
        ---
        Additional changes that had to be merged from branches/zip:
        
        dict_table_add_system_columns(): New function, factored out from
        dict_table_add_to_cache().
        
        mlog_parse_index(): Add some consistency checks, and make use of
        dict_table_add_system_columns().
      storage/innobase/include/lock0lock.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1664:
        lock_number_of_rows_locked(): Fix a typo in comment, and make the comments
        in lock0lock.c and lock0lock.h identical.  The typo was incorrectly fixed in
        r1623.
      storage/innobase/include/row0mysql.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/include/row0sel.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/include/trx0trx.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/include/ut0mem.h:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1713:
        Fix typo in comment.
      storage/innobase/log/log0recv.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1657:
        recv_init_crash_recovery(): remove trailing white space
      storage/innobase/row/row0mysql.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/row/row0sel.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      storage/innobase/trx/trx0trx.c:
        Apply InnoDB snapshot innodb-5.1-ss1726.
        
        Revision r1645:
        Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
        is one test that fails as of this commit. The updated test case should be
        part of the snapshot from MySQL shortly.
        
        Fix for bug# 27950 - Init AUTOINC from delete_row().
        
        Fix for bug# 28781 - Use value specified by MySQL, in update_row().
        
        Summary of structural changes:
        ==============================
        InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
        the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
        for simple INSERT statements (including multi-value inserts), we try and avoid
        acquiring the special AUTOINC table level lock unless another transaction has
        already reserved the AUTOINC table level lock, in which case we fall back
        to the old behavior of acquiring the AUTOINC table level lock.
        
        The max AUTOINC value is now read directly using the low level interface
        of InnoDB.
      6d4b3c58
  19. 02 Aug, 2007 1 commit
    • unknown's avatar
      Post-merge fix. Update some test results, and add an InnoDB-only · c7419deb
      unknown authored
      compatibility hook, thd_mark_transaction_to_rollback().
      
      
      mysql-test/r/ps.result:
        Post-merge fix.   Changes for WL 3984 (Revise locking
        of mysql.general_log and mysql.slow_log) cause some test
        result differences.
      mysql-test/r/show_check.result:
        Post-merge fix.   Changes for WL 3984 (Revise locking
        of mysql.general_log and mysql.slow_log) cause some test
        result differences.
      sql/sql_class.cc:
        Post-merge fix, add InnoDB compatibility hook (defined for
        InnoDB only), thd_mark_transaction_to_rollback().
      storage/innobase/handler/ha_innodb.cc:
        Post-merge fix, add InnoDB compatibility hook (defined for
        InnoDB only), thd_mark_transaction_to_rollback().
      storage/innobase/handler/ha_innodb.h:
        Post-merge fix, add InnoDB compatibility hook (defined for
        InnoDB only), thd_mark_transaction_to_rollback().
      c7419deb
  20. 01 Aug, 2007 1 commit
    • unknown's avatar
      Remove some redundant or unused code from InnoDB (feedback from · 971050de
      unknown authored
      Marko after applying latest snapshot).
      
      
      storage/innobase/handler/ha_innodb.cc:
        Remove redundant assignment to thd_to_trx(thd); trx is
        declared as a reference to thd_to_trx(thd) at the top
        of the function, so this assignment isn't useful.
      storage/innobase/include/trx0trx.h:
        Remove two unused members from struct trx_struct.  allow_duplicates
        and replace_duplicates are not used; a single duplicates member is
        used instead to represent both flags.
      971050de
  21. 25 Jul, 2007 1 commit
    • unknown's avatar
      Apply snapshot innodb-51-ss1644 · c2f0c211
      unknown authored
      Fixes:
      - Bug #23710: crash_commit_before fails if innodb_file_per_table=1
      - Bug #28254: innodb crash if shutdown during innodb_table_monitor is running
      - Bug #28604: innodb_force_recovery restricts data dump
      - Bug #29097: fsp_get_available_space_in_free_extents() is capped at 4TB
      - Bug #29155: Innodb "Parallel recovery" is not prevented
      
      
      storage/innobase/Makefile.am:
        Apply snapshot innodb-51-ss1644
        
        Revision r1632:
        Add include/lock0priv.h to noinst_HEADERS in Makefile.am.
        
        
        
        Revision r1636:
        Move lock_get_type() from lock/lock0lock.c to include/lock0priv.ic:
        * lock0lock.c: remove lock_get_type() and include include/lock0priv.ic
        * lock0priv.h: include lock0priv.ic and add lock_get_type() prototype
        * Makefile.am: add lock0priv.ic to noinst_HEADERS
        * lock0priv.ic: introduce this new file containing the body of
          lock_get_type()
        
        This move is necessary in order to use lock_get_type() from other lock/
        source files (it's going to be used in lock/lock0iter.c).
        
        Approved by:	Heikki
        
        
        Revision r1638:
        Introduce a lock queue iterator for easy (and opaque) traversing of lock
        queues. Supports table and record lock queues via the same interface.
        
        There is only "get previous" method because currently there is no need
        for "get next" - it would be unused. Feel free to add one if needed.
        
        Approved by:	Heikki
      storage/innobase/buf/buf0buf.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1624:
        Fix change missed as part of Bug 15815. Use a function to check if a block
        needs to be made younger.
        
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/buf/buf0lru.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/fsp/fsp0fsp.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1605:
        Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
        by typecasting the variables before multiplying them, so that the result of
        the multiplication is of type "unsigned long long".
        
        I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
        use it without overwriting it with zeroes (by commenting the code that
        overwrites :newraw files).
        
        New type ullint is introduced with the sole purpose of shortening
        "unsigned long long", please do not define it to something else than
        "unsigned long long".
        
        Approved by:	Heikki
      storage/innobase/handler/ha_innodb.cc:
        Apply snapshot innodb-51-ss1644
        
        Revision r1605:
        Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
        by typecasting the variables before multiplying them, so that the result of
        the multiplication is of type "unsigned long long".
        
        I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
        use it without overwriting it with zeroes (by commenting the code that
        overwrites :newraw files).
        
        New type ullint is introduced with the sole purpose of shortening
        "unsigned long long", please do not define it to something else than
        "unsigned long long".
        
        Approved by:	Heikki
        
        
        Revision r1573:
        create_table_def(): Eliminate the inline function call to dict_table_is_comp()
        that was introduced in r1571.  Inlining is disabled in ha_innodb.cc.
        
        
        Revision r1574:
        innodb_check_for_record_too_big_error(): Divide the return value of
        page_get_free_space_of_empty_noninline() by 2.  Until r1571, that function
        did not return the same value as page_get_free_space_of_empty().
        
        
        Revision r1571:
        Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
        When creating an index containing a too long record, InnoDB would
        dereference a NULL pointer when trying to determine the maximum row length.
        
        innodb_check_for_record_too_big_error(): Replace the dict_table_t*
        parameter with a Boolean flag.  There is not always a dict_table_t object
        when this function is called.
        
        page_get_free_space_of_empty_noninline(): Move the definition and
        declaration from row0mysql (!) to page0page.  Make the signature
        identical with page_get_free_space_of_empty().
        
        create_clustered_index_when_no_primary(): Add the parameter "comp".
        Remove unnecessary casts.
      storage/innobase/include/buf0buf.ic:
        Apply snapshot innodb-51-ss1644
        
        Revision r1624:
        Fix change missed as part of Bug 15815. Use a function to check if a block
        needs to be made younger.
      storage/innobase/include/fsp0fsp.h:
        Apply snapshot innodb-51-ss1644
        
        Revision r1605:
        Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
        by typecasting the variables before multiplying them, so that the result of
        the multiplication is of type "unsigned long long".
        
        I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
        use it without overwriting it with zeroes (by commenting the code that
        overwrites :newraw files).
        
        New type ullint is introduced with the sole purpose of shortening
        "unsigned long long", please do not define it to something else than
        "unsigned long long".
        
        Approved by:	Heikki
      storage/innobase/include/lock0lock.h:
        Apply snapshot innodb-51-ss1644
        
        Revision r1623:
        Fix typo in comment.
        
        
        Revision r1628:
        lock_has_to_wait() is needed in the INFORMATION_SCHEMA implementation
        in order to determine which lock is blocking which. Make it non-static
        and put its definition in include/lock0lock.h.
        
        Approved by:	Heikki (via IM)
      storage/innobase/include/mem0mem.ic:
        Apply snapshot innodb-51-ss1644
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/include/page0page.h:
        Apply snapshot innodb-51-ss1644
        
        Revision r1571:
        Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
        When creating an index containing a too long record, InnoDB would
        dereference a NULL pointer when trying to determine the maximum row length.
        
        innodb_check_for_record_too_big_error(): Replace the dict_table_t*
        parameter with a Boolean flag.  There is not always a dict_table_t object
        when this function is called.
        
        page_get_free_space_of_empty_noninline(): Move the definition and
        declaration from row0mysql (!) to page0page.  Make the signature
        identical with page_get_free_space_of_empty().
        
        create_clustered_index_when_no_primary(): Add the parameter "comp".
        Remove unnecessary casts.
      storage/innobase/include/row0mysql.h:
        Apply snapshot innodb-51-ss1644
        
        Revision r1571:
        Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
        When creating an index containing a too long record, InnoDB would
        dereference a NULL pointer when trying to determine the maximum row length.
        
        innodb_check_for_record_too_big_error(): Replace the dict_table_t*
        parameter with a Boolean flag.  There is not always a dict_table_t object
        when this function is called.
        
        page_get_free_space_of_empty_noninline(): Move the definition and
        declaration from row0mysql (!) to page0page.  Make the signature
        identical with page_get_free_space_of_empty().
        
        create_clustered_index_when_no_primary(): Add the parameter "comp".
        Remove unnecessary casts.
      storage/innobase/include/univ.i:
        Apply snapshot innodb-51-ss1644
        
        Revision r1605:
        Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
        by typecasting the variables before multiplying them, so that the result of
        the multiplication is of type "unsigned long long".
        
        I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
        use it without overwriting it with zeroes (by commenting the code that
        overwrites :newraw files).
        
        New type ullint is introduced with the sole purpose of shortening
        "unsigned long long", please do not define it to something else than
        "unsigned long long".
        
        Approved by:	Heikki
        
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/lock/lock0lock.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1631:
        Move lock_rec_find_set_bit() and lock_rec_get_prev() from
        lock/lock0lock.c to include/lock0priv.h and make them non-static.
        They will be used in lock/lock0iter.c.
        
        Approved by:	Heikki
        
        
        Revision r1636:
        Move lock_get_type() from lock/lock0lock.c to include/lock0priv.ic:
        * lock0lock.c: remove lock_get_type() and include include/lock0priv.ic
        * lock0priv.h: include lock0priv.ic and add lock_get_type() prototype
        * Makefile.am: add lock0priv.ic to noinst_HEADERS
        * lock0priv.ic: introduce this new file containing the body of
          lock_get_type()
        
        This move is necessary in order to use lock_get_type() from other lock/
        source files (it's going to be used in lock/lock0iter.c).
        
        Approved by:	Heikki
        
        
        Revision r1628:
        lock_has_to_wait() is needed in the INFORMATION_SCHEMA implementation
        in order to determine which lock is blocking which. Make it non-static
        and put its definition in include/lock0lock.h.
        
        Approved by:	Heikki (via IM)
        
        
        Revision r1629:
        Add "const" qualifiers to lock_get_type() and lock_get_mode().
        
        Approved by:	Sunny
        
        
        Revision r1626:
        Move lock_*struct structures from lock/lock0lock.c to include/lock0priv.h.
        
        This is needed in order to add more code to lock/ that uses members of
        these structures (internal to the lock module) but in a separate file,
        rather than lock0lock.c. lock0lock.c is a way too big already.
        
        Approved by:	Sunny
      storage/innobase/log/log0recv.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1607:
        Bug#23710
        
        At InnoDB startup consider the case where log scan went beyond checkpoint_lsn as a crash and initiate crash recovery code path.
        
        reviewed by: Heikki
      storage/innobase/mem/mem0mem.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/mem/mem0pool.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/os/os0file.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1613:
        Fix Bug#29155 by enabling file locking on FreeBSD.
        It has been disabled because InnoDB has refused to start on
        FreeBSD & LinuxThreads, but now it starts just fine.
        
        Approved by:	Heikki
      storage/innobase/page/page0page.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1571:
        Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
        When creating an index containing a too long record, InnoDB would
        dereference a NULL pointer when trying to determine the maximum row length.
        
        innodb_check_for_record_too_big_error(): Replace the dict_table_t*
        parameter with a Boolean flag.  There is not always a dict_table_t object
        when this function is called.
        
        page_get_free_space_of_empty_noninline(): Move the definition and
        declaration from row0mysql (!) to page0page.  Make the signature
        identical with page_get_free_space_of_empty().
        
        create_clustered_index_when_no_primary(): Add the parameter "comp".
        Remove unnecessary casts.
      storage/innobase/rem/rem0rec.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/row/row0mysql.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1571:
        Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
        When creating an index containing a too long record, InnoDB would
        dereference a NULL pointer when trying to determine the maximum row length.
        
        innodb_check_for_record_too_big_error(): Replace the dict_table_t*
        parameter with a Boolean flag.  There is not always a dict_table_t object
        when this function is called.
        
        page_get_free_space_of_empty_noninline(): Move the definition and
        declaration from row0mysql (!) to page0page.  Make the signature
        identical with page_get_free_space_of_empty().
        
        create_clustered_index_when_no_primary(): Add the parameter "comp".
        Remove unnecessary casts.
      storage/innobase/sync/sync0rw.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1598:
        Add some comments.
        
        Approved by:	Heikki (via IM)
      storage/innobase/sync/sync0sync.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1598:
        Add some comments.
        
        Approved by:	Heikki (via IM)
      storage/innobase/trx/trx0sys.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      storage/innobase/trx/trx0trx.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1595:
        trx_commit_for_mysql(): Avoid acquiring and releasing kernel_mutex when
        trx->sess or trx_dummy_sess is non-NULL.
      storage/innobase/ut/ut0mem.c:
        Apply snapshot innodb-51-ss1644
        
        Revision r1581:
        Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
      c2f0c211