1. 17 Aug, 2010 8 commits
    • Marko Mäkelä's avatar
      A non-functional change: · 085bb22a
      Marko Mäkelä authored
      dict_load_index_low(): Rename the parameter "cached" to "allocated"
      and clarify the comments.
      085bb22a
    • Vasil Dimov's avatar
      Make main.endspace more deterministic · 026d301f
      Vasil Dimov authored
      Followup to vasil.dimov@oracle.com-20100817063430-inglmzgdtj95t29d
      which didn't fully fix the test because the order of the returned
      rows was different in embedded and non-embedded version. So the only
      way to fix this is to add an ORDER BY clause.
      026d301f
    • Jimmy Yang's avatar
      Fix bug #53496 Use Lock_time in slow query log output for InnoDB row · b17b122b
      Jimmy Yang authored
      lock wait time. Including the InnoDB lock time in the exiting "Lock_time"
      output.
      b17b122b
    • Vasil Dimov's avatar
      Adjust endspace.result · 524e0dc4
      Vasil Dimov authored
      This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
      which improved the sampling algorithm. The endspace test is non-deterministic
      because it does not include ORDER BY clause in its queries.
      524e0dc4
    • Vasil Dimov's avatar
      Adjust type_bit_innodb.result · 8e168c5c
      Vasil Dimov authored
      This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
      which improved the sampling algorithm.
      8e168c5c
    • Vasil Dimov's avatar
      Adjust rowid_order_innodb.result · f0ba35c6
      Vasil Dimov authored
      This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
      which improved the sampling algorithm.
      f0ba35c6
    • Vasil Dimov's avatar
      Adjust innodb_gis.result · aed93f87
      Vasil Dimov authored
        
      This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
      which improved the sampling algorithm.
      aed93f87
    • Vasil Dimov's avatar
      Adjust innodb_mysql.result · 393aaa4c
      Vasil Dimov authored
      This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
      which improved the sampling algorithm. I have manually checked that the new
      values are actually the correct ones, for example:
      -rows	16
      +rows	32
      the number of rows returned by the query is 32.
      393aaa4c
  2. 16 Aug, 2010 1 commit
    • Vasil Dimov's avatar
      Fix Bug#53761 RANGE estimation for matched rows may be 200 times different · 7f62ec7b
      Vasil Dimov authored
      Improve the range estimation algorithm.
      
      Previously:
      For a given level the algo knows the number of pages in the requested range and the n
      
      With this change:
      Same idea, but peek a few (10) of the intermediate pages to get a better estimate of 
      
      In the bug report one of the examples has a btree with a snippet of the leaf level li
      page1(899 records), page2(1 record), page3(1 record), page4(1 record)
      so when trying to estimate, the previous algo, assumed there are average (899+1)/2=45
      Fix Bug#53761 RANGE estimation for matched rows may be 200 times different
      
      Improve the range estimation algorithm.
      
      Previously:
      For a given level the algo knows the number of pages in the requested range
      and the number of records on the leftmost and the rightmost page. Then it
      assumes all pages in between contain the average between the two border pages
      and multiplies this average number by the number of intermediate pages.
      
      With this change:
      Same idea, but peek a few (10) of the intermediate pages to get a better
      estimate of the average number of records per page. If there are less than 10
      intermediate pages then all of them will be scanned and the result will be
      precise, not an estimation.
      
      In the bug report one of the examples has a btree with a snippet of the leaf
      level like this:
      page1(899 records), page2(1 record), page3(1 record), page4(1 record)
      so when trying to estimate, the previous algo, assumed there are average
      (899+1)/2=450 records per page which went terribly wrong. With this change
      page2 and page3 will be read and the exact number of records will be returned.
      
      Approved by:	Sunny (rb://401)
      7f62ec7b
  3. 13 Aug, 2010 2 commits
  4. 12 Aug, 2010 1 commit
  5. 10 Aug, 2010 2 commits
    • Vasil Dimov's avatar
      9d2a49d1
    • Marko Mäkelä's avatar
      Bug#54914: InnoDB: performance drop with innodb_change_buffering=all · 271e6ae3
      Marko Mäkelä authored
      Reduce ibuf_mutex and ibuf_pessimistic_insert_mutex contention further.
      
      Protect ibuf->empty by the insert buffer root page latch, not ibuf_mutex.
      
      ibuf_tree_root_get(): Assert that ibuf_mutex is owned by the
      caller. Assert that the stamped page number is correct. Assert that
      ibuf->empty agrees with the root page.
      
      ibuf_size_update(): Do not update ibuf->empty.
      
      ibuf_init_at_db_start(): Update ibuf->empty while holding the root page latch.
      
      ibuf_add_free_page(): Return TRUE/FALSE instead of DB_SUCCESS/DB_STRONG_FAIL.
      
      ibuf_remove_free_page(): Release ibuf_pessimistic_insert_mutex as
      early as possible.
      
      ibuf_contract_ext(): Rely on a dirty read of ibuf->empty, unless the
      server is being shut down. Never acquire ibuf_mutex. Eliminate n_stored.
      
      ibuf_contract_after_insert(): Never acquire ibuf_mutex. Perform dirty
      reads of ibuf->size and ibuf->max_size.
      
      ibuf_insert_low(): Only acquire ibuf_mutex for mode==BTR_MODIFY_TREE.
      Perform dirty reads of ibuf->size and ibuf->max_size. Update
      ibuf->empty while holding the root page latch.
      
      ibuf_delete_rec(): Update ibuf->empty while holding the root page latch.
      
      ibuf_is_empty(): Release ibuf_mutex earlier.
      271e6ae3
  6. 09 Aug, 2010 1 commit
    • Marko Mäkelä's avatar
      Reduce the ibuf_mutex hold time. This does not fix the update · a4c5cf7c
      Marko Mäkelä authored
      regression in Bug #54914, but it does speed up the execution for
      innodb_change_buffering=inserts.
      
      ibuf_add_ops(), ibuf_merge_or_delete_for_page(),
      ibuf_delete_for_discarded_space(): Use atomic built-ins instead of
      ibuf_mutex, when available.
      
      ibuf_add_free_page(), ibuf_remove_free_page(), ibuf_contract_ext():
      Release ibuf_mutex earlier.
      
      ibuf_free_excess_pages(): Release ibuf_mutex before a conditional branch.
      
      ibuf_insert_low(): Release ibuf_mutex before a conditional
      branch. Create ibuf_entry before re-acquiring ibuf_mutex. Simplify a
      loop to reduce code footprint. Release ibuf_mutex before mtr_commit()
      [btr_pcur_close()].
      
      ibuf_is_empty(): Release ibuf_mutex before mtr_commit().
      a4c5cf7c
  7. 05 Aug, 2010 2 commits
  8. 03 Aug, 2010 1 commit
  9. 30 Jul, 2010 2 commits
  10. 29 Jul, 2010 1 commit
  11. 28 Jul, 2010 3 commits
    • Gleb Shchepa's avatar
      Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c on · 95d9205c
      Gleb Shchepa authored
                  DELETE statement
      
      Single-table delete ordered by a field that has a hash-type index
      may cause an assertion failure or a crash.
      
      An optimization added by the fix for the bug 36569 forced the
      optimizer to use ORDER BY-compatible indices when applicable.
      
      However, the existence of unsorted indices (HASH index algorithm
      for some engines such as MEMORY/HEAP, NDB) was ignored.
      
      The test_if_order_by_key function has been modified to skip
      unsorted indices.
      
      
      mysql-test/r/heap_hash.result:
        Test case for bug #55472.
      mysql-test/t/heap_hash.test:
        Test case for bug #55472.
      sql/sql_select.cc:
        Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c on
                    DELETE statement
        
        The test_if_order_by_key function has been modified to skip
        unsorted indices.
      95d9205c
    • Vasil Dimov's avatar
      Fix trailing whitespace on ha_innodb.cc:1259 · 3ced6488
      Vasil Dimov authored
      3ced6488
    • Vasil Dimov's avatar
      c0285935
  12. 26 Jul, 2010 1 commit
    • Davi Arnaut's avatar
      Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE · e4cbcaf9
      Davi Arnaut authored
      The problem was that the optimize method of the ARCHIVE storage
      engine was not preserving the FRM embedded in the ARZ file when
      rewriting the ARZ file for optimization. The ARCHIVE engine stores
      the FRM in the ARZ file so it can be transferred from machine to
      machine without also copying the FRM -- the engine restores the
      embedded FRM during discovery.
      
      The solution is to copy over the FRM when rewriting the ARZ file.
      In addition, some initial error checking is performed to ensure
      garbage is not copied over.
      
      
      mysql-test/t/archive.test:
        Add test case for Bug#45377.
      storage/archive/azio.c:
        Add error checking to ensure that the I/O operations are
        successful.
      storage/archive/ha_archive.cc:
        Copy over the embedded FRM.
      e4cbcaf9
  13. 28 Jul, 2010 1 commit
  14. 27 Jul, 2010 1 commit
  15. 26 Jul, 2010 5 commits
  16. 25 Jul, 2010 1 commit
    • Vladislav Vaintroub's avatar
      Cleanup after bild team push. · 568c2663
      Vladislav Vaintroub authored
      * Fixed obvious errors (HAVE_BROKEN_PREAD is not true for on any
      of systems we use, definitely not on HPUX)
      
      * Remove other junk flags for OSX and HPUX
      
      * Avoid checking type sizes in universal builds on OSX, again 
      (CMake2.8.0 fails is different architectures return different results)
      
      * Do not compile template instantiation stuff unless 
      EXPLICIT_TEMPLATE_INSTANTIATION is used.
      
      * Some cleanup (make gen_lex_hash simpler, avoid dependencies)
      
      * Exclude some unused files from compilation (strtol.c etc)
      568c2663
  17. 24 Jul, 2010 4 commits
    • Vladislav Vaintroub's avatar
      Bug#55169: Installer does not preserve user's settings in custom mode · 212b26d1
      Vladislav Vaintroub authored
      Fix some issues with WiX packaging, particularly 
      major upgrade and change scenarios.
      
      * remember binary location and data location
      (for major upgrade)
      
      * use custom UI, which is WiX Mondo extended 
      for major upgrade dialog (no feature selection
      screen shown on major upgrade, only upgrade
      confirmation). This is necessary to prevent
      changing installation path during upgrade
      (services are not reregistered, so they would 
      have invalid binary path is it is changed)
      
      * Hide datafiles that are installed into 
      ProgramFiles, show ones that are installed
      in ProgramData
      
      * Make MSI buildable with nmake
      
      * Fix autotools "make dist"
      
      
      
      
      Makefile.am:
        Fix autotools "make dist"
      configure.in:
        Fix autotools "make dist"
      packaging/Makefile.am:
        Fix autotools "make dist"
      packaging/WiX/CMakeLists.txt:
        Use custom UI, for major upgrades
      packaging/WiX/CPackWixConfig.cmake:
        Show user editable datafiles in feature selection dialog, 
        not datafiles installed into ProgramFiles directory
      packaging/WiX/create_msi.cmake.in:
        Use custom UI, fix nmake build for installer
      packaging/WiX/custom_ui.wxs:
        Use custom UI
      packaging/WiX/extra.wxs.in:
        Show user editable datafiles in feature selection dialog, 
        not datafiles installed into ProgramFiles directory
      packaging/WiX/mysql_server.wxs.in:
        Remember install locations of binaries and 
        user editable datafiles.
      212b26d1
    • Davi Arnaut's avatar
      Add a maintainer target to the warning-mode of the build scripts. · 8011a429
      Davi Arnaut authored
      Fix assorted warnings in order for the warning-mode to be effective.
      8011a429
    • Davi Arnaut's avatar
    • Davi Arnaut's avatar
      Bug#42733: Type-punning warnings when compiling MySQL · 7f80eb46
      Davi Arnaut authored
      Post-merge fix: remove remaining casts which are now
      unnecessary and are actually causing warnings.
      7f80eb46
  18. 23 Jul, 2010 3 commits