1. 17 Jan, 2011 2 commits
    • unknown's avatar
      MWL#89 · 5c4e64a5
      unknown authored
      Fixed query plans with loose index scan degraded into index scan.
      
      Analysis:
      With MWL#89 subqueries are no longer executed and substituted during
      the optimization of the outer query. As a result subquery predicates
      that were previously executed and substituted by a constant before
      the range optimizer were present as regular subquery predicates during
      range optimization. The procedure check_group_min_max_predicates()
      had a naive test that ruled out all queries with subqueries in the
      WHERE clause. This resulted in worse plans with MWL#89.
      
      Solution:
      The solution is to refine the test in check_group_min_max_predicates()
      to check if each MIN/MAX argument is referred to by a subquery predicate.
      5c4e64a5
    • unknown's avatar
      Fix LP BUG#702345 · b1a6ecd6
      unknown authored
      Analysis:
      Close to its end JOIN::optimize() assigns having to tmp_having, and
      sets the having clause to NULL:
      
        tmp_having= having;
        if (select_options & SELECT_DESCRIBE)
        {
          error= 0;
          DBUG_RETURN(0);
        }
        having= 0;
      
      At the same time, this query detects an empty result set, and calls
      return_zero_rows(), which checks the HAVING clause as follows:
      
          if (having && having->val_int() == 0)
            send_row=0;
      
      However having has been already set to NULL, so return_zero_rows
      doesn't check the having clause, hence the wrong result.
      
      Solution:
      Check join->tmp_having in addition to join->having.
      
      There is no additional test case, because the failure was in
      the current regression test.
      b1a6ecd6
  2. 13 Jan, 2011 1 commit
  3. 11 Jan, 2011 1 commit
  4. 05 Jan, 2011 1 commit
    • Igor Babaev's avatar
      Fixed LP bug #697557. · cb4fa7f4
      Igor Babaev authored
      When stored in a key buffer any varchar field has a length prefix
      that always takes 2 bytes.
      cb4fa7f4
  5. 30 Dec, 2010 1 commit
  6. 29 Dec, 2010 2 commits
  7. 28 Dec, 2010 3 commits
  8. 27 Dec, 2010 3 commits
    • Igor Babaev's avatar
      Post-merge fixes. · 511b53ab
      Igor Babaev authored
      511b53ab
    • Igor Babaev's avatar
      Merge · 0dc5ef87
      Igor Babaev authored
      0dc5ef87
    • Igor Babaev's avatar
      Fixed LP bug #694443. · 18dc64ec
      Igor Babaev authored
      One of the hash functions employed by the BNLH join algorithm
      calculates the the value of hash index for key value utilizing
      every byte of the key buffer. To make this calculation valid
      one has to ensure that for any key value unused bytes of the 
      buffer are filled with with a certain filler. We choose 0 as
      a filler for these bytes.
      
      Added an optional boolean parameter with_zerofill to the function
      key_copy. If the value of the parameter is TRUE all unused bytes
      of the key buffer is filled with 0. 
      18dc64ec
  9. 26 Dec, 2010 1 commit
  10. 25 Dec, 2010 1 commit
  11. 24 Dec, 2010 2 commits
    • Igor Babaev's avatar
      Fixed LP bug#694092. · d9a81475
      Igor Babaev authored
      In some cases the function make_cond_for_index() was mistaken
      when detecting index only pushdown conditions for a table: 
      a pushdown condition that was not index only could be marked
      as such.
      It happened because the procedure erroneously used the markers
      for index only conditions that remained from the calls of
      this function that extracted the index conditions for other 
      tables.
      Fixed by erasing index only markers as soon as they are need
      anymore.
      d9a81475
    • Igor Babaev's avatar
      Merge: mwl#24+mwl#21 5.1->5.2 · 7d68e1ea
      Igor Babaev authored
      7d68e1ea
  12. 23 Dec, 2010 2 commits
    • unknown's avatar
      MWL#89 · 2e42948e
      unknown authored
        
      - Post-review fixes. Intermediate commit to address review point 1.6.
      - Fixed valgrind warnings
      2e42948e
    • Igor Babaev's avatar
      Post-review fixes. · 6f2db629
      Igor Babaev authored
      6f2db629
  13. 22 Dec, 2010 1 commit
    • Igor Babaev's avatar
      Fixed LP bug #670380. · a095346a
      Igor Babaev authored
      Lifted the limitation that hash join could not be used over 
      varchar fields with non-binary collation.
      a095346a
  14. 21 Dec, 2010 2 commits
  15. 20 Dec, 2010 2 commits
  16. 19 Dec, 2010 2 commits
  17. 17 Dec, 2010 3 commits
  18. 16 Dec, 2010 3 commits
  19. 15 Dec, 2010 2 commits
    • unknown's avatar
      MWL#89 · 0bee625f
      unknown authored
      Post-review fixes. Intermediate commit to address
      review points 1.1, 1.2, 1.3, 1.4, 1.5, and 3.1, 3.2, 3.3.
      0bee625f
    • Sergey Petrunya's avatar
      - Fix compiler warning · 802db7a6
      Sergey Petrunya authored
      - Better warnings
      802db7a6
  20. 14 Dec, 2010 1 commit
    • unknown's avatar
      Fix LP BUG#685411 · 4f28dcbe
      unknown authored
      Analysis:
      The assert failed because st_select_lex::print() was called for subqueries
      as follows:
      
      Item_subselect::print() ->
        subselect_single_select_engine::print() -> st_select_lex::print()
      
      It was Item_subselect::fix_fields() that set the thd by calling set_thd(),
      so when this print() was called before fix_fields(), subselect_engine::thd
      was NULL.
      
      Solution:
      The patch makes all constructors of all subselect_engine classes to take
      a THD parameter. The default subselect_single_select_engine engine is created
      early during parse time, in the Item_subselect::init call, so we pass the
      correct THD object already at this point.
      4f28dcbe
  21. 13 Dec, 2010 4 commits
    • Sergey Petrunya's avatar
      MWL#121-125 DS-MRR improvements · eafc4bef
      Sergey Petrunya authored
      - Address review feedback: change return type of RANGE_SEQ_IF::next()
      eafc4bef
    • Michael Widenius's avatar
      merge with 5.1 · 09d2e7f6
      Michael Widenius authored
      (Includes patch for overrun detected by valgrind thanks to previous my_alloca() -> my_malloc() patch)
      09d2e7f6
    • Michael Widenius's avatar
      Fixed typo that caused compile failure in thr_lock.c · 0b20943e
      Michael Widenius authored
      mysys/thr_lock.c:
        Fixed typo that caused compile failure
      0b20943e
    • Michael Widenius's avatar
      When compiling with valgrind, change my_alloca() to use my_malloc() · ffb0cd61
      Michael Widenius authored
      - This allows us to detect missing my_afree() calls and also find overruns (when running with valgrind) to alloca() areas.
      - Added missing my_afree() calls
      - Fixed wrong call to my_afree()
      
      
      include/my_sys.h:
        When compiling with valgrind, change my_alloca() to use my_malloc()
      mysql-test/suite/innodb/t/innodb_bug57255.test:
        Speed up taste case (patch from Stewart Smith)
      mysql-test/suite/innodb_plugin/t/innodb_bug57255.test:
        Speed up taste case (patch from Stewart Smith)
      sql/ha_partition.cc:
        Removed casts from my_afree()
      sql/opt_range.cc:
        Add missing my_afree() calls.
      storage/maria/ma_rt_split.c:
        Fixed wrong parameter to my_afree()
      ffb0cd61