Item_sum_max/Item_sum_min incorrectly set null_value flag and
attempt to get result in parent functions leads to crash.
This happens due to double evaluation of the function argumet.
First evaluation happens in the comparator and second one
happens in Item_cache::cache_value().
The fix is to introduce new Item_cache object which
holds result of the argument and use this cached value
as an argument of the comparator.
mysql-test/r/func_group.result:
test case
mysql-test/t/func_group.test:
test case
sql/item.cc:
added assertion that ether we have some result or result is NULL.
sql/item_sum.cc:
introduce new Item_cache object which
holds result of the argument and use this cached value
as an argument of the comparator.
sql/item_sum.h:
introduce new Item_cache object which
holds result of the argument and use this cached value
as an argument of the comparator.
== MYSQL_TYPE_LONGLONG
A MIN/MAX() function with a subquery as its argument could lead
to a debug assertion on debug builds or wrong data on release
ones.
The problem was a combination of the following factors:
- Item_sum_hybrid::fix_fields() might use the argument
(args[0]) to calculate 'hybrid_field_type' which was later used
to decide how the data should be sent to the client.
- Item_sum::make_field() might use the argument again to
calculate the field's type when sending result set metadata to
the client.
- The argument could be changed in between these two calls via
Item::set_arg() leading to inconsistent metadata being
reported.
Here is what was happening for the bug's test case:
1. Item_sum_hybrid::fix_fields() calculates hybrid_field_type
as MYSQL_TYPE_LONGLONG based on args[0] which is an
Item::SUBSELECT_ITEM at that time.
2. A temporary table is created to execute the
query. create_tmp_field_from_item() creates a Field_long object
according to the subselect's max_length.
3. The subselect item in Item_sum_hybrid is replaced by the
Item_field object referencing the newly created Field_long.
4. Item_sum::make_field() rightfully returns the
MYSQL_TYPE_LONG type when calculating the result set metadata.
5. When sending the actual data, Item::send() relies on the
virtual field_type() function which in our case returns
previously calculated hybrid_field_type == MYSQL_TYPE_LONGLONG.
It looks like the only solution is to never refer to the
argument's metadata after the result metadata has been
calculated in fix_fields(), since the argument itself may be
different by then. In this sense, Item_sum::make_field() should
never be used, because it may rely on the argument's metadata
and is only called after fix_fields(). The "default"
implementation in Item::make_field() should be used instead as
it relies only on field_type(), but not on the argument's type.
Fixed by removing Item_sum::make_field() so that the superclass
implementation Item::make_field() is always used.
mysql-test/r/func_group.result:
Added a test case for bug #54465.
mysql-test/t/func_group.test:
Added a test case for bug #54465.
sql/item_sum.cc:
Removed Item_sum::make_field() so that the superclass
implementation Item::make_field() is always used.
sql/item_sum.h:
Removed Item_sum::make_field() so that the superclass
implementation Item::make_field() is always used.
MySQL manual describes values of the YEAR(2) field type as follows:
values 00 - 69 mean 2000 - 2069 years and values 70 - 99 mean 1970 - 1999
years. MIN/MAX and comparison functions was comparing them as int values
thus producing wrong result.
Now the Arg_comparator class is extended with compare_year function which
performs correct comparison of the YEAR type.
The Item_sum_hybrid class now uses Item_cache and Arg_comparator objects to
correctly calculate its value.
To allow Arg_comparator to use func_name() function for Item_func and Item_sum
objects the func_name declaration is moved to the Item_result_field class.
A helper function is_owner_equal_func is added to the Arg_comparator class.
It checks whether the Arg_comparator object owner is the <=> function or not.
A helper function setup is added to the Item_sum_hybrid class. It sets up
cache item and comparator.
mysql-test/r/func_group.result:
Added a test case for the bug#43668.
mysql-test/t/func_group.test:
Added a test case for the bug#43668.
sql/item.cc:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
Now Item_cache_int returns the type of cached item.
sql/item.h:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
To allow Arg_comparator to use func_name() function for Item_func and Item_sum
objects the func_name declaration is moved to the Item_result_field class.
sql/item_cmpfunc.cc:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
The Arg_comparator class is extended with compare_year function which
performs correct comparison of the YEAR type.
sql/item_cmpfunc.h:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
The year_as_datetime variable is added to the Arg_comparator class.
It's set to TRUE when YEAR value should be converted to the
YYYY-00-00 00:00:00 format for correct YEAR-DATETIME comparison.
sql/item_geofunc.cc:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
Item_func_spatial_rel::val_int chenged to use Arg_comparator's string
buffers.
sql/item_subselect.h:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
Added an implementation of the virtual func_name function.
sql/item_sum.cc:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
The Item_sum_hybrid class now uses Item_cache and Arg_comparator objects to
correctly calculate its value.
A helper function setup is added to the Item_sum_hybrid class. It sets up
cache item and comparator.
sql/item_sum.h:
Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
The Item_sum_hybrid class now uses Item_cache and Arg_comparator objects to
correctly calculate its value.
Added an implementation of the virtual func_name function.
columns without where/group
Simple SELECT with implicit grouping used to return many rows if
the query was ordered by the aggregated column in the SELECT
list. This was incorrect because queries with implicit grouping
should only return a single record.
The problem was that when JOIN:exec() decided if execution needed
to handle grouping, it was assumed that sum_func_count==0 meant
that there were no aggregate functions in the query. This
assumption was not correct in JOIN::exec() because the aggregate
functions might have been optimized away during JOIN::optimize().
The reason why queries without ordering behaved correctly was
that sum_func_count is only recalculated if the optimizer chooses
to use temporary tables (which it does in the ordered case).
Hence, non-ordered queries were correctly treated as grouped.
The fix for this bug was to remove the assumption that
sum_func_count==0 means that there is no need for grouping. This
was done by introducing variable "bool implicit_grouping" in the
JOIN object.
mysql-test/r/func_group.result:
Add test for BUG#47280
mysql-test/t/func_group.test:
Add test for BUG#47280
sql/opt_sum.cc:
Improve comment for opt_sum_query()
sql/sql_class.h:
Add comment for variables in TMP_TABLE_PARAM
sql/sql_select.cc:
Introduce and use variable implicit_grouping instead of (!group_list && sum_func_count) in places that need to test if grouping is required. Also added comments for: optimization of aggregate fields for implicitly grouped queries (JOIN::optimize) and choice of end_select method (JOIN::execute)
sql/sql_select.h:
Add variable implicit_grouping, which will be TRUE for queries that contain aggregate functions but no GROUP BY clause. Also added comment to sort_and_group variable.
ONLY_FULL_GROUP_BY
The check for non-aggregated columns in queries with aggregate function, but without
GROUP BY was treating all the parts of the query as if they are in the SELECT list.
Fixed by ignoring the non-aggregated fields in the WHERE clause.
mysql-test/r/func_group.result:
Bug #39656: test case
mysql-test/t/func_group.test:
Bug #39656: test case
sql/sql_select.cc:
Bug #39656: ignore the new non-aggregated column refs in a WHERE
by saving the state so far and then adding only the new values of the other
parts of the bitmask.
The optimizer pulls up aggregate functions which should be aggregated in
an outer select. At some point it may substitute such a function for a field
in the temporary table. The setup_copy_fields function doesn't take this
into account and may overrun the copy_field buffer.
Fixed by filtering out the fields referenced through the specialized
reference for aggregates (Item_aggregate_ref).
Added an assertion to make sure bugs that cause similar discrepancy
don't go undetected.
mysql-test/r/func_group.result:
Bug #37348: test case
mysql-test/t/func_group.test:
Bug #37348: test case
sql/item.cc:
Bug #37348: Added a way to distinguish Item_aggregate_ref from the other types of refs
sql/item.h:
Bug #37348: Added a way to distinguish Item_aggregate_ref from the other types of refs
sql/sql_select.cc:
Bug #37348:
- Don't consider copying field references
seen through Item_aggregate_ref
- check for discrepancies between the number of expected
fields that need copying and the actual fields copied.
into kaamos.(none):/data/src/opt/bug34512/my51
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item_sum.cc:
Auto merged
returns wrong results
Casting AVG() to DECIMAL led to incorrect results when the arguments
had a non-DECIMAL type, because in this case
Item_sum_avg::val_decimal() performed the division by the number of
arguments twice.
Fixed by changing Item_sum_avg::val_decimal() to not rely on
Item_sum_sum::val_decimal(), i.e. calculate sum and divide using
DECIMAL arithmetics for DECIMAL arguments, and utilize val_real() with
subsequent conversion to DECIMAL otherwise.
mysql-test/r/func_group.result:
Added a test case for bug #34512.
mysql-test/t/func_group.test:
Added a test case for bug #34512.
sql/item_sum.cc:
Do not use Item_sum_sum::val_decimal() in Item_sum_avg::val_decimal()
because the first one, depending on the arguments type, may return
either the sum of the arguments, or the average calculated by the
virtual val_real() method of Item_sum_avg. Instead, do our own
calculation based on the arguments type.
into macbook.gmz:/Users/kgeorge/mysql/work/B33133-5.1-opt
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/sql_base.cc:
Auto merged
When resolving references we need to take into consideration
the view "fields" and allow qualified access to them.
Fixed by extending the reference resolution to process view
fields correctly.
mysql-test/r/func_group.result:
Bug #33133: test case
mysql-test/t/func_group.test:
Bug #33133: test case
sql/sql_base.cc:
Bug #33133: allow qualified alias refs to view fields
into magare.gmz:/home/kgeorge/mysql/work/B31794-5.1-opt
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/sql_select.cc:
Auto merged
The HAVING clause is subject to the same rules as the SELECT list
about using aggregated and non-aggregated columns.
But this was not enforced when processing implicit grouping from
using aggregate functions.
Fixed by performing the same checks for HAVING as for SELECT.
mysql-test/r/func_group.result:
Bug #31794: test case
mysql-test/t/func_group.test:
Bug #31794: test case
sql/sql_select.cc:
Bug #31794: Check HAVING in addition to SELECT list
into magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.1-opt
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/type_decimal.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/type_decimal.test:
Auto merged
sql/item.cc:
Auto merged
sql/opt_sum.cc:
merge bug 30715 to 5.1-opt
file .\opt_sum.cc, line
The optimizer pre-calculates the MIN/MAX values for queries like
SELECT MIN(kp_k) WHERE kp_1 = const AND ... AND kp_k-1 = const
when there is a key over kp_1...kp_k
In doing so it was not checking correctly nullability and
there was a superfluous assert().
Fixed by making sure that the field can be null before checking and
taking out the wrong assert().
.
Introduced a correct check for nullability
The MIN(field) can return NULL when all the row values in the group
are NULL-able or if there were no rows.
Fixed the assertion to reflect the case when there are no rows.
mysql-test/r/func_group.result:
Bug #30715: test case
mysql-test/t/func_group.test:
Bug #30715: test case
sql/opt_sum.cc:
Bug #30715: correct nullability check for MIN/MAX pre-calculation over index.
into magare.gmz:/home/kgeorge/mysql/work/B31156-5.1-opt
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
Item_sum_distinct::setup(THD*): Assertion
There was an assertion to detect a bug in ROLLUP
implementation. However the assertion is not true
when used in a subquery context with non-cacheable
statements.
Fixed by turning the assertion to accepted case
(just like it's done for the other aggregate functions).
mysql-test/r/func_group.result:
Bug #31156: test case
mysql-test/t/func_group.test:
Bug #31156: test case
sql/item_sum.cc:
Bug #31156: make it OK to call setup() several times:
done for (e.g.) scalar subquery
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
mysql-test/r/ps.result:
merging
mysql-test/r/subselect.result:
merging
mysql-test/r/type_datetime.result:
SCCS merged
mysql-test/t/ps.test:
merging
mysql-test/t/subselect.test:
merging
mysql-test/t/type_datetime.test:
merging
sql/opt_sum.cc:
SCCS merged
into linux-st28.site:/home/martin/mysql/src/5.0o-bug27573
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
bug#27573: hand merged test case
to NULL
For queries of the form SELECT MIN(key_part_k) FROM t1
WHERE key_part_1 = const and ... and key_part_k-1 = const,
the opt_sum_query optimization tries to
use an index to substitute MIN/MAX functions with their values according
to the following rules:
1) Insert the minimum non-null values where the WHERE clause still matches, or
3) A row of nulls
However, the correct semantics requires that there is a third case 2)
such that a NULL value is substituted if there are only NULL values for
key_part_k.
The patch modifies opt_sum_query() to handle this missing case.
mysql-test/r/func_group.result:
Bug #27573: Correct result
mysql-test/t/func_group.test:
Bug #27573: test case
sql/opt_sum.cc:
Bug #27573:
Added code that will try to read the
first non-null value for a given complete-field prefix, second
choice is to read the null, and lastly set the error code if no row
is found.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item.h:
Auto merged
sql/item_sum.cc:
Auto merged
into siva.hindu.god:/usr/home/tim/m/bk/51
BitKeeper/etc/collapsed:
auto-union
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
This is for bug #22555.
mysql-test/r/func_group.result:
Round the results of std() for some calls, because Windows' sqrt() function appears to return fewer "significant" digits than the Unix implementations.
This is for bug #22555.
mysql-test/t/func_group.test:
Round the results of std() for some calls, because Windows' sqrt() function appears to return fewer "significant" digits than the Unix implementations.
This is for bug #22555.
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug22555/my51-bug22555
BitKeeper/etc/collapsed:
auto-union
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_sum.cc:
Manual merge.
When only one row was present, the subtraction of nearly the same number
resulted in catastropic cancellation, introducing an error in the
VARIANCE calculation near 1e-15. That was sqrt()ed to get STDDEV, the
error was escallated to near 1e-8.
The simple fix of testing for a row count of 1 and forcing that to yield
0.0 is insufficient, as two rows of the same value should also have a
variance of 0.0, yet the error would be about the same.
So, this patch changes the formula that computes the VARIANCE to be one
that is not subject to catastrophic cancellation.
In addition, it now uses only (faster-than-decimal) floating point numbers
to calculate, and renders that to other types on demand.
mysql-test/r/func_group.result:
Test that the bug is fixed, and that no unexpected behavior arises from the
changes.
mysql-test/t/func_group.test:
Test that the bug is fixed, and that no unexpected behavior arises from the
changes.
sql/item_sum.cc:
Serg's suggestion: Force all VARIANCE calculations to be done with floating-
point types. It's faster, and the SQL standard says we may implement these
functions any way we want.
Additionally, use a form of variance calculation that is not subject to
catastrophic cancellation.
http://static.flickr.com/108/311308512_5c4e1c0c3d_b.jpg
sql/item_sum.h:
Remove unused members and add a comment describing the recurrence relation.
We use val_int() calls (followed by null_value check) to determine
nullness in some Item_sum_count' and Item_sum_count_distinct' methods,
as a side effect we get extra warnings raised in the val_int().
Fix: use is_null() instead.
mysql-test/r/func_group.result:
Fix for bug #21976: Unnecessary warning with count(decimal)
- test result.
mysql-test/t/func_group.test:
Fix for bug #21976: Unnecessary warning with count(decimal)
- test case.
sql/item.h:
Fix for bug #21976: Unnecessary warning with count(decimal)
- comment adjusted.
sql/item_sum.cc:
Fix for bug #21976: Unnecessary warning with count(decimal)
- use is_null() to determine nullness.
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
into mysql.com:/home/hf/work/mysql-5.1.clean
include/my_time.h:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/my_decimal.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/records.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/type_newdecimal.result:
SCCS merged
mysql-test/t/type_newdecimal.test:
merging
sql/item.cc:
merging
sql/item_subselect.cc:
SCCS merged
sql/item_timefunc.h:
merging
sql/sql_lex.cc:
SCCS merged
sql/sql_select.h:
merging
Item::val_xxx() may be called by the server several times at execute time
for a single query. Calls to val_xxx() may be very expensive and sometimes
(count(distinct), sum(distinct), avg(distinct)) not possible.
To avoid that problem the results of calculation for these aggregate
functions are cached so that val_xxx() methods just return the calculated
value for the second and subsequent calls.
mysql-test/r/func_group.result:
Bug #23184: SELECT causes server crash
- test case
mysql-test/t/func_group.test:
Bug #23184: SELECT causes server crash
- test case
sql/item_sum.cc:
Bug #23184: SELECT causes server crash
- caching of the aggregate function results so no need to recalculate at val_xxx()
sql/item_sum.h:
Bug #23184: SELECT causes server crash
- caching of the aggregate function results so no need to recalculate at val_xxx()
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
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 bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysys.dsp~32695fee91189326:
Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Auto merged
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
dbug/dbug.c:
Auto merged
extra/perror.c:
Auto merged
extra/yassl/src/yassl_imp.cpp:
Auto merged
extra/yassl/src/yassl_int.cpp:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_compress.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/mysqlcheck.result:
Auto merged
mysql-test/r/rpl_sp.result:
Auto merged
mysql-test/r/rpl_trigger.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/mysqlcheck.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/rpl_trigger.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.h:
Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
mysql-test/r/im_life_cycle.result:
e
use local
mysql-test/r/ps.result:
use local
client/Makefile.am:
Manual merge.
client/mysqlimport.c:
Manual merge.
configure.in:
Manual merge.
mysql-test/mysql-test-run.pl:
Manual merge.
mysql-test/r/mysqldump.result:
Manual merge.
mysql-test/r/mysqltest.result:
Manual merge.
mysql-test/r/ndb_basic.result:
Manual merge.
mysql-test/r/rpl_view.result:
Manual merge.
mysql-test/r/show_check.result:
Manual merge.
mysql-test/r/sp-error.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/union.result:
Manual merge.
mysql-test/t/mysqldump.test:
Manual merge.
mysql-test/t/mysqltest.test:
Manual merge.
mysql-test/t/ndb_basic.test:
Manual merge.
mysql-test/t/rpl_sp.test:
Manual merge.
mysql-test/t/rpl_view.test:
Manual merge.
mysql-test/t/show_check.test:
Manual merge.
mysql-test/t/sp-error.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/item_sum.cc:
Manual merge.
sql/mysql_priv.h:
Manual merge.
sql/sp_head.cc:
Manual merge.
sql/sql_db.cc:
Manual merge.
sql/sql_delete.cc:
Manual merge.
sql/sql_lex.h:
Manual merge.
sql/sql_show.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
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 neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/union.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/func_group.result:
Merge manually
mysql-test/t/func_group.test:
Merge manually
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
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/group_min_max.result:
Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysqld_ia64.dsp~7f8cf84d81ee04e2:
Auto merged
BitKeeper/deleted/.del-mysqldump.dsp~a8bd23547d3fc27e:
Auto merged
BitKeeper/deleted/.del-mysqldump_ia64.dsp~a2aabe898be35b31:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/time.cc:
Auto merged
storage/ndb/test/ndbapi/Makefile.am:
Auto merged
strings/decimal.c:
Auto merged
mysql-test/r/analyse.result:
Manual merge
mysql-test/r/bigint.result:
Manual merge
mysql-test/r/create.result:
Manual merge
mysql-test/r/information_schema.result:
Manual merge
mysql-test/r/ps_2myisam.result:
Manual merge
mysql-test/r/ps_3innodb.result:
Manual merge
mysql-test/r/ps_4heap.result:
Manual merge
mysql-test/r/ps_5merge.result:
Manual merge
mysql-test/r/ps_6bdb.result:
Manual merge
mysql-test/r/rpl_insert_id.result:
Manual merge
mysql-test/r/select.result:
Manual merge
mysql-test/r/sp.result:
Manual merge
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/information_schema.test:
Manual merge
mysql-test/t/rpl_insert_id.test:
Manual merge
sql/field.h:
Manual merge
sql/item.cc:
Manual merge
sql/item.h:
Manual merge
sql/item_strfunc.h:
Manual merge
sql/item_sum.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/share/errmsg.txt:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_select.cc:
Manual merge
into mysql.com:/usr/home/ram/work/5.0.b10966
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
An aggregate function reference was resolved incorrectly and
caused a crash in count_field_types.
Must use real_item() to get to the real Item instance through
the reference
mysql-test/r/func_group.result:
Bug #20868: Client connection is broken on SQL query error
* test case for the bug
mysql-test/t/func_group.test:
Bug #20868: Client connection is broken on SQL query error
* test case for the bug
sql/sql_select.cc:
Bug #20868: Client connection is broken on SQL query error
* correctly resolve aggregate function references.
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new-maint
BUILD/compile-dist:
Auto merged
BitKeeper/deleted/.del-partition_innodb.result:
Auto merged
BitKeeper/deleted/.del-partition_innodb.test:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/create_not_windows.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/partition.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/wait_timeout.test:
Auto merged
mysys/my_lib.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/unireg.cc:
Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
manuakl merge
mysql-test/lib/mtr_process.pl:
manuakl merge
mysql-test/mysql-test-run.pl:
manuakl merge
mysql-test/r/type_newdecimal.result:
manuakl merge
mysql-test/t/create.test:
manuakl merge
mysql-test/t/func_group.test:
manuakl merge
mysql-test/t/type_newdecimal.test:
manuakl merge