summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1msvensson@neptunus.(none)2007-02-061-14/+11
|\ | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
| * Merge mysql.com:/home/my/mysql-5.0monty@narttu.mysql.fi2007-01-271-14/+11
| |\ | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.1 Merge of 'remove compiler warnings when using -Wshadow'
| | * Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-01-221-14/+11
| | |\ | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | | * Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2006-12-151-14/+11
| | | |\ | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | | | * Fixed compiler warnings detected by option -Wshadow and -Wunused:monty@mysql.com/narttu.mysql.fi2006-12-151-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed not used variables and functions - Added #ifdef around code that is not used - Renamed variables and functions to avoid conflicts - Removed some not used arguments Fixed some class/struct warnings in ndb Added define IS_LONGDATA() to simplify code in libmysql.c I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
* | | | | Merge mysql.com:/home/ram/work/b19690/b19690.5.0ramil/ram@ramil.myoffice.izhnet.ru2007-01-311-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | into mysql.com:/home/ram/work/b19690/b19690.5.1
| * | | | after-merge fix.ramil/ram@mysql.com/ramil.myoffice.izhnet.ru2007-01-311-3/+4
| |/ / /
| * | | Merge siva.hindu.god:/usr/home/tim/m/bk/g50tsmith/tim@siva.hindu.god2006-12-261-2/+1
| |\ \ \ | | | | | | | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/50
| * \ \ \ Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22555/my50-bug22555cmiller@zippy.cornsilk.net2006-12-221-238/+120
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
* | | | | Merge siva.hindu.god:/usr/home/tim/m/bk/g51tsmith/tim@siva.hindu.god2006-12-261-242/+124
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/tmp/mrg51-dec26
| * | | | | Fixed error in merge.cmiller@zippy.cornsilk.net2006-12-221-1/+1
| | | | | |
| * | | | | Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22555/my51-bug22555cmiller@zippy.cornsilk.net2006-12-221-243/+125
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
| | * \ \ \ \ Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22555/my50-bug22555cmiller@zippy.cornsilk.net2006-12-221-243/+125
| | |\ \ \ \ \ | | | | |/ / / | | | |/| | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/bug22555/my51-bug22555
| | | * | | | Bug#22555: STDDEV yields positive result for groups with only one rowcmiller@zippy.cornsilk.net2006-12-221-238/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge mysql.com:/home/kent/bk/main/mysql-5.0kent@kent-amd64.(none)2006-12-231-2/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | / / | | |_|_|/ / | |/| | | | into mysql.com:/home/kent/bk/main/mysql-5.1
| * | | | | Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| | |_|/ / | |/| | | | | | | | | | | | | Changed header to GPL version 2 only
| * | | | Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0-marveldf@kahlann.erinye.com2006-12-011-2/+2
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | into kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build
| * | | | Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0gkodinov@dl145s.mysql.com2006-11-301-4/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt
| * \ \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0kostja@bodhi.local2006-11-291-17/+53
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.0-runtime
* | \ \ \ \ \ Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1df@kahlann.erinye.com2006-12-011-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into kahlann.erinye.com:/home/df/mysql/build/mysql-5.1-build
| * \ \ \ \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.1monty@narttu.mysql.fi2006-11-301-2/+2
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.1
| | * \ \ \ \ \ \ Merge mysql.com:/home/my/mysql-5.0monty@narttu.mysql.fi2006-11-291-2/+2
| | |\ \ \ \ \ \ \ | | | | |_|_|/ / / | | | |/| | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.1
| | | * | | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2006-11-291-2/+2
| | | |\ \ \ \ \ \ | | | | |_|/ / / / | | | |/| | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | | | * | | | | Increased heap max length to > 4G for 64 bit machines monty@mysql.com/nosik.monty.fi2006-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize key_part->type on open. This caused key_copy() to fail for bit_fields. (key_copy is used in HANDLER and opt_range)
* | | | | | | | | Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.1gkodinov@dl145s.mysql.com2006-11-301-4/+4
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
| * | | | | | | | Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0-optgkodinov@dl145s.mysql.com2006-11-291-4/+4
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | / / / | | | |_|_|/ / / | | |/| | | | | into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.1-opt
| | * | | | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@rakia.gmz2006-11-281-4/+4
| | |\ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | | | | | | | | | into rakia.gmz:/home/kgeorge/mysql/autopush/B11927-5.0-opt
| | | * | | | | BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)gkodinov/kgeorge@macbook.gmz2006-11-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When implicitly converting string fields to numbers the string-to-number conversion error was not sent to the client. Added code to send the conversion error as warning. We also need to prevent generation of warnings from the places where val_xxx() methods are called for the sole purpose of updating the Item::null_value flag. To achieve that a special function is added (and called) : update_null_value(). This function will set the no_errors flag and will call val_xxx(). The warning generation in Field_string::val_xxx() will use the flag when generating the conversion warnings.
| | * | | | | | Merge bk@192.168.21.1:mysql-5.0-optholyfoot/hf@mysql.com/deer.(none)2006-11-171-13/+34
| | |\ \ \ \ \ \ | | | |/ / / / / | | | | / / / / | | | |/ / / / | | |/| | | | into mysql.com:/home/hf/work/mysql-5.0-0mrg
* | | | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1kostja@bodhi.local2006-11-291-13/+34
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
| * | | | | | Merge bk-internal:/home/bk/mysql-5.1gkodinov@dl145s.mysql.com2006-11-281-13/+34
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
| | * \ \ \ \ \ Merge bk@192.168.21.1:mysql-5.1-optholyfoot/hf@deer.(none)2006-11-171-13/+34
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/hf/work/mysql-5.1-mrg
| | | * \ \ \ \ \ Merge mysql.com:/home/hf/work/mysql-5.0.cleanholyfoot/hf@deer.(none)2006-11-081-13/+34
| | | |\ \ \ \ \ \ | | | | | |/ / / / | | | | |/| | | | | | | | | | | | | into mysql.com:/home/hf/work/mysql-5.1.clean
| | | | * | | | | Bug #23184: SELECT causes server crashgkodinov/kgeorge@macbook.gmz2006-10-311-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1kostja@bodhi.local2006-11-291-8/+26
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / | | | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
| * | | | | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1monty@nosik.monty.fi2006-11-211-4/+7
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.1
| | * | | | | | | Added --debug-info to most clients to detect memory leaks in mysql-test-runmonty@mysql.com/nosik.monty.fi2006-11-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved .progress files into the log directory Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23 Fixed some compiler warnings Fixed small memory leak in libmysql Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
| * | | | | | | | Merge mysql.com:/usr/home/bar/mysql-5.0.b23451bar@bar.intranet.mysql.r18.ru2006-11-081-4/+19
| |\ \ \ \ \ \ \ \ | | | |_|_|/ / / / | | |/| | | | / / | | |_|_|_|_|/ / | |/| | | | | | into mysql.com:/usr/home/bar/mysql-5.1.b23451
| | * | | | | | after merge fix for bug 23451.bar@mysql.com/bar.intranet.mysql.r18.ru2006-11-081-5/+6
| | | | | | | |
| | * | | | | | Merge mysql.com:/usr/home/bar/mysql-4.1.b23451v2bar@mysql.com/bar.intranet.mysql.r18.ru2006-11-081-3/+17
| | |\ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | | | | | | | | | | into mysql.com:/usr/home/bar/mysql-5.0.b23451
| | | * | | | | Bug#23451 GROUP_CONCAT truncates a multibyte utf8 characterbar@mysql.com/bar.intranet.mysql.r18.ru2006-11-071-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: GROUP_CONCAT on a multi-byte column can truncate in the middle of a multibyte character when applying group_concat_max_len limit. It produces an invalid multi-byte character in the result string. The second, easier version - reusing old "warning_for_row" flag, instead of introducing of "result_is_full" - which was added in the previous commit.
* | | | | | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21635kroki/tomash@moonlight.intranet2006-11-221-3/+7
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | / | | |_|_|_|_|/ | |/| | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21635
| * | | | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug21635kroki/tomash@moonlight.intranet2006-11-221-3/+7
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21635
| | * | | | | BUG#21635: MYSQL_FIELD struct's member strings seem to misbehave forkroki/tomash@moonlight.intranet2006-11-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression cols. The problem was that MYSQL_FIELD::org_name was set for MIN() and MAX() functions (COUNT() is also mentioned in the bug report but was already fixed). After this patch for expressions MYSQL_FIELD::name is set to either expression itself or its alias, and other data origin fields of MYSQL_FILED (db, org_table, table, org_name) are empty strings.
| | * | | | | Merge bk-internal.mysql.com:/home/bk/mysql-4.1kostja@bodhi.local2006-11-021-0/+1
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-4.1-runtime
| * | \ \ \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0kostja@bodhi.local2006-11-021-0/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
* | \ \ \ \ \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.1kostja@bodhi.local2006-11-021-0/+1
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
| * | | | | | | | Merge bodhi.local:/opt/local/work/mysql-5.0-runtimekostja@bodhi.local2006-10-231-1/+1
| |\ \ \ \ \ \ \ \ | | | |/ / / / / / | | |/| | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
| | * | | | | | | Fix for valgrind warning introduced by the fix for bug#21354:kroki/tomash@moonlight.intranet2006-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (COUNT(*) = 1) not working in SELECT inside prepared statement. Note: the warning was introduced in 5.0 and 5.1, 4.1 is OK with the original fix. The problem was that in 5.0 and 5.1 clear() for group functions may access hybrid_type member, and this member is initialized in fix_fields(). So we should not call clear() from item cleanup() methods, as cleanup() may be called for unfixed items.
| | * | | | | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-101-0/+1
| | |\ \ \ \ \ \ \ | | | |_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21354