The function causes quite a few unit tests to blow up and they had to b changed, but each one is annotated and motivated.

avg error updating in progress-56avg error updating in progress-8

This can, if the maximum precision is, say, 5 significant digits, lead to a value of 123.000 to be returned from a UNION query as 10.000. The class Item_type_holder represents fields in the result tuple, and it is this class that has the final word in setting the number of significant digits prior to storing.

The maximum precision for getting non-approximate values is hardware specific. The obvious fix is of course to switch to non-fixed precision (using approximatations for all values with too many significant digits). However, at this point (The method Item_type_holder::join_types), all field metadata is gone.

row *************************** Table: test2 Create Table: CREATE TABLE `test2` ( `testrun_id` smallint(5) unsigned NOT NULL default '0', `runtime` float(20,14) default NULL ) ENGINE=My ISAM DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql ; ------ -------------------------- | 7406 | AVG(runtime) | ------ -------------------------- | 7406 | 13558.794316406250000000 | | 7499 | 14373.432968750000000000 | ------ -------------------------- 2 rows in set (0.02 sec) mysql I'm sorry for reopening this bug, but I forgot to mention something pretty important: When doing the seperate queries (SELECT 7406, AVG(runtime) FROM test2 WHERE testrun_id = 7406 and with 7499) the results are just fine, so mysql *can* produce correct results from those lists of float's. Your My SQL connection id is 4 Server version: 5.0.34-debug Source distribution Type 'help;' or '\h' for help. mysql WHERE testrun_id = 7406; ------ -------------------------- | 7406 | AVG(runtime) | ------ -------------------------- | 7406 | 13558.794316406250800355 | ------ -------------------------- 1 row in set (0.26 sec) mysql WHERE testrun_id = 7499; ------ -------------------------- | 7499 | AVG(runtime) | ------ -------------------------- | 7499 | 14373.432968749999417923 | ------ -------------------------- 1 row in set (0.01 sec) mysql WHERE testrun_id = 7499; ------ -------------------------- | 7406 | AVG(runtime) | ------ -------------------------- | 7406 | 10000.000000000000000000 | | 7499 | 10000.000000000000000000 | ------ -------------------------- 2 rows in set (0.10 sec)A patch for this bug has been committed.

But when combined in a union the results are the ones in this report. After review, it may be pushed to the relevant source trees for release in the next version.

Additional tests had to be fixed A patch for this bug has been committed.

After review, it may be pushed to the relevant source trees for release in the next version.

Fw-300 #ya-qn-sort h2 /* Breadcrumb */ #ya-question-breadcrumb #ya-question-breadcrumb i #ya-question-breadcrumb a #bc .ya-q-full-text, .ya-q-text #ya-question-detail h1 html[lang="zh-Hant-TW"] .ya-q-full-text, html[lang="zh-Hant-TW"] .ya-q-text, html[lang="zh-Hant-HK"] .ya-q-full-text, html[lang="zh-Hant-HK"] .ya-q-text html[lang="zh-Hant-TW"] #ya-question-detail h1, html[lang="zh-Hant-HK"] #ya-question-detail h1 /* Trending Now */ /* Center Rail */ #ya-center-rail .profile-banner-default .ya-ba-title #Stencil . Bgc-lgr .tupwrap .comment-text /* Right Rail */ #Stencil .

Fw-300 .qstn-title #ya-trending-questions-show-more, #ya-related-questions-show-more #ya-trending-questions-more, #ya-related-questions-more /* DMROS */ .

#3: AVG function does not update max_length (display length) when updating number of decimals.