2006-08-02 10:00:28 +02:00
|
|
|
44d03f27qNdqJmARzBoP3Is_cN5e0w
|
2006-08-23 21:31:00 +04:00
|
|
|
44ec850ac2k4y2Omgr92GiWPBAVKGQ
|
2006-08-25 13:37:07 +04:00
|
|
|
44edb86b1iE5knJ97MbliK_3lCiAXA
|
2006-08-29 15:46:40 +04:00
|
|
|
44f33f3aj5KW5qweQeekY1LU0E9ZCg
|
2006-09-08 16:19:19 +04:00
|
|
|
45001f7c3b2hhCXDKfUvzkX9TNe6VA
|
|
|
|
45002051rHJfMEXAIMiAZV0clxvKSA
|
2006-09-22 14:42:43 +02:00
|
|
|
4513d8e4Af4dQWuk13sArwofRgFDQw
|
2006-10-03 13:38:25 -04:00
|
|
|
45143312u0Tz4r0wPXCbUKwdHa2jWA
|
|
|
|
45143b90ewOQuTW8-jrB3ZSAQvMRJw
|
|
|
|
45184588w9U72A6KX1hUFeAC4shSHA
|
|
|
|
45185df8mZbxfp85FbA0VxUXkmDewA
|
2006-09-27 14:42:56 -04:00
|
|
|
4519a6c5BVUxEHTf5iJnjZkixMBs8g
|
|
|
|
451ab499rgdjXyOnUDqHu-wBDoS-OQ
|
2006-10-03 13:38:25 -04:00
|
|
|
451b110a3ZV6MITl93ehXk2wxrbW7g
|
Bug#19356: Assert on undefined @uservar in prepared statement execute
The executing code had a safety assertion so that it refused to free Items
that it didn't create. However, there is a case, undefined user variables,
which would put Items into the list to be freed.
Instead, do something that is more risky in expectation that the code will
be refactored soon, as Kostja wants to do: Remove the assertions from
prepare() and execute(). Put one assertion at a higher level, before
stmt->set_params_from_vars(), which may then create new to-be-freed Items .
mysql-test/r/ps_11bugs.result:
Create tests to prove that undefined variables work, as keys and not, and
that variables explicitly assigned to Null work.
mysql-test/t/ps_11bugs.test:
Create tests to prove that undefined variables work, as keys and not, and
that variables explicitly assigned to Null work.
sql/sql_prepare.cc:
Move a safety assertion up one level and higher, because there is
legitimately a case where thd->free_list is not NULL going into
Prepared_statement::{prepare,execute} methods.
Kostja plans to refactor this code so that it is both safe and works.
(Now it works, but isn't very safe.)
2006-10-04 11:19:23 -04:00
|
|
|
45214442pBGT9KuZEGixBH71jTzbOA
|
|
|
|
45214a07hVsIGwvwa-WrO-jpeaSwVw
|
2006-10-09 18:28:06 -04:00
|
|
|
452a92d0-31-8wSzSfZi165fcGcXPA
|
2006-10-30 10:14:03 +04:00
|
|
|
452c6c6dAjuNghfc1ObZ_UQ5SCl85g
|
2006-11-01 12:30:01 +04:00
|
|
|
4538a7b0EbDHHkWPbIwxO6ZIDdg6Dg
|
2006-11-06 17:13:19 -05:00
|
|
|
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
|
2006-11-13 13:13:44 -05:00
|
|
|
454bb488ijVLOUK_GFjcoISE0GxPUA
|
|
|
|
454bb9a8AwlGRC_wWLS2sNMoRBMRGw
|
|
|
|
454c946ciQoR4dfTBZ0RTBmGJKp6lw
|
|
|
|
454f6e7eAnfLD9OCbGr5X9KiKvfKcQ
|
|
|
|
454f704bJiJy0_Nx2drY9P5kK3uOzg
|
2006-11-06 17:13:19 -05:00
|
|
|
454f8960jsVT_kMKJtZ9OCgXoba0xQ
|
2006-11-13 13:13:44 -05:00
|
|
|
454fa71cxshxszXJQYa9jbo0-_hAHw
|
|
|
|
4550b0ceIcozdgQhWFUTAtWkN196lA
|
2006-11-10 16:36:08 -05:00
|
|
|
4554a95d7txO1DuO9G3nAizI3SkFAA
|
|
|
|
4554b3722d71SbPiI2Gx-RhbZjmuIQ
|
2006-11-13 13:13:44 -05:00
|
|
|
4558b3d73Cxjlb7Wv1oytdSTthxDfw
|
2006-11-22 17:34:09 +03:00
|
|
|
4561b2ecZbhuAc0TTDdCdultxUYaMw
|
|
|
|
4561bde4qWhz1I8tkItXKex5uniipA
|
|
|
|
4562ba016dYH0JzszOqZ8p6psbKfnQ
|
Bug#22555: STDDEV yields positive result for groups with only one row
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.
2006-12-22 15:37:37 -05:00
|
|
|
45771031yRCoM_ZfONdYchPvVEgLRg
|
2007-01-31 15:39:41 -05:00
|
|
|
459a60d8rIxeTuhB3j_QsOwLGdcpng
|
|
|
|
459a61c9OS8PzIsdviZJDkybJ1y1uA
|
|
|
|
459a70691aYIfU2ohV0a3P5iTLpO2A
|
|
|
|
459a7422KF_P7PuU3YQ5qG6ZLEVpiA
|
|
|
|
459a74e4nRcXppMSBYeQQ5efDkTADg
|
2007-01-17 13:22:50 -05:00
|
|
|
45ae6628gqKTsUFfnoNExadETVIkbA
|
2007-01-26 14:47:12 -05:00
|
|
|
45ba4faf2oqu6eR8fqecR3LfSNcYUg
|
|
|
|
45ba5238-NKl80QVXzdGo8hO9M75Xg
|
2007-01-31 15:39:41 -05:00
|
|
|
45c0fdfb2mz6NdOIsLenJtf6_ZelTA
|
2007-02-13 16:35:29 -05:00
|
|
|
45d1ffcd-r3v8A7uh92hQaMfQM9UPQ
|
|
|
|
45d21437Vg_-i4uOWyvzYWHESXDP6A
|