1. 04 Jul, 2011 5 commits
  2. 03 Jul, 2011 4 commits
  3. 01 Jul, 2011 3 commits
  4. 30 Jun, 2011 7 commits
  5. 29 Jun, 2011 13 commits
  6. 28 Jun, 2011 3 commits
    • Marko Mäkelä's avatar
      Bug#12699505 Memory leak in row_create_index_for_mysql() · 8c988dc6
      Marko Mäkelä authored
      DB_COL_APPEARS_TWICE_IN_INDEX: Remove. This condition is already
      checked and reported by MySQL before passing the index definition to
      the storage engine.
      
      row_create_index_for_mysql(): Remove the redundant check for
      DB_COL_APPEARS_TWICE_IN_INDEX. When enforcing the column prefix index
      limit, invoke dict_mem_index_free(index) to plug the memory leak. In
      the loop, use index->n_def instead of dict_index_get_n_fields(index),
      because the latter would be 0 for indexes that have not been copied to
      the data dictionary cache.
      
      innodb-use-sys-malloc.test:
      
      Add test cases for attempting to trigger the error checks in
      row_create_index_for_mysql(). Before MySQL 5.5 and WL#5743, the leak
      is only reproducible if ha_innobase::max_supported_key_part_length()
      returned a higher limit than the one used in
      row_create_index_for_mysql().
      
      In MySQL 5.5 and later, the leak is reproducible with
      innodb_large_prefix=true.
      
      rb:688 approved by Jimmy Yang
      8c988dc6
    • Marko Mäkelä's avatar
      Merge mysql-5.1 to mysql-5.5. · cdecb914
      Marko Mäkelä authored
      cdecb914
    • Marko Mäkelä's avatar
      Bug#12595087 - 61191: Question about page_zip_available (clean up page0zip.c) · 0c54d44f
      Marko Mäkelä authored
      page_zip_dir_elems(): New function, refactored from page_zip_dir_size().
      
      page_zip_dir_size(): Use page_zip_dir_elems()
      
      page_zip_dir_start_offs(): New function: Gets an offset to the
      compressed page trailer (the dense page directory), including deleted
      records (the free list)
      
      page_zip_dir_start_low(page_zip, n_dense): Constness-preserving
      wrapper macro for page_zip_dir_start_offs().
      
      page_zip_dir_start(page_zip): Constness-preserving
      wrapper macro for page_zip_dir_start_offs().
      
      page_zip_decompress_node_ptrs(), page_zip_decompress_clust(): Replace
      a formula with a fully equivalent page_zip_dir_start_low() call.
      
      page_zip_write_rec(), page_zip_parse_write_node_ptr(),
      page_zip_write_node_ptr(), page_zip_write_trx_id_and_roll_ptr(),
      page_zip_clear_rec(): Replace a formula with an almost equivalent
      page_zip_dir_start() call.
      It is OK to replace page_dir_get_n_heap(page) with
      page_dir_get_n_heap(page_zip->data), because
      ut_ad(page_zip_header_cmp(page_zip, page)) or
      page_zip_validate(page_zip, page) asserts that the
      page headers are identical.
      
      rb:687 approved by Jimmy Yang
      0c54d44f
  7. 23 Jun, 2011 4 commits
    • Dmitry Shulga's avatar
    • Dmitry Shulga's avatar
      Fixed Bug#11756013 (formerly known as bug#47870): · bc7af175
      Dmitry Shulga authored
      BOGUS "THE TABLE MYSQL.PROC IS MISSING,..."
      
      There was a race condition between loading a stored routine
      (function/procedure/trigger) specified by fully qualified name
      SCHEMA_NAME.PROC_NAME and dropping the stored routine database.
      
      The problem was that there is a window for race condition when one server
      thread tries to load a stored routine being executed and the other thread
      tries to drop the stored routine schema.
      
      This condition race window exists in implementation of function
      mysql_change_db() called by db_load_routine() during loading of stored
      routine to cache. Function mysql_change_db() calls check_db_dir_existence()
      that might failed because specified database was dropped during concurrent
      execution of DROP SCHEMA statement. db_load_routine() calls mysql_change_db()
      with flag 'force_switch' set to 'true' value so when referenced db is not found
      then my_error() is not called and function mysql_change_db() returns ok.
      This shadows information about schema opening error in db_load_routine().
      Then db_load_routine() makes attempt to parse stored routine that is failed.
      This makes to return error to sp_cache_routines_and_add_tables_aux() but since
      during error generation a call to my_error wasn't made and hence
      THD::main_da wasn't set we set the generic "mysql.proc table corrupt" error
      when running sp_cache_routines_and_add_tables_aux().
      
      The fix is to install an error handler inside db_load_routine() for
      the mysql_op_change_db() call, and check later if the ER_BAD_DB_ERROR
      was caught.
      
      
      sql/sql_db.cc:
        Added synchronization point "before_db_dir_check" to emulate a race condition during
        processing of CALL/DROP SCHEMA.
      bc7af175
    • Marko Mäkelä's avatar
      Merge mysql-5.1 to mysql-5.5. · 7545f866
      Marko Mäkelä authored
      This patch was already pushed to mysql-5.5 by Inaam Rana.
      7545f866
    • Marko Mäkelä's avatar
      Bug#11753728 45225: Locking: hang if drop table with no timeout · d09b999f
      Marko Mäkelä authored
      Fix a failure of the re-enabled innodb-index.test in the embedded server.
      Apparently, the embedded server does not default to ENGINE=InnoDB when
      copying an InnoDB table by CREATE TABLE t2 SELECT * FROM t1;
      d09b999f
  8. 17 Jun, 2011 1 commit
    • Inaam Rana's avatar
      Bug 12635227 - 61188: DROP TABLE EXTREMELY SLOW · e60e6505
      Inaam Rana authored
      approved by: Marko
      rb://681
      
      Coalescing of free buf_page_t descriptors can prove to be one severe
      bottleneck in performance of compression. One such workload where it
      hurts badly is DROP TABLE. This patch removes buf_page_t allocations
      from buf_buddy and uses ut_malloc instead.
      In order to further reduce overhead of colaescing we no longer attempt
      to coalesce a block if the corresponding free_list is less than 16 in
      size.
      e60e6505