1. 28 Jun, 2011 1 commit
    • Sergey Petrunya's avatar
      Followup to previous commit: · 9b2b992e
      Sergey Petrunya authored
      - Update test results
      - Fix a problem with PS: 
         = convert_subq_to_sj() should not save where to prep_where or on_expr to prep_on_expr.
         = After an unmerged subquery predicate has been pulled, it should call fix_after_pullout() for 
           outer_refs.
      9b2b992e
  2. 27 Jun, 2011 4 commits
  3. 25 Jun, 2011 3 commits
    • Igor Babaev's avatar
      Fixed LP bug #802023. · 5d461687
      Igor Babaev authored
      Made mergeable views and mergeable derived tables transparent for
      the MIN/MAX optimization.
      5d461687
    • Igor Babaev's avatar
      Added test cases for LP bug #798625 and LP bug #800085 · 7821d37b
      Igor Babaev authored
      fixed by the patch for LP bug 798621.
      7821d37b
    • Igor Babaev's avatar
      Fixed LP bug #799499. · 413eb2e8
      Igor Babaev authored
      The following were missing in the patch for mwl106:
      - KEY_PART_INFO::fieldnr were not set for generated keys to access
        tmp tables storing the rows of materialized derived tables/views
      - TABLE_SHARE::column_bitmap_size was not set for tmp tables storing
        the rows of materialized derived tables/views.
      These could cause crashes or memory overwrite.
      
      413eb2e8
  4. 24 Jun, 2011 10 commits
    • Igor Babaev's avatar
      Fixed LP bug #798576. · a11b1822
      Igor Babaev authored
      If a view/derived table is non-mergeable then the definition of the tmp table
      to store the rows for it is created at the prepare stage. In this case if the
      view definition uses outer joins and a view column belongs to an inner table
      of one of them then the column should be considered as nullable independently
      on nullability of the underlying column. If the underlying column happens to be
      defined as non-nullable then the function create_tmp_field_from_item rather 
      than the function create_tmp_field_from_field should be employed to create
      the definition of the interesting column in the tmp table.
       
      a11b1822
    • Sergey Petrunya's avatar
      Merge 5.2 -> 5.3 · 1c371480
      Sergey Petrunya authored
      (testcase for #798597 now crashes)
      1c371480
    • Michael Widenius's avatar
      Automatic merge · 3134d9dc
      Michael Widenius authored
      3134d9dc
    • Sergey Petrunya's avatar
      34f5c420
    • Michael Widenius's avatar
      Merge with 5.1 · 9e8c92cb
      Michael Widenius authored
      9e8c92cb
    • Michael Widenius's avatar
      Fixed several errors in Aria discovered by test case for lp:727869... · 079aaf43
      Michael Widenius authored
      Fixed several errors in Aria discovered by test case for lp:727869 ma_pagecache.c:2103: find_block: Assertion `block->rlocks == 0
      - Fixed assert in transaction log handler when aria_check was run on block-record table that was much bigger than expected.
      - Fixed warnings about wrong mutex order between bitmap and intern_lock
      - Fixed error in bitmap that could cause two rows to use same block for a block record.
      - Fixed wrong test that could cause error if last page for a bitmap was used by a blob.
      - Fixed several bugs in pagecache for the case where pagecase had very few blocks and there was a lot of threads competing to get the blocks (very unlikely case).
      
      
      mysql-test/suite/maria/r/maria-recovery3.result:
        Updated results
      sql/mysqld.cc:
        Allow mi_check() to send information messages for log file
      storage/maria/ma_bitmap.c:
        Fixed problem with wrong mutex order when bitmap was the first page that was flushed out of page cache
        - Fixed by introducing _ma_bitmap_mark_file_changed() that marks file changed without a bitmap lock.
        - Fixed one case in _ma_change_bitmap_page() where we didn't mark the bitmap changed. This could cause to rows to reuse same block if this was the only change to the bitmap.
        - Split _ma_bitmap_get_page_bits() in two parts to not take a bitmap lock when we already have it
        - Fixed bug in _ma_bitmap_set_full_page_bits() that caused an error if last page for a bitmap was used by a blob
      storage/maria/ma_check.c:
        Better handling of wrong file length.
        Fixed bug when we tried to write to transaction log when it was not opened (happened when block record file was bigger than expected)
      storage/maria/ma_pagecache.c:
        Fixed several bugs in pagecache for the case where pagecase had very few blocks and there was a lot of threads competing to get the blocks:
        - In link_block() mark a block given to another thread with PCBLOCK_REASSIGNED to ensure that no other threads can start re-using the block
          before the thread that requsted a block.
        - In free_block(), don't reset status for a block that is in re-assign by link_block() (we don't want to loose the PCBLOCK_REASSIGNED flag).
        - Added call to wait_for_flush() when we got a new block in find_block() to ensure that we don't use a block that is beeing flushed by another thread.
        - Moved setting of hits_left and last_hit_time in find_block() to where we assign the block.
        
        
        Code cleanup and making code uniform:
        - Changed a lot of KEYCACHE_DBUG_PRINT to use DBUG_PRINT
        - Streamlined all reporting of 'signal' and 'wait' between threads to be identical.
        - Use thread name instead of thread number (for each match against --debug)
        - Added more DBUG_ENTER, DBUG_PRINT and DBUG_ASSERT()
        - Added more comments
      storage/myisam/ha_myisam.cc:
        Only print information about that we make a backup if we are really making a backup.
      storage/myisam/mi_check.c:
        Inform mysqld that we are creating a backup of the data file (for inclusion in error log).
      079aaf43
    • Michael Widenius's avatar
    • Michael Widenius's avatar
      Fixes to aria · f75be095
      Michael Widenius authored
      - Fixed error when writing a blob to the last page on the bitmap.
      - Marked bitmap changed in once case that could cause two rows to use the same blob page.
      f75be095
    • Michael Widenius's avatar
      Fix for bug lp:798597 Incorrect "Duplicate entry" error with views and GROUP BY · 71c7be39
      Michael Widenius authored
      
      mysql-test/r/join.result:
        Test case for LP:798597
      mysql-test/t/join.test:
        Test case for LP:798597
      sql/sql_select.cc:
        In simplify_joins we reset table->maybe_null for outer join tables that can't ever be NULL.
        This caused a conflict between the previously calculated items and the group_buffer against the fields
        in the temporary table that are created as not null thanks to the optimization.
        The fix is to correct the group by items to also be not_null so that they match the used fields and keys.
      71c7be39
    • Igor Babaev's avatar
      Fixed a valgrind problem. · 3c65e0a9
      Igor Babaev authored
      The function setup_tables should handle table_list elements for
      semijoin materialized tables in a special way when executing
      a prepared statement for the second time.
      3c65e0a9
  5. 23 Jun, 2011 1 commit
    • Igor Babaev's avatar
      Fixed LP bug #800518. · 6dbf605f
      Igor Babaev authored
      The function simple_pred did not take into account that a multiple equality
      could include ref items (more exactly items of the class Item_direct_view_ref).
      It caused crashes for queries over derived tables or views if the
      min/max optimization could be applied to these queries.
      6dbf605f
  6. 22 Jun, 2011 5 commits
    • Sergey Petrunya's avatar
      Make semi-joins work with outer joins: · 2d706fd7
      Sergey Petrunya authored
      - evaluate_null_complemented_join_record() should perform FirstMatch checks.
      2d706fd7
    • Sergey Petrunya's avatar
      Make semi-joins work with outer joins part #2: · e9fb13a4
      Sergey Petrunya authored
      - Do make the DuplicateWeedout check for outer joins.
      e9fb13a4
    • Sergey Petrunya's avatar
      BUG#600958 RQG: Crash in optimize_semijoin_nests · 188af073
      Sergey Petrunya authored
      - Testcase.
      188af073
    • Igor Babaev's avatar
      Merge · 4db7d9ce
      Igor Babaev authored
      4db7d9ce
    • Igor Babaev's avatar
      Fixed LP bug #798621. · 03b2a8e0
      Igor Babaev authored
      The patch for bugs 717577 and 724942 has missed to make adjustments for the
      call item_equal->add_const(const_item, orig_field_item) in the function
      check_simple_equality that builds multiple equality for a field and a constant.
      As a result, when this field happens to be a view field and the corresponding
      Item_field object F is wrapped in an Item_direct_view_ref object R the object
      F is placed in the multiple equality instead of the object R.
      A substitution of an equal item for F potentially can cause very serious
      problems and in some cases can lead to crashes of the server.
      03b2a8e0
  7. 21 Jun, 2011 5 commits
    • Sergey Petrunya's avatar
      Make semi-joins work with outer joins part #1: · 1fbbabd0
      Sergey Petrunya authored
      - Make make_outerjoin_info() correctly process semi-join nests
      - Make make_join_select() attach conditions to the right places.
      1fbbabd0
    • unknown's avatar
      MWL#89 · 3e36fc69
      unknown authored
      Removed forgotten EXPLAIN EXTENDED from the test file.
      3e36fc69
    • Sergei Golubchik's avatar
      lp:790513 MariaDB crashes on startup · 03e31843
      Sergei Golubchik authored
      initialize plugins earlier, to support, for example, non-MyISAM mysql.plugin table.
      03e31843
    • unknown's avatar
      MWL#89 · 9eb6d502
      unknown authored
      Automerged with 5.3.
      9eb6d502
    • unknown's avatar
      MWL#89 · 9895a719
      unknown authored
      - Added regression test with queries over the WORLD database.
      - Discovered and fixed several bugs in the related cost calculation
        functionality both in the semijoin and non-semijon subquery code.
      - Added DBUG printing of the cost variables used to decide between
        IN-EXISTS and MATERIALIZATION.
      9895a719
  8. 17 Jun, 2011 3 commits
  9. 16 Jun, 2011 1 commit
  10. 15 Jun, 2011 7 commits