feature
The test for bug no 50939 was put in range.test which isn't such a good idea
since it requires partitioning. Fixed by moving the test case to
partitioning_range.test.
remember range endpoints
The Loose Index Scan optimization keeps track of a sequence
of intervals. For the current interval it maintains the
current interval's endpoints. But the maximum endpoint was
not stored in the SQL layer; rather, it relied on the
storage engine to retain this value in-between reads. By
coincidence this holds for MyISAM and InnoDB. Not for the
partitioning engine, however.
Fixed by making the key values iterator
(QUICK_RANGE_SELECT) keep track of the current maximum endpoint.
This is also more efficient as we save a call through the
handler API in case of open-ended intervals.
The code to calculate endpoints was extracted into
separate methods in QUICK_RANGE_SELECT, and it was possible to
get rid of some code duplication as part of fix.
for each record'
There was an error in an internal structure in the range
optimizer (SEL_ARG). Bad design causes parts of a data
structure not to be initialized when it is in a certain
state. All client code must check that this state is not
present before trying to access the structure's data. Fixed
by
- Checking the state before trying to access data (in
several places, most of which not covered by test case.)
- Copying the keypart id when cloning SEL_ARGs
mysql-test/r/range.result:
Bug#48459: Test result.
mysql-test/t/range.test:
Bug#48459: Test case.
sql/opt_range.cc:
Bug#48459: Fix + doxygenated count_key_part_usage comment.
When merging ranges during calculation of the result of OR
to two range sets the current range may be obsoleted by the
resulting merged range.
The first overlapping range can be obsoleted as well.
Fixed by moving the pointer to the first overlapping range to the
pointer of the resulting union range.
Added few comments at key places in key_or().
When a query was using a DATE or DATETIME value formatted
using any other separator characters beside hyphen '-', a
query with a greater-or-equal '>=' condition matching only
the greatest value in an indexed column, the result was
empty if index range scan was employed.
The range optimizer got a new feature between 5.1.38 and
5.1.39 that changes a greater-or-equal condition to a
greater-than if the value matching that in the query was not
present in the table. But the value comparison function
compared the dates as strings instead of dates.
The bug was fixed by splitting the function
get_date_from_str in two: One part that parses and does
error checking. This function is now visible outside the
module. The old get_date_from_str now calls the new
function.
mysql-test/r/range.result:
Bug#47925: Test result
mysql-test/t/range.test:
Bug#47925: Test case
sql/item.cc:
Bug#47925: Fix + some edit on the comments
sql/item.h:
Bug#47925: Changed function signature
sql/item_cmpfunc.cc:
Bug#47925: Split function in two
sql/item_cmpfunc.h:
Bug#47925: Declaration of new function
sql/opt_range.cc:
Bug#47925: Added THD to function call
sql/time.cc:
Bug#47925: Added microsecond comparison
The problem was in incorrect handling of predicates involving
NULL as a constant value by the range optimizer.
For example, when creating a SEL_ARG node from a condition of
the form "field < const" (which would normally result in the
"NULL < field < const" SEL_ARG), the special case when "const"
is NULL was not taken into account, so "NULL < field < NULL"
was produced for the "field < NULL" condition.
As a result, SEL_ARG structures of this form could not be
further optimized which in turn could lead to incorrectly
constructed SEL_ARG trees. In particular, code assuming SEL_ARG
structures to always form a sequence of ordered disjoint
intervals could enter an infinite loop under some
circumstances.
Fixed by changing get_mm_leaf() so that for any sargable
predicate except "<=>" involving NULL as a constant, "empty"
SEL_ARG is returned, since such a predicate is always false.
mysql-test/r/partition_pruning.result:
Fixed a broken test case.
mysql-test/r/range.result:
Added a test case for bug #47123.
mysql-test/r/subselect.result:
Fixed a broken test cases.
mysql-test/t/range.test:
Added a test case for bug #47123.
sql/opt_range.cc:
Fixed get_mm_leaf() so that for any sargable
predicate except "<=>" involving NULL as a constant, "empty"
SEL_ARG is returned, since such a predicate is always false.
The problem was in incorrect handling of predicates involving
NULL as a constant value by the range optimizer.
For example, when creating a SEL_ARG node from a condition of
the form "field < const" (which would normally result in the
"NULL < field < const" SEL_ARG), the special case when "const"
is NULL was not taken into account, so "NULL < field < NULL"
was produced for the "field < NULL" condition.
As a result, SEL_ARG structures of this form could not be
further optimized which in turn could lead to incorrectly
constructed SEL_ARG trees. In particular, code assuming SEL_ARG
structures to always form a sequence of ordered disjoint
intervals could enter an infinite loop under some
circumstances.
Fixed by changing get_mm_leaf() so that for any sargable
predicate except "<=>" involving NULL as a constant, "empty"
SEL_ARG is returned, since such a predicate is always false.
mysql-test/r/range.result:
Added a test case for bug #47123.
mysql-test/t/range.test:
Added a test case for bug #47123.
sql/opt_range.cc:
Fixed get_mm_leaf() so that for any sargable
predicate except "<=>" involving NULL as a constant, "empty"
SEL_ARG is returned, since such a predicate is always false.
covering index
When two range predicates were combined under an OR
predicate, the algorithm tried to merge overlapping ranges
into one. But the case when a range overlapped several other
ranges was not handled. This lead to
1) ranges overlapping, which gave repeated results and
2) a range that overlapped several other ranges was cut off.
Fixed by
1) Making sure that a range got an upper bound equal to the
next range with a greater minimum.
2) Removing a continue statement
mysql-test/r/group_min_max.result:
Bug#42846: Changed query plans
mysql-test/r/range.result:
Bug#42846: Test result.
mysql-test/t/range.test:
Bug#42846: Test case.
sql/opt_range.cc:
Bug#42846: The fix.
Part1: Previously, both endpoints from key2 were copied,
which is not safe. Since ranges are processed in ascending
order of minimum endpoints, it is safe to copy the minimum
endpoint from key2 but not the maximum. The maximum may only
be copied if there is no other range or the other range's
minimum is greater than key2's maximum.
WHERE f1 < n ignored row if f1 was indexed integer column and
f1 = TYPE_MAX ^ n = TYPE_MAX+1. The latter value when treated
as TYPE overflowed (obviously). This was not handled, it is now.
mysql-test/r/range.result:
show that on an index int column, we no longer disregard
a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
mysql-test/t/range.test:
show that on an index int column, we no longer disregard
a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
sql/opt_range.cc:
Handle overflowing of int-types in range-optimizer.
Unfortunately requires re-indentation of entire block.
Overflow (err == 1) was handled, but only if
field->cmp_type() != value->result_type(), which it
just wasn't in our case.
into kaamos.(none):/data/src/opt/mysql-5.1-opt
mysql-test/r/heap.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
BitKeeper/deleted/.del-bdb.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_binary.result:
Auto merged
mysql-test/r/type_set.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
mysql-test/t/warnings.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/mysqld.cc:
Null merge.
mysql-test/include/mix1.inc:
Manual merge.
mysql-test/r/innodb_mysql.result:
Manual merge.
mysql-test/r/range.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/handler.cc:
Manual merge.
Two disjuncts containing equalities of the form key=const1 and key=const2 can
be merged into one if const1 is equal to const2. To check it the common
collation of the constants were used rather than the collation of the field key.
For example when the default collation of the constants was cases insensitive
while the collation of the field was case sensitive, then two or-ed equality
predicates key='b' and key='B' incorrectly were merged into one f='b'. As a
result ref access was used instead of range access and wrong result sets were
returned in many cases.
Fixed the problem by comparing constant in the or-ed predicate with collation of
the key field.
mysql-test/r/range.result:
Added a test case for bug #33833.
mysql-test/t/range.test:
Added a test case for bug #33833.
sql/item.cc:
Fixed bug #33833.
Added the method eq_by_collation that compares two items almost as
the method Item::eq, but it rather enforces a given collation for
the comparison.
sql/item.h:
Fixed bug #33833.
Added the method eq_by_collation that compares two items almost as
the method Item::eq, but it rather enforces a given collation for
the comparison.
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
mysql-test/r/delayed.result:
Auto merged
mysql-test/r/func_misc.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
mysql-test/include/mix1.inc:
manual merge
mysql-test/r/innodb_mysql.result:
manual merge
mysql-test/r/range.result:
manual merge
sql/item_cmpfunc.cc:
manual merge
- Make conditions like "date_col $CMP$ 'datetime-const'" range-sargable
mysql-test/r/range.result:
BUG#32198: Comparison of DATE with DATETIME still not using indexes correctly
- Testcase
mysql-test/t/range.test:
BUG#32198: Comparison of DATE with DATETIME still not using indexes correctly
- Testcase
sql/field.cc:
BUG#32198: Comparison of DATE with DATETIME still not using indexes correctly
- Added comments
- Renamed "Using join cache" to "Using join buffer".
- "Using join buffer" is now printed on the last
table that "reads" from the join buffer cache.
mysql-test/r/archive_gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/compress.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ctype_utf8.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/derived.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/distinct.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/func_group.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/func_group_innodb.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/greedy_optimizer.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/group_by.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/group_min_max.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/index_merge_myisam.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/information_schema.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/innodb_gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/innodb_mysql.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/join.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/join_nested.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/key_diff.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/myisam.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ndb_condition_pushdown.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ndb_gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/range.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/row.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/select.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ssl.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ssl_compress.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/subselect.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/subselect3.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/union.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/view.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
sql/sql_select.cc:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
- added join cache indication in EXPLAIN (Extra column).
- prefer filesort over full scan over
index for ORDER BY (because it's faster).
- when switching from REF to RANGE because
RANGE uses longer key turn off sort on
the head table only as the resulting
RANGE access is a candidate for join cache
and we don't want to disable it by sorting
on the first table only.
mysql-test/r/archive_gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/compress.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/ctype_utf8.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/derived.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/distinct.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/func_group.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/func_group_innodb.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/greedy_optimizer.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/group_by.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/group_min_max.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/index_merge_myisam.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/information_schema.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/innodb_gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/innodb_mysql.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/join.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/join_nested.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/key_diff.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/myisam.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/ndb_condition_pushdown.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/ndb_gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/range.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/row.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/select.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/ssl.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/ssl_compress.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/subselect.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/subselect3.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/union.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/view.result:
bug #27531: join cache in EXPLAIN
sql/sql_select.cc:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over
index for ORDER BY.
- disable sorting on the first table only
when switching from REF to RANGE.
into mysql.com:/home/psergey/mysql-5.1-merge2
mysql-test/r/range.result:
Auto merged
mysql-test/t/range.test:
Auto merged
sql/opt_range.cc:
Auto merged
Pushbuild fixes:
- Make MAX_SEL_ARGS smaller (even 16K records_in_range() calls is
more than it makes sense to do in typical cases)
- Don't call sel_arg->test_use_count() if we've already allocated
more than MAX_SEL_ARGs elements. The test will succeed but will take
too much time for the test suite (and not provide much value).
mysql-test/r/range.result:
BUG#26624: high mem usage (crash) in range optimizer
Pushbuild fixes: make the test go faster
mysql-test/t/range.test:
BUG#26624: high mem usage (crash) in range optimizer
Pushbuild fixes: make the test go faster
into mysql.com:/home/psergey/mysql-5.1-merge
BitKeeper/deleted/.del-mysqld.cc.rej:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/t/range.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_list.h:
Auto merged
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/subselect.test:
Manual merge
sql/opt_range.cc:
Manual merge
- Added PARAM::alloced_sel_args where we count the # of SEL_ARGs
created by SEL_ARG tree cloning operations.
- Made the range analyzer to shortcut and not do any more cloning
if we've already created MAX_SEL_ARGS SEL_ARG objects in cloning.
- Added comments about space complexity of SEL_ARG-graph
representation.
mysql-test/r/range.result:
BUG#26624: Testcase
mysql-test/t/range.test:
BUG#26624: Testcase
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
configure.in:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/t/range.test:
Auto merged
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
BitKeeper/etc/ignore:
auto-union
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/select.result:
manual merge
mysql-test/r/view.result:
manual merge
mysql-test/t/select.test:
manual merge
mysql-test/t/view.test:
manual merge
into macbook.gmz:/Users/kgeorge/mysql/work/merge-5.1-opt
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_str.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/group_by.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/insert.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/subselect.result:
merge 5.0-opt -> 5.1-opt
mysql-test/t/group_by.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/insert.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/subselect.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/view.test:
merge 5.0-opt -> 5.1-opt
sql/item_cmpfunc.h:
merge 5.0-opt -> 5.1-opt
sql/item_strfunc.h:
merge 5.0-opt -> 5.1-opt
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/select.result:
manual merge
mysql-test/r/view.result:
manual merge
mysql-test/t/select.test:
manual merge
into mysql.com:/usr/home/ram/work/bug22533/my51-bug22533
mysql-test/r/range.result:
Auto merged
mysql-test/r/type_bit.result:
Auto merged
mysql-test/r/type_bit_innodb.result:
Auto merged
sql/field.cc:
Auto merged
into olga.mysql.com:/home/igor/mysql-5.0-opt
mysql-test/r/range.result:
Auto merged
mysql-test/t/range.test:
Auto merged
sql/opt_range.h:
Manual merge.
for queries using 'range checked for each record'.
The problem was fixed in 5.0 by the patch for bug 12291.
This patch down-ported the corresponding code from 5.0 into
QUICK_SELECT::init() and added a new test case.
mysql-test/r/range.result:
Added a test case for bug #24776.
mysql-test/t/range.test:
Added a test case for bug #24776.
sql/opt_range.h:
Fixed bug #24776: an assertion abort in handler::ha_index_init
for queries using 'range checked for each record'.
The problem was fixed in 5.0 by the patch for bug 12291.
The patch for 4.1 down-ported the corresponding code from 5.0 into
QUICK_SELECT::init().
into mysql.com:/usr/home/ram/work/bug20732/my51-bug20732
mysql-test/r/range.result:
Auto merged
mysql-test/t/range.test:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
manual merging.
into mysql.com:/usr/home/ram/work/bug20732/my50-bug20732
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/range.result:
SCCS merged
mysql-test/t/range.test:
SCCS merged
We miss some records sometimes using RANGE method if we have
partial key segments.
Example:
Create table t1(a char(2), key(a(1)));
insert into t1 values ('a'), ('xx');
select a from t1 where a > 'x';
We call index_read() passing 'x' key and HA_READ_AFTER_KEY flag
in the handler::read_range_first() wich is wrong because we have
a partial key segment for the field and might miss records like 'xx'.
Fix: don't use open segments in such a case.
mysql-test/r/range.result:
Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
- test result.
mysql-test/t/range.test:
Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
- test case.
sql/opt_range.cc:
Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
- check if we have a partial key segment for a Item_func::GT_FUNC;
if so, don't set NEAR_MIN flag in order to use HA_READ_KEY_OR_NEXT
instead of HA_READ_AFTER_KEY.
sql/opt_range.h:
Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
- key segment 'flag' slot added.
sql/sql_select.cc:
Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
- test (HA_PART_KEY_SEG | HA_NULL_PART) as we split it in the sql/table.cc
sql/table.cc:
Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
- set HA_NULL_PART flag instead of HA_PART_KEY_SEG in order not to mix them.
into mysql.com:/home/psergey/mysql-5.1-bug22393
mysql-test/t/range.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/range.result:
Manual merge
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/heap_hash.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/row.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/sp.test:
SCCS merged
sql/item_cmpfunc.cc:
SCCS merged
sql/sql_select.cc:
SCCS merged
- Check if we have E(#rows) for 'range' access on the smaller interval
on the same index. If yes, adjust the estimate.
mysql-test/r/range.result:
BUG#22393: Testcase
mysql-test/t/range.test:
BUG#22393: Testcase
Select_type in the EXPLAIN output for the query SELECT * FROM t1 was
'SIMPLE', while for the query SELECT * FROM v1, where the view v1
was defined as SELECT * FROM t1, the EXPLAIN output contained 'PRIMARY'
for the select_type column.
mysql-test/r/group_by.result:
Adjusted results after the fix for bug #5500.
mysql-test/r/information_schema.result:
Adjusted results after the fix for bug #5500.
mysql-test/r/olap.result:
Adjusted results after the fix for bug #5500.
mysql-test/r/range.result:
Adjusted results after the fix for bug #5500.
mysql-test/r/view.result:
Added a test case for bug #5500.
Adjusted other results.
mysql-test/r/view_grant.result:
Adjusted results after the fix for bug #5500.
mysql-test/t/view.test:
Added a test case for bug #5500.
when a range condition use an invalid DATETIME constant.
Now we do not use invalid DATETIME constants to form end keys for
range intervals: range analysis just ignores predicates with such
constants.
mysql-test/r/query_cache.result:
Adjusted result warnings when adding a fix for bug #16249.
mysql-test/r/range.result:
Added a test case for bug #16249.
mysql-test/t/range.test:
Added a test case for bug #16249.
into moonbone.local:/work/tmp_merge-5.1-opt-mysql
BUILD/check-cpu:
Auto merged
include/config-netware.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/ndb_condition_pushdown.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
storage/innobase/btr/btr0btr.c:
Auto merged
storage/innobase/buf/buf0buf.c:
Auto merged
storage/innobase/dict/dict0dict.c:
Auto merged
storage/innobase/fil/fil0fil.c:
Auto merged
storage/innobase/fsp/fsp0fsp.c:
Auto merged
storage/innobase/include/buf0buf.ic:
Auto merged
storage/innobase/log/log0log.c:
Auto merged
storage/innobase/log/log0recv.c:
Auto merged
storage/innobase/os/os0file.c:
Auto merged
storage/innobase/row/row0sel.c:
Auto merged
storage/innobase/srv/srv0start.c:
Auto merged
storage/innobase/ut/ut0dbg.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
client/mysqltest.c:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/t/innodb_mysql.test:
Manual merge
mysql-test/t/join_outer.test:
Manual merge
sql/item_cmpfunc.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/opt_range.cc:
Manual merge
sql/sql_base.cc:
Manual merge
storage/innobase/include/btr0cur.ic:
Manual merge
storage/innobase/row/row0mysql.c:
Manual merge
Made [NOT]BETWEEN predicates SARGable in respect to the second and
the third arguments.
mysql-test/r/range.result:
Added a test case to bug #18165.
mysql-test/t/range.test:
Added a test case to bug #18165.
sql/opt_range.cc:
Fixed bug #18165.
Made [NOT]BETWEEN predicates SARGable in respect to the second and
the third arguments.
Put in a separate function called get_full_func_mm_tree the functionality
that builds a conjunction of all SEL_TREEs for a simple predicate of the
form (f op c), where f was a field and c was a constant, applying different
equalities f=f' with f' being another field.
In fix for BUG#15872, a condition of type "t.key NOT IN (c1, .... cN)"
where N>1000, was incorrectly converted to
(-inf < X < c_min) OR (c_max < X)
Now this conversion is removed, we dont produce any range lists for such
conditions.
mysql-test/r/range.result:
BUG#21282: Testcase
mysql-test/t/range.test:
BUG#21282: Testcase
sql/opt_range.cc:
BUG#21282: Incorrect query results for "t.key NOT IN (<big const list>)
In fix for BUG#15872, a condition of type "t.key NOT IN (c1, .... cN)"
where N>1000, was incorrectly converted to
(-inf < X < c_min) OR (c_max < X)
Now this conversion is removed, we dont produce any range lists for such
conditions.