An error occurred fetching the project authors.
  1. 27 Oct, 2010 1 commit
  2. 22 Oct, 2010 1 commit
  3. 21 Oct, 2010 1 commit
    • Sunny Bains's avatar
      Bug #57243 Inconsistent use of trans_register_ha() API in InnoDB · 38f54271
      Sunny Bains authored
      Remove trx_t::active_trans. Split into two separate fields with distinct
      responsibilities. trx_t::is_registered and trx_t::owns_prepare_mutex.
      There are wrapper functions for using this fields in ha_innodb.cc. The
      wrapper functions check for invariants.
      
      Fix some formatting to conform to InnoDB guidelines.
      
      Remove innobase_register_stmt() and innobase_register_trx_and_stmt().
      
      Add:
      trx_is_started()
      trx_deregister_from_2pc()
      trx_register_for_2pc()
      trx_is_registered_for_2pc()
      trx_owns_prepare_commit_mutex_set()
      trx_has_prepare_commit_mutex()
      
      rb://479, Approved by Jimmy Yang.
      38f54271
  4. 19 Oct, 2010 1 commit
    • Marko Mäkelä's avatar
      Bug #56680 wrong InnoDB results from a case-insensitive covering index · a8f2f7af
      Marko Mäkelä authored
      row_search_for_mysql(): When a secondary index record might not be
      visible in the current transaction's read view and we consult the
      clustered index and optionally some undo log records, return the
      relevant columns of the clustered index record to MySQL instead of the
      secondary index record.
      
      REC_INFO_DELETED_FLAG: Move the definition from rem0rec.ic to rem0rec.h.
      
      ibuf_insert_to_index_page_low(): New function, refactored from
      ibuf_insert_to_index_page().
      
      ibuf_insert_to_index_page(): When we are inserting a record in place
      of a delete-marked record and some fields of the record differ, update
      that record just like row_ins_sec_index_entry_by_modify() would do.
      
      mysql_row_templ_t: Add clust_rec_field_no.
      
      row_sel_store_mysql_rec(), row_sel_push_cache_row_for_mysql(): Add the
      flag rec_clust, for returning data at clust_rec_field_no instead of
      rec_field_no. Resurrect the debug assertion that the record not be
      marked for deletion. (Bug #55626)
      
      buf_LRU_free_block(): Refactored from
      buf_LRU_search_and_free_block(). This is needed for the
      innodb_change_buffering_debug diagnostics.
      
      [UNIV_DEBUG || UNIV_IBUF_DEBUG] ibuf_debug, buf_page_get_gen(),
      buf_flush_page_try():
      Implement innodb_change_buffering_debug=1 for evicting pages from the
      buffer pool, so that change buffering will be attempted more
      frequently.
      a8f2f7af
  5. 18 Oct, 2010 1 commit
    • Vasil Dimov's avatar
      Fix Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE · 902b13fa
      Vasil Dimov authored
      In order to fix this bug we need to distinguish whether ha_innobase::info()
      has been called from ::analyze() or not. Rename ::info() to ::info_low()
      and add a boolean parameter that tells whether the call is from ::analyze()
      or not. Create a new simple ::info() that just calls
      ::info_low(false => not called from analyze). From ::analyze() instead of
      ::info() call ::info_low(true => called from analyze).
      
      Approved by:	Jimmy (rb://487)
      902b13fa
  6. 13 Oct, 2010 1 commit
  7. 12 Oct, 2010 1 commit
    • unknown's avatar
      Bug#56632 - The warning code related to KEY_BLOCK_SIZE and ROW_FORMAT when... · cfcafcf5
      unknown authored
      Bug#56632 - The warning code related to KEY_BLOCK_SIZE and ROW_FORMAT  when innodb_strict_mode=OFF  is improved in order to take into account whether the KEY_BLOCK_SIZE is specified on the current ALTER statement or the previous CREATE statement.
        
      The testcase shows the expected results of 12 different combinations of these settings.
      cfcafcf5
  8. 06 Oct, 2010 1 commit
    • Davi Arnaut's avatar
      Bug#49938: Failing assertion: inode or deadlock in fsp/fsp0fsp.c · a5efb91d
      Davi Arnaut authored
      Bug#54678: InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock
      
      - Incompatible change: truncate no longer resorts to a row by
      row delete if the storage engine does not support the truncate
      method. Consequently, the count of affected rows does not, in
      any case, reflect the actual number of rows.
      
      - Incompatible change: it is no longer possible to truncate a
      table that participates as a parent in a foreign key constraint,
      unless it is a self-referencing constraint (both parent and child
      are in the same table). To work around this incompatible change
      and still be able to truncate such tables, disable foreign checks
      with SET foreign_key_checks=0 before truncate. Alternatively, if
      foreign key checks are necessary, please use a DELETE statement
      without a WHERE condition.
      
      Problem description:
      
      The problem was that for storage engines that do not support
      truncate table via a external drop and recreate, such as InnoDB
      which implements truncate via a internal drop and recreate, the
      delete_all_rows method could be invoked with a shared metadata
      lock, causing problems if the engine needed exclusive access
      to some internal metadata. This problem originated with the
      fact that there is no truncate specific handler method, which
      ended up leading to a abuse of the delete_all_rows method that
      is primarily used for delete operations without a condition.
      
      Solution:
      
      The solution is to introduce a truncate handler method that is
      invoked when the engine does not support truncation via a table
      drop and recreate. This method is invoked under a exclusive
      metadata lock, so that there is only a single instance of the
      table when the method is invoked.
      
      Also, the method is not invoked and a error is thrown if
      the table is a parent in a non-self-referencing foreign key
      relationship. This was necessary to avoid inconsistency as
      some integrity checks are bypassed. This is inline with the
      fact that truncate is primarily a DDL operation that was
      designed to quickly remove all data from a table.
      
      mysql-test/suite/innodb/t/innodb-truncate.test:
        Add test cases for truncate and foreign key checks.
        Also test that InnoDB resets auto-increment on truncate.
      mysql-test/suite/innodb/t/innodb.test:
        FK is not necessary, test is related to auto-increment.
        
        Update error number, truncate is no longer invoked if
        table is parent in a FK relationship.
      mysql-test/suite/innodb/t/innodb_mysql.test:
        Update error number, truncate is no longer invoked if
        table is parent in a FK relationship.
        
        Use delete instead of truncate, test is used to check
        the interaction of FKs, triggers and delete.
      mysql-test/suite/parts/inc/partition_check.inc:
        Fix typo.
      mysql-test/suite/sys_vars/t/foreign_key_checks_func.test:
        Update error number, truncate is no longer invoked if
        table is parent in a FK relationship.
      mysql-test/t/mdl_sync.test:
        Modify test case to reflect and ensure that truncate takes
        a exclusive metadata lock.
      mysql-test/t/trigger-trans.test:
        Update error number, truncate is no longer invoked if
        table is parent in a FK relationship.
      sql/ha_partition.cc:
        Reorganize the various truncate methods. delete_all_rows is now
        passed directly to the underlying engines, so as truncate. The
        code responsible for truncating individual partitions is moved
        to ha_partition::truncate_partition, which is invoked when a
        ALTER TABLE t1 TRUNCATE PARTITION p statement is executed.
        
        Since the partition truncate no longer can be invoked via
        delete, the bitmap operations are not necessary anymore. The
        explicit reset of the auto-increment value is also removed
        as the underlying engines are now responsible for reseting
        the value.
      sql/handler.cc:
        Wire up the handler truncate method.
      sql/handler.h:
        Introduce and document the truncate handler method. It assumes
        certain use cases of delete_all_rows.
        
        Add method to retrieve the list of foreign keys referencing a
        table. Method is used to avoid truncating tables that are
        parent in a foreign key relationship.
      sql/share/errmsg-utf8.txt:
        Add error message for truncate and FK.
      sql/sql_lex.h:
        Introduce a flag so that the partition engine can detect when
        a partition is being truncated. Used to give a special error.
      sql/sql_parse.cc:
        Function mysql_truncate_table no longer exists.
      sql/sql_partition_admin.cc:
        Implement the TRUNCATE PARTITION statement.
      sql/sql_truncate.cc:
        Change the truncate table implementation to use the new truncate
        handler method and to not rely on row-by-row delete anymore.
        
        The truncate handler method is always invoked with a exclusive
        metadata lock. Also, it is no longer possible to truncate a
        table that is parent in some non-self-referencing foreign key.
      storage/archive/ha_archive.cc:
        Rename method as the description indicates that in the future
        this could be a truncate operation.
      storage/blackhole/ha_blackhole.cc:
        Implement truncate as no operation for the blackhole engine in
        order to remain compatible with older releases.
      storage/federated/ha_federated.cc:
        Introduce truncate method that invokes delete_all_rows.
        This is required to support partition truncate as this
        form of truncate does not implement the drop and recreate
        protocol.
      storage/heap/ha_heap.cc:
        Introduce truncate method that invokes delete_all_rows.
        This is required to support partition truncate as this
        form of truncate does not implement the drop and recreate
        protocol.
      storage/ibmdb2i/ha_ibmdb2i.cc:
        Introduce truncate method that invokes delete_all_rows.
        This is required to support partition truncate as this
        form of truncate does not implement the drop and recreate
        protocol.
      storage/innobase/handler/ha_innodb.cc:
        Rename delete_all_rows to truncate. InnoDB now does truncate
        under a exclusive metadata lock.
        
        Introduce and reorganize methods used to retrieve the list
        of foreign keys referenced by a or referencing a table.
      storage/myisammrg/ha_myisammrg.cc:
        Introduce truncate method that invokes delete_all_rows.
        This is required in order to remain compatible with earlier
        releases where truncate would resort to a row-by-row delete.
      a5efb91d
  9. 05 Oct, 2010 1 commit
  10. 23 Sep, 2010 1 commit
  11. 20 Sep, 2010 4 commits
  12. 17 Sep, 2010 1 commit
  13. 14 Sep, 2010 2 commits
  14. 10 Sep, 2010 2 commits
  15. 24 Aug, 2010 1 commit
    • Marko Mäkelä's avatar
      Merge Bug#55832 fix from mysql-5.1-innodb: · 938ce0ef
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3550
      revision-id: marko.makela@oracle.com-20100824081003-v4ecy0tga99cpxw2
      parent: marko.makela@oracle.com-20100823102854-t1clrojqis2ley36
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Tue 2010-08-24 11:10:03 +0300
      message:
        Bug#55832: selects crash too easily when innodb_force_recovery>3
      
        dict_update_statistics_low(): Create bogus statistics for those
        indexes that cannot be accessed because of the innodb_force_recovery
        setting.
      
        ha_innobase::info(): Calculate statistics for each index, even if
        innodb_force_recovery is set. Fill in bogus data for those indexes
        that are not accessed because of the innodb_force_recovery setting.
      938ce0ef
  16. 23 Aug, 2010 1 commit
    • Marko Mäkelä's avatar
      Bug#55832: selects crash too easily when innodb_force_recovery>3 · 634af8f4
      Marko Mäkelä authored
      dict_update_statistics_low(): Create bogus statistics for those
      indexes that cannot be accessed because of the innodb_force_recovery
      setting.
      
      ha_innobase::info(): Calculate statistics for each index, even if
      innodb_force_recovery is set. Fill in bogus data for those indexes
      that are not accessed because of the innodb_force_recovery setting.
      634af8f4
  17. 20 Aug, 2010 1 commit
  18. 17 Aug, 2010 1 commit
  19. 16 Aug, 2010 1 commit
  20. 13 Aug, 2010 2 commits
  21. 06 Aug, 2010 1 commit
  22. 05 Aug, 2010 1 commit
  23. 04 Aug, 2010 1 commit
  24. 03 Aug, 2010 1 commit
  25. 02 Aug, 2010 1 commit
  26. 28 Jul, 2010 2 commits
  27. 15 Jul, 2010 1 commit
  28. 13 Jul, 2010 1 commit
  29. 08 Jul, 2010 1 commit
    • Davi Arnaut's avatar
      Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled · f56dd32b
      Davi Arnaut authored
      Essentially, the problem is that safemalloc is excruciatingly
      slow as it checks all allocated blocks for overrun at each
      memory management primitive, yielding a almost exponential
      slowdown for the memory management functions (malloc, realloc,
      free). The overrun check basically consists of verifying some
      bytes of a block for certain magic keys, which catches some
      simple forms of overrun. Another minor problem is violation
      of aliasing rules and that its own internal list of blocks
      is prone to corruption.
      
      Another issue with safemalloc is rather the maintenance cost
      as the tool has a significant impact on the server code.
      Given the magnitude of memory debuggers available nowadays,
      especially those that are provided with the platform malloc
      implementation, maintenance of a in-house and largely obsolete
      memory debugger becomes a burden that is not worth the effort
      due to its slowness and lack of support for detecting more
      common forms of heap corruption.
      
      Since there are third-party tools that can provide the same
      functionality at a lower or comparable performance cost, the
      solution is to simply remove safemalloc. Third-party tools
      can provide the same functionality at a lower or comparable
      performance cost. 
      
      The removal of safemalloc also allows a simplification of the
      malloc wrappers, removing quite a bit of kludge: redefinition
      of my_malloc, my_free and the removal of the unused second
      argument of my_free. Since free() always check whether the
      supplied pointer is null, redudant checks are also removed.
      
      Also, this patch adds unit testing for my_malloc and moves
      my_realloc implementation into the same file as the other
      memory allocation primitives.
      
      client/mysqldump.c:
        Pass my_free directly as its signature is compatible with the
        callback type -- which wasn't the case for free_table_ent.
      f56dd32b
  30. 01 Jul, 2010 1 commit
  31. 29 Jun, 2010 1 commit
    • Marko Mäkelä's avatar
      Bug#52199 utf32: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4 · 142e8417
      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
        ------------------------------------------------------------------------
      142e8417
  32. 25 Jun, 2010 1 commit
  33. 24 Jun, 2010 1 commit
    • Marko Mäkelä's avatar
      Merge Bug #54679 fix from mysql-5.1-innodb: · e375c45c
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3523
      revision-id: marko.makela@oracle.com-20100624104620-pklunowaigv7quu9
      parent: jimmy.yang@oracle.com-20100624021010-oh2hnp8e1xbaax6u
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Thu 2010-06-24 13:46:20 +0300
      message:
        Bug#54679: alter table causes compressed row_format to revert to compact
      
        ha_innobase::create(): Add the local variable row_type = form->s->row_type.
        Adjust it to ROW_TYPE_COMPRESSED when ROW_FORMAT is not specified or inherited
        but KEY_BLOCK_SIZE is. Observe the inherited ROW_FORMAT even when it is not
        explicitly specified.
      
        innodb_bug54679.test: New test, to test the bug and to ensure that there are
        no regressions. (The only difference in the test result without the patch
        applied is that the first ALTER TABLE changes ROW_FORMAT to Compact.)
      e375c45c