into siva.hindu.god:/usr/home/tim/m/bk/50
configure.in:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/view.test:
Auto merged
mysys/mf_iocache.c:
Auto merged
sql/item_func.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
myisam/sort.c:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/t/innodb_mysql.test:
Manual merge
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/myisam.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/merge.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/view.result:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
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 rurik.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug19579
mysql-test/t/select.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/select.result:
SCCS merged
into macbook.gmz:/Users/kgeorge/mysql/work/B21798-5.0-opt-merge
sql/mysql_priv.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/subselect.result:
merge fixes for bug 21798
mysql-test/t/subselect.test:
merge fixes for bug 21798
list using a function
When executing dependent subqueries they are re-inited and re-exec() for
each row of the outer context.
The cause for the bug is that during subquery reinitialization/re-execution,
the optimizer reallocates JOIN::join_tab, JOIN::table in make_simple_join()
and the local variable in 'sortorder' in create_sort_index(), which is
allocated by make_unireg_sortorder().
Care must be taken not to allocate anything into the thread's memory pool
while re-initializing query plan structures between subquery re-executions.
All such items mush be cached and reused because the thread's memory pool
is freed at the end of the whole query.
Note that they must be cached and reused even for queries that are not
otherwise cacheable because otherwise it will grow the thread's memory
pool every time a cacheable query is re-executed.
We provide additional members to the JOIN structure to store references
to the items that need to be cached.
mysql-test/r/subselect.result:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- test case
mysql-test/t/subselect.test:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- test case
sql/mysql_priv.h:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the entities allocated in the threads memory pool by
JOIN::exec ().
sql/sql_delete.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_select.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_select.h:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_table.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_update.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
account predicates that become sargable after reading const tables.
In some cases this resulted in choosing non-optimal execution plans.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.
mysql-test/r/select.result:
Added a test case for bug #19579.
mysql-test/t/select.test:
Added a test case for bug #19579.
sql/item_cmpfunc.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_base.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_lex.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_lex.h:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_select.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.
into willster.(none):/home/stewart/Documents/MySQL/5.0/bug19914-mk2-merge
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
Auto merged
BitKeeper/deleted/.del-ha_isam.h~bf53d533be3d3927:
Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
Auto merged
BitKeeper/deleted/.del-ha_isammrg.h~66fd2e5bfe7207dc:
Auto merged
sql/ha_archive.cc:
Auto merged
sql/ha_archive.h:
Auto merged
sql/ha_blackhole.cc:
Auto merged
sql/ha_blackhole.h:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/ha_heap.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_myisam.h:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_myisammrg.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/examples/ha_example.cc:
Auto merged
sql/examples/ha_example.h:
Auto merged
sql/examples/ha_tina.cc:
Auto merged
sql/examples/ha_tina.h:
Auto merged
sql/sql_union.cc:
Auto merged
sql/ha_ndbcluster.cc:
merge
sql/ha_ndbcluster.h:
merge
sql/handler.h:
merge
sql/sql_select.cc:
merge
Examined rows are counted for every join part. The per-join-part
counter was incremented over all iterations. The result variable
was replaced at the end of every iteration. The final result was
the number of examined rows by the join part that ended its
execution as the last one. The numbers of other join parts was
lost.
Now we reset the per-join-part counter before every iteration and
add it to the result variable at the end of the iteration. That
way we get the sum of all iterations of all join parts.
No test case. Testing this needs a look into the slow query log.
I don't know of a way to do this portably with the test suite.
sql/sql_select.cc:
Bug#12240 - Rows Examined in Slow Log showing incorrect number?
Fixed reseting and accumulation of examined rows counts.
Currently SQL_BIG_RESULT is checked only at compile time.
However, additional optimizations may take place after
this check that change the sort method from 'filesort'
to sorting via index. As a result the actual plan
executed is not the one specified by the SQL_BIG_RESULT
hint. Similarly, there is no such test when executing
EXPLAIN, resulting in incorrect output.
The patch corrects the problem by testing for
SQL_BIG_RESULT both during the explain and execution
phases.
mysql-test/r/bdb.result:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- updated sql_big_result testcase
mysql-test/r/group_by.result:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- test case with MyISAM
mysql-test/r/innodb.result:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- updated sql_big_result testcase
mysql-test/r/innodb_mysql.result:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- test case with InnoDB
mysql-test/r/myisam.result:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- updated sql_big_result testcase
mysql-test/t/group_by.test:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- test case with MyISAM
mysql-test/t/innodb_mysql.test:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- test case with InnoDB
sql/sql_select.cc:
Bug #22781: SQL_BIG_RESULT fails to influence sort plan
- When SQL_BIG_RESULT is specified, disable the optimization performed
at execution/explain time that decides to use an index instead
of filesort.
Note: bug#21726 does not directly apply to 4.1, as it doesn't have stored
procedures. However, 4.1 had some bugs that were fixed in 5.0 by the
patch for bug#21726, and this patch is a backport of those fixes.
Namely, in 4.1 it fixes:
- LAST_INSERT_ID(expr) didn't return value of expr (4.1 specific).
- LAST_INSERT_ID() could return the value generated by current
statement if the call happens after the generation, like in
CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY, j INT);
INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID());
- Redundant binary log LAST_INSERT_ID_EVENTs could be generated.
mysql-test/r/rpl_insert_id.result:
Add result for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
mysql-test/t/rpl_insert_id.test:
Add test case for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
sql/item_func.cc:
Add implementation of Item_func_last_insert_id::fix_fields(), where we
set THD::last_insert_id_used when statement calls LAST_INSERT_ID().
In Item_func_last_insert_id::val_int(), return THD::current_insert_id
if called like LAST_INSERT_ID(), otherwise return value of argument if
called like LAST_INSERT_ID(expr).
sql/item_func.h:
Add declaration of Item_func_last_insert_id::fix_fields().
sql/log_event.cc:
Do not set THD::last_insert_id_used on LAST_INSERT_ID_EVENT. Though we
know the statement will call LAST_INSERT_ID(), it wasn't called yet.
sql/set_var.cc:
In sys_var_last_insert_id::value_ptr(), set THD::last_insert_id_used,
and return THD::current_insert_id for @@LAST_INSERT_ID.
sql/sql_class.h:
Update comments.
Remove THD::insert_id(), as it has lost its purpose now.
sql/sql_insert.cc:
Now it is OK to read THD::last_insert_id directly.
sql/sql_load.cc:
Now it is OK to read THD::last_insert_id directly.
sql/sql_parse.cc:
In mysql_execute_command(), remember THD::last_insert_id (first
generated value of the previous statement) in THD::current_insert_id,
which then will be returned for LAST_INSERT_ID() and @@LAST_INSERT_ID.
sql/sql_select.cc:
If "IS NULL" is replaced with "= <LAST_INSERT_ID>", use right value,
which is THD::current_insert_id, and also set THD::last_insert_id_used
to issue binary log LAST_INSERT_ID_EVENT.
sql/sql_update.cc:
Now it is OK to read THD::last_insert_id directly.
tests/mysql_client_test.c:
Add test case for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
invocations of LAST_INSERT_ID.
Reding of LAST_INSERT_ID inside stored function wasn't noted by caller,
and no LAST_INSERT_ID_EVENT was issued for binary log.
The solution is to add THD::last_insert_id_used_bin_log, which is much
like THD::last_insert_id_used, but is reset only for upper-level
statements. This new variable is used to issue LAST_INSERT_ID_EVENT.
mysql-test/r/rpl_insert_id.result:
For bug#21726, add result for statement-based replication of function
calls.
mysql-test/t/rpl_insert_id.test:
For bug#21726, add test case for statement-based replication of function
calls.
sql/item_func.cc:
Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT.
sql/log.cc:
Issue LAST_INSERT_ID_EVENT if THD::last_insert_id_used_bin_log is set.
sql/set_var.cc:
Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT.
sql/sql_class.cc:
Initialize THD::last_insert_id_used_bin_log.
Fix typo, add whitespace.
sql/sql_class.h:
Add THD::last_insert_id_used_bin_log.
sql/sql_parse.cc:
Reset THD::last_insert_id_used_bin_log for upper-level statements.
sql/sql_select.cc:
Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT.
into mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Non-upper-level INSERTs (the ones in the body of stored procedure,
stored function, or trigger) into a table that have AUTO_INCREMENT
column didn't affected the result of LAST_INSERT_ID() on this level.
The problem was introduced with the fix of bug 6880, which in turn was
introduced with the fix of bug 3117, where current insert_id value was
remembered on the first call to LAST_INSERT_ID() (bug 3117) and was
returned from that function until it was reset before the next
_upper-level_ statement (bug 6880).
The fix for bug#21726 brings back the behaviour of version 4.0, and
implements the following: remember insert_id value at the beginning
of the statement or expression (which at that point equals to
the first insert_id value generated by the previous statement), and
return that remembered value from LAST_INSERT_ID() or @@LAST_INSERT_ID.
Thus, the value returned by LAST_INSERT_ID() is not affected by values
generated by current statement, nor by LAST_INSERT_ID(expr) calls in
this statement.
Version 5.1 does not have this bug (it was fixed by WL 3146).
mysql-test/r/rpl_insert_id.result:
Add results for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID, and bug#20339: stored procedure using LAST_INSERT_ID()
does not replicate statement-based.
mysql-test/t/rpl_insert_id.test:
Add test cases for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID, and bug#20339: stored procedure using LAST_INSERT_ID()
does not replicate statement-based.
sql/item_func.cc:
Add implementation of Item_func_last_insert_id::fix_fields(), where we
remember in THD::current_insert_id the first value generated during
execution of the previous statement, which is returned then from
Item_func_last_insert_id::val_int().
sql/item_func.h:
Add declaration of Item_func_last_insert_id::fix_fields().
sql/log_event.cc:
Do not set THD::last_insert_id_used on LAST_INSERT_ID_EVENT. Though we
know the statement will call LAST_INSERT_ID(), it wasn't called yet.
sql/set_var.cc:
In sys_var_last_insert_id::value_ptr() remember in
THD::current_insert_id the first value generated during execution of the
previous statement, and return this value for @@LAST_INSERT_ID.
sql/sql_class.cc:
Reset THD::last_insert_id_used after each statement execution.
sql/sql_class.h:
Rather then remember current insert_id value on first invocation of
THD::insert_id(), remember it in Item_func_last_insert_id::fix_fields(),
sys_var_last_insert_id::value_ptr(), or mysql_execute_command().
Remove THD::insert_id(), as it lost its value now.
sql/sql_insert.cc:
THD::insert_id() is removed, use THD::last_insert_id directly.
sql/sql_load.cc:
THD::insert_id() is removed, using THD::last_insert_id directly is OK.
sql/sql_parse.cc:
Remember in THD::current_insert_id first generated insert id value of
the previous statement in mysql_execute_command().
No need to reset THD::last_insert_id_used in
mysql_reset_thd_for_next_command(), it will be reset after each
statement.
sql/sql_select.cc:
If "IS NULL" is replaced with "= <LAST_INSERT_ID>", use right value,
which is THD::current_insert_id, and also set THD::last_insert_id_used
to issue binary log LAST_INSERT_ID_EVENT.
sql/sql_update.cc:
THD::insert_id() is removed, use THD::last_insert_id directly.
tests/mysql_client_test.c:
Add test case for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
Fix for bug 7894 replaces a field(s) in a non-aggregate function with a item
reference if such a field was specified in the GROUP BY clause in order to
get a correct result.
When ROLLUP is involved this lead to a wrong result due to value of a such
field is got through a copy function and copying happens after the function
evaluation.
Such replacement isn't needed if grouping is also done by such a function.
The change_group_ref() function now isn't called for a function present in
the group list.
mysql-test/t/olap.test:
Added the test case for the bug#20825: rollup puts non-equal values together
mysql-test/r/olap.result:
Added the test case for the bug#20825: rollup puts non-equal values together
sql/sql_select.cc:
Fixed bug#20825: rollup puts non-equal values together
The change_group_ref() function now isn't called for a function present in
the group list.
into mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge
mysql-test/r/temp_table.result:
Auto merged
mysql-test/t/temp_table.test:
Auto merged
sql/sql_select.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
while space allocation
Under some circumstances DISTINCT clause can be converted to grouping.
In such cases grouping is performed by all items in the select list.
If an ORDER clause is present then items from it is prepended to group list.
But the case with ORDER wasn't taken into account when allocating the
array for sum functions. This leads to memory corruption and crash.
The JOIN::alloc_func_list() function now allocates additional space if there
is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is
possible.
mysql-test/t/select.test:
Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation
mysql-test/r/select.result:
Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation
sql/sql_select.cc:
Fixed bug#20503: Server crash due to the ORDER clause not taken into account
while space allocation
The JOIN::alloc_func_list() function now allocates additional space if there
is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is
possible.
create_tmp_table()".
The fix for bug 21787 "COUNT(*) + ORDER BY + LIMIT returns wrong
result" introduced valgrind warnings which occured during execution
of information_schema.test and sp-prelocking.test in version 5.0.
There were no user visible effects.
The latter fix made create_tmp_table() dependant on
THD::lex::current_select value. Valgrind warnings occured when this
function was executed and THD::lex::current_select member pointed
to uninitialized SELECT_LEX instance.
This fix tries to remove this dependancy by moving some logic
outside of create_tmp_table() function.
sql/sql_select.cc:
create_tmp_table():
Moved code which is responsible for determining if optimization
which pushes down LIMIT clause to temporary table creation is
applicable out of this function.
Such move made this function independant of THD::lex::current_select
value and removed valgrind warnings which occured in cases when this
member pointed to uninitialized SELECT_LEX object (particularly these
warnings occured in sp-prelocking.test and information_schema.test
in 5.0). This seems like a better solution than trying to force this
pointer always to point to relevant select because:
- In some cases when we use create_tmp_table() there are no relevant
SELECT_LEX object (we use it just to create temporary table/object).
- There is only one place in code where we call this funciton and
where this optimization can be enabled. And in this place we
already have some logic which tries to determine if it is applicable.
post-review fixes as indicated by Serg.
manual testing of error cases done in 5.0 due to support for DBUG_EXECUTE_IF
to insert errors.
Unable to write test case for mysql-test until 5.1 due to support for setting
debug options at runtime.
sql/ha_blackhole.cc:
update for handler::info() now returning int
sql/ha_blackhole.h:
update for handler::info() now returning int
sql/ha_isam.cc:
update for handler::info() now returning int
sql/ha_isam.h:
update for handler::info() now returning int
sql/ha_isammrg.cc:
update for handler::info() now returning int
sql/ha_isammrg.h:
update for handler::info() now returning int
sql/item_sum.cc:
update for handler::info() now returning int.
return error to user if info call fails
sql/sql_delete.cc:
update for handler::info() now returning int.
return error to user if info call fails
sql/sql_select.cc:
update for handler::info() now returning int.
return error to user if info call fails
sql/sql_union.cc:
update for handler::info() now returning int.
return error to user if info call fails
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
- reversed the patch for 5.0 and moved to 5.1
mysql-test/r/group_by.result:
Bug #21174: Index degrades sort performance and optimizer does not honor IGNORE INDEX
- reversed the patch for 5.0
mysql-test/t/group_by.test:
Bug #21174: Index degrades sort performance and optimizer does not honor IGNORE INDEX
- reversed the patch for 5.0
sql/sql_select.cc:
Bug #21174: Index degrades sort performance and optimizer does not honor IGNORE INDEX
- reversed the patch for 5.0
into willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/sql_select.cc:
Auto merged
into chilla.local:/home/mydev/mysql-4.1-bug14400-monty
BitKeeper/etc/ignore:
auto-union
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/myisam.test:
Auto merged
sql/sql_select.cc:
Auto merged
into chilla.local:/home/mydev/mysql-5.0-bug14400-monty
BitKeeper/etc/ignore:
auto-union
include/my_global.h:
Auto merged
myisam/mi_rkey.c:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/myisam.test:
Auto merged
myisam/mi_test_all.res:
Manual merge from 4.1.
sql/sql_select.cc:
Manual merge from 4.1.
into chilla.local:/home/mydev/mysql-4.1-bug14400-monty
BitKeeper/etc/ignore:
auto-union
include/my_global.h:
Auto merged
myisam/mi_rkey.c:
Manual null merge as a better fix is already present.
mysql-test/r/myisam.result:
Manual null merge as a better fix is already present.
mysql-test/t/myisam.test:
Manual null merge as a better fix is already present.
sql/sql_select.cc:
Manual merge of purify improvements.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
statement that uses an aggregating IN subquery with
HAVING clause.
A wrong order of the call of split_sum_func2 for the HAVING
clause of the subquery and the transformation for the
subquery resulted in the creation of a andor structure
that could not be restored at an execution of the prepared
statement.
mysql-test/r/ps.result:
Added a test cases for bug #22085.
mysql-test/t/ps.test:
Added a test cases for bug #22085.
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
Saved andor structure of the having conditions at the proper moment
before any calls of split_sum_func2 that could modify the having structure
adding new Item_ref objects. (These additions, are produced not with
the statement mem_root, but rather with the execution mem_root.)
mysql-test/r/sp.result:
Added a test case for bug #21493.
mysql-test/t/sp.test:
Added a test case for bug #21493.
sql/sql_delete.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_insert.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_lex.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_lex.h:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_update.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
sql/item.h:
Auto merged
sql/log.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/item.h:
SCCS merged
equal constant under any circumstances.
In fact this substitution can be allowed if the field is
not of a type string or if the field reference serves as
an argument of a comparison predicate.
mysql-test/r/func_str.result:
Added test cases for bug #21698.
mysql-test/r/heap_hash.result:
Adjusted results after the fix for bug #21198.
mysql-test/t/func_str.test:
Added test cases for bug #21698.
sql/item.cc:
Fixed bug #21198.
Added a method to check whether a field reference can be
substituted for a constant equal to the field.
This substitution is allowed if the field is not of a type string
or if the field reference serves as an argument of a comparison
predicate.
sql/item.h:
Fixed bug #21698.
Added a new virtual transformation method for a item 'compile'
with two callback function parameters.
Added a new virtual method 'subst_argument_checker' to be used
as an amnalyzer method.
This method is supposed to set its in/out argument to NULL for
the nodes where substitution of a string field for a constant
is not valid.
sql/item_cmpfunc.cc:
Fixed bug #21698.
Added an implementation of the compile method for class Item_cond.
First it processes the Item_cond node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/item_cmpfunc.h:
Fixed bug #21698.
Added the implementations of 'subst_argument_checker'
for the Item_func and Item_cond classes.
This method is supposed to set its in/out argument to NULL for
the nodes where substitution of a string field for a constant
is not valid.
Added the declaration of an implementation of the compile method for
class Item_cond.
First it processes the Item_cond node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/item_func.cc:
Fixed bug #21698.
Added an implementation of the compile method for class Item_func.
First it processes the Item_func node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/item_func.h:
Fixed bug #21698.
Added the declaration of the implementation of the compile method for
class Item_func.
First it processes the Item_func node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/sql_select.cc:
Fixed bug #21698.
Limited the conditions at which a field can be substituted
a for an equal constant in a formula.
This substitution is allowed if the field is not of a type string
or if the field reference serves as an argument of a comparison
predicate.
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.
into macbook.gmz:/Users/kgeorge/mysql/work/B16792-5.0-opt
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
sql/opt_sum.cc:
Auto merged
mysql-test/r/func_group.result:
merge 4.1->5.0 for bug #16792
mysql-test/t/func_group.test:
merge 4.1->5.0 for bug #16792
sql/sql_select.cc:
merge 4.1->5.0 for bug #16792
into dl145s.mysql.com:/data/tkatchaounov/5.0-bug-21787
mysql-test/r/limit.result:
Auto merged
mysql-test/t/limit.test:
Auto merged
sql/sql_select.cc:
Adjust the fix for BUG#21787 for 5.0
The problem was due to a prior fix for BUG 9676, which limited
the rows stored in a temporary table to the LIMIT clause. This
optimization is not applicable to non-group queries with aggregate
functions. The fix disables the optimization in this case.
mysql-test/r/limit.result:
Test case for BUG#21787
mysql-test/t/limit.test:
Test case for BUG#21787
sql/sql_select.cc:
If there is an aggregate function in a non-group query,
materialize all rows in the temporary table no matter if
there is a LIMIT clause. This is necessary, since the
aggregate functions must be computed over all result rows,
not just the first LIMIT rows.
account by the optimizer.
Now all row equalities are converted into conjunctions of
equalities between row elements. They are taken into account
by the optimizer together with the original regular equality
predicates.
mysql-test/r/join_outer.result:
Adjusted results after fix for bug #16081.
mysql-test/r/row.result:
Added a test cases for bug #16081.
mysql-test/t/row.test:
Added a test cases for bug #16081.
sql/sql_list.h:
Corrected the copy constructor for the class base_list.
The previous implementation resulted in creation of an
inconsistent base_list if the source list was empty.
into maint2.mysql.com:/data/localhome/tsmith/bk/50
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/net_serv.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
vio/viosocket.c:
Auto merged
client/mysql.cc:
Manual merge.
mysql-test/t/ctype_recoding.test:
Manual merge.
sql/sql_lex.h:
SCCS merged
sql/sql_table.cc:
Manual merge.
mysql-test/r/ctype_recoding.result:
Manual merge
const tables. This resulted in choosing extremely inefficient
execution plans in same cases when distribution of data in
joined were skewed (see the customer test case for the bug).
mysql-test/r/select.result:
Added a test case for bug #21390: wrong estimate of rows
after elimination of const tables.
Includded a test case that checks the code added by the patch
that handles outer joins with no matches after substitution of
a const table in an efficient way.
mysql-test/t/select.test:
Added a test case for bug #21390: wrong estimate of rows
after elimination of const tables.
Included a test case that checks the code added by the patch
that handles outer joins with no matches after substitution of
a const table in an efficient way.
sql/sql_select.cc:
Fixed bug #21390: wrong estimate of rows after elimination of
const tables. This resulted in choosing extremely inefficient
execution plans in same cases when distribution of data in
joined were skewed (see the customer test case for the bug).
Also added the code to handle outer joins with no matches after
substitution of a const table in an efficient way.
Corrected calculation of the null rejecting key conditions.
into lamia.home:/home/timka/mysql/src/5.0-bug-21456
mysql-test/r/distinct.result:
Merge the fix for BUG#21456
mysql-test/t/distinct.test:
Merge the fix for BUG#21456
sql/sql_select.cc:
Merge the fix for BUG#21456
GROUP BY/DISTINCT pruning optimization must be done before ORDER BY
optimization because ORDER BY may be removed when GROUP BY/DISTINCT
sorts as a side effect, e.g. in
SELECT DISTINCT <non-key-col>,<pk> FROM t1
ORDER BY <non-key-col> DISTINCT
must be removed before ORDER BY as if done the other way around
it will remove both.
mysql-test/r/distinct.result:
Test for BUG#21456.
mysql-test/t/distinct.test:
Test for BUG#21456.
sql/sql_select.cc:
Bug #21456: SELECT DISTINCT(x) produces incorrect results when using order by
GROUP BY/DISTINCT pruning optimization must be done before ORDER BY
optimization because ORDER BY may be removed when GROUP BY/DISTINCT
sorts as a side effect.
used.
Sorting by RAND() uses a temporary table in order to get a correct results.
User defined variable was set during filling the temporary table and later
on it is substituted for its value from the temporary table. Due to this
it contains the last value stored in the temporary table.
Now if the result_field is set for the Item_func_set_user_var object it
updates variable from the result_field value when being sent to a client.
The Item_func_set_user_var::check() now accepts a use_result_field
parameter. Depending on its value the result_field or the args[0] is used
to get current value.
mysql-test/r/user_var.result:
Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
mysql-test/t/user_var.test:
Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
sql/item_func.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Now if the result_field is set for the Item_func_set_user_var object it
updates variable from the result_field value when being sent to a client.
The Item_func_set_user_var::check() now accepts a use_result_field
parameter. Depending on its value the result_field or the args[0] is used
to get current value.
sql/item_func.h:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Added a new SUSERVAR_FUNC function type.
Updated the Item_func_set_user_var::check() function declaration.
Added the Item_func_set_user_var::send() member function.
sql/set_var.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Modified to use updated Item_func_set_user_var::check() function.
sql/sql_class.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Modified to use updated Item_func_set_user_var::check() function.
sql/sql_select.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Now an Item_func_set_user_var object isn't substituted for an Item_field object after filling a temporary table.
A date can be represented as an int (like 20060101) and as a string (like
"2006.01.01"). When a DATE/TIME field is compared in one SELECT against both
representations the constant propagation mechanism leads to comparison
of DATE as a string and DATE as an int. In this example it compares 2006 and
20060101 integers. Obviously it fails comparison although they represents the
same date.
Now the Item_bool_func2::fix_length_and_dec() function sets the comparison
context for items being compared. I.e. if items compared as strings the
comparison context is STRING.
The constant propagation mechanism now doesn't mix items used in different
comparison contexts. The context check is done in the
Item_field::equal_fields_propagator() and in the change_cond_ref_to_const()
functions.
Also the better fix for bug 21159 is introduced.
mysql-test/t/type_datetime.test:
Added a test case for bug#21475: Wrongly applied constant propagation leads to a false comparison.
mysql-test/r/type_datetime.result:
Added a test case for bug#21475: Wrongly applied constant propagation leads to a false comparison.
sql/sql_select.cc:
Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
The constant propagation mechanism now doesn't mix items used in different
comparison contexts. The check is done in the change_cond_ref_to_const() function.
sql/item_cmpfunc.cc:
Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
Now the Item_bool_func2::fix_length_and_dec() function sets the comparison
context for items being compared.
sql/item.h:
Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
To the Item class a new field called cmp_context is added.
It represents the comparison context of an item.
sql/item.cc:
Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
The constant propagation mechanism now doesn't mix items used in different
comparison contexts. The context check is done in the
Item_field::equal_fields_propagator() function.
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.
into sunlight.local:/local_work/21261-bug-5.0-mysql
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/view.result:
SCCS merged
mysql-test/t/view.test:
SCCS merged
into mysql.com:/usr/home/bar/mysql-4.1.b9509
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/sql_select.cc:
Auto merged
SELECT right instead of INSERT right was required for an insert into to a view.
This wrong behaviour appeared after the fix for bug #20989. Its intention was
to ask only SELECT right for all tables except the very first for a complex
INSERT query. But that patch has done it in a wrong way and lead to asking
a wrong access right for an insert into a view.
The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.
mysql-test/t/view.test:
Added a test case for bug#21261: Wrong access rights was required for an insert into a view
mysql-test/r/view.result:
Added a test case for bug#21261: Wrong access rights was required for an insert into a view
sql/sql_update.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_select.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_load.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_insert.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_delete.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_base.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.
sql/mysql_priv.h:
Fixed bug#21261: Wrong access rights was required for an insert into a view
The setup_tables_and_check_access() function now accepts two want_access
parameters.
Disable const propagation for Item_hex_string.
This must be done because Item_hex_string->val_int() is not
the same as (Item_hex_string->val_str() in BINARY column)->val_int().
We cannot simply disable the replacement in a particular context (
e.g. <bin_col> = <int_col> AND <bin_col> = <hex_string>) since
Items don't know the context they are in and there are functions like
IF (<hex_string>, 'yes', 'no').
Note that this will disable some valid cases as well
(e.g. : <bin_col> = <hex_string> AND <bin_col2> = <bin_col>) but
there's no way to distinguish the valid cases without having the
Item's parent say something like : Item->set_context(Item::STRING_RESULT)
and have all the Items that contain other Items do that consistently.
mysql-test/r/compare.result:
Bug #21159: Optimizer: wrong result after AND with different data types
- test case
mysql-test/t/compare.test:
Bug #21159: Optimizer: wrong result after AND with different data types
- test case
sql/sql_select.cc:
Bug #21159: Optimizer: wrong result after AND with different data types
- disable const propagation for Item_hex_string.
optimizer does not honor IGNORE INDEX
- Allow an index to be used for sorting the table
instead of filesort only if it is not disabled by
IGNORE INDEX.
mysql-test/r/group_by.result:
Bug #21174: Index degrades sort performance and
optimizer does not honor IGNORE INDEX
- test case
mysql-test/t/group_by.test:
Bug #21174: Index degrades sort performance and
optimizer does not honor IGNORE INDEX
- test case
table in a join
The optimizer removes redundant columns in ORDER BY. It is considering
redundant every reference to const table column, e.g b in :
create table t1 (a int, b int, primary key(a));
select 1 from t1 order by b where a = 1
But it must not remove references to const table columns if the
const table is an outer table because there still can be 2 values :
the const value and NULL. e.g.:
create table t1 (a int, b int, primary key(a));
select t2.b c from t1 left join t1 t2 on (t1.a = t2.a and t2.a = 5)
order by c;
mysql-test/r/join_outer.result:
Bug #21302: Result not properly sorted when using an ORDER BY on a second
table in a join
- don't remove columns of const tables in ORDER BY if the const table
is an outer table.
mysql-test/r/order_by.result:
Bug #21302: Result not properly sorted when using an ORDER BY on a second
table in a join
- test case
mysql-test/t/order_by.test:
Bug #21302: Result not properly sorted when using an ORDER BY on a second
table in a join
- test case
sql/sql_select.cc:
Bug #21302: Result not properly sorted when using an ORDER BY on a second
table in a join
- don't remove columns of const tables in ORDER BY if the const table
is an outer table.
The previous bug fix didn't work when using partial keys.
Don't use GNUC min/max operations are they are depricated.
Fixed valgrind warning
BitKeeper/etc/ignore:
Added */.libs/*
include/my_global.h:
Don't use GNUC min/max operations are they are depricated
myisam/mi_rkey.c:
Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
The previous bug fix didn't work when using partial keys.
myisam/mi_test_all.res:
Updated results to match mi_test_all.sh
myisam/mi_test_all.sh:
Removed confusing warning
mysql-test/r/myisam.result:
Added test case for #14400
mysql-test/t/myisam.test:
Added test case for #14400
sql/sql_select.cc:
Fixed valgrind warning (in field_string::val_int())
allow handler::info to return an error code (that will be returned to the user)
sql/ha_berkeley.cc:
update handler::info interface to return int
sql/ha_berkeley.h:
update handler::info interface to return int
sql/ha_heap.cc:
update handler::info interface to return int
sql/ha_heap.h:
update handler::info interface to return int
sql/ha_innodb.cc:
update handler::info interface to return int
sql/ha_innodb.h:
update handler::info interface to return int
sql/ha_myisam.cc:
update handler::info interface to return int
sql/examples/ha_archive.cc:
update handler::info interface to return int
sql/examples/ha_archive.h:
update handler::info interface to return int
sql/examples/ha_example.cc:
update handler::info interface to return int
sql/examples/ha_example.h:
update handler::info interface to return int
sql/examples/ha_tina.cc:
update handler::info interface to return int
sql/examples/ha_tina.h:
update handler::info interface to return int
sql/ha_myisam.h:
update handler::info interface to return int
sql/ha_myisammrg.cc:
update handler::info interface to return int
sql/ha_myisammrg.h:
update handler::info interface to return int
sql/ha_ndbcluster.cc:
update handler::info interface to return int
sql/ha_ndbcluster.h:
update handler::info interface to return int
sql/handler.h:
update handler::info interface to return int
sql/opt_sum.cc:
If we get an error when using handler::info to get count(*),
print and return the error.
sql/sql_select.cc:
if error, set fatal error.
Treat queries with no FROM and aggregate functions as normal queries,
so the aggregate function get correctly calculated as if there is 1 row.
This means that they will be considered to have one row, so COUNT(*) will return
1 instead of 0. Other aggregates will behave in compatible manner.
mysql-test/r/func_gconcat.result:
Bug #16792 query with subselect, join, and group not returning proper values
- test case. Note how it improves the support for DUAL.
mysql-test/r/func_group.result:
Bug #16792 query with subselect, join, and group not returning proper values
- test case. Note how it improves the support for DUAL.
mysql-test/r/subselect.result:
Bug #16792 query with subselect, join, and group not returning proper values
- consequence of (SELECT MAX(<const>)) now returning <const> instead of 0
mysql-test/t/func_group.test:
Bug #16792 query with subselect, join, and group not returning proper values
- test case.
sql/opt_sum.cc:
Bug #16792 query with subselect, join, and group not returning proper values
- cannot do the optimization if the index is already opened by (say) UPDATE
as it invloves opening reading and closing the index.
sql/sql_select.cc:
Bug #16792 query with subselect, join, and group not returning proper values
- Treat queries with no FROM and aggregate functions as normal queries,
so the aggregate function get correctly calculated as if there is 1 row.
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/t/sp.test:
Manual merge
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-merge
configure.in:
Auto merged
man/Makefile.am:
Auto merged
mysys/my_bitmap.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/field.cc:
Auto merged
sql/sql_locale.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/t/mysqlbinlog.test:
Manual merge.
sql/sql_select.cc:
Manual merge.
Renamed variable, to avoid name clash with macro "rem_size"
on AIX 5.3 and "/usr/include/sys/xmem.h" (bug#17648)
asn.cpp, asn.hpp:
Avoid name clash with NAME_MAX
sql/sql_select.cc:
Renamed variable, to avoid name clash with macro "rem_size"
on AIX 5.3 and "/usr/include/sys/xmem.h" (bug#17648)
extra/yassl/taocrypt/src/asn.cpp:
Avoid name clash with NAME_MAX
extra/yassl/taocrypt/include/asn.hpp:
Avoid name clash with NAME_MAX
Post review changes for bug#19862.
sql/sql_select.cc:
Post review changes for bug#19862.
sql/item_func.h:
Post review changes for bug#19862.
sql/item_func.cc:
Post review changes for bug#19862.
sql/item.h:
Post review changes for bug#19862.
When processing aggregate functions all tables values are reset
to NULLs at the end of each group.
When doing that if there are no rows found for a group
the const tables must not be reset as they are not recalculated
by do_select()/sub_select() for each group.
mysql-test/r/subselect2.result:
* Bug #20792: Incorrect results from aggregate subquery
- test suite for the bug. This is dependent on InnoDB despite
the fact that the bug and the fix are not InnoDB specific.
This is because of the table flag HA_NOT_EXACT_COUNT.
When this flag is off (as in MyISAM) both t2 and t3 become of
join type 'system' as they are estimated to have 1 record and
and this statistics can be trusted (according to the absence of
HA_NOT_EXACT_COUNT).
mysql-test/t/subselect2.test:
* Bug #20792: Incorrect results from aggregate subquery
- test suite for the bug
sql/sql_select.cc:
* Bug #20792: Incorrect results from aggregate subquery
- when clearing results if there are not rows found for group
the const tables must not be reset as they are not recalculated
for each group.