1. 30 Jun, 2010 2 commits
    • Marko Mäkelä's avatar
      Merge Bug #54358 comment corrections from mysql-5.1-innodb: · fd7a1118
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3533
      revision-id: marko.makela@oracle.com-20100630093149-wmc37t128gic933v
      parent: marko.makela@oracle.com-20100629131219-pjbkpk5rsqztmw27
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Wed 2010-06-30 12:31:49 +0300
      message:
        Correct some comments that were added in the fix of Bug #54358
        (READ UNCOMMITTED access failure of off-page DYNAMIC or COMPRESSED columns).
      
        Records that lack incompletely written externally stored columns may
        be accessed by READ UNCOMMITTED transaction even without involving a
        crash during an INSERT or UPDATE operation. I verified this as follows.
      
        (1) added a delay after the mini-transaction for writing the clustered
        index 'stub' record was committed (patch attached)
        (2) started mysqld in gdb, setting breakpoints to the where the
        assertions about READ UNCOMMITTED were added in the bug fix
        (3) invoked ibtest3 --create-options=key_block_size=2
        to create BLOBs in a COMPRESSED table
        (4) invoked the following:
        yes 'set transaction isolation level read uncommitted;
        checksum table blobt3;select sleep(1);'|mysql -uroot test
        (5) noted that one of the breakpoints was triggered
        (return(NULL) in btr_rec_copy_externally_stored_field())
      
        === modified file 'storage/innodb_plugin/row/row0ins.c'
        --- storage/innodb_plugin/row/row0ins.c	2010-06-30 08:17:25 +0000
        +++ storage/innodb_plugin/row/row0ins.c	2010-06-30 08:17:25 +0000
        @@ -2120,6 +2120,7 @@ function_exit:
         		rec_t*	rec;
         		ulint*	offsets;
         		mtr_start(&mtr);
        +		os_thread_sleep(5000000);
         
         		btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE,
         					    BTR_MODIFY_TREE, &cursor, 0,
        
        === modified file 'storage/innodb_plugin/row/row0upd.c'
        --- storage/innodb_plugin/row/row0upd.c	2010-06-30 08:11:55 +0000
        +++ storage/innodb_plugin/row/row0upd.c	2010-06-30 08:11:55 +0000
        @@ -1763,6 +1763,7 @@ row_upd_clust_rec(
         		rec_offs_init(offsets_);
         
         		mtr_start(mtr);
        +		os_thread_sleep(5000000);
         
         		ut_a(btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr));
         		rec = btr_cur_get_rec(btr_cur);
      fd7a1118
    • Mark Leith's avatar
      Bug#54726 - Inconsistent reporting between mutex and RW lock spin rounds · aab20dd8
      Mark Leith authored
       - Add round counts to the output for RW s/x locks
      aab20dd8
  2. 29 Jun, 2010 3 commits
    • Marko Mäkelä's avatar
      Merge Bug#54408 fix from mysql-5.1-innodb: · 1cc7629e
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3531
      revision-id: marko.makela@oracle.com-20100629130058-1ilqaj51u9sj9vqe
      parent: marko.makela@oracle.com-20100629125653-t799e5x30h31cvrd
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Tue 2010-06-29 16:00:58 +0300
      message:
        Bug#54408: txn rollback after recovery: row0umod.c:673
        dict_table_get_format(index->table)
      
        The REDUNDANT and COMPACT formats store a local 768-byte prefix of
        each externally stored column. No row_ext cache is needed, but we
        initialized one nevertheless. When the BLOB pointer was zero, we would
        ignore the locally stored prefix as well. This triggered an assertion
        failure in row_undo_mod_upd_exist_sec().
      
        row_build(): Allow ext==NULL when a REDUNDANT or COMPACT table
        contains externally stored columns.
      
        row_undo_search_clust_to_pcur(), row_upd_store_row(): Invoke
        row_build() with ext==NULL on REDUNDANT and COMPACT tables.
      
        rb://382 approved by Jimmy Yang
      1cc7629e
    • Marko Mäkelä's avatar
      Merge Bug#54358 fix from mysql-5.1-innodb: · 6e6d119a
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3529
      revision-id: marko.makela@oracle.com-20100629125518-m3am4ia1ffjr0d0j
      parent: jimmy.yang@oracle.com-20100629024137-690sacm5sogruzvb
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Tue 2010-06-29 15:55:18 +0300
      message:
        Bug#54358: READ UNCOMMITTED access failure of off-page DYNAMIC or COMPRESSED
        columns
      
        When the server crashes after a record stub has been inserted and
        before all its off-page columns have been written, the record will
        contain incomplete off-page columns after crash recovery. Such records
        may only be accessed at the READ UNCOMMITTED isolation level or when
        rolling back a recovered transaction in recv_recovery_rollback_active().
        Skip these records at the READ UNCOMMITTED isolation level.
      
        TODO: Add assertions for checking the above assumptions hold when an
        incomplete BLOB is encountered.
      
        btr_rec_copy_externally_stored_field(): Return NULL if the field is
        incomplete.
      
        row_prebuilt_t::templ_contains_blob: Clarify what "BLOB" means in this
        context. Hint: MySQL BLOBs are not the same as InnoDB BLOBs.
      
        row_sel_store_mysql_rec(): Return FALSE if not all columns could be
        retrieved. Previously this function always returned TRUE.  Assert that
        the record is not delete-marked.
      
        row_sel_push_cache_row_for_mysql(): Return FALSE if not all columns
        could be retrieved.
      
        row_search_for_mysql(): Skip records containing incomplete off-page
        columns. Assert that the transaction isolation level is READ
        UNCOMMITTED.
      
        rb://380 approved by Jimmy Yang
      6e6d119a
    • Marko Mäkelä's avatar
      Bug#52199 utf32: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4 · deaba603
      Marko Mäkelä authored
      Merge and adjust a forgotten change to fix this bug.
      rb://393 approved by Jimmy Yang
        ------------------------------------------------------------------------
        r3794 | marko | 2009-01-07 14:14:53 +0000 (Wed, 07 Jan 2009) | 18 lines
      
        branches/6.0: Allow the minimum length of a multi-byte character to be
        up to 4 bytes. (Bug #35391)
      
        dtype_t, dict_col_t: Replace mbminlen:2, mbmaxlen:3 with mbminmaxlen:5.
        In this way, the 5 bits can hold two values of 0..4, and the storage size
        of the fields will not cross the 64-bit boundary.  Encode the values as
        DATA_MBMAX * mbmaxlen + mbminlen.  Define the auxiliary macros
        DB_MBMINLEN(mbminmaxlen), DB_MBMAXLEN(mbminmaxlen), and
        DB_MINMAXLEN(mbminlen, mbmaxlen).
      
        Try to trim and pad UTF-16 and UTF-32 with spaces as appropriate.
      
        Alexander Barkov suggested the use of cs->cset->fill(cs, buff, len, 0x20).
        ha_innobase::store_key_val_for_row() now does that, but the added function
        row_mysql_pad_col() does not, because it doesn't have the MySQL TABLE object.
      
        rb://49 approved by Heikki Tuuri
        ------------------------------------------------------------------------
      deaba603
  3. 28 Jun, 2010 1 commit
  4. 25 Jun, 2010 2 commits
    • Jimmy Yang's avatar
      7f1e5a37
    • Sunny Bains's avatar
      Fix bug#54583. This change reverses r1530 by getting rid of a bogus assertion · fce131cc
      Sunny Bains authored
      and clarifies the invariant in dict_table_get_on_id().
        
      In Mar 2007 Marko observed a crash during recovery, the crash resulted from
      an UNDO operation on a system table. His solution was to acquire an X lock on
      the data dictionary, this in hindsight was an overkill. It is unclear what
      caused the crash, current hypothesis is that it was a memory corruption.
        
      The X lock results in performance issues by when undoing changes due to
      rollback during normal operation on regular tables.
        
      Why the change is safe:
      ======================
      The InnoDB code has changed since the original X lock change was made. In the
      new code we always lock the data dictionary in X mode during startup when
      UNDOing operations on the system tables (this is a given). This ensures that
      the crash Marko observed cannot happen as long as all transactions that update
      the system tables follow the standard rules by setting the appropriate DICT_OP
      flag when writing the log records when they make the changes.
        
      If transactions violate the above mentioned rule then during recovery (at
      startup) the rollback code (see trx0roll.c) will not acquire the X lock
      and we will see the crash again.  This will however be a different bug.
      fce131cc
  5. 24 Jun, 2010 5 commits
  6. 23 Jun, 2010 4 commits
    • Marko Mäkelä's avatar
    • Jimmy Yang's avatar
      Merge Bug#54044 fix from mysql-5.1-innodb: · e9c542b0
      Jimmy Yang authored
      ```---------------------------------------------------------
      revno: 3520
      committer: Jimmy Yang <jimmy.yang@oracle.com>
      branch nick: mysql-5.1-innodb
      timestamp: Tue 2010-06-22 19:04:31 -0700
      message:
        Fix bug #54044, Create temporary tables and using innodb crashes. Screen
        out NULL type columns, and return without creating the table.
        
        rb://378 approved by Marko
      ```
      
      ---------------------------------------------------------
      e9c542b0
    • Vasil Dimov's avatar
      Enable InnoDB's UNIV_DEBUG if MySQL's WITH_DEBUG[_FULL] is defined · 0a7d5799
      Vasil Dimov authored
      This will make PB2 test InnoDB with UNIV_DEBUG on its *_debug platforms
      
      Discussed with:	Marko (on IRC)
      0a7d5799
    • Vasil Dimov's avatar
      Merge Bug#47991 fix from mysql-5.1-innodb · e3d842c6
      Vasil Dimov authored
        ------------------------------------------------------------
        revno: 3517
        revision-id: vasil.dimov@oracle.com-20100622163043-dc0lxy0byg74viet
        parent: marko.makela@oracle.com-20100621095148-8g73k8k68dpj080u
        committer: Vasil Dimov <vasil.dimov@oracle.com>
        branch nick: mysql-5.1-innodb
        timestamp: Tue 2010-06-22 19:30:43 +0300
        message:
          Fix Bug#47991 InnoDB Dictionary Cache memory usage increases indefinitely
          when renaming tables
          
          Allocate the table name using ut_malloc() instead of table->heap because
          the latter cannot be freed.
          
          Adjust dict_sys->size calculations all over the code.
          
          Change dict_table_t::name from const char* to char* because we need to
          ut_malloc()/ut_free() it.
          
          Reviewed by:	Inaam, Marko, Heikki (rb://384)
          Approved by:	Heikki (rb://384)
        ------------------------------------------------------------
      e3d842c6
  7. 22 Jun, 2010 3 commits
    • Marko Mäkelä's avatar
      Merge Bug#54686 fix from mysql-5.1-innodb: · f776568e
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3517
      revision-id: marko.makela@oracle.com-20100622115215-kxtzx7xuugcxd375
      parent: marko.makela@oracle.com-20100621095148-8g73k8k68dpj080u
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Tue 2010-06-22 14:52:15 +0300
      message:
        Bug#54686 "field->col->mtype == type" assertion error at row/row0sel.c
        ha_innobase::index_read(), ha_innobase::records_in_range(): Check that
        the index is useable before invoking row_sel_convert_mysql_key_to_innobase().
      
        This fix is based on a suggestion by Yasufumi Kinoshita.
      f776568e
    • Marko Mäkelä's avatar
      buf_flush_insert_in_flush_rbt(), buf_flush_validate_low(): · 3ba73a21
      Marko Mäkelä authored
      Silence GCC warnings about dereferencing a type-punned pointer.
      Approved by Jimmy Yang.
      3ba73a21
    • Marko Mäkelä's avatar
      dict_load_column_low(): Initialize pos. Improve documentation. · 84b51676
      Marko Mäkelä authored
      Approved by Jimmy Yang.
      84b51676
  8. 21 Jun, 2010 3 commits
    • Inaam Rana's avatar
      Fixes bug#39168. · 72e5d2ae
      Inaam Rana authored
      Make a call to log_free_check() on all DML paths.
      72e5d2ae
    • Vladislav Vaintroub's avatar
      Bug#53593: Add some instrumentation to improve Valgrind sensitivity. · 23d05c1c
      Vladislav Vaintroub authored
      Implement WITH_VALGRIND for the CMake build.
      23d05c1c
    • Marko Mäkelä's avatar
      Merge Bug #54658 fix from mysql-5.1-innodb: · cda93dfc
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3515
      revision-id: marko.makela@oracle.com-20100621094008-o9fa153s3f09merw
      parent: vasil.dimov@oracle.com-20100618085155-xnm469cbhedqea96
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Mon 2010-06-21 12:40:08 +0300
      message:
        Bug #54658: InnoDB: Warning: allocated tablespace %lu, old maximum was 0
      
        dict_check_tablespaces_and_store_max_id(): Initialize max_space_id
        and fil_system->max_assigned_id from DICT_HDR_MAX_SPACE_ID.
      
        fil_space_create(): Suppress the warning unless !recv_recovery_on
        (do not complain while applying the redo log).
      cda93dfc
  9. 17 Jun, 2010 7 commits
  10. 15 Jun, 2010 10 commits