- 24 May, 2012 1 commit
-
-
Sergey Petrunya authored
- In JOIN::exec(), make the having->update_used_tables() call before we've made the JOIN::cleanup(full=true) call. The latter frees SJ-Materialization structures, which correlated subquery predicate items attempt to walk afterwards.
-
- 23 May, 2012 3 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
- Correct testcases.
-
Sergey Petrunya authored
- Disable IndexConditionPushdown for reverse scans.
-
- 22 May, 2012 1 commit
-
-
unknown authored
Analysis: The optimizer detects an empty result through constant table optimization. Then it calls return_zero_rows(), which in turns calls inderctly Item_maxmin_subselect::no_rows_in_result(). The latter method set "value=0", however "value" is pointer to Item_cache, and not just an integer value. All of the Item_[maxmin | singlerow]_subselect::val_XXX methods does: if (forced_const) return value->val_real(); which of course crashes when value is a NULL pointer. Solution: When the optimizer discovers an empty result set, set Item_singlerow_subselect::value to a FALSE constant Item instead of NULL.
-
- 21 May, 2012 1 commit
-
-
Alexey Botchkov authored
Handle the 'set read_only=1' in lighter way, than the FLUSH TABLES READ LOCK; For the transactional engines we don't wait for operations on that tables to finish. per-file comments: mysql-test/r/read_only_innodb.result MDEV-136 Non-blocking "set read_only". test result updated. mysql-test/t/read_only_innodb.test MDEV-136 Non-blocking "set read_only". test case added. sql/mysql_priv.h MDEV-136 Non-blocking "set read_only". The close_cached_tables_set_readonly() declared. sql/set_var.cc MDEV-136 Non-blocking "set read_only". Call close_cached_tables_set_readonly() for the read_only::set_var. sql/sql_base.cc MDEV-136 Non-blocking "set read_only". Parameters added to the close_cached_tables implementation, close_cached_tables_set_readonly declared. Prevent blocking on the transactional tables if the set_readonly_mode is on.
-
- 20 May, 2012 1 commit
-
-
Sergei Golubchik authored
-
- 18 May, 2012 4 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
BUG#1000269: Wrong result (extra rows) with semijoin+materialization, IN subqueries, join_cache_level>0 - make make_cond_after_sjm() correctly handle OR clauses where one branch refers to the semi-join table while the other branch refers to the non-semijoin table.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
sql/slave.cc: add mutex protection, like in sql_parse.cc
-
- 17 May, 2012 3 commits
-
-
Sergei Golubchik authored
-
unknown authored
-
unknown authored
The problem is that we can't check null_value field of non-basic constant without the item execution.:
-
- 15 May, 2012 1 commit
-
-
unknown authored
If we did nothing in resolving unique table conflict we should not retry (it leed to infinite loop). Now we retry (recheck) unique table check only in case if we materialized a table.
-
- 13 May, 2012 1 commit
-
-
Sergey Petrunya authored
- Let fix_semijoin_strategies_for_picked_join_order() set POSITION::prefix_record_count for POSITION records that it copies from SJ_MATERIALIZATION_INFO::tables. (These records do not have prefix_record_count set, because they are optimized as joins-inside-semijoin-nests, without full advance_sj_state() processing).
-
- 12 May, 2012 3 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
Sergey Petrunya authored
in greedy_search with LEFT JOINs and unique keys - Backport the fix for BUG#806524 from MariaDB 5.3
-
- 11 May, 2012 2 commits
-
-
unknown authored
-
unknown authored
The not_null_tables() of Item_func_not_all and Item_in_optimizer was inherited from Item_func by mistake. It made the optimizer think that subquery predicates with ALL/ANY/IN were null-rejecting. This could trigger invalid conversions of outer joins into inner joins.
-
- 10 May, 2012 1 commit
-
-
unknown authored
-
- 08 May, 2012 3 commits
-
-
unknown authored
-
unknown authored
It is problem of constant propagated to ref* access method (the problem was hiden by using debug binaries for testing).
-
Vladislav Vaintroub authored
The failures are missing entries in the slow query log. The reason for the failure are sleep() calls with short duration 10ms, which is less than the default system timer resolution for various WaitForXXXObject functions (15.6 ms) and thus can't work reliably. The fix is to make sleeps tiny bit longer (20ms from 10ms) in the test.
-
- 07 May, 2012 4 commits
-
-
Vladislav Vaintroub authored
let x = `SELECT <something>` The fix is to detect the condition "no active connection", to report error and die. Note, that the check for no active connection was already in place for ordinary commands, and was missing only for assign-variable command.
-
unknown authored
In 5.3 we substitute constants in ref access values it can't be null so we do not need add NOT NULL for early NULL filtering.
-
unknown authored
Optimization of aggregate functions detected constant under max() and evalueted it, but condition in the WHWRE clause (which is always FALSE) was not taken into account
-
unknown authored
The patch backports two patches from mysql 5.6: - BUG#12640437: USING SQL_BUFFER_RESULT RESULTS IN A DIFFERENT QUERY OUTPUT - Bug#12578908: SELECT SQL_BUFFER_RESULT OUTPUTS TOO MANY ROWS WHEN GROUP IS OPTIMIZED AWAY Original comment: ----------------- 3714 Jorgen Loland 2012-03-01 BUG#12640437 - USING SQL_BUFFER_RESULT RESULTS IN A DIFFERENT QUERY OUTPUT For all but simple grouped queries, temporary tables are used to resolve grouping. In these cases, the list of grouping fields is stored in the temporary table and grouping is resolved there (e.g. by adding a unique constraint on the involved fields). Because of this, grouping is already done when the rows are read from the temporary table. In the case where a group clause may be optimized away, grouping does not have to be resolved using a temporary table. However, if a temporary table is explicitly requested (e.g. because the SQL_BUFFER_RESULT hint is used, or the statement is INSERT...SELECT), a temporary table is used anyway. In this case, the temporary table is created with an empty group list (because the group clause was optimized away) and it will therefore not create groups. Since the temporary table does not take care of grouping, JOIN::group shall not be set to false in make_simple_join(). This was fixed in bug 12578908. However, there is an exception where make_simple_join() should set JOIN::group to false even if the query uses a temporary table that was explicitly requested but is not strictly needed. That exception is if the loose index scan access method (explain says "Using index for group-by") is used to read into the temporary table. With loose index scan, grouping is resolved by the access method. This is exactly what happens in this bug.
-
- 03 May, 2012 1 commit
-
-
unknown authored
This is a backport of the fix for MySQL bug #13723054 in 5.6. Original comment: The crash is caused by arbitrary memory area owerwriting in case of BLOB fields during attempt to copy BLOB field key image into record buffer(record buffer is too small to get BLOB key part image). note: QUICK_GROUP_MIN_MAX_SELECT can not work with BLOB fields because it uses record buffer as temporary buffer for key values however this case is filtered out by covering_keys() check in get_best_group_min_max() as BLOBs always require key length modificator in the key declaration and if the key has a BLOB then it can not be covered key. The fix is to use 'max_used_key_length' key length instead of 0. Analysis: Spcifically the crash in this bug was a result of the call to key_copy() that copied the whole key, inlcuding the BLOB field which is not used for index access. Copying the blob field overwrote memory as far as the function parameter 'key_info'. As a result the contents of key_info was all 0, which resulted in a crash when this key_info was accessed few lines below in key_cmp().
-
- 02 May, 2012 1 commit
-
-
Sergei Golubchik authored
-
- 03 May, 2012 1 commit
-
-
Alexey Botchkov authored
-
- 02 May, 2012 8 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Oleksandr Byelkin authored
MDEV-214 lp:967242 Wrong result with JOIN, AND in ON condition, multi-part key, GROUP BY, subquery and OR in WHERE The problem was in the code (update_const_equal_items()) which marked index parts constant independently of the place where the equality was used. In the test suite it marked t2_1.c part constant despite the fact that it connected by OR with other expression. Solution is to mark constant only top equalities connected with AND.
-
Sergei Golubchik authored
-
Vladislav Vaintroub authored
Fix is to set maybe_null flag for Item_func_last_day.
-
Sergei Golubchik authored
unnecessary date->string->date conversion
-
Sergei Golubchik authored
Create an Item_cache based on item's cmp_type, not result_type in subselect_engine. Use result_field in Item_cache_temporal::cache_value(), just like all other Item_cache*::cache_value() do.
-
Vladislav Vaintroub authored
-