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.
Added definitions for the following Hebrew characters as specified by the ISO/IEC 8859-8:1999:
LEFT-TO-RIGHT MARK (LRM)
RIGHT-TO-LEFT MARK (RLM)
sql/share/charsets/hebrew.xml:
Added definitions for the following Hebrew characters as specified by the ISO/IEC 8859-8:1999:
LEFT-TO-RIGHT MARK (LRM)
RIGHT-TO-LEFT MARK (RLM)
strings/conf_to_src.c:
Added a warning comment in the generated C source file.
strings/ctype-extra.c:
Re-generated from sql/share/charsets/hebrew.xml
mysql-test/r/ctype_hebrew.result:
Added the test case for bug #24037 "Lossy Hebrew to Unicode conversion"
mysql-test/t/ctype_hebrew.test:
Added the test case for bug #24037 "Lossy Hebrew to Unicode conversion"
into siva.hindu.god:/usr/home/tim/m/bk/50
mysql-test/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/mysqld_multi.sh:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/sql_class.h:
Auto merged
- Skip tests using chmod when running as root
mysql-test/t/information_schema_chmod.test:
Use mysqltest builtin "chmode"
mysql-test/t/mysqltest.test:
Dont run as root - test chmod
mysql-test/t/rpl_rotate_logs.test:
Use mysqltest builtin "chmode"
Use 'write_file' and 'chmod' instead of system
mysql-test/t/trigger.test:
Don't run as root
Use 'write_file' and 'chmod'
mysql-test/t/varbinary.test:
Don't run as root
- Don't call SSL_shutdown a second time
vio/viossl.c:
SSL_shutdown might return 0 indicating that it should be called once
again for a graceful shutdown. Since the socket are going to be closed
anyway ther is no need for the second call.
configure.in:
Fix an omission: Version number for NDB is still kept separate (up to 5.0)
and must be changed in sync with the general version number in AM_INIT_AUTOMAKE.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/lib/mtr_cases.pl:
Auto merged
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
cmd-line-utils/readline/histfile.c:
Remove warning (compare signed & unsigned)
sql/udf_example.c:
Remove warning (cast integer to pointer of different size)
strings/decimal.c:
Remove warning (%lx format, double arg)
more similar to my_strtod() (and maybe even a bit faster due
to less floating point divisions).
This should at least partially fix Bug #23260 for DECIMALs
with a moderate number of total digits.
InnoDB timeout behavior (Bug #24200)
mysql-test/t/innodb_mysql-master.opt:
Set --innodb-lock-wait-timeout=2, since test for bug #24200 times out.
This *could* cause random test failures if some long-running transaction concurrency is being tested. However, such a test really should go in innodb-big or some other test file.
Handling of large signed/unsigned values was not consistent, so some string functions could return bogus results.
The current fix is to simply patch up the val_str() methods for those string items.
It would be good clean this code up in general, to make similar problems much harder to make. This is left as an exercise for the reader.
mysql-test/r/func_str.result:
Update test results for bug #24947
mysql-test/t/func_str.test:
Add test case for bug #24947
sql/item_strfunc.cc:
Adjust some string function Items' val_str() methods to handle large signed/unsigned arguments properly
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Bugs fixed:
- Bug #21468: InnoDB crash during recovery with corrupted data pages: XA bug?
- Bug #24299: Identifiers in foreign keys cannot contain U+0160, U+0360, ..., U+FF60
- Bug #24386: Performance degradation caused by instrumentation in mutex_struct
- Bug #24712: SHOW TABLE STATUS for file-per-table showing incorrect time fields
innobase/dict/dict0dict.c:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1030:
branches/5.0: Replace isspace() with a wrapper ib_isspace(), because on
Win32 isspace(0xa0) appears to hold. (Bug #24299)
innobase/include/sync0rw.h:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1040:
branches/5.0: Port r1039 from trunk:
Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds. (Bug #24386)
innobase/include/sync0sync.h:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1040:
branches/5.0: Port r1039 from trunk:
Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds. (Bug #24386)
innobase/include/sync0sync.ic:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1040:
branches/5.0: Port r1039 from trunk:
Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds. (Bug #24386)
innobase/log/log0recv.c:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1076:
branches/5.0: Remove the unintentionally committed change to univ.i in r1075.
Fix assertion failure sync0sync.c line 1239
(the latter ut_error in sync_thread_reset_level())
in crash recovery when UNIV_SYNC_DEBUG is enabled.
Revision r1079:
branches/5.0: recv_recovery_from_checkpoint_finish(): Add 1 sec delay
before switching on the sync order checks in crash recovery, so that
file I/O threads have time to suspend themselves.
innobase/srv/srv0start.c:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1075:
branches/5.0: Fix assertion failure sync0sync.c line 1239
(the latter ut_error in sync_thread_reset_level())
in crash recovery when UNIV_SYNC_DEBUG is enabled.
Revision r1077:
branches/5.0: innobase_start_or_create_for_mysql(): Remove unnecessary delay
now that we moved the setting sync_order_checks_on=TRUE to log0recv.c,
to the start of the rollback phase in crash recovery.
innobase/sync/sync0rw.c:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1040:
branches/5.0: Port r1039 from trunk:
Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds. (Bug #24386)
innobase/sync/sync0sync.c:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1040:
branches/5.0: Port r1039 from trunk:
Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds. (Bug #24386)
innobase/trx/trx0roll.c:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1067:
branches/5.0: trx_rollback_for_mysql(), trx_commit_for_mysql():
Protect the creation of trx_dummy_sess with kernel_mutex.
This error was introduced in r1046 and r1050.
Revision r1050:
branches/5.0: trx_rollback_for_mysql(): Fix the comment introduced in r1046.
trx_commit_for_mysql(): Use the dummy trx->sess also for committing a prepared
transaction in XA recovery, just in case our code would need the session
object also in that case (does not seem to need it right now).
Revision r1048:
branches/5.0: trx_rollback_for_mysql(): Do not set trx->sess back to NULL.
This bug was introduced in r1046.
Revision r1046:
branches/5.0: trx_rollback_for_mysql(): Ensure that trx->sess is non-NULL
when calling trx_general_rollback_for_mysql(). This removes a segmentation
fault when rolling back a prepared transaction in XA recovery. (Bug #21468)
innobase/trx/trx0trx.c:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1067:
branches/5.0: trx_rollback_for_mysql(), trx_commit_for_mysql():
Protect the creation of trx_dummy_sess with kernel_mutex.
This error was introduced in r1046 and r1050.
Revision r1050:
branches/5.0: trx_rollback_for_mysql(): Fix the comment introduced in r1046.
trx_commit_for_mysql(): Use the dummy trx->sess also for committing a prepared
transaction in XA recovery, just in case our code would need the session
object also in that case (does not seem to need it right now).
sql/ha_innodb.cc:
Applied innodb-5.0-ss1040 and innodb-5.0-ss1099 snapshots.
Revision r1040:
branches/5.0: Port r1039 from trunk:
Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds. (Bug #24386)
Revision r1099:
branches/5.0: Merge revision 1098 from trunk: Fix bug #24712: SHOW TABLE
STATUS for file-per-table showing incorrect time fields
Fix the move of "mysqlmanager" to section 8: Directory name was wrong.
support-files/mysql.spec.sh:
Fix the move of "mysqlmanager" to section 8: Directory name was wrong.