1. 26 Oct, 2010 1 commit
    • unknown's avatar
      Fixed LP bug #601156 · b4d5f30a
      unknown authored
      The cause for this bug is that MariaDB 5.3 still processes derived tables
      (subqueries in the FROM clause) by fully executing them during the parse
      phase. This will be remedied by MWL#106 once merged into the main 5.3.
      
      The assert statement is triggered when MATERIALIZATION is ON for EXPLAIN
      EXTENDED for derived tables with an IN subquery as follows:
      - mysql_parse calls JOIN::exec for the derived table as if it is regular
        execution (not explain).
      - When materialization is ON, this call goes all the way to
        subselect_hash_sj_engine::exec, which creates a partial match engine
        because of NULL presence.
      - In order to proceed with normal execution, the hash_sj engine substitutes
        itself with the created partial match engine.
      - After the parse phase it turns out that this execution was part of
        EXPLAIN EXTENDED, which in turn calls
        Item_cond::print -> ... -> Item_subselect::print,
        which calls engine->print().
        Since subselect_hash_sj_engine::exec substituted the current
        Item_subselect engine with a  partial match engine, eventually we call
        its ::print() method. However the partial match engines are designed only
        for execution, hence there is no implementation of this print() method.
      
      The fix temporarily removes the assert, until this code is merged with
      MWL#106.
      b4d5f30a
  2. 25 Oct, 2010 1 commit
    • unknown's avatar
      Fixed LP bug #609121 · db4738a1
      unknown authored
      The bug was a result of missing logic to handle the case
      when there are 'expensive' predicates that are not evaluated
      during constant table optimization. Such is the case for
      the IN predicate, which is considered expensive if it is
      computed via materialization. In general this bug can be
      triggered with any expensive predicate instead of IN.
      
      When FALSE constant predicates are not evaluated during constant
      optimization, the execution path changes so that instead of
      setting JOIN::zero_result_cause after make_join_select, and
      exiting JOIN::exec via the call to return_zero_rows(), execution
      ends in JOIN::exec in the branch:
      if (join->tables == join->const_tables)
      {
        ...
        else if (join->send_row_on_empty_set())
           ...
           rc= join->result->send_data(*columns_list);
      }
      Unlike return_zero_rows(), this branch didn't evaluate the
      having clause of the query.
      
      The patch adds a call to evaluate the HAVING clause of a query even
      when all tables are constant, because even for an empty result set
      some aggregate functions may produce a NULL value.
      db4738a1
  3. 18 Oct, 2010 2 commits
  4. 17 Oct, 2010 1 commit
    • Sergey Petrunya's avatar
      MariaDB 5.2 -> 5.2 post-merge fixes: · f75fd03e
      Sergey Petrunya authored
      - When building multiple-equalities for HAVING, don't set JOIN::cond_equal, set
        join_having_equal instead. Setting JOIN::cond_equal based on HAVING makes 
        equality propagation data self-inconsistent
      f75fd03e
  5. 14 Oct, 2010 4 commits
  6. 13 Oct, 2010 5 commits
    • Sergey Petrunya's avatar
      Merge-in Sanja's post-merge fix · aad8a298
      Sergey Petrunya authored
      aad8a298
    • Sergey Petrunya's avatar
      Merge MariaDB 5.2 -> MariaDB 5.3 · 508e75c2
      Sergey Petrunya authored
      - post-merge fixes
      508e75c2
    • Michael Widenius's avatar
      Fixes for bugs found by running test case for LP#608369 "Page: 1 Found wrong... · 01672cc0
      Michael Widenius authored
      Fixes for bugs found by running test case for LP#608369 "Page: 1 Found wrong page type 0' on CHECK TABLE EXTENDED"
      Fixed overflow when using long --debug=xxxxxx line.
      Fixed that "mysqld --disable-debug --debug" works.
      Ensure that MariaDB doesn't start if the Aria engine didn't start and we are using Aria for temporary tables.
      More DBUG_ASSERT() and more info in debug log.
      
      
      dbug/dbug.c:
        Fixed crash in mysqld caused by an overflow when using long --debug=xxxxxx line
      sql/mysqld.cc:
        Fixed that "mysqld --disable-debug --debug" works.
        Documented myisam-recover=OFF option
      storage/maria/ha_maria.cc:
        Ensure that MariaDB doesn't start if the Aria engine didn't start and we are using Aria for temporary tables.
      storage/maria/ma_delete.c:
        Added missing write of changed key on node page.
        This could fix LP#608369 "Page: 1 Found wrong page type 0' on CHECK TABLE EXTENDED"
        Changed so that we log page numbers (not positions)
        Added KEY_OP_DEBUG_2 log entry to get more debug information into the log
      storage/maria/ma_key_recover.c:
        Changed so that we log page numbers (not positions)
        In case of wrong page information after index_redo, dump pages to debug log
      storage/maria/ma_loghandler.h:
        Added KEY_OP_DEBUG_2
      storage/maria/ma_search.c:
        Changed so that we log page numbers (not positions)
      storage/maria/ma_write.c:
        Changed so that we log page numbers (not positions)
      01672cc0
    • Sergey Petrunya's avatar
      More post-merge test result updates (2). · 49ae85af
      Sergey Petrunya authored
      49ae85af
    • unknown's avatar
      version of mysqld changed. · 23de53f5
      unknown authored
      23de53f5
  7. 12 Oct, 2010 3 commits
  8. 10 Oct, 2010 3 commits
  9. 07 Oct, 2010 1 commit
    • Michael Widenius's avatar
      Fixes some bug in Aria recovery: · 2f85f78d
      Michael Widenius authored
      - _ma_apply_redo_index: Assertion `page_offset != 0 && page_offset + length <= page_length' failed
      Fixes one bug and one log assert when inserting rows:
      - _ma_log_split: Assertion `org_length <= info->s->max_index_block_size' failed
      - write_block_record:  Assertion '(data_length < MAX_TAIL_SIZE(block_size)' failed
      Mark in recovery log where _ma_log_add() calls was done (for better debugging).
      
      storage/maria/ma_bitmap.c:
        Don't write a head part on a tail page. (Caused an assert in write_block_record())
      storage/maria/ma_delete.c:
        Mark in recovery log where _ma_log_add() calls was done
      storage/maria/ma_key_recover.c:
        Mark in recovery log where _ma_log_add() calls was done
        Fixed not handled logging case for overfull index pages.
      storage/maria/ma_key_recover.h:
        Mark in recovery log where _ma_log_add() calls was done
      storage/maria/ma_loghandler.h:
        Mark in recovery log where _ma_log_add() calls was done
      storage/maria/ma_rt_key.c:
        Mark in recovery log where _ma_log_add() calls was done
      storage/maria/ma_write.c:
        Mark in recovery log where _ma_log_add() calls was done.
        Fixed wrong call to _ma_split_page() for overfull pages
      2f85f78d
  10. 06 Oct, 2010 3 commits
  11. 03 Oct, 2010 1 commit
  12. 28 Sep, 2010 1 commit
  13. 01 Oct, 2010 1 commit
  14. 28 Sep, 2010 2 commits
  15. 27 Sep, 2010 2 commits
    • Michael Widenius's avatar
      Move maria_upgrade() out of maria_init() as in standalone programs maria_data_root is not set. · f715c9c2
      Michael Widenius authored
      Fixed failing pbxt test
      
      
      include/maria.h:
        Added maria_upgrade()
      mysql-test/suite/pbxt/r/select.result:
        Don't print number of rows as this is not constant over different runs
      mysql-test/suite/pbxt/t/select.test:
        Don't print number of rows as this is not constant over different runs
      storage/maria/ha_maria.cc:
        Run maria_upgrade() before maria_init()
      storage/maria/ma_init.c:
        Move maria_upgrade() out of maria_init() as in standalone programs maria_data_root is not set.
      f715c9c2
    • Michael Widenius's avatar
      Rename control file and log files from maria_xxx to aria_xxx when upgrading from MariaDB 5.1 · 0df17892
      Michael Widenius authored
      Fix cleanup to really remove 'aria_log' files. Fixes failures in maria unit tests on some platforms.
      Fixed compiler warnings
      
      include/mysql/plugin.h:
        Changed def_val back to const, to remove compiler warnings.
      storage/maria/ma_init.c:
        Rename control file and log files from maria_xxx to aria_xxx when upgrading from MariaDB 5.1
      storage/maria/unittest/ma_maria_log_cleanup.c:
        Fix cleanup to really remove 'aria_log' files. Fixes failures in maria unit tests on some platforms.
      0df17892
  16. 26 Sep, 2010 2 commits
    • Igor Babaev's avatar
      Merge · 6b1c78e7
      Igor Babaev authored
      6b1c78e7
    • Igor Babaev's avatar
      Fixed bug #57024. · 716e8416
      Igor Babaev authored
      The condition over the outer tables now are extracted from
      the on condition of any outer join. This condition is
      saved in a special field of the JOIN_TAB structure for
      the first inner table of the outer join. The condition
      is checked before the first inner table is accessed. If 
      it turns out to be false the table is not accessed at all
      and a null complemented row is generated immediately.
      716e8416
  17. 25 Sep, 2010 2 commits
  18. 23 Sep, 2010 4 commits
    • Michael Widenius's avatar
    • Michael Widenius's avatar
      Change some my_bool in C++ classes and a few functions to bool to detect wrong... · bdba1d11
      Michael Widenius authored
      Change some my_bool in C++ classes and a few functions to bool to detect wrong usage of bool/my_bool.
      Fix some bugs where we stored values other than 0 or 1 in my_bool
      Fixed some compiler warnings
      
      
      client/mysql.cc:
        Changed interrupted_query from my_bool to int, as we stored 2 in it.
      client/mysqladmin.cc:
        Changed return variable type to same type as function value type
      client/mysqltest.cc:
        Changed 'found' to int as we store other values than 0 or 1 into it
        Changed type for parameter of set_reconnect() to match usage.
      extra/libevent/evbuffer.c:
        Added __attribute__((unused))
      extra/libevent/event.c:
        Added __attribute__((unused))
      extra/libevent/signal.c:
        Added __attribute__((unused))
      sql/event_data_objects.h:
        my_bool -> bool
      sql/event_db_repository.cc:
        my_bool -> bool
      sql/event_db_repository.h:
        my_bool -> bool
      sql/event_parse_data.h:
        my_bool -> bool
      sql/events.cc:
        my_bool -> bool
      sql/events.h:
        my_bool -> bool
      sql/field.cc:
        my_bool -> bool
      sql/field.h:
        my_bool -> bool
      sql/hash_filo.h:
        my_bool -> bool
      sql/item.cc:
        my_bool -> bool
      sql/item.h:
        my_bool -> bool
      sql/item_cmpfunc.h:
        my_bool -> bool
        Changed result_for_null_param from my_bool to int as we stored -1 in it.
      sql/item_func.cc:
        my_bool -> bool
        Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
      sql/item_func.h:
        my_bool -> bool
      sql/item_subselect.h:
        my_bool -> bool
      sql/item_sum.cc:
        Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
      sql/parse_file.h:
        my_bool -> bool
      sql/rpl_mi.h:
        my_bool -> bool
      sql/sp_rcontext.h:
        my_bool -> bool
      sql/sql_analyse.h:
        my_bool -> bool
      sql/sql_base.cc:
        Change some assignments so that we don't initialize bool variables with int's.
      sql/sql_bitmap.h:
        my_bool -> bool
      sql/sql_cache.cc:
        my_bool -> bool
      sql/sql_cache.h:
        my_bool -> bool
      sql/sql_class.h:
        my_bool -> bool
      sql/sql_insert.cc:
        Change some assignments so that we don't initialize bool variables with int's.
      sql/sql_prepare.cc:
        my_bool -> bool
      sql/table.h:
        my_bool -> bool
      storage/maria/ma_check.c:
        Removed duplicate assignment
      strings/decimal.c:
        Fixed wrong variable usage.
        Don't do complex arithmetic on bool when simple works.
      bdba1d11
    • Igor Babaev's avatar
      Merge · c6c86edb
      Igor Babaev authored
      c6c86edb
    • Michael Widenius's avatar
      Fix usage of mysqld option --new, --old, --safe and --skip_new to not disable... · 5ce4825b
      Michael Widenius authored
      Fix usage of mysqld option --new, --old, --safe and --skip_new to not disable things that are proven stable or enable things that are not usefull.
      
      
      sql/field.cc:
        Remove feature of 'new_mode' that was never implemtented in a newer MySQL version.
      sql/item_cmpfunc.cc:
        Boyer more is stable; Don't have to be protected by --skip-new anymore
      sql/mysqld.cc:
        Don't disable some proven stable functions with --skip-new
      sql/records.cc:
        Don't disable record caching with --safe-mode anymore
      sql/sql_delete.cc:
        Do fast truncate even if --skip-new or --safe is used
      sql/sql_parse.cc:
        Use always mysql_optimizer() for optimizer (instead of mysql_recreate_table() in case of --safe or --skip-new)
      sql/sql_select.cc:
        Don't disable 'only_eq_ref_tables' if --safe is used.
      sql/sql_yacc.yy:
        Removed not meaningfull test of --old
      5ce4825b
  19. 21 Sep, 2010 1 commit