1. 12 Aug, 2011 2 commits
  2. 11 Aug, 2011 1 commit
    • Igor Babaev's avatar
      Fixed LP bug #823826. · b09da4b2
      Igor Babaev authored
      The method Item_func_isnull::update_used_tables() erroneously did not
      update cached values stored in the fields used_tables_cache and
      const_item_cache of the Item_func_isnull objects. As a result the
      Item_func_isnull::used_tables() returned wrong bitmaps and, as a
      consequence, push-down predicates could be attached to wrong tables.
      b09da4b2
  3. 09 Aug, 2011 3 commits
    • unknown's avatar
      Bug lp:781508: Take relevant test cases from MySQL 5.6 feature preview trees · db12d8d9
      unknown authored
      Identified all test cases in the MySQL file subquery_mat.inc that are
      not present in MariaDB. In total found 8 test cases for the following
      MySQL bugs:
      * BUG#49630 - not a bug in MariaDB, added test case
      * BUG#52538 - not a bug in MariaDB, added test case (checked with VG)
      * BUG#53103 - not a bug in MariaDB, added test case
      * BUG#54511 - not a bug in MariaDB, added test case
      * BUG#56367 - not a bug in MariaDB, added test case
      * BUG#59833 - not a bug in MariaDB, added test case
      * BUG#11852644 - not a bug in MariaDB, added test case
      * BUG#12668294 - not a bug in MariaDB, added test case
      
      All of these MySQL bugs are not present in MariaDB 5.3.
      
      The comparison was based on the following version of
      mysql-trunk:
      
      revno: 3350 [merge]
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: mysql-trunk
      timestamp: Mon 2011-08-08 12:42:09 +0300
      message:
        Merge mysql-5.5 to mysql-trunk.
      db12d8d9
    • unknown's avatar
      Fix bug lp:817384 · 84778ee5
      unknown authored
      This bug is a special case of lp:813447.
      
      Analysis:
      Constant optimization finds that the condition t2.a = 1
      can be used to access the primary key of table 't2'. As
      a result both outer table t1,t2 are considered as constant
      when we reach the execution phase. At the same time, during
      constant optimization, the IN predicate is not evaluated
      because it is expensive.
      
      When execution of the outer query reaches do_select(),
      control flow enter the branch:
      if (join->table_count == join->const_tables)
      { ... }
      This branch checks only the WHERE and HAVING clauses,
      but doesn't check the ON clauses of the query. Since the
      IN predicate was not evaluated during optimization, it is
      not evaluated at all, thus execution doesn't detect that
      the ON clause is FALSE.
      
      Solution:
      Similar to the patch for bug lp:813447, exclude system
      tables from constant substitution based on unique key
      lookups if there is an expensive ON condition on the
      inner table.
      84778ee5
    • Igor Babaev's avatar
      Fixed LP bug #819716. · 85409350
      Igor Babaev authored
      Do not optimize derived table for the second time ever.
      85409350
  4. 08 Aug, 2011 6 commits
    • Sergey Petrunya's avatar
      Merge fix for BUG#822134 · d54cd335
      Sergey Petrunya authored
      d54cd335
    • Sergey Petrunya's avatar
      BUG#822134: Invalid plan and wrong result set for Q20 from DBT3 benchmark set · db05c145
      Sergey Petrunya authored
      - create_ref_for_key() has the code that walks KEYUSE array and tries to use
        maximum number of keyparts for ref (and eq_ref and ref_or_null) access.
        When one constructs ref access for table that is inside a SJ-Materialization
        nest, it is not possible to use tables that are ouside the nest (because 
        materialization is performed before they have any "current value").
        The bug was caused by this function not taking this into account.
      db05c145
    • Sergey Petrunya's avatar
      Merge · 85ecb1f7
      Sergey Petrunya authored
      85ecb1f7
    • Sergey Petrunya's avatar
      Update test results for previous cset · 71ec378d
      Sergey Petrunya authored
      71ec378d
    • Vladislav Vaintroub's avatar
      Fix long xtradb shutdown on Windows XP · a2fee983
      Vladislav Vaintroub authored
      The reason for the long shutdown is hanging in io threads. It appears
      that just closing completion port on XP does not necessarily signal 
      thread waiting in GetIOCompletionStatus() (even if this works fine
      on later Windows versions)
      
      The fix is to wakeup background threads using PostQueuedCompletionStatus()
      with a special 'key' parameter indicating shutdown.
      a2fee983
    • Vladislav Vaintroub's avatar
      LPBUG#882689 - crash during startup on XP. · b5d67260
      Vladislav Vaintroub authored
      The reason for the crash is Innodb assertion after trying to load condition variables function
      dynamically and not finding them
      
      The fix is to skip dynamic loading if srv_use_native_conditions is FALSE. srv_use_native_conditions 
      is derived from Windows version and would be FALSE on XP and TRUE on later Windows.
      
      This is the same handling as in MySQL 5.. In Maria 5.3 srv_use_native_conditions check was 
      presumably  lost in the downporting.
      b5d67260
  5. 05 Aug, 2011 2 commits
    • Sergey Petrunya's avatar
      Merge · d7cd15e4
      Sergey Petrunya authored
      d7cd15e4
    • Sergey Petrunya's avatar
      Backport of: · 11aad5cb
      Sergey Petrunya authored
      revno: 2876.47.174
      revision-id: jorgen.loland@oracle.com-20110519120355-qn7eprkad9jqwu5j
      parent: mayank.prasad@oracle.com-20110518143645-bdxv4udzrmqsjmhq
      committer: Jorgen Loland <jorgen.loland@oracle.com>
      branch nick: mysql-trunk-11765831
      timestamp: Thu 2011-05-19 14:03:55 +0200
      message:
        BUG#11765831: 'RANGE ACCESS' MAY INCORRECTLY FILTER 
                              AWAY QUALIFYING ROWS
              
        The problem was that the ranges created when OR'ing two 
        conditions could be incorrect. Without the bugfix, 
        "I <> 6 OR (I <> 8 AND J = 5)" would create these ranges:
        
        "NULL < I < 6",
        "6 <= I <= 6 AND 5 <= J <= 5",
        "6 < I < 8",
        "8 <= I <= 8 AND 5 <= J <= 5",
        "8 < I"
        
        While the correct ranges is
        "NULL < I < 6",
        "6 <= I <= 6 AND 5 <= J <= 5",
        "6 < I"
        
        The problem occurs when key_or() ORs
        (1) "NULL < I < 6, 6 <= I <= 6 AND 5 <= J <= 5, 6 < I" with 
        (2) "8 < I AND 5 <= J <= 5"
        
        The reason for the bug is that in key_or(), SEL_ARG *tmp is 
        used to point to the range in (1) above that is merged with 
        (2) while key1 points to the root of the red-black tree of 
        (1). When merging (1) and (2), tmp refers to the "6 < I" 
        part whereas the root is the "6 <= ... AND 5 <= J <= 5" part. 
        
        key_or() decides that the tmp range needs to be split into
        "6 < I < 8, 8 <= I <= 8, 8 < I", in which next_key_part of the 
        second range should be that of tmp. However, next_key_part is
        set to key1->next_key_part ("5 <= J <= 5") instead of 
        tmp->next_key_part (empty). Fixing this gives the correct but
        not optimal ranges:
        "NULL < I < 6",
        "6 <= I <= 6 AND 5 <= J <= 5",
        "6 < I < 8",
        "8 <= I <= 8",
        "8 < I"
        
        A second problem can be seen above: key_or() may create 
        adjacent ranges that could be replaced with a single range. 
        Fixes for this is also included in the patch so that the range
        above becomes correct AND optimal:
        "NULL < I < 6",
        "6 <= I <= 6 AND 5 <= J <= 5",
        "6 < I"
        
        Merging adjacent ranges like this gives a slightly lower cost 
        estimate for the range access.
      11aad5cb
  6. 04 Aug, 2011 1 commit
    • Sergey Petrunya's avatar
      Backport of: · 1fd16348
      Sergey Petrunya authored
      revno: 3363.3.16
      revision-id: jorgen.loland@oracle.com-20110506132631-5wickj6dvrh1dpj6
      parent: alexander.nozdrin@oracle.com-20110506132138-46459va9vcbd4nz0
      committer: Jorgen Loland <jorgen.loland@oracle.com>
      branch nick: mysql-trunk-11765831
      timestamp: Fri 2011-05-06 15:26:31 +0200
      message:
        BUG#11765831: 'RANGE ACCESS' MAY INCORRECTLY FILTER
                      AWAY QUALIFYING ROWS
      
        Preparation patch (does not include fix for the bug):
      
         * Extensively document key_or()
         * Remove tab indentations from key_or()
         * Minor code changes like using existing utility functions
           in key_or()
      1fd16348
  7. 03 Aug, 2011 2 commits
  8. 01 Aug, 2011 2 commits
  9. 31 Jul, 2011 3 commits
    • unknown's avatar
      Automerge 5.2->5.3 · 2481b4af
      unknown authored
      2481b4af
    • unknown's avatar
      Automerge 5.1->5.2 · 0c8579ff
      unknown authored
      0c8579ff
    • unknown's avatar
      Speed up mysql-test-run.pl. · ce2fe108
      unknown authored
      Problem was the parsing of test suite files for various tags and options.
      This was done inefficiently, and include files were re-parsed for every
      place they were included. This caused a delay of 20 seconds or so before
      the first test started to run.
      
      By parsing more efficiently and re-using first parse for subsequent
      inclusion of the same file, time spent parsing is reduced to less than
      1 second, and start appears instantaneous.
      
      (With this patch, full ./mtr runs in 3 minutes on my laptop (release
      build.)
      
      mysql-test/suite/innodb_plugin/t/innodb_bug52663.test:
        Test is fairly slow, so try to avoid getting stuck with it at the end
        while other workers are idle.
      ce2fe108
  10. 30 Jul, 2011 1 commit
    • Igor Babaev's avatar
      Fixed LP bug #817360. · 485e5edb
      Igor Babaev authored
      This problem could be observed for queries with nested outer joins
      for which the not_exist optimization were applicable. 
      The problem was caused by the code of the patch for bug #49322
      that erroneously forced the return to the previous nested loop
      level when the join algorithm successfully builds a partial record
      for an embedded outer to which the not_exist optimization could be
      applied.
      Actually the immediate return to the previous nested loops level
      is correct only if this partial record is rejected by a predicate
      pushed down to one of the inner tables of this outer join. Otherwise
      attempts to find extensions of this record must be made.
      485e5edb
  11. 28 Jul, 2011 1 commit
  12. 26 Jul, 2011 1 commit
    • Michael Widenius's avatar
      Merge with 5.1 · 89c4ab41
      Michael Widenius authored
      Fixed lp:814237: Wrong mutex usage in Aria
      
      
      storage/maria/ma_bitmap.c:
        Added call to _ma_bitmap_mark_file_changed() when flushing bitmap. This fixes lp:814237
      89c4ab41
  13. 24 Jul, 2011 2 commits
    • Michael Widenius's avatar
      Ensure that the last --datadir option is used from the my.cnf files. · 097180ef
      Michael Widenius authored
      scripts/mysqldumpslow.sh:
        Remove not used --basedir option
        Ensure that the last --datadir option is used from the my.cnf files.
      097180ef
    • Michael Widenius's avatar
      Fixes lp:805930 Sysbench breaks on multiple table test with MariaDB 5.2.7 + Aria · 35cc5ea0
      Michael Widenius authored
      The bug happens when one uses MAX_ROWS=# with Aria & row_format=page and one insert more than # rows.
      
      
      mysql-test/mysql-test-run.pl:
        Ignore table is full error messages
      mysql-test/suite/maria/r/max_length.result:
        Test case for 'Table is full'
      mysql-test/suite/maria/t/max_length.test:
        Test case for 'Table is full'
      storage/maria/ma_bitmap.c:
        Ensure that we don't allocate bits outside of max_data_file_size.
        Adjust max_data_file_size based on bitmap alignments.
        Backport fix to adjust wrong first_bitmap_with_space.
      storage/maria/ma_blockrec.c:
        Calculate value of max_data_file_length
      storage/maria/ma_blockrec.h:
        Updated prototype for _ma_bitmap_init()
      storage/maria/ma_check.c:
        Give warnings if file sizes are above max file sizes.
        Give more warnings in case of errors.
        Have maria_chk write if table is recreated.
      storage/maria/ma_create.c:
        Better calculation of max_data_file_length and thus data pointer length.
        Fixes some wrong pointer lengths when using MAX_ROWS=#
      storage/maria/ma_open.c:
        Removed duplicate assigment.
        Use block size from file instead of global variable.
      storage/maria/maria_chk.c:
        Remove -1 from printed file length
      storage/maria/maria_def.h:
        Update struct st_maria_file_bitmap
      35cc5ea0
  14. 23 Jul, 2011 2 commits
  15. 21 Jul, 2011 11 commits