Содержание
- D.1. Changes in Release 5.5.x (Production)
- D.1.1. Changes in MySQL 5.5.22 (Not yet released)
- D.1.2. Changes in MySQL 5.5.21 (17 February 2012)
- D.1.3. Changes in MySQL 5.5.20 (10 January 2012)
- D.1.4. Changes in MySQL 5.5.19 (08 December 2011)
- D.1.5. Changes in MySQL 5.5.18 (16 November 2011)
- D.1.6. Changes in MySQL 5.5.17 (19 October 2011)
- D.1.7. Changes in MySQL 5.5.16 (15 September 2011)
- D.1.8. Changes in MySQL 5.5.15 (28 July 2011)
- D.1.9. Changes in MySQL 5.5.14 (05 July 2011)
- D.1.10. Changes in MySQL 5.5.13 (31 May 2011)
- D.1.11. Changes in MySQL 5.5.12 (05 May 2011)
- D.1.12. Changes in MySQL 5.5.11 (07 April 2011)
- D.1.13. Changes in MySQL 5.5.10 (15 March 2011)
- D.1.14. Changes in MySQL 5.5.9 (07 February 2011)
- D.1.15. Changes in MySQL 5.5.8 (03 December 2010, General Availability)
- D.1.16. Changes in MySQL 5.5.7 (14 October 2010)
- D.1.17. Changes in MySQL 5.5.6 (13 September 2010, Release Candidate)
- D.1.18. Changes in MySQL 5.5.5 (06 July 2010)
- D.1.19. Changes in MySQL 5.5.4 (09 April 2010)
- D.1.20. Changes in MySQL 5.5.3 (24 March 2010, Milestone 3)
- D.1.21. Changes in MySQL 5.5.2 (12 February 2010)
- D.1.22. Changes in MySQL 5.5.1 (04 January 2010)
- D.1.23. Changes in MySQL 5.5.0 (07 December 2009, Milestone 2)
- D.2. MySQL Connector/ODBC (MyODBC) Change History
- D.3. MySQL Connector/Net Change History
- D.3.1. Changes in MySQL Connector/Net Version 6.5.x
- D.3.2. Changes in MySQL Connector/Net Version 6.4.x
- D.3.3. Changes in MySQL Connector/Net Version 6.3.x
- D.3.4. Changes in MySQL Connector/Net Version 6.2.x
- D.3.5. Changes in MySQL Connector/Net Version 6.1.x
- D.3.6. Changes in MySQL Connector/Net Version 6.0.x
- D.3.7. Changes in MySQL Connector/Net Version 5.3.x
- D.3.8. Changes in MySQL Connector/Net Version 5.2.x
- D.3.9. Changes in MySQL Connector/Net Version 5.1.x
- D.3.10. Changes in MySQL Connector/Net Version 5.0.x
- D.3.11. Changes in MySQL Connector/Net Version 1.0.x
- D.3.12. Changes in MySQL Connector/Net Version 0.9.0 (30 August 2004)
- D.3.13. Changes in MySQL Connector/Net Version 0.76
- D.3.14. Changes in MySQL Connector/Net Version 0.75
- D.3.15. Changes in MySQL Connector/Net Version 0.74
- D.3.16. Changes in MySQL Connector/Net Version 0.71
- D.3.17. Changes in MySQL Connector/Net Version 0.70
- D.3.18. Changes in MySQL Connector/Net Version 0.68
- D.3.19. Changes in MySQL Connector/Net Version 0.65
- D.3.20. Changes in MySQL Connector/Net Version 0.60
- D.3.21. Changes in MySQL Connector/Net Version 0.50
- D.4. MySQL Visual Studio Plugin Change History
- D.5. MySQL Connector/J Change History
- D.6. MySQL Connector/MXJ Change History
- D.6.1. Changes in MySQL Connector/MXJ 5.0.12 (07 July 2011)
- D.6.2. Changes in MySQL Connector/MXJ 5.0.11 (24 November 2009)
- D.6.3. Changes in MySQL Connector/MXJ 5.0.10 (Not released)
- D.6.4. Changes in MySQL Connector/MXJ 5.0.9 (19 August 2008)
- D.6.5. Changes in MySQL Connector/MXJ 5.0.8 (06 August 2007)
- D.6.6. Changes in MySQL Connector/MXJ 5.0.7 (27 May 2007)
- D.6.7. Changes in MySQL Connector/MXJ 5.0.6 (04 May 2007)
- D.6.8. Changes in MySQL Connector/MXJ 5.0.5 (14 March 2007)
- D.6.9. Changes in MySQL Connector/MXJ 5.0.4 (28 January 2007)
- D.6.10. Changes in MySQL Connector/MXJ 5.0.3 (24 June 2006)
- D.6.11. Changes in MySQL Connector/MXJ 5.0.2 (15 June 2006)
- D.6.12. Changes in MySQL Connector/MXJ 5.0.1 (Not released)
- D.6.13. Changes in MySQL Connector/MXJ 5.0.0 (09 December 2005)
- D.7. MySQL Connector/C++ Change History
- D.8. MySQL Proxy Change History
- D.8.1. Changes in MySQL Proxy 0.8.2 (18 August 2011)
- D.8.2. Changes in MySQL Proxy 0.8.1 (13 September 2010)
- D.8.3. Changes in MySQL Proxy 0.8.0 (21 January 2010)
- D.8.4. Changes in MySQL Proxy 0.7.2 (30 June 2009)
- D.8.5. Changes in MySQL Proxy 0.7.1 (15 May 2009)
- D.8.6. Changes in MySQL Proxy 0.7.0 (Not Released)
- D.8.7. Changes in MySQL Proxy 0.6.1 (06 February 2008)
- D.8.8. Changes in MySQL Proxy 0.6.0 (11 September 2007)
- D.8.9. Changes in MySQL Proxy 0.5.1 (30 June 2007)
- D.8.10. Changes in MySQL Proxy 0.5.0 (19 June 2007)
This appendix lists the changes from version to version in the MySQL source code through the latest version of MySQL 5.5, which is currently MySQL 5.5.22. We offer a version of the Manual for each series of MySQL releases (5.0, 5.1, and so forth). For information about changes in another release series of the MySQL database software, see the corresponding version of this Manual.
We update this section as we add new features in the 5.5 series, so that everybody can follow the development process.
Note that we tend to update the manual at the same time we make changes to MySQL. If you find a recent version of MySQL listed here that you can't find on our download page (http://dev.mysql.com/downloads/), it means that the version has not yet been released.
The date mentioned with a release version is the date of the last Bazaar ChangeSet on which the release was based, not the date when the packages were made available. The binaries are usually made available a few days after the date of the tagged ChangeSet, because building and testing all packages takes some time.
The manual included in the source and binary distributions may not be fully accurate when it comes to the release changelog entries, because the integration of the manual happens at build time. For the most up-to-date release changelog, please refer to the online version instead.
Previously, MySQL development proceeded by including a large set of features and moving them over many versions within a release series through several stages of maturity (Alpha, Beta, and so forth). This development model had a disadvantage in that problems with only part of the code could hinder timely release of the whole.
MySQL development now uses a milestone model. The move to this model provides for more frequent milestone releases, with each milestone proceeding through a small number of releases having a focus on a specific subset of thoroughly tested features. Following the releases for one milestone, development proceeds with the next milestone; that is, another small number of releases that focuses on the next small set of features, also thoroughly tested.
MySQL 5.5.0-m2 is the first release for Milestone 2. The new features of this milestone may be considered to be initially of beta quality. For subsequent Milestone 2 releases, we plan to use increasing version numbers (5.5.1 and higher) while continuing to employ the “-m2” suffix. For Milestone 3, we plan to change the suffix to “-m3”. Version designators with “-alpha” or “-beta” suffixes are no used.
You may notice that the MySQL 5.5.0 release is designated as Milestone 2 rather than Milestone 1. This is because MySQL 5.4 was actually designated as Milestone 1, although we had not yet begun referring to milestone numbers as part of version numbers at the time.
- D.1.1. Changes in MySQL 5.5.22 (Not yet released)
- D.1.2. Changes in MySQL 5.5.21 (17 February 2012)
- D.1.3. Changes in MySQL 5.5.20 (10 January 2012)
- D.1.4. Changes in MySQL 5.5.19 (08 December 2011)
- D.1.5. Changes in MySQL 5.5.18 (16 November 2011)
- D.1.6. Changes in MySQL 5.5.17 (19 October 2011)
- D.1.7. Changes in MySQL 5.5.16 (15 September 2011)
- D.1.8. Changes in MySQL 5.5.15 (28 July 2011)
- D.1.9. Changes in MySQL 5.5.14 (05 July 2011)
- D.1.10. Changes in MySQL 5.5.13 (31 May 2011)
- D.1.11. Changes in MySQL 5.5.12 (05 May 2011)
- D.1.12. Changes in MySQL 5.5.11 (07 April 2011)
- D.1.13. Changes in MySQL 5.5.10 (15 March 2011)
- D.1.14. Changes in MySQL 5.5.9 (07 February 2011)
- D.1.15. Changes in MySQL 5.5.8 (03 December 2010, General Availability)
- D.1.16. Changes in MySQL 5.5.7 (14 October 2010)
- D.1.17. Changes in MySQL 5.5.6 (13 September 2010, Release Candidate)
- D.1.18. Changes in MySQL 5.5.5 (06 July 2010)
- D.1.19. Changes in MySQL 5.5.4 (09 April 2010)
- D.1.20. Changes in MySQL 5.5.3 (24 March 2010, Milestone 3)
- D.1.21. Changes in MySQL 5.5.2 (12 February 2010)
- D.1.22. Changes in MySQL 5.5.1 (04 January 2010)
- D.1.23. Changes in MySQL 5.5.0 (07 December 2009, Milestone 2)
An overview of features added in MySQL 5.5 can be found here: Section 1.4, “What Is New in MySQL 5.5”. For a full list of changes, please refer to the changelog sections for individual 5.5 releases.
For discussion of upgrade issues that you may encounter for upgrades from MySQL 5.1 to MySQL 5.5, see Section 2.11.1.1, “Upgrading from MySQL 5.1 to 5.5”.
For discussion of upgrade issues that you may encounter for upgrades from MySQL 5.4 to MySQL 5.5, see Section 2.11.1.2, “Upgrading from MySQL 5.4 to 5.5”.
For changes relating to MySQL Cluster, see Section 16.7, “Changes in MySQL Cluster”.
Bugs Fixed
InnoDB Storage Engine: An erroneous assertion could occur, in debug builds only, when creating an index on a column containing zero-length values (that is,
''). (Bug #13654923)InnoDB Storage Engine: A DDL operation such as
ALTER TABLE ... ADD COLUMNcould stall, eventually timing out with anError 1005: Can't create tablemessage referring tofil_rename_tablespace. (Bug #13636122, Bug #62100, Bug #63553)InnoDB Storage Engine: A DDL operation for an
InnoDBtable could cause a busy MySQL server to halt with an assertion error:InnoDB: Failing assertion: trx->error_state == DB_SUCCESS
The error occurred if the DDL operation was run while all 1023 undo slots were in use by concurrent transactions. This error was less likely to occur in MySQL 5.5 and 5.6, because raising the number of
InnoDBundo slots increased the number of simultaneous transactions (corresponding to the number of undo slots) from 1K to 128K. (Bug #12739098, Bug #62401)InnoDB Storage Engine: Server startup could produce an error for temporary tables using the
InnoDBstorage engine, if the path in the$TMPDIRvariable ended with a/character. The error log would look like:120202 19:21:26 InnoDB: Operating system error number 2 in a file operation. InnoDB: The error means the system cannot find the path specified. InnoDB: If you are installing InnoDB, remember that you must create InnoDB: directories yourself, InnoDB does not create them. 120202 19:21:26 InnoDB: Error: trying to open a table, but could not InnoDB: open the tablespace file './t/#sql7750_1_0.ibd'! InnoDB: Have you moved InnoDB .ibd files around without using the InnoDB: commands DISCARD TABLESPACE and IMPORT TABLESPACE? InnoDB: It is also possible that this is a temporary table #sql..., InnoDB: and MySQL removed the .ibd file for this.
The workaround for the problem was to create a similar temporary table again, copy its
.frmfile totmpdirunder the name mentioned in the error message (for example,#sql123.frm) and restartmysqldwithtmpdirset to its normal value without a trailing slash, for example/var/tmp. On startup, MySQL would see the.frmfile and issueDROP TABLEfor the orphaned temporary table. (Bug #11754376, Bug #45976)Replication: Statements that wrote to tables with
AUTO_INCREMENTcolumns based on an unorderedSELECTfrom another table could lead to the master and the slave going out of sync, as the order in which the rows are retrieved from the table may differ between them. Such statements include anyINSERT ... SELECT,REPLACE ... SELECT, orCREATE TABLE ... SELECTstatement. Such statements are now marked as unsafe for statement-based replication, which causes the execution of one to throw a warning, and forces the statement to be logged using the row-based format if the logging format isMIXED. (Bug #11758263, Bug #50440)myisam_sort_buffer_sizecould not be set larger than 4GB on 64-bit systems. (Bug #45702, Bug #11754145)
Functionality Added or Changed
A new CMake option,
MYSQL_PROJECT_NAME, can be set on Windows or Mac OS X to be used in the project name. (Bug #13551687)
Bugs Fixed
Performance: InnoDB Storage Engine: Memory allocation for
InnoDBtables was reorganized to reduce the memory overhead for large numbers of tables or partitions, avoiding situations where the “resident set size” could grow regardless ofFLUSH TABLESstatements. The problem was most evident for tables with large row size. Some of the memory that was formerly allocated for every open table is now allocated only when the table is modified for the first time. (Bug #11764622, Bug #57480)Incompatible Change: An earlier change (in MySQL 5.1.62 and 5.5.21) was found to modify date-handling behavior in General Availability-status series (MySQL 5.1 and 5.5). This change has been reverted.
The change was that several functions became more strict when passed a
DATE()function value as their argument, thus they rejected incomplete dates with a day part of zero. These functions were affected:CONVERT_TZ(),DATE_ADD(),DATE_SUB(),DAYOFYEAR(),LAST_DAY(),TIMESTAMPDIFF(),TO_DAYS(),TO_SECONDS(),WEEK(),WEEKDAY(),WEEKOFYEAR(),YEARWEEK(). The previous behavior has been restored. (Bug #13458237)InnoDB Storage Engine: A Valgrind error was fixed in the function
os_aio_init(). (Bug #13612811)InnoDB Storage Engine: The server could crash when creating an
InnoDBtemporary table under Linux, if the$TMPDIRsetting points to atmpfsfilesystem andinnodb_use_native_aiois enabled, as it is by default in MySQL 5.5.4 and higher. The entry in the error log looked like:101123 2:10:59 InnoDB: Operating system error number 22 in a file operation. InnoDB: Error number 22 means 'Invalid argument'.
The crash occurred because asynchronous I/O is not supported on tmpfs in some Linux kernel versions. The workaround was to turn off the
innodb_use_native_aiosetting or use a different temporary directory. The fix causesInnoDBto turn off theinnodb_use_native_aiosetting automatically if it detects that the temporary file directory does not support asynchronous I/O. (Bug #13593888, Bug #11765450, Bug #58421)InnoDB Storage Engine: References to C preprocessor symbols and macros
HAVE_purify,UNIV_INIT_MEM_TO_ZERO, andUNIV_SET_MEM_TO_ZEROwere removed from theInnoDBsource code. They were only used in debug builds instrumented for Valgrind. They are replaced by calls to theUNIV_MEM_INVALID()macro. (Bug #13418934)InnoDB Storage Engine: The MySQL server could halt with an assertion error:
InnoDB: Failing assertion: page_get_n_recs(page) > 1
Subsequent restarts could fail with the same error. The error occurred during a purge operation involving the
InnoDBchange buffer. The workaround was to set the configuration optioninnodb_change_buffering=inserts. (Bug #13413535, Bug #61104)InnoDB Storage Engine: With 1024 concurrent
InnoDBtransactions running concurrently and theinnodb_file_per_tablesetting enabled, aCREATE TABLEoperation for anInnoDBtable could fail. The.ibdfile from the failedCREATE TABLEwas left behind, preventing the table from being created later, after the load had dropped.The fix adds error handling to delete the erroneous
.ibdfile. This error was less likely to occur in MySQL 5.5 and 5.6, because raising the number ofInnoDBundo slots increased the number of simultaneous transactions needed to trigger the bug, from 1K to 128K. (Bug #12400341)Replication: Executing mysqlbinlog with the
--start-position=option, whereNNwas equal either to 0 or to a value greater than the length of the dump file, caused it to crash.This issue was introduced in MySQL 5.5.18 by the fix for Bug #32228 and Bug #11747416. (Bug #13593869, Bug #64035)
Replication: On Windows replication slave hosts,
STOP SLAVEtook an excessive length of time to complete when the master was down. (Bug #11752315, Bug #43460)A query that used an index on a
CHARcolumn referenced in aBETWEENclause could return invalid results. (Bug #13463488, Bug #63437)Expressions that compared a
BIGINTcolumn with any non-integer constant were performed using integers rather than decimal or float values, with the result that the constant could be truncated. This could lead to any such comparison that used<,>,<=,>=,=,!=/<>,IN, orBETWEENyielding false positive or negative results. (Bug #13463415, Bug #11758543, Bug #63502, Bug #50756)When the optimizer performed conversion of
DECIMALvalues while evaluating range conditions, it could produce incorrect results. (Bug #13453382)When running mysqldump with both the
--single-transactionand--flush-logsoptions, the flushing of the log performed an implicitCOMMIT(see Section 12.3.3, “Statements That Cause an Implicit Commit”), causing more than one transaction to be used and thus breaking consistency. (Bug #12809202, Bug #61854)It was possible in the event of successive failures for mysqld_safe to restart quickly enough to consume excessive amounts of CPU. Now, on systems that support the sleep and date system utilities, mysqld_safe checks to see whether it has restarted more than 5 times in the current second, and if so, waits 1 second before attempting another restart. (Bug #11761530, Bug #54035)
When used with the
--xmloption, mysqldump--routinesfailed to dump any stored routines, triggers, or events. (Bug #11760384, Bug #52792)It was possible on replication slaves where
FEDERATEDtables were in use to get timeouts on long-running operations, such as Error 1160 Got an error writing communication packets. TheFEDERATEDtables did not need to be replicated for the issue to occur. (Bug #11758931, Bug #51196)References: See also Bug #12896628, Bug #61790.
If an attempt to initiate a statement failed, the issue could not be reported to the client because it was not prepared to receive any error messages prior to the execution of any statement. Since the user could not execute any queries, they were simply disconnected without providing a clear error.
After the fix for this issue, the client is prepared for an error as soon as it attempts to initiate a statement, so that the error can be reported prior to disconnecting the user. (Bug #11755281, Bug #47032)
Using myisamchk with the sort recover method to repair a table having fixed-width row format could cause the row pointer size to be reduced, effectively resulting in a smaller maximum data file size. (Bug #48848, Bug #11756869)
On Windows, the server incorrectly constructed the full path name of the plugin binary for
INSTALL PLUGINandCREATE FUNCTION ... SONAME. (Bug #45549, Bug #11754014)The stored routine cache was subject to a small memory leak that over time or with many routines being used could result in out-of-memory errors. (Bug #44585, Bug #11753187)
Functionality Added or Changed
A new server option,
--slow-start-timeout, controls the Windows service control manager's service start timeout. The value is the maximum number of milliseconds that the service control manager waits before trying to kill the MySQL service during startup. The default value is 15000 (15 seconds). If the MySQL service takes too long to start, you may need to increase this value. A value of 0 means there is no timeout. (Bug #45546, Bug #11754011)
Bugs Fixed
Performance: InnoDB Storage Engine: This fix improved the efficiency and concurrency of freeing pages in the
InnoDBbuffer pool when performing aDROP TABLEfor anInnoDBtable when theinnodb_file_per_tableoption is enabled.This change is most noticeable for systems with large buffer pools. During the drop operation, one traversal of the buffer pool memory structure is changed from the LRU list (the entire buffer pool) to the flush list (a much smaller structure). The LRU scanning is reduced, but not entirely eliminated. The buffer pool mutex is also released periodically, so that if the drop operation takes significant time, other threads can proceed concurrently. (Bug #11759044, Bug #51325)
Important Change: Replication: Setting an empty user in a
CHANGE MASTER TOstatement caused an invalid internal result and is no longer permitted. Trying to useMASTER_USER=''or settingMASTER_PASSWORDwhile leavingMASTER_USERunset causes the statement to fail with an error. (Bug #13427949)Important Change: Replication: Moving the binary log file, relay log file, or both files to a new location, then restarting the server with a new value for
--log-bin,--relay-log, or both, caused the server to abort on start. This was because the entries in the index file overrode the new location. In addition, paths were calculated relative to datadir (rather than to the--log-binor--relay-logvalues).The fix for this problem means that, when the server reads an entry from the index file, it now checks whether the entry contains a relative path. If it does, the relative part of the path is replaced with the absolute path set using the
--log-binor--relay-logoption. An absolute path remains unchanged; in such a case, the index must be edited manually to enable the new path or paths to be used. (Bug #11745230, Bug #12133)InnoDB Storage Engine: When doing a live downgrade from MySQL 5.6.4 or later, with
innodb_page_sizeset to a value other than 16384, now the earlier MySQL version reports that the page size is incompatible with the older version, rather than crashing or displaying a “corruption” error. (Bug #13116225)InnoDB Storage Engine: Certain
CREATE TABLEstatements could fail forInnoDBchild tables containing foreign key definitions. This problem affected Windows systems only, with the settinglower_case_table_names=0. It was a regression from MySQL bug #55222. (Bug #13083023, Bug #60229)InnoDB Storage Engine: Issuing
INSERT...ON DUPLICATE KEYstatements forInnoDBtables from concurrent threads could cause a deadlock, particularly with theINSERT...ON DUPLICATE KEY UPDATEform. The problem could also be triggered by issuing multipleINSERT IGNOREstatements. The fix avoids deadlocks caused by the same row being accessed by more than one transaction. Deadlocks could still occur when multiple rows are inserted and updated simultaneously by different transactions in inconsistent order; those types of deadlocks require the standard error handling on the application side, of re-trying the transaction. (Bug #11759688, Bug #52020, Bug #12842206)An incorrect
InnoDBassertion could cause the server to halt. This issue only affected debug builds. The assertion referenced the source filebtr0pcur.icand the variablecursor->pos_state. (Bug #13358468)Locale information for
FORMAT()function instances was lost in view definitions. (Bug #63020, Bug #13344643)The
handle_segfault()signal-handler code in mysqld could itself crash due to calling unsafe functions. (Bug #54082, Bug #11761576)Enabling
myisam_use_mmapcould cause the server to crash. (Bug #48726, Bug #11756764)Concurrent access to
ARCHIVEtables could cause corruption. (Bug #42784, Bug #11751793)
Functionality Added or Changed
Replication: Previously, replication slaves could connect to the master server through master accounts that use nonnative authentication, except Windows native authentication. This is now also true for Windows native authentication.
Performance of metadata locking operations on Windows XP systems was improved by instituting a cache for metadata lock objects. This permits the server to avoid expensive operations for creation and destruction of synchronization objects on XP. A new system variable,
metadata_locks_cache_size, permits control over the size of the cache. The default size is 1024. (Bug #12695572)
Bugs Fixed
InnoDB Storage Engine: An internal deadlock could occur within
InnoDB, on a server doing a substantial amount of change buffering for DML operations, particularlyDELETEstatements. (Bug #13340047)Replication: When a statement containing a large number of rows to be applied on a slave table that does not contain a primary key, a considerable amount of time can be needed to find and change all the rows that are to be changed. The current fix helps diagnose this issue by printing a message to the error log if the execution time for a given statement replicated using row-based replication takes more than 60 seconds.
log_warningsmust be greater than 1 for this message to be printed to the error log. (Bug #11760927, Bug #53375)Rounding
DBL_MAXreturnedDBL_MAX, not 'inf'. (Bug #13261955)mysql_upgrade did not upgrade the system tables or create the
mysql_upgrade_infofile when run with the--write-binlogor--skip-write-binlogoption. (Bug #60223, Bug #11827359)If a plugin was uninstalled, thread local variables for plugin variables of string type with wth
PLUGIN_VAR_MEMALLOCflag were not freed. (Bug #56652, Bug #11763882)Deadlock could occur when these four things happened at the same time: 1) An old dump thread was waiting for the binary log to grow. 2) The slave server that replicates from the old dump thread tried to reconnect. During reconnection, the new dump thread tried to kill the old dump thread. 3) A
KILLstatement tried to kill the old dump thread. 4) AnINSERTstatement caused a binary log rotation. (Bug #56299, Bug #11763573)
Functionality Added or Changed
Upgrading from an
Advanced GPLRPM package to anAdvancedRPM package did not work. Now on Linux it is possible to use rpm -U to replace any installed MySQL product by any other of the same release family. It is not necessary to remove the old produce with rpm -e first. (Bug #11886309)
Bugs Fixed
Performance: InnoDB Storage Engine: The process of deallocating the
InnoDBAdaptive Hash Index was made faster, during shutdown or when turning off the AHI with the statement:SET GLOBAL innodb_adaptive_hash_index=OFF;
(Bug #13006367, Bug #62487)
Incompatible Change: Replication: The statements in the following list are now marked as unsafe for statement-based replication. This is due to the fact that each of these statements depends on the results of a
SELECTstatement whose order cannot always be determined. When usingSTATEMENTlogging mode, a warning is issued in the binary log for any of these statements; when usingMIXEDlogging mode, the statement is logged using the row-based format.When upgrading, you should note the use of these statements in your applications, keeping in mind that a statement that inserts or replaces rows obtained from a
SELECTcan take up many times as much space in the binary log when logged using row-based format than when only the statement itself is logged. Depending on the number and size of the rows selected and inserted (or replaced) by any such statements, the difference in size of the binary log after the logging of these statements is switched from statement-based to row-based can potentially be several orders of magnitude. See Section 15.1.2.1, “Advantages and Disadvantages of Statement-Based and Row-Based Replication”. (Bug #11758262, Bug #50439)InnoDB Storage Engine: Fixed a compilation problem that affected the
InnoDBsource code withgcc4.6.1. The affectedInnoDBsource file wasbtr/btr0cur.c. (Bug #13116045)InnoDB Storage Engine: An
UPDATEstatement for anInnoDBtable could hang. The issue affects tables using the Barracuda file format and having multiple indexes on column prefixes. The size of an undo log record could exceed the page size, even though the total size of the column prefixes was less than the page size (usually 16KB). In MySQL 5.5 and higher, this error is now reported using the new codeER_UNDO_RECORD_TOO_BIG. In MySQL 5.1 with the InnoDB Plugin, this error is reported using the existing codeER_TOO_BIG_ROWSIZE. (Bug #12547647)Replication: A replication master could send damaged events to slaves after the binary log disk on the master became full. To correct this issue, only complete events are now pushed by the master dump thread to the slave I/O thread. In addition, the error text that the master sends to the slave when an incomplete event is found now states that the incomplete event may have been caused by running out of disk space on the master, and provides coordinates of the first and the last event bytes read. (Bug #11747416, Bug #32228)
References: See also Bug #64035, Bug #13593869.
During the table-opening process, memory was allocated and later freed that was needed view loading, even for statements that did not use views. These unnecessary allocation and free operations are no longer done. (Bug #13116518)
mysql_plugin mishandled the
--plugin-ini,--mysqld, and--my-print-defaultsoptions under some circumstances. (Bug #12968815)mysql_plugin returned the wrong error code from failed server bootstrap execution. (Bug #12968567)
Several improvements were made to the
libeditlibrary bundled with MySQL distributions, and that is available for all platforms that MySQL supports except Windows.Navigation keys did not work for UTF-8 input.
Word navigation and delete operations did not work for UTF-8 input with Cyrillic characters.
Nonlatin characters were corrupted in overwrite mode for UTF-8 input.
Long queries caused the statement history file to become corrupted.
The Alt key caused history operations to fail.
(Bug #12605400, Bug #12613725, Bug #12618092, Bug #12624155, Bug #12617651, Bug #12605388)
ARCHIVEtables withNULLcolumns could cause server crashes or become corrupt under concurrent load. (Bug #51252, Bug #11758979)OPTIMIZE TABLEcould corruptMyISAMtables ifmyisam_use_mmapwas enabled. (Bug #49030, Bug #11757032)A query that selected a
GROUP_CONCAT()function result could return different values depending on whether anORDER BYof the function result was present. (Bug #41090, Bug #11750518)For
FEDERATEDtables, loss of connection to the remote table during some insert operations could cause a server crash. (Bug #34660, Bug #11747970)
Functionality Added or Changed
Replication: Previously, replication slaves could connect to the master server only through master accounts that use native authentication. Now replication slaves can also connect through master accounts that use nonnative authentication (except Windows native authentication) if the required client-side plugin is installed on the slave side in the directory named by the slave
plugin_dirsystem variable. The exception for Windows is lifted in MySQL 5.5.19. (Bug #12897501)The make_win_bin_dist script is no longer used and has been removed from MySQL distributions and the manual. (Bug #58241)
MEMORYtable creation time is now available in theCREATE_TIMEcolumn of theINFORMATION_SCHEMA.TABLEStable and theCreate_timecolumn ofSHOW TABLE STATUSoutput. (Bug #51655, Bug #11759349)
Bugs Fixed
Performance: InnoDB Storage Engine: This fix improves the performance of instrumentation code for
InnoDBbuffer pool operations. (Bug #12950803, Bug #62294)InnoDB Storage Engine: Lookups using secondary indexes could give incorrect matches under a specific set of conditions. The conditions involve an index defined on a column prefix, for a BLOB or other long column stored outside the index page, with a table using the Barracuda file format. (Bug #12601439, Bug #12543666)
InnoDB Storage Engine: This fix corrects cases where the MySQL server could hang or abort with a
long semaphore waitmessage. (This is a different issue than when these symptoms occurred during aCHECK TABLEstatement.) (Bug #11766591, Bug #59733)Internal conversion of zero to binary and back could yield a result with incorrect precision. (Bug #12911710)
Valgrind warnings generated by
filesortoperations were fixed. (Bug #12856915)mysqld_safe did not properly check for an already running instance of mysqld. (Bug #11878394)
With Valgrind enabled,
InnoDBsemaphore wait timeouts were too low and could expire. (Bug #11765460)The help message for mysql_install_db did not indicate that it supports the
--defaults-file,--defaults-extra-fileand--no-defaultsoptions. (Bug #58898, Bug #11765888)An assertion designed to detect zero-length sort keys also was raised when the entire key set fit in memory. (Bug #58200, Bug #11765254)
myisampack could create corrupt
FULLTEXTindexes when compressing tables. (Bug #53646, Bug #11761180)A linking problem prevented the
FEDERATEDstorage engine plugin from loading. (Bug #40942, Bug #11750417)
Thread Pool Plugin Notes
The default thread-handling model in MySQL Server executes statements using one thread per client connection. As more clients connect to the server and execute statements, overall performance degrades. Commercial distributions of MySQL now include a thread pool plugin that provides an alternative thread-handling model designed to reduce overhead and improve performance. The plugin implements a thread pool that increases server performance by efficiently managing statement execution threads for large numbers of client connections.
The thread pool addresses several problems of the one thread per connection model:
Too many thread stacks make CPU caches almost useless in highly parallel execution workloads. The thread pool promotes thread stack reuse to minimize the CPU cache footprint.
With too many threads executing in parallel, context switching overhead is high. This also presents a challenging task to the operating system scheduler. The thread pool controls the number of active threads to keep the parallelism within the MySQL server at a level that it can handle and that is appropriate for the server host on which MySQL is executing.
Too many transactions executing in parallel increases resource contention. In
InnoDB, this increases the time spent holding central mutexes. The thread pool controls when transactions start to ensure that not too many execute in parallel.
On Windows, the thread pool plugin requires Windows Vista or newer. On Linux, the plugin requires kernel 2.6.9 or newer.
For more information, see Section 7.11.6, “The Thread Pool Plugin”.
External Authentication
Commercial distributions of MySQL now include two plugins that enable MySQL Server to use external authentication methods to authenticate MySQL users:
PAM (Pluggable Authentication Modules) enables a system to access various kinds of authentication methods through a standard interface. A PAM authentication plugin enables MySQL Server to use PAM to authenticate MySQL users.
The PAM plugin uses the information passed to it by the MySQL server (such as user name, host name, password, and authentication string), plus whatever is available for PAM lookup (such as Unix passwords or an LDAP directory). The plugin checks the user credentials against PAM and returns success or failure.
The PAM authentication plugin has been tested on Linux and Mac OS X.
ЗамечаниеThe PAM plugin works with a client-side plugin that simply sends the password to the server in clear text so it can be passed to PAM. This may be a security problem in some configurations, but is necessary to use the server-side PAM library. To avoid problems if there is any possibility that the password would be intercepted, clients should connect to MySQL Server using SSL. See Section 5.5.6.4, “The Clear-Text Client-Side Authentication Plugin”.
Distributions of MySQL for Windows include an authentication plugin that enables MySQL Server to use native Windows services to authenticate client connections. Users who have logged in to Windows can connect from MySQL client programs to the server based on the information in their environment without specifying an additional password.
The client and server exchange data packets in the authentication handshake. As a result of this exchange, the server creates a security context object that represents the identity of the client in the Windows OS. This identity includes the name of the client account. The Windows authentication plugin uses the identity of the client to check whether it is a given account or a member of a group. By default, negotiation uses Kerberos to authenticate, then NTLM if Kerberos is unavailable.
The Windows authentication plugin should work on Windows 2000 Professional
These authentication plugins enable MySQL Server to accept connections from users defined outside the MySQL grant tables. They also support the MySQL proxy-user capability. Each plugin can return to MySQL a user name different from the login user, which means that the plugin can return the MySQL user that defines the privileges the externally authenticated user should have. For example, an external user named
joecan connect and have the privileges of the MySQL user nameddeveloper.The server-side PAM and Windows authentication plugins are included only in commercial distributions. They are not included in MySQL community distributions. The client-side plugins with which they communicate are included in all distributions, including community distributions. This permits clients from any release to connect to a server that has the server-side plugin loaded.
For more information about these plugins, see Section 5.5.6.2, “The PAM Authentication Plugin”, and Section 5.5.6.3, “The Windows Native Authentication Plugin”. For general information about pluggable authentication in MySQL, see Section 5.5.6, “Pluggable Authentication”. For proxy user information, see Section 5.5.7, “Proxy Users”.
Functionality Added or Changed
Important Change: Replication: The
RESET SLAVEstatement has been extended with anALLkeyword. In addition to deleting themaster.info,relay-log.info, and all relay log files,RESET SLAVE ALLalso clears all connection information otherwise held in memory following execution ofRESET SLAVE. (Bug #11809016)The thread pool plugin should be loaded at server startup, and not loaded or unloaded at runtime. An error now occurs for attempts to load or unload it with the
INSTALL PLUGINorUNINSTALL PLUGINstatement.Some plugins operate in such a matter that they should be loaded at server startup, and not loaded or unloaded at runtime. The plugin API now supports marking plugins this way. The
st_mysql_pluginstructure now has aflagsmember, which can be set to the OR of the applicable flags. ThePLUGIN_OPT_NO_INSTALLflag indicates that the plugin cannot be loaded at runtime with theINSTALL PLUGINstatement. This is appropriate for plugins that must be loaded at server startup with the--plugin-loadoption. ThePLUGIN_OPT_NO_UNINSTALLflag indicates that the plugin cannot be unloaded at runtime with theUNINSTALL PLUGINstatement.The new member changes the interface, so the plugin interface version,
MYSQL_PLUGIN_INTERFACE_VERSION, has been incremented from0x0102to0x0103. Plugins that require access to the new member must be recompiled to use version0x0103or higher.A new utility, mysql_plugin, enables MySQL administrators to manage which plugins a MySQL server loads. It provides an alternative to manually specifying the
--plugin-loadoption at server startup or using theINSTALL PLUGINandUNINSTALL PLUGINstatements at runtime. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”.
Bugs Fixed
Performance: InnoDB Storage Engine: This fix improves the performance of operations on
VARCHAR(columns inN)InnoDBtables, whereNis declared as a large value but the actual string values in the table are short. (Bug #12835650)Performance: InnoDB Storage Engine: The “random read-ahead” feature that was removed from the
InnoDBPlugin is now available again. Because it is only helpful for certain workloads, it is turned off by default. To turn it on, enable theinnodb_random_read_aheadconfiguration option. Because this feature can improve performance in some cases and reduce performance in others, before relying on this setting, benchmark both with and without the setting enabled. (Bug #12356373)Incompatible Change: Handling of a date-related assertion was modified.
However, a consequence of this change is that several functions become more strict when passed a
DATE()function value as their argument and reject incomplete dates with a day part of zero. These functions are affected:CONVERT_TZ(),DATE_ADD(),DATE_SUB(),DAYOFYEAR(),LAST_DAY(),TIMESTAMPDIFF(),TO_DAYS(),TO_SECONDS(),WEEK(),WEEKDAY(),WEEKOFYEAR(),YEARWEEK(). Because this changes date-handling behavior in General Availability-status series (MySQL 5.1 and 5.5), it was reverted in 5.1.62 and 5.5.21. The change is retained in MySQL 5.6.References: See also Bug #13458237.
InnoDB Storage Engine: The
DATA_LENGTHcolumn in theINFORMATION_SCHEMA.TABLEStable now correctly reports the on-disk sizes of tablespaces forInnoDBcompressed tables. (Bug #12770537)InnoDB Storage Engine: With the configuration settings
innodb_file_per_table=1andinnodb_file_format=Barracuda, inserting a column value greater than half the page size, and including that column in a secondard index, could cause a crash when that column value was updated. (Bug #12637786)InnoDB Storage Engine: Unused functions were removed from the internal
InnoDBcode related to mini-transactions, to clarify the logic. (Bug #12626794, Bug #61240)Replication: Processing of corrupted table map events could cause the server to crash. This was especially likely if the events mapped different tables to the same identifier, such as could happen due to Bug #56226.
Now, before applying a table map event, the server checks whether the table has already been mapped with different settings, and if so, an error is raised and the slave SQL thread stops. If it has been mapped with the same settings, or if the table is set to be ignored by filtering rules, there is no change in behavior: the event is skipped and IDs are not checked. (Bug #44360, Bug #11753004)
References: See also Bug #11763509.
The metadata locking subsystem added too much overhead for
INFORMATION_SCHEMAqueries that were processed by opening only.frmor.TRGfiles and had to scan many tables. For example,SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERSwas affected. (Bug #12828477)Compilation failed on Mac OS X 10.7 (Lion) with a warning:
Implicit declaration of function 'pthread_init'(Bug #12779790)With profiling disabled or not compiled in,
set_thd_proc_info()unnecessarily checked file name lengths. (Bug #12756017)References: This bug is a regression of Bug #59273.
A
DBUG_ASSERTadded by Bug #11792200 was overly aggressive in raising assertions. (Bug #12537160)CHECK TABLEandREPAIR TABLEfailed to find problems withMERGEtables that had underlying tables missing or with the wrong storage engine. Issues were reported only for the first underlying table. (Bug #11754210)(5 DIV 2)and(5.0 DIV 2)produced different results (2 versus 3) because the result of the latter expression was not truncated before conversion to integer. This differed from the behavior in MySQL 5.0 and 5.1. Now both expressions produce 2. (Bug #61676, Bug #12711164)For a
lower_case_table_namesvalue of 1 or 2 and a database having a mixed-case name, calling a stored function using a fully qualified name including the database name failed. (Bug #60347, Bug #11840395)SELECT DISTINCTwith a deterministic stored function in theWHEREclause could produce incorrect results. (Bug #59736, Bug #11766594)The embedded server crashed when
argc = 0. (Bug #57931, Bug #12561297)CREATE TABLEwithout anENGINEoption determined the default engine at parse rather than execution time. This led to incorrect results if the statement was executed within a stored program and the default engine had been changed in the meantime. (Bug #50614, Bug #11758414)The
mysql_affected_rows()C API function returned 3 (instead of 2) forINSERT ... ON DUPLICATE KEY UPDATEstatements where there was a duplicated key value. (Bug #46675, Bug #11754979)Upgrades using an RPM package recreated the
testdatabase, which is undesirable when the DBA had removed it. (Bug #45415, Bug #11753896)
Functionality Added or Changed
The undocumented
--alloption for perror is deprecated and will be removed in MySQL 5.6.
Bugs Fixed
Performance: InnoDB Storage Engine: The
DROP TABLEcommand for anInnoDBtable could be very slow, in a configuration with a combination of table compression, partitioning, and a large buffer pool. (Bug #12635227, Bug #61188)InnoDB Storage Engine: A failed
CREATE INDEXoperation for anInnoDBtable could result in some memory being allocated but not freed. This memory leak could affect tables created with theROW_FORMAT=DYNAMICorROW_FORMAT=COMPRESSEDsetting. (Bug #12699505)Partitioning: Auto-increment columns of partitioned tables were checked even when they were not being written to. In debug builds, this could lead to a server crash. (Bug #11765667, Bug #58655)
Partitioning: The
UNIX_TIMESTAMP()function was not treated as a monotonic function for purposes of partition pruning. (Bug #11746819, Bug #28928)Replication: If a
LOAD DATA INFILEstatement—replicated using statement-based replication—featured aSETclause, the name-value pairs were regenerated using a method (Item::print()) intended primarily for generating output for statements such asEXPLAIN EXTENDED, and which cannot be relied on to return valid SQL. This could in certain cases lead to a crash on the slave.To fix this problem, the server now names each value in its original, user-supplied form, and uses that to create
LOAD DATA INFILEstatements for statement-based replication. (Bug #60580, Bug #11902767)References: See also Bug #34283, Bug #11752526, Bug #43746.
Compiling the server with maintainer mode enabled failed for gcc 4.6 or higher. (Bug #12727287)
The option-parsing code for empty strings leaked memory. (Bug #12589928)
mysql_list_fields()returned incorrect character set information for character columns of views. (Bug #12337762)Previously, an inappropriate error message was produced if a multiple-table update for an
InnoDBtable with a clustered primary key would update a table through multiple aliases, and perform an update that may physically move the row in at least one of these aliases. Now the error message is:Primary key/partition key update is not permitted since the table is updated both as '(Bug #11882110)tbl_name1' and 'tbl_name2'References: See also Bug #11764529.
ALTER TABLE {MODIFY|CHANGE} ... FIRSTdid nothing except rename columns if the old and new versions of the table had exactly the same structure with respect to column data types. As a result, the mapping of column name to column data was incorrect. The same thing happened forALTER TABLE DROP COLUMN ... ADD COLUMNstatements intended to produce a new version of the table with exactly the same structure as the old version. (Bug #61493, Bug #12652385)Incorrect handling of metadata locking for
FLUSH TABLES WITH READ LOCKfor statements requiring prelocking caused two problems:Execution of any data-changing statement that required prelocking (that is, involved a stored function or trigger) as part of a transaction slowed down somewhat all subsequent statements in the transaction. Performance in a transaction that periodically involved such statements gradually degraded over time.
Execution of any data-changing statement that required prelocking as part of a transaction prevented a concurrent
FLUSH TABLES WITH READ LOCKfrom proceeding until the end of the transaction rather than at the end of the particular statement.
(Bug #61401, Bug #12641342)
The fractional part of the “Queries per second” value could be displayed incorrectly in MySQL status output (for example, in the output from mysqladmin status or the mysql
STATUScommand). (Bug #61205, Bug #12565712)LOAD DATA INFILEincorrectly parsed relative data file path names that ascended more than three levels in the file system and as a consequence was unable to find the file. (Bug #60987, Bug #12403662)For unknown users, the native password plugin reported incorrectly that no password had been specified even when it had. (Bug #59792, Bug #11766641)
For
MyISAMtables, attempts to insert incorrect data into an indexedGEOMETRYcolumn could result in table corruption. (Bug #57323, Bug #11764487)In debug builds,
Field_new_decimal::store_value()was subject to buffer overflows. (Bug #55436, Bug #11762799)A race condition between loading a stored routine using the name qualified by the database name and dropping that database resulted in a spurious error message:
The table mysql.proc is missing, corrupt, or contains bad data(Bug #47870, Bug #11756013)
Functionality Added or Changed
Incompatible Change: In the audit plugin interface, the
event_classmember was removed from themysql_event_generalstructure and the calling sequence for the notification function was changed. Originally, the second argument was a pointer to the event structure. The function now receives this information as two arguments: an event class number and a pointer to the event. Corresponding to these changes,MYSQL_AUDIT_INTERFACE_VERSIONwas increased to0x0300.The
plugin_audit.hheader file, and theNULL_AUDITexample plugin in theplugin/audit_nulldirectory were modified per these changes. See Section 22.2.4.8, “Writing Audit Plugins”.InnoDB Storage Engine:
InnoDBnow permits concurrent reads while creating a secondary index. (Bug #11853126)References: See also Bug #11751388, Bug #11784056, Bug #11815600.
CMake configuration support on Linux now provides a boolean
ENABLE_GCOVoption to control whether to include support for gcov. (Bug #12549572)Client programs now display more information for SSL errors to aid in diagnosis and debugging of connection problems. (Bug #21287, Bug #11745920)
Bugs Fixed
Replication: A mistake in thread cleanup could cause a replication master to crash. (Bug #12578441)
Replication: When using row-based replication and attribute promotion or demotion (see Section 15.4.1.6.2, “Replication of Columns Having Different Data Types”), memory allocated internally for conversion of
BLOBcolumns was not freed afterwards. (Bug #12558519)Adding support for Windows authentication to
libmysqlintroduced a link dependency on the system Secur32 library. The Microsoft Visual C++ link information now pulls in this library automatically. (Bug #12612143)In some cases, memory allocated for
Query_tables_list::sroutines()was not freed properly. (Bug #12429877)After the fix for Bug #11889186,
MAKEDATE()arguments with a year part greater than 9999 raised an assertion. (Bug #12403504)An assertion could be raised due to a missing
NULLvalue check inItem_func_round::fix_length_and_dec(). (Bug #12392636)An assertion could be raised during two-phase commits if the binary log was used as the transaction coordinator log. (Bug #12346411)
A problem introduced in MySQL 5.5.11 caused very old (MySQL 4.0) clients to be unable to connect to the server. (Bug #61222, Bug #12563279)
Using
CREATE EVENT IF NOT EXISTSfor an event that already existed and was enabled caused multiple instances of the event to run. (Bug #61005, Bug #12546938)An embedded client aborted rather than issuing an error message if it issued a
TEEcommand (\T) and the directory containing the file did not exist. This occurred because the wrong error handler was called. (Bug #57491, Bug #11764633)file_nameALTER EVENTcould change the event status. (Bug #57156, Bug #11764334)On some platforms, the
Incorrect value: xxx for column yyy at row zzzerror produced byLOAD DATA INFILEcould have an incorrect value ofzzz. (Bug #46895, Bug #11755168)An attempt to install nonexistent files during installation was corrected. (Bug #43247, Bug #11752142)
On FreeBSD 64-bit builds of the embedded server, exceptions were not prevented from propagating into the embedded application. (Bug #38965, Bug #11749418)
Very old (MySQL 4.0) clients are not working temporarily due to a problem discovered after the release of MySQL 5.5.12. We are looking at fixing the problem. Update: This is fixed in MySQL 5.5.14.
Functionality Added or Changed
The client-side plugin that accompanies the server-side Windows authentication plugin is now included in all MySQL distributions. This will permit clients from any release, whether commercial or community, to connect to a server that has the server-side plugin loaded. See Section 5.5.6.3, “The Windows Native Authentication Plugin” (Bug #59780, Bug #11766631)
Bugs Fixed
InnoDB Storage Engine: If the server crashed while an XA transaction was prepared but not yet committed, the transaction could remain in the system after restart, and cause a subsequent shutdown to hang. (Bug #11766513, Bug #59641)
InnoDB Storage Engine: The MySQL server could hang during
CREATE TABLE,OPTIMIZE TABLE, orALTER TABLEor other DDL operation that performs a table copy for anInnoDBtable, if such operations were performed by multiple sessions simultaneously. The error was reported as:InnoDB: Error: semaphore wait has lasted > 600 seconds
(Bug #11760042, Bug #52409)
InnoDB Storage Engine: With the setting
lower_case_table_names=2, inserts intoInnoDBtables covered by foreign key constraints could fail after a server restart. This is a similar problem to the foreign key error in Bug #11831040 / Bug #60196 / Bug #60909, but with a different root cause and occurring on Mac OS X.Partitioning: The internal
get_partition_set()function did not take into account the possibility that a key specification could beNULLin some cases. (Bug #12380149)Partitioning: When executing a row-ordered retrieval index merge, the partitioning handler used memory from that allocated for the table, rather than that allocated to the query, causing table object memory not to be freed until the table was closed. (Bug #11766249, Bug #59316)
Replication: When mysqlbinlog was invoked using
--base64-output=decode-rowand--start-position=, (whereposposis a point in the binary log past the format description log event), a spurious error of the type shown here was generated:malformed binlog: it does not contain any Format_description_log_event...However, since there is nothing unsafe about not printing the format description log event, the error has been removed for this case. (Bug #12354268)
Replication: Typographical errors appeared in the text of several replication error messages. (The word “position” was misspelled as “postion”.) (Bug #11762616, Bug #55229)
Assignments to
NEW.within triggers, wherevar_namevar_namehad aBLOBorTEXTtype, were not properly handled and produced incorrect results. (Bug #12362125)XA COMMITcould fail to clean up the error state if it discovered that the current XA transaction had to be rolled back. Consequently, the next XA transaction could raise an assertion when it checked for proper cleanup of the previous transaction. (Bug #12352846)An internal client macro reference was removed from the
client_plugin.hheader file. This reference made the file unusable. (Bug #60746, Bug #12325444)For repeated invocation of some stored procedures, the server consumed memory that it did not release until the connection terminated. (Bug #60025, Bug #11848763)
The server did not check for certain invalid out of order sequences of XA statements, and these sequences raised an assertion. (Bug #59936, Bug #11766752, Bug #12348348)
With the conversion from GNU autotools to CMake for configuring MySQL, the
USE_SYMDIRpreprocessor symbol was omitted. This caused failure of symbolic links (described at Section 7.11.3.1, “Using Symbolic Links”). (Bug #59408, Bug #11766320)An incorrect
max_lengthvalue forYEARvalues could be used in temporary result tables forUNION, leading to incorrect results. (Bug #59343, Bug #11766270)In
Item_func_in::fix_length_and_dec(), a Valgrind warning for uninitialized values was corrected. (Bug #59270, Bug #11766212)In
ROUND()calculations, a Valgrind warning for uninitialized memory was corrected. (Bug #58937, Bug #11765923)References: This bug is a regression of Bug #33143.
Valgrind warnings caused by comparing index values to an uninitialized field were corrected. (Bug #58705, Bug #11765713)
LOAD DATA INFILEerrors could leak I/O cache memory. (Bug #58072, Bug #11765141)For
LOAD DATA INFILE, multibyte character sequences could be pushed onto a stack too small to accommodate them. (Bug #58069, Bug #11765139)Internal Performance Schema header files were unnecessarily installed publicly. (Bug #53281)
On Linux, the mysql client built using the bundled
libeditdid not read~/.editrc. (Bug #49967, Bug #11757855)The optimizer sometimes incorrectly processed
HAVINGclauses for queries that did not also have anORDER BYclause. (Bug #48916, Bug #11756928)PROCEDURE ANALYZE()could leak memory forNULLresults, and could return incorrect results if used with aLIMITclause. (Bug #48137, Bug #11756242)With
DISTINCT,CONCAT(returned incorrect results when the arguments tocol_name,...)CONCAT()were columns with an integer data type declared with a display width narrower than the values in the column. (For example, if anINT(1)column contained1111.) (Bug #4082)
Functionality Added or Changed
When invoked with the
--auto-generate-sqloption, mysqlslap dropped the schema specified with the--create-schemaoption at the end of the test run, which may have been unexpected by the user. mysqlslap no longer drops the schema, but has a new--create-and-drop-schemaoption that both creates and drops a schema. (Bug #58090, Bug #11765157)
Bugs Fixed
InnoDB Storage Engine: Replication: Trying to update a column, previously set to
NULL, of anInnoDBtable with no primary key caused replication to fail with Can't find record in 'table' on the slave. (Bug #11766865, Bug #60091)InnoDB Storage Engine: The server could halt if
InnoDBinterpreted a very heavy I/O load for 15 minutes or more as an indication that the server was hung. This change fixes the logic that measures how longInnoDBthreads were waiting, which formerly could produce false positives. (Bug #11877216, Bug #11755413, Bug #47183)InnoDB Storage Engine: With the setting
lower_case_table_names=2, inserts intoInnoDBtables covered by foreign key constraints could fail after a server restart. (Bug #11831040, Bug #60196, Bug #60909)Replication: Using the
--server-idoption with mysqlbinlog could cause format description log events to be filtered from the binary log, leaving mysqlbinlog unable to read the remainder of the log. Now such events are always read without regard to the value of this option.As part of the the fix for this problem, mysqlbinlog now also reads rotate log events without regard to the value of
--server-id. (Bug #59530, Bug #11766427)On Windows, the server rejected client connections if no DNS server was available. (Bug #12325375)
mysql_upgrade did not properly upgrade the
authentication_stringcolumn of themysql.usertable. (Bug #11936829)InnoDBinvoked somezlibfunctions without proper initialization. (Bug #11849231)CREATE TABLEpermitted aTABLESPACEtable option but did not write the option value to the.frmfile. (Bug #11769356)Comparison of a
DATETIMEstored program variable andNOW()resulted in “Illegal mix of collations error” whencharacter_set_connectionwas set toutf8. (Bug #60625, Bug #11926811)Selecting from a view for which the definition included a
HAVINGclause failed with an error:1356: View '...' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
(Bug #60295, Bug #11829681)
CREATE TABLEsyntax permits specification of aSTORAGE {DEFAULT|DISK|MEMORY}option. However, this value was not written to the.frmfile, so that a subsequentCREATE TABLE ... LIKEfor the table did not include that option.Also,
ALTER TABLEof a table that had a tablespace incorrectly destroyed the tablespace. (Bug #60111, Bug #11766883, Bug #34047, Bug #11747789)The server permitted
max_allowed_packetto be set lower thannet_buffer_length, which does not make sense becausemax_allowed_packetis the upper limit onnet_buffer_lengthvalues. Now a warning occurs and the value remains unchanged. (Bug #59959, Bug #11766769)A missing variable initialization for
Item_func_set_user_varobjects could raise an assertion. (Bug #59527, Bug #11766424)When the server was started with the
--skip-innodboption, it initialized thehave_innodbsystem variable toYESrather thanDISABLED. (Bug #59393, Bug #11766306)In
Item_func_month::val_str(), a Valgrind warning for a too-lateNULLvalue check was corrected. (Bug #59166, Bug #11766126)In
Item::get_date, a Valgrind warning for a missingNULLvalue check was corrected. (Bug #59164, Bug #11766124)In
extract_date_time(), a Valgrind warning for a missing end-of-string check was corrected. (Bug #59151, Bug #11766112)In string context, the
MIN()andMAX()functions did not take into account the unsignedness of aBIGINT UNSIGNEDargument. (Bug #59132, Bug #11766094)In
Item_func::val_decimal, a Valgrind warning for a missingNULLvalue check was corrected. (Bug #59125, Bug #11766087)In
Item_func_str_to_date::val_str, a Valgrind warning for an uninitialized variable was corrected. (Bug #58154, Bug #11765216)An assertion could be raised in
Item_func_int_val::fix_num_length_and_dec()due to overflow for geometry functions. (Bug #57900, Bug #11764994)With prepared statements, the server could attempt to send result set metadata after the table had been closed. (Bug #56115, Bug #11763413)
With
lower_case_table_names=2, resolution of objects qualified by database names could fail. (Bug #50924, Bug #11758687)SHOW EVENTSdid not always show events from the correct database. (Bug #41907, Bug #11751148)
Functionality Added or Changed
InnoDBnow permits concurrent reads on a table while creating nonprimary unique indexes. (This was found to create problems and was reverted in 5.5.12.) (Bug #11784056)Previously, Performance Schema instrumentation for both the binary log and the relay log used these instruments:
wait/io/file/sql/binlog wait/io/file/sql/binlog_index wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond
Now instrumentation for the relay log uses these instruments, which makes it possible to distinguish binary log and relay log events:
wait/io/file/sql/relaylog wait/io/file/sql/relaylog_index wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond
(Bug #59658, Bug #11766528)
MySQL distributions now include an
INFO_SRCfile that contains information about the source distribution, such as the MySQL version from which it was created. MySQL binary distributions additionally include anINFO_BINfile that contains information about how the distribution was built, such as compiler options and feature flags. In RPM packages, these files are located in the/usr/share/doc/packages/MySQL-serverdirectory. Intar.gzand derived packages, they are located in theDocsdirectory under the location where the distribution is unpacked. (Bug #42969, Bug #11751935)Previously, for queries that were aborted due to a sort problem or terminated with
KILLin the middle of a sort, the server wrote the messageSort abortedto the error log. Now the server writes more information about the cause of the error. These causes include:Insufficient disk space in the temporary file directory prevented a temp file from being created
Insufficient memory for
sort_buffer_sizeto be allocatedSomebody ran
KILLin the middle of a filesort operationidThe server was shut down while some queries were sorting
A transaction was rolled back or aborted due to a lock wait timeout or deadlock
Unexpected errors, such as a source table or even temp table was corrupt
Processing of a subquery failed which was also sorting
(Bug #30771, Bug #11747102)
A new system variable,
max_long_data_size, now controls the maximum size of parameter values that can be sent with themysql_stmt_send_long_data()C API function. If not set at server startup, the default is the value of themax_allowed_packetsystem variable. This variable is deprecated. In MySQL 5.6, it is removed and the maximum parameter size is controlled bymax_allowed_packet.For the Windows installer, debug information files and the embedded MySQL server have been removed from the standard MSI distribution file to reduce the download size for the majority of users.
If these files are needed, the Zip distribution must be downloaded separately and be extracted in the installation directory, which is most probably
C:\Program Files\MySQL\MySQL Server 5.5on English systems.Please note that upon product de-installation, these extracted files from the Zip distribution must be removed from the system manually.
The undocumented
SHOW NEW MASTERstatement has been removed.
Bugs Fixed
Important Change: The length of the
plugincolumn of themysql.usersystem table is increased to 64 characters. This is now the same size as thenamecolumn of themysql.plugintable. (Bug #11766610, Bug #59752)Partitioning: A problem with a previous fix for poor performance of
INSERT ON DUPLICATE KEY UPDATEstatements on tables having many partitions caused the handler function for reading a row from a specific index to fail to store the ID of the partition last used. This caused some statements to fail with Can't find record errors. (Bug #59297, Bug #11766232)References: This bug is a regression of Bug #52455.
Replication: A failed
DROP DATABASEstatement could break statement-based replication. (Bug #58381, Bug #11765416)Two unused test files in
storage/ndb/test/sqlcontained incorrect versions of the GNU Lesser General Public License. The files and the directory containing them have been removed. (Bug #11810224)References: See also Bug #11810156.
Division of large numbers could cause stack corruption. (Bug #11792200)
The
mysql_load_client_plugin()C API function did not clear the previous error. (Bug #60075, Bug #11766854)An assertion was raised if an
XA COMMITwas issued when an XA transaction had already encountered an error (such as a deadlock) that required the transaction to be rolled back. (Bug #59986, Bug #11766788)On some systems, debug builds of
comp_errcould fail due to an uninitialized variable. (Bug #59906, Bug #11766729)The server read one byte too many when trying to process an XML string lacking a closing single quote (
') or double quote (") character used as an argument forUpdateXML()orExtractValue(). (Bug #59901, Bug #11766725)References: See also Bug #44332, Bug #11752979.
Attempting to create a spatial index on a
CHARcolumn longer than 31 bytes led to an assertion failure if the server was compiled with safemutex support. (Bug #59888, Bug #11766714)Aggregation followed by a subquery could produce an incorrect result. (Bug #59839, Bug #11766675)
An incorrect character set pointer passed to
my_strtoll10_mb2()caused an assertion to be raised. (Bug #59648, Bug #11766519)FIND_IN_SET()could work differently in MySQL 5.5 than in 5.1. (Bug #59405, Bug #11766317)mysqldump did not quote database names in
ALTER DATABASEstatements in its output, which could cause an error at reload time for database names containing a dash. (Bug #59398, Bug #11766310)The
MYSQL_HOMEenvironment variable was being ignored. (Bug #59280, Bug #11766219)An invalid pathname argument for the
--defaults-extra-fileoption of MySQL programs caused a program crash. (Bug #59234, Bug #11766184)On Windows, the
authentication_stringcolumn recently added to themysql.usertable caused the Configuration Wizard to fail. (Bug #59038, Bug #11766011)CREATE TRIGGERandDROP TRIGGERcan change the prelocking list of stored routines, but the routine cache did not detect such changes, resulting in routine execution with an inaccurate locking list. (Bug #58674, Bug #11765684)The code for
PROCEDURE ANALYSE()had a missingDBUG_RETURNstatement, which could cause a server crash in debug builds. (Bug #58140, Bug #11765202)An assertion was raised if a statement tried to upgrade a metadata lock while there was an active
FLUSH TABLEstatement. Now if a statement tries to upgrade a metadata lock in this situation, the server returns antbl_listWITH READ LOCKER_TABLE_NOT_LOCKED_FOR_WRITEerror to the client. (Bug #57649, Bug #11764779)If a multiple-table update updated a row through two aliases and the first update physically moved the row, the second update failed to locate the row. This resulted in different errors depending on the storage engine, although these errors did not accurately describe the problem:
For
MyISAM, which is nontransactional, the update executed first was performed but the second was not. In addition, for two equal multiple-table update statements, one could succeed and the other fail depending on whether the record actually moved, which is inconsistent.Now such an update returns an error if it will update a table through multiple aliases, and perform an update that may physically move the row in at least one of these aliases. (Bug #57373, Bug #11764529, Bug #55385, Bug #11762751)
SHOW WARNINGSoutput followingEXPLAIN EXTENDEDcould include unprintable characters. (Bug #57341, Bug #11764503)In some cases,
SHOW WARNINGSreturned an empty result when the previous statement failed. (Bug #55847, Bug #11763166)On Windows, an object in thread local storage could be used before the object was created. (Bug #55730, Bug #11763065)
For a client connected using SSL, the
Ssl_cipher_liststatus variable was empty and did not show the possible cipher types. (Bug #52596, Bug #11760210)When used to upgrade tables, mysqlcheck (and mysql_upgrade, which invokes mysqlcheck) did not upgrade some tables for which table repair was found to be necessary. In particular, it failed to upgrade
InnoDBtables that needed repair, leaving them in a nonupgraded state. This occurred because:mysqlcheck --check-upgrade ---auto-repair checks for tables that are incompatible with the current version of MySQL. It does this by issuing the
CHECK TABLE ... FOR UPGRADEstatement and examining the result.For any table found to be incompatible, mysqlcheck issues a
REPAIR TABLEstatement. But this fails for storage engines such asInnoDBthat do not support the repair operation. Consequently, the table remained unchanged.
To fix the problem, the following changes were made to
CHECK TABLE ... FOR UPGRADEand mysqlcheck. Because mysql_upgrade invokes mysqlcheck, these changes also fix the problem for mysql_upgrade.CHECK TABLE ... FOR UPGRADEreturns a different error if a table needs repair but its storage engine does not supportREPAIR TABLE:Previous:
Error:
ER_TABLE_NEEDS_UPGRADETable upgrade required. Please do "REPAIR TABLE `tbl_name`" or dump/reload to fix it!Now:
Error:
ER_TABLE_NEEDS_REBUILDTable rebuild required. Please do "ALTER TABLE `tbl_name` FORCE" or dump/reload to fix it!mysqlcheck recognizes the new error and issues an
ALTER TABLE ... FORCEstatement. TheFORCEoption forALTER TABLEwas recognized but did nothing; now it is implemented and acts as a “null” alter operation that rebuilds the table.
(Bug #47205, Bug #11755431)
When
CASE ... WHENarguments had different character sets, 8-bit values could be referenced asutf16orutf32values, raising an assertion. (Bug #44793, Bug #11753363)Bitmap functions used in one thread could change bitmaps used by other threads, raising an assertion. (Bug #43152, Bug #11752069)
C API Notes
Incompatible Change: The shared library version of the client library was increased to 18 to reflect ABI changes, and avoid compatibility problems with the client library in MySQL 5.1. Note that this is an incompatible change between 5.5.10 and earlier 5.5 versions, so client programs that use the 5.5 client library should be recompiled against the 5.5.10 client library. (Bug #60061, Bug #11827366)
Pluggable Authentication
MySQL distributions now include
auth_socket, a server-side authentication plugin that authenticates clients that connect from the local host through the Unix socket file. The plugin uses theSO_PEERCREDsocket option to obtain information about the user running the client program (and thus can be built only on systems that support this option). For a connection to succeed, the plugin requires a match between the login name of the connecting client user and the MySQL user name presented by the client program. For more information, see Section 5.5.6.5, “The Socket Peer-Credential Authentication Plugin”. (Bug #59017, Bug #11765993, Bug #9411, Bug #11745104)MySQL distributions now include
mysql_clear_password, a client-side authentication plugin that sends the password to the server without hashing or encryption. Although this is insecure, and thus appropriate precautions should be taken (such as using an SSL connection), the plugin is useful in conjunction with server-side plugins that must have access to the original password in clear text. For more information, see Section 5.5.6.4, “The Clear-Text Client-Side Authentication Plugin”.
Functionality Added or Changed
The mysql_upgrade, mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow, and mysqlslap clients now have
--default-authand--plugin-diroptions for specifying which authentication plugin and plugin directory to use. (Bug #58139)Boolean system variables can be enabled at run time by setting them to the value
ONorOFF, but previously this did not work at server startup. Now at startup such variables can be enabled by setting them toONorTRUE, or disabled by setting them toOFForFALSE. Any other nonnumeric variable is invalid. (Bug #46393)References: See also Bug #11754743, Bug #51631.
Previously, for queries that were aborted due to a sort problem, the server wrote the message
Sort abortedto the error log. Now the server writes more information to provide a more specific message, such as:Sort aborted: Out of memory (Needed 24 bytes) Out of sort memory, consider increasing server sort buffer size Sort aborted: Out of sort memory, consider increasing server sort buffer size Sort aborted: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1
In addition, if the server was started with
--log-warnings=2, the server writes information about the host, user, and query. (Bug #36022, Bug #11748358)mysqldump --xml now displays comments from column definitions. (Bug #13618, Bug #11745324)
Bugs Fixed
Security Fix: Bug #36544 was fixed.
InnoDB Storage Engine: Raised the number of I/O requests that each AIO helper thread could process, from 32 to 256. The new limit applies to Linux and Unix platforms; the limit on Windows remains 32. (Bug #59472)
InnoDB Storage Engine:
InnoDBreturned values for “rows examined” in the query plan that were higher than expected.NULLvalues were treated in an inconsistent way. The inaccurate statistics could trigger “false positives” in combination with themax_join_sizesetting, because the queries did not really examine as many rows as reported.A new configuration option
innodb_stats_methodlets you specify howNULLvalues are treated when calculating index statistics. Allowed values arenulls_equal(the default),nulls_unequalandnull_ignored. The meanings of these values are similar to those of themyisam_stats_methodoption. (Bug #30423)Replication: When using the statement-based logging format,
INSERT ON DUPLICATE KEY UPDATEandINSERT IGNOREstatements affecting transactional tables that did not fail were not written to the binary log if they did not insert any rows. (With statement-based logging, all successful statements should be logged, whether they do or do not cause any rows to be changed.) (Bug #59338, Bug #11766266)Replication: Formerly,
STOP SLAVEstopped the slave I/O thread first and then stopped the slave SQL thread; thus, it was possible for the I/O thread to stop after replicating only part of a transaction which the SQL thread was executing, in which case—if the transaction could not be rolled back safely—the SQL thread could hang.Now,
STOP SLAVEstops the slave SQL thread first and then stops the I/O thread; this guarantees that the I/O thread can fetch any remaining events in the transaction that the SQL thread is executing, so that the SQL thread can finish the transaction if it cannot be rolled back safely. (Bug #58546, Bug #11765563)Setting the
optimizer_switchsystem variable to an invalid value caused a server crash. (Bug #59894, Bug #11766719)DES_DECRYPT()could crash if the argument was not produced byDES_ENCRYPT(). (Bug #59632, Bug #11766505)The server and client did not always properly negotiate authentication plugin names. (Bug #59453, Bug #11766356)
--autocommit=ONdid not work (it set the globalautocommitvalue to 0, not 1). (Bug #59432, Bug #11766339)A query of the following form returned an incorrect result, where the values for
col_namein the result set were entirely replaced withNULLvalues:SELECT DISTINCT
col_name... ORDER BYcol_nameDESC;(Bug #59308, Bug #11766241)
SHOW PRIVILEGESdid not display a row for thePROXYprivilege. (Bug #59275, Bug #11766216)SHOW PROFILEcould truncate source file names or fail to show function names. (Bug #59273, Bug #11766214)DELETEorUPDATEstatements could fail if they usedDATEorDATETIMEvalues with a year, month, or day part of zero. (Bug #59173)The
ESCAPEclause for theLIKEoperator permits only expressions that evaluate to a constant at execution time, but aggregate functions were not being rejected. (Bug #59149, Bug #11766110)Memory leaks detected by Valgrind, some of which could cause incorrect query results, were corrected. (Bug #59110, Bug #11766075)
There was an erroneous restriction on file attributes for
LOAD DATA INFILE. (Bug #59085, Bug #11766052)The
DEFAULT_CHARSETandDEFAULT_COLLATIONCMake options did not work. (Bug #58991, Bug #11765967)An
OUTER JOINquery usingWHEREcould return an incorrect result. (Bug #58490, Bug #11765513)col_nameIS NULLStarting the server with the
--defaults-file=option, where the file name had no extension, caused a server crash. (Bug #58455, Bug #11765482)file_nameOuter joins with an empty table could produce incorrect results. (Bug #58422, Bug #11765451)
In debug builds,
SUBSTRING_INDEX(FORMAT(...), FORMAT(...))could cause a server crash. (Bug #58371, Bug #11765406)When mysqladmin was run with the
--sleepand--countoptions, it went into an infinite loop executing the specified command. (Bug #58221, Bug #11765270)Some string-manipulating SQL functions use a shared string object intended to contain an immutable empty string. This object was used by the SQL function
SUBSTRING_INDEX()to return an empty string when one argument was of the wrong data type. If the string object was then modified by the SQL functionINSERT(), undefined behavior ensued. (Bug #58165, Bug #11765225)Parsing nested regular expressions could lead to recursion resulting in a stack overflow crash. (Bug #58026, Bug #11765099)
The fix for Bug #25192 caused
load_defaults()to add an argument separator to distinguish options loaded from option files from those provided on the command line, whether or not the application needed it. (Bug #57953, Bug #11765041)References: See also Bug #11746296.
The mysql client went into an infinite loop if the standard input was a directory. (Bug #57450, Bug #11764598)
Outer joins on a unique key could return incorrect results. (Bug #57034, Bug #11764219)
The expression
was optimized incorrectly and produced incorrect results. (Bug #57030, Bug #11764215)const1BETWEENconst2ANDfieldSome RPM installation scripts used a hardcoded value for the data directory, which could result in a failed installation for users who have a nonstandard data directory location. The same was true for other configuration values such as the PID file name. (Bug #56581, Bug #11763817)
On FreeBSD and OpenBSD, the server incorrectly checked the range of the system date, causing legal values to be rejected. (Bug #55755, Bug #11763089)
Sorting using
ORDER BY AVG(DISTINCTcaused a server crash or incorrect results. (Bug #52123, Bug #11759784)decimal_col)When using
ExtractValue()orUpdateXML(), if the XML to be read contained an incomplete XML comment, MySQL read beyond the end of the XML string when processing, leading to a crash of the server. (Bug #44332, Bug #11752979)DATE_ADD()andDATE_SUB()return a string if the first argument is a string, but incorrectly returned a binary string. Now they return a character string with a collation ofconnection_collation. (Bug #31384, Bug #11747221)
Functionality Added or Changed
The mysqladmin and mysqldump clients now have
--default-authand--plugin-diroptions for specifying which authentication plugin and plugin directory to use. (Bug #58139, Bug #11765201)sql_priv.hnow includes anOPTION_ALLOW_BATCHflag for thetransaction_allow_batchingfeature of MySQL Cluster. (Bug #57604)Boolean system variables can be enabled at run time by setting them to the value
ONorOFF, but previously this did not work at server startup. Now at startup such variables can be enabled by setting them toONorTRUE. Any other nonnumeric variable is interpreted asOFF. (Bug #46393 improves on this such thatON,TRUE,OFF, andFALSEare recognized, and other values are invalid.) (Bug #51631, Bug #11759326)References: See also Bug #11754743.
In the audit plugin interface, the
MYSQL_AUDIT_CONNECTION_CLASSevent class was added, and theMYSQL_AUDIT_GENERAL_STATUSsubclass was added to theMYSQL_AUDIT_GENERAL_CLASSevent class. The new symbol definitions can be found in theplugin_audit.hheader file.
Bugs Fixed
Security Fix: Bug #57952 was fixed.
Performance: InnoDB Storage Engine:
InnoDBnow uses thePAUSEinstruction on all platforms where it is available. Previously,InnoDBused thePAUSEinstruction only on Windows systems. (Bug #58666)Performance: Queries involving
InnoDBtables in theINFORMATON_SCHEMAtablesTABLE_CONSTRAINTS,KEY_COLUMN_USAGE, orREFERENTIAL_CONSTRAINTSwere slower than necessary because statistics were rechecked more often than required, even more so when many foreign keys were present. The improvement to this may be of particular benefit to users of MySQL Enterprise Monitor with many monitored servers or tens of thousands of tables. (Bug #43818, Bug #11752585)Incompatible Change: When
auto_increment_incrementis greater than one, values generated by a bulk insert that reaches the maximum column value could wrap around rather producing an overflow error.As a consequence of the fix, it is no longer possible for an auto-generated value to be equal to the maximum
BIGINT UNSIGNEDvalue. It is still possible to store that value manually, if the column can accept it. (Bug #39828, Bug #11749800)Important Change: Partitioning: Date and time functions used as partitioning functions now have the types of their operands checked; use of a value of the wrong type is now disallowed in such cases. In addition,
EXTRACT(WEEK FROM, wherecol_name)col_nameis aDATEorDATETIMEcolumn, is now disallowed altogether because its return value depends on the value of thedefault_week_formatsystem variable. (Bug #54483, Bug #11761948)References: See also Bug #57071, Bug #11764255.
Partitioning: InnoDB Storage Engine: The partitioning handler did not pass locking information to a table's storage engine handler. This caused high contention and thus slower performance when working with partitioned
InnoDBtables. (Bug #59013)InnoDB Storage Engine: When multiple
InnoDBbuffer pools were enabled,SHOW ENGINE INNODBstatements displayed information about each one, but not summary information combining statistics for the entire buffer pool subsystem. Now, the aggregated information is displayed in theBUFFER POOL AND MEMORYsection, and information about individual buffer pool instances is displayed in a newINDIVIDUAL BUFFER POOL INFOsection. (Bug #58461)InnoDB Storage Engine: The command to create a debug build (
cmake -DWITH_DEBUG ...) now automatically sets theInnoDBdebugging flagUNIV_DEBUGon all platforms. Formerly, theUNIV_DEBUGflag might not be set for Windows platforms with Visual Studio and not on OS X with Xcode. (Bug #58279)InnoDB Storage Engine: In
InnoDBstatus output, the value forI/O sum[]could be incorrect, displayed as a very large number. (Bug #57600)InnoDB Storage Engine: The server could crash with an assertion error, if a stored procedure, stored function, or trigger modified one
InnoDBtable containing an auto-increment column, and dropped anotherInnoDBtable containing an auto-increment column. (Bug #56228)InnoDB Storage Engine: It was not possible to query the
information_schema.INNODB_TRXtable while other connections were running queries involvingBLOBtypes. (Bug #55397, Bug #11762763)InnoDB Storage Engine: When the
lower_case_table_namesvariable was set to 2,InnoDBcould fail to restore amysqldumpdump of a table with foreign key constraints involving case-sensitive names. (Bug #55222)InnoDB Storage Engine: The
OPTIMIZE TABLEstatement reset the auto-increment counter for anInnoDBtable. Now the auto-increment value is preserved across this operation. (Bug #18274)Partitioning: Failed
ALTER TABLE ... TRUNCATE PARTITIONstatements were written to the binary log. (Bug #58147)Partitioning: Failed
ALTER TABLE ... PARTITIONstatements could cause memory leaks. (Bug #56380, Bug #11763641)References: See also Bug #46949, Bug #11755209, Bug #56996, Bug #11764187.
Replication: While an
INSERT DELAYEDstatement with a single inserted value does not return any visible warnings, such a warning could be still written into the error log. (Bug #57666, Bug #11764793)References: See also Bug #49567.
Replication: When closing a session that used temporary tables, binary logging could sometimes fail with a spurious Failed to write the DROP statement for temporary tables to binary log. (Bug #57288)
Replication: Due to changes made in MySQL 5.5.3, settings made in the
binlog_cache_sizeandmax_binlog_cache_sizeserver system variables affected both the binary log statement cache (also introduced in that version) and the binary log transactional cache (formerly known simply as the binary log cache). This meant that the resources used as a result of setting either or both of these variables were double the amount expected. To rectify this problem, these variables now affect only the transactional cache. The fix for this issue also introduces two new system variablesbinlog_stmt_cache_sizeandmax_binlog_stmt_cache_size, which affect only the binary log statement cache.In addition, the
Binlog_cache_usestatus variable was incremented whenever either cache was used, andBinlog_cache_disk_usewas incremented whenever the disk space from either cache was used, which caused problems with performance tuning of the statement and transactional caches, because it was not possible to determine which of these was being exceeded when attempting to troubleshoot excessive disk seeks and related problems. This issue is solved by changing the behavior of these two status variables such that they are incremented only in response to usage of the binary log transactional cache, as well as by introducing two new status variablesBinlog_stmt_cache_useandBinlog_stmt_cache_disk_use, which are incremented only by usage of the binary log statement cache.The behavior of the
max_binlog_cache_sizesystem variable with regard to active sessions has also been changed to match that of thebinlog_cache_sizesystem variable: Previously, a change inmax_binlog_cache_sizetook effect in existing sessions; now, as with a change inbinlog_cache_size, a change inmax_binlog_cache_sizetakes effect only in sessions begun after the value was changed.For more information, see System variables used with the binary log, and Section 5.1.5, “Server Status Variables”. (Bug #57275, Bug #11764443)
Replication: By default, a value is generated for an
AUTO_INCREMENTcolumn by inserting eitherNULLor 0 into the column. Setting theNO_AUTO_VALUE_ON_ZEROserver SQL mode suppresses this behavior for 0, so that it occurs only whenNULLis inserted into the column.This behavior is also followed on a replication slave (by the slave SQL thread) when applying events that have been logged on the master using the statement-based format. However, when applying events that had been logged using the row-based format,
NO_AUTO_VALUE_ON_ZEROwas ignored, which could lead to an assertion.To fix this issue, the value of an
AUTO_INCREMENTcolumn is no longer generated when applying an event that was logged using the row-based row format, as this value is already contained in the changes applied on the slave. (Bug #56662)Replication: The
Binlog_cache_useandBinlog_cache_disk_use statusvariables were incremented twice by a change to a table using a transactional storage engine. (Bug #56343, Bug #11763611)References: This bug is a regression of Bug #50038.
Replication: The
BINLOGstatement modified the values of session variables, which could lead to problems with operations such as point-in-time recovery. One such case occurred when replaying a row-based binary log which relied on settingforeign_key_checks = OFFat the session level to create and populate a set ofInnoDBtables having foreign key constraints. (Bug #54903)Replication: mysqlbinlog printed
USEstatements to its output only when the default database changed between events. To illustrate how this could cause problems, suppose that a user issued the following sequence of statements:CREATE DATABASE mydb; USE mydb; CREATE TABLE mytable (
column_definitions); DROP DATABASE mydb; CREATE DATABASE mydb; USE mydb; CREATE TABLE mytable (column_definitions);When played back using mysqlbinlog, the second
CREATE TABLEstatement failed with Error: No Database Selected because the secondUSEstatement was not played back, due to the fact that a database other thanmydbwas never selected.This fix ensures that mysqlbinlog outputs a
USEstatement whenever it reads one from the binary log. (Bug #50914, Bug #11758677)Replication: Previously, when a statement failed with a different error on the slave than on the master, the slave SQL thread displayed a message containing:
The error message for the master error code
The master error code
The error message for the slaves error code
The slave error code
However, the slave has no information with which to fill in any print format specifiers for the master message, so it actually displayed the message format string. To make it clearer that the slave is not displaying the actual message as it appears on the master, the slave now indicates that the master part of the output is the message format, not the actual message. For example, previously the slave displayed information like this:
Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
Now the slave displays this:
Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
(Bug #46697)
Replication: When an error occurred in the generation of the name for a new binary log file, the error was logged but not shown to the user. (Bug #46166)
References: See also Bug #37148, Bug #11748696, Bug #40611, Bug #11750196, Bug #43929, Bug #51019.
Comparisons of aggregate values with
TIMESTAMPvalues were incorrect. (Bug #59330, Bug #11766259)For
DIVexpressions, assignment of the result to multiple variables could cause a server crash. (Bug #59241, Bug #11766191)References: See also Bug #8457.
MIN(could return an incorrect result in some cases. (Bug #59211, Bug #11766165)year_col)mysqlslap failed to check for a
NULLreturn frommysql_store_result()and crashed trying to process the result set. (Bug #59109, Bug #11766074)In a subquery, a
UNIONwith no referenced tables (or only a reference to theDUALvirtual table) did not permit anORDER BYclause. (Bug #58970, Bug #11765950)Configuring MySQL with
-DWITHOUT_PERFSCHEMA_STORAGE_ENGINE=1caused build failures. (Bug #58953)Several Valgrind warnings were fixed. (Bug #58948, Bug #59021)
OPTIMIZE TABLEfor anInnoDBtable could raise an assertion if the operation failed because it had been killed. (Bug #58933, Bug #11765920)If
max_allowed_packetwas set larger than 16MB, the server failed to reject too-large packets with “Packet too large” errors. (Bug #58887, Bug #11765878)A
NOT INpredicate with a subquery containing aHAVINGclause could retrieve too many rows, when the subquery itself returnedNULL. (Bug #58818, Bug #11765815)EXPLAINcould crash for queries that accessed two derived tables. (Bug #58730)On Solaris, the MySQL build failed if it was configured with debugging enabled. (Bug #58699)
Issuing
EXPLAIN EXTENDEDfor a query that would use condition pushdown could cause mysqld to crash. (Bug #58553, Bug #11765570)An assertion could be raised for queries for which the optimizer could choose between Index Merge range access or const ref access methods. (Bug #58456)
If MySQL was built with Visual Studio Express, the project wixca was not built. (Bug #58411)
EXPLAINcould crash for queries that usedGROUP_CONCAT(). (Bug #58396)CMake polluted the source tree by writing installation-related temporary files there. (Bug #58372)
Security context references in
sp_head.ccwere rewritten for improved DTrace compatibility. (Bug #58350)The
ucs2character set does not support characters outside the Basic Multilingual Plane (BMP), but converting toucs2a string containing such characters did not produce a conversion-failure warning. (Bug #58321)A Valgrind failure occurred in
fn_formatwhen called fromarchive_discover. (Bug #58205, Bug #11765259)CMake did not add
LINK_LIBRARIESforMYSQL_ADD_PLUGINforlibmysqld. (Bug #58158)An assertion could be raised if the server was closing a session at the same time the session was being killed by another thread. (Bug #58136)
Condition pushdown optimization could push down conditions with incorrect column references. (Bug #58134, Bug #11765196)
Configuration with maintainer mode enabled resulted in errors when compiling with icc. (Bug #57991, Bug #58871)
An
ORDER BYclause was bound to the incorrect substatement when used inUNIONcontext. (Bug #57986)The
BIT_AND()function could return incorrect results when a join returned no matching rows. (Bug #57954)If the set of values aggregated with
AVG(DISTINCT)contained aNULLvalue, the function result could be incorrect. (Bug #57932)In rare cases,
LIKEexpressions failed for an indexed column that used a collation containing contractions. (Bug #57737)Unnecessary subquery evaluation in contexts such as statement preparation or view creation could cause a server crash. (Bug #57703)
View creation could produce Valgrind warnings. (Bug #57352)
NULLgeometry values could cause a crash inItem_func_spatial_collection::fix_length_and_dec. (Bug #57321)It was possible to compile mysqld with Performance Schema support but with a dummy atomic-operations implementation, which caused a server crash. This problem does not affect binary distributions. It is helpful as a safety measure for users who build MySQL from source. (Bug #56769)
The
cp1251character set did not properly support the Euro sign (0x88). For example, converting a string containing this character toutf8resulted in'?'rather than theutf8Euro sign. (Bug #56639)Some unsigned system variables could be displayed with negative values. (Bug #55794)
CREATE DATABASEandDROP DATABASEcaused mysql --one-database to lose track of the statement-filtering context. (Bug #54899)An assertion could be raised during concurrent execution of
DROP DATABASEandREPAIR TABLEif the drop deleted a table's.TMDfile at the same time the repair tried to read details from the old file that was just removed.A problem could also occur when
DROP TABLEtried to remove all files belonging to a table at the same timeREPAIR TABLEhad just deleted the table's.TMDfile. (Bug #54486)After compilation from source, all header files were installed in the same directory, even those that should be installed into subdirectories of the installation include directory. (Bug #51925)
When mysqld printed crash dump information, it incorrectly indicated that some valid pointers were invalid. (Bug #51817)
On Mac OS X, a configuration error caused the preference pane to fail. (Bug #51264)
On FreeBSD, if mysqld was killed with a
SIGHUPsignal, it could corruptInnoDB.ibdfiles. (Bug #51023, Bug #11758773)An assertion could be raised if –1 was inserted into an
AUTO_INCREMENTcolumn by a statement writing more than one row. (Bug #50619, Bug #11758417)If a client supplied a user name longer than the maximum 16 characters permitted for names stored in the MySQL grant tables, all characters were being considered significant when checking for a match. Historically, only the first 16 characters were used for matching; this behavior was restored. (Bug #49752)
The
my_seek()andmy_tell()functions ignored theMY_WMEflag when they returned an error, which could cause client programs to hang. (Bug #48451)During assignment of values to system variables, legality checks on the value range occurred too late, preventing proper error checking. (Bug #43233)
On Solaris, time-related functions such as
NOW()orSYSDATE()could return a constant value. (Bug #42054)If the remote server for a
FEDERATEDtable could not be accessed, queries for theINFORMATION_SCHEMA.TABLEStable failed. (Bug #35333)
Configuration Notes
MySQL releases are now built on all platforms using CMake rather than the GNU autotools, so autotools support has been removed. For instructions on building MySQL with
CMake, see Section 2.9, “Installing MySQL from Source”. If you are familiar with autotools but not CMake, you might find this transition document helpful: http://forge.mysql.com/wiki/Autotools_to_CMake_Transition_Guide Third-party tools that need to extract the MySQL version number formerly found inconfigure.incan use theVERSIONfile. See Section 2.9.6, “MySQL Configuration and Third-Party Tools”.
Functionality Added or Changed
Support for the
IBMDB2Istorage engine has been removed. (Bug #58079)The following words are no longer reserved words the way they are in earlier MySQL 5.5 releases:
SLOW,GENERAL,IGNORE_SERVER_IDS,MASTER_HEARTBEAT_PERIOD(Bug #57899)For an upgrade to MySQL 5.5.7 from a previous release, the server exited if the
mysql.proxies_privtable did not exist, making upgrades inconvenient. Now the server treats a missingproxies_privtable as equivalent to an empty table. However, after starting the server, you should still run mysql_upgrade to create the table. (Bug #57551)The
autocommitsystem variable is enabled by default for all user connections, and the session value can be set for each new connection by setting theinit_connectsystem variable toSET autocommit=0. However, this has no effect for users who have theSUPERprivilege.Now the global
autocommitvalue can be set at server startup, and this value is used to initialize the session value for all new connections, including those for users with theSUPERprivilege. The variable is treated as a boolean value so it can be enabled with--autocommit,--autocommit=1, or--enable-autocommit. It can be disabled with--autocommit=0,--skip-autocommit, or--disable-autocommit. (Bug #57316)The client/server protocol now includes a
SERVER_QUERY_WAS_SLOWflag to indicate when a query is slow; that is, when query execution exceeds the value of thelong_query_timesystem variable. (Bug #57058)The time zone tables available at http://dev.mysql.com/downloads/timezones.html have been updated. These tables can be used on systems such as Windows or HP-UX that do not include zoneinfo files. (Bug #40230)
Changes to replication in MySQL 5.6 make mysqlbinlog output generated by the
--base64-output=ALWAYSoption unusable, soALWAYSis now deprecated and will be an invalid option value in MySQL 5.6. This should not be a significant problem because--base64-outputvalues other thanAUTOare supposed to be used only for debugging, not for production environments.References: See also Bug #28760.
A
--bind-addressoption has been added to a number of MySQL client programs: mysql, mysqldump, mysqladmin, mysqlbinlog, mysqlcheck, mysqlimport, and mysqlshow. This is for use on a computer having multiple network interfaces, and enables you to choose which interface is used to connect to the MySQL server.A corresponding change was made to the
mysql_options()C API function, which now has aMYSQL_OPT_BINDoption for specifying the interface. The argument is a host name or IP address (specified as a string).
Bugs Fixed
InnoDB Storage Engine: Security Fix: A failed
CREATE TABLEstatement for anInnoDBtable could allocate memory that was never freed. (Bug #56947)Security Fix: Bug #58005 was fixed.
Security Fix: Bug #57687 was fixed.
Security Fix: Bug #57659 was fixed.
Security Fix: Bug #57477 was fixed.
Security Fix: Bug #57272 was fixed.
Security Fix: Bug #57130 was fixed.
Security Fix: Bug #56814 was fixed.
Security Fix: Bug #55146 and Bug #56287 were fixed.
Security Fix: Bug #54484 was fixed.
Performance: InnoDB Storage Engine: Improved concurrency when several
ANALYZE TABLEorSHOW TABLE STATUSstatements are run simultaneously forInnoDBtables. (Bug #53046)Incompatible Change: Previously, tables in the
performance_schemadatabase had uppercase names. This was incompatible with thelower_case_table_namessystem variable, and caused issues when the variable value was changed after installing or upgrading.Now
performance_schematable names are lowercase, so they appear in uniform lettercase regardless of thelower_case_table_namessetting. References to these tables in SQL statements should be given in lowercase. This is an incompatible change, but provides compatible behavior across different values oflower_case_table_names.If you upgrade to MySQL 5.5.8 from an earlier version of MySQL 5.5, be sure to run mysql_upgrade (and restart the server) to change the names of existing
performance_schematables from uppercase to lowercase. If mysql_upgrade does not work, use this procedure:Stop mysqld.
Remove the
performance_schema/*.frmfiles from the data directory.Create a separate “dummy” MySQL 5.5.8 installation.
Copy the
performance_schema/*.frmfiles from the dummy installation to the installation you are upgrading.Restart mysqld and run mysqld_upgrade --force and check that it does not produce errors.
Remove the dummy installation.
(Bug #57609)
Incompatible Change: The following changes were made to the
performance_schema.threadstable for conformance with the implementation in MySQL 5.6:IDcolumn: Renamed toPROCESSLIST_ID, removedNOT NULLfrom definition.NAMEcolumn: Changed fromVARCHAR(64)toVARCHAR(128).
(Bug #57154)
Incompatible Change: Starvation of
FLUSH TABLES WITH READ LOCKstatements occurred when there was a constant load of concurrent DML statements in two or more connections. Deadlock occurred when a connection that had some table open through aHANDLERstatement tried to update data through a DML statement while another connection tried to executeFLUSH TABLES WITH READ LOCKconcurrently.These problems resulted from the global read lock implementation, which was reimplemented with the following consequences:
To solve deadlock in event-handling code that was exposed by this patch, the
LOCK_event_metadatamutex was replaced with metadata locks on events. As a result, DDL operations on events are now prohibited underLOCK TABLES. This is an incompatible change.The global read lock (
FLUSH TABLES WITH READ LOCK) no longer blocks DML and DDL on temporary tables. Before this patch, server behavior was not consistent in this respect: In some cases, DML/DDL statements on temporary tables were blocked; in others, they were not. Since the main use cases forFLUSH TABLES WITH READ LOCKare various forms of backups and temporary tables are not preserved during backups, the server now consistently permits DML/DDL on temporary tables under the global read lock.The set of thread states has changed:
Waiting for global metadata lockis replaced byWaiting for global read lock.Previously,
Waiting for release of readlockwas used to indicate that DML/DDL statements were waiting for release of a read lock andWaiting to get readlockwas used to indicate thatFLUSH TABLES WITH READ LOCKwas waiting to acquire a global read lock. NowWaiting for global read lockis used for both cases.Previously,
Waiting for release of readlockwas used for all statements that caused an explicit or implicit commit to indicate that they were waiting for release of a read lock andWaiting for all running commits to finishwas used byFLUSH TABLES WITH READ LOCK. NowWaiting for commit lockis used for both cases.There are two other new states,
Waiting for trigger metadata lockandWaiting for event metadata lock.
(Bug #57006, Bug #11764195, Bug #54673, Bug #11762116)
InnoDB Storage Engine: Values could be truncated in certain
INFORMATION_SCHEMAcolumns, such asREFERENTIAL_CONSTRAINTS.REFERENCED_TABLE_NAMEandKEY_COLUMN_USAGE.REFERENCED_TABLE_NAME. (Bug #57960)InnoDB Storage Engine: For an
InnoDBtable created withROW_FORMAT=COMPRESSEDorROW_FORMAT=DYNAMIC, a query using theREAD UNCOMMITTEDisolation level could cause the server to stop with an assertion error, ifBLOBor other large columns that use off-page storage were being inserted at the same time. (Bug #57799)InnoDB Storage Engine: The server could stop with an assertion error on Windows Vista and Windows 7 systems. (Bug #57720)
InnoDB Storage Engine: A followup fix to bug #54678.
TRUNCATE TABLEcould still cause a crash (assertion error) in the debug version of the server. (Bug #57700)InnoDB Storage Engine: If the MySQL Server crashed immediately after creating an
InnoDBtable, the server could quit with asignal 11during the subsequent restart. The issue could occur if the server halted afterInnoDBcreated the primary index for the table, but before the index definition was recorded in the MySQL metadata. (Bug #57616)References: This bug is a regression of Bug #54582.
InnoDB Storage Engine: The
InnoDBsystem tablespace could grow continually for a server under heavy load. (Bug #57611)InnoDB Storage Engine: Heavy concurrent updates of a
BLOBcolumn in anInnoDBtable could cause a hang. (Bug #57579)InnoDB Storage Engine: Turning off the
innodb_stats_on_metadataoption could prevent theANALYZE TABLEstatement from updating the cardinality statistics ofInnoDBtables. (Bug #57252)InnoDB Storage Engine: A query for an
InnoDBtable could return the wrong value if a column value was changed to a different case, and the column had a case-insensitive index. (Bug #56680)InnoDB Storage Engine: An existing
InnoDBtable could be switched toROW_FORMAT=COMPRESSEDimplicitly by aKEY_BLOCK_SIZEclause in anALTER TABLEstatement. Now, the row format is only switched to compressed if there is an explicitROW_FORMAT=COMPRESSEDclause. on theALTER TABLEstatement.Any valid, nondefault
ROW_FORMATparameter takes precedence overKEY_BLOCK_SIZEwhen both are specified.KEY_BLOCK_SIZEonly enablesROW_FORMAT=COMPRESSEDifROW_FORMATis not specified on either theCREATE TABLEorALTER TABLEstatement, or is specified asDEFAULT. In case of a conflict betweenKEY_BLOCK_SIZEandROW_FORMATclauses, theKEY_BLOCK_SIZEis ignored ifinnodb_strict_modeis off, and the statement causes an error ifinnodb_strict_modeis on. (Bug #56632)InnoDB Storage Engine: The clause
KEY_BLOCK_SIZE=0is now permitted onCREATE TABLEandALTER TABLEstatements forInnoDBtables, regardless of the setting ofinnodb_strict_mode. The zero value has the effect of resetting theKEY_BLOCK_SIZEtable parameter to its default value, depending on theROW_FORMATparameter, as if it had not been specified. That default is 8 ifROW_FORMAT=COMPRESSED. Otherwise,KEY_BLOCK_SIZEis not used or stored with the table parameters.As a consequence of this fix,
ROW_FORMAT=FIXEDis not permitted wheninnodb_strict_modeis enabled. (Bug #56628)InnoDB Storage Engine: A large number of foreign key declarations could cause the output of the
SHOW CREATE STATEMENTstatement to be truncated. (Bug #56143)InnoDB Storage Engine: Clarified the message when a
CREATE TABLEstatement fails because a foreign key constraint does not have the required indexes. (Bug #16290)Partitioning: In-place
ALTER TABLEoperations (that do not involve a table copy) on a partitioned table could leave the table in an unusable state. (Bug #57985)Partitioning: In debug builds, an
INSERT ... ON DUPLICATE KEY UPDATEstatement on ancol_name= 0AUTO_INCREMENTcolumn caused the server to crash. (Bug #57890)Partitioning: Issuing
ALTER TABLE ... ADD PRIMARY KEYon a partitionedInnoDBtable could cause the MySQL Server to crash. (Bug #57778)Replication: Concurrent statements using a stored function and a
DROP DATABASEstatement that caused the same stored function to be dropped could cause statement-based replication to fail. This problem is resolved by making sure thatDROP DATABASEtakes an exclusive metadata lock on all stored functions and stored procedures that it causes to be dropped. (Bug #57663)References: See also Bug #30977.
Replication: When
STOP SLAVEis issued, the slave SQL thread rolls back the current transaction and stops immediately if the transaction updates only tables which use transactional storage engines. Previously, this occurred even when the transaction containedCREATE TEMPORARY TABLEstatements,DROP TEMPORARY TABLEstatements, or both, although these statements cannot be rolled back. Because temporary tables persist for the lifetime of a user session (in the case, the replication user), they remain until the slave is stopped or reset. When the transaction is restarted following a subsequentSTART SLAVEstatement, the SQL thread aborts with an error that a temporary table to be created (or dropped) already exists (or does not exist, in the latter case).Following this fix, if an ongoing transaction contains
CREATE TEMPORARY TABLEstatements,DROP TEMPORARY TABLEstatements, or both, the SQL thread now waits until the transaction ends, then stops. (Bug #56118, Bug #11763416)Replication: If there exist both a temporary table and a nontemporary table having the same name, updates normally apply only to the temporary table, with the exception of a
CREATE TABLE ... SELECTstatement that creates a nontemporary table having the same name as an existing temporary table. When such a statement was replicated using theMIXEDlogging format, and the statement was unsafe for row-based logging, updates were misapplied to the temporary table.Updates were also applied wrongly when a temporary table that used a transactional storage engine was dropped inside a transaction, followed by updates within the same transaction to a nontemporary table having the same name. (Bug #55478)
References: See also Bug #47899, Bug #55709.
Replication: When making changes to relay log settings using
CHANGE MASTER TO, the I/O cache was not cleared. This could result in replication failure when the slave attempted to read stale data from the cache and then stopped with an assertion. (Bug #55263)Replication: Replication of
SETandENUMcolumns represented using more than 1 byte (that is,SETcolumns with more than 8 members andENUMcolumns with more than 256 constants) between platforms using different endianness failed when using the row-based format. This was because columns of these types are represented internally using integers, but the internal functions used by MySQL to handle them treated them as strings. (Bug #52131)References: See also Bug #53528.
Replication: Trying to read from a binary log containing a log event of an invalid type caused the slave to crash. (Bug #38718)
Replication: When replicating the
mysql.tables_privtable, theGrantorcolumn was not replicated, and was thus left empty on the slave. (Bug #27606)Setting the
read_onlysystem variable at server startup did not work. (Bug #58669)mysql_upgrade failed after an upgrade from MySQL 5.1. (Bug #58514)
When configuring the build with
-DBUILD_CONFIG=mysql_releaseand building with Visual Studio Express, the build failed if signtool.exe was not present. (Bug #58313)With CMake 2.8.3, the
-DBUILD_CONFIG=mysql_releaseoption did not work. (Bug #58272)When configuring the build with
-DBUILD_CONFIG=mysql_releaseon Linux,libaiois required, but the error message if it was missing was uninformative. (Bug #58227)Use of
NAME_CONST()in aHAVINGclause caused a server crash. (Bug #58199)BETWEENdid not use indexes forDATEorDATETIMEcolumns. (Bug #58190)Memory was allocated in
fn_expand()for storing path names, but not freed anywhere. (Bug #58173)In debug builds, inserting a
FLOATvalue into aCHAR(0)column could cause a server crash. (Bug #58137)Failure to create a thread to handle a user connection could cause a server crash. (Bug #58080)
During configuration,
ADD_VERSION_INFOincmake/mysql_version.cmakefailed ifLINK_FLAGSwas modified. (Bug #58074)The Performance Schema did not count I/O for the binary log file. (Bug #58052)
Several compilation problems were fixed. (Bug #57992, Bug #57993, Bug #57994, Bug #57995, Bug #57996, Bug #57997, Bug #58057)
After creation of a table with two foreign key constraints, the
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTStable displayed only one of them. (Bug #57904)Incorrect error handling raised an assertion if character set conversion wrapped an item that failed. (Bug #57882)
In debug builds, a missing
DBUG_RETURNmacro insql/client.ccaused mysql to be unable to connect to the server. (Bug #57744)Clients using a client library older than MySQL 5.5.7 suffered loss of connection after executing
mysql_change_user()while connected to a 5.5.7 server. (Bug #57689)The
MySQL-sharedRPM package failed to provide the lowercase virtual identifier'mysql-shared'in the RPM'Provides'tags (usually used for backward compatibility). (Bug #57596)SHOW PROCESSLISTdisplayed non-ASCII characters improperly. (Bug #57306)Passing a string that was not null-terminated to
UpdateXML()orExtractValue()caused the server to fail with an assertion. (Bug #57279, Bug #11764447)SET GLOBAL debugcould cause a crash on Solaris if the server failed to open the trace file. (Bug #57274)In debug builds, an assertion could be raised during conversion of strings to floating-point values. (Bug #57203)
If the
file_nameargument to the--defaults-fileor--defaults-extra-fileoption was not a full path name, it could be interpreted incorrectly in some contexts and cause a server crash. Now thefile_nameargument is interpreted as relative to the current working directory if given as a relative path name rather than as a full path name. (Bug #57108)A user with no privileges on a stored routine or the
mysql.proctable could discover the routine's existence. (Bug #57061)Queries executed using the Index Merge access method and a temporary file could return incorrect results. (Bug #56862)
The server could crash inside
memcpy()when reading certain Performance Schema tables. (Bug #56761, Bug #58003)The server could crash as a result of accessing freed memory when populating
INFORMATION_SCHEMA.VIEWSif a view could not be opened properly. (Bug #56540)Valgrind warnings about overlapping memory when double-assigning the same variable were corrected. (Bug #56138)
If a
STOP SLAVEstatement was issued while the slave SQL thread was executing a statement that invoked theSLEEP()function, both statements hung. (Bug #56096)OPTIMIZE TABLEforInnoDBtables could raise an assertion. (Bug #55930)Warnings raised by a trigger were not cleared upon successful completion. Now warnings are cleared if the trigger completes successfully, per the SQL standard. (Bug #55850)
For CMake builds, some parts of the source were unnecessarily compiled twice if the embedded server was built. (Bug #55647)
In debug builds, an assertion could be raised if a
send_eof()method was called after an error occurred. (Bug #54812)Boolean command options caused an error if given with an option value and the
loose-option prefix. (Bug #54569)An error in a stored procedure could leave the session in a different default database. (Bug #54375)
The
CMake“wrapper” for configure (configure.pl) did not handle the--with-commentoption properly. (Bug #52275)Grouping by a
TIME_TO_SEC()function result could cause a server crash or incorrect results. Grouping by a function returning aBLOBcould cause an unexpected “Duplicate entry” error and incorrect result. (Bug #52160)The
find_files()function used bySHOWstatements performed redundant and unnecessary memory allocation. (Bug #51208)The Windows sample option files contained values more appropriate for Linux. (Bug #50021)
A failed
RENAME TABLEoperation could prevent aFLUSH TABLES WITH READ LOCKfrom completing. (Bug #47924)Error messages for several delegate-related initialization error conditions that should not occur were changed to help identify the area of failure and to instruct the user to file a bug report if they do occur. A delegate is a set of internal data structures and algorithms. (Bug #47027)
On file systems with case insensitive file names, and
lower_case_table_names=2, the server could crash due to a table definition cache inconsistency. (Bug #46941)Handling of host name lettercase in
GRANTstatements was inconsistent. (Bug #36742)SET NAMES utf8 COLLATE utf8_sinhala_cidid not work. (Bug #26474)The
utf16_bincollation uses code-point order, not byte-by-byte order, as described at Section 9.1.14.1, “Unicode Character Sets”. (The order was byte-by-byte in MySQL 5.5.7.)
Configuration Notes
MySQL releases now are built using CMake rather than the GNU autotools. Accordingly, the instructions for installing MySQL from source have been updated to discuss how to build MySQL using CMake. See Section 2.9, “Installing MySQL from Source”. If you are familiar with autotools but not CMake, you might find this transition document helpful: http://forge.mysql.com/wiki/Autotools_to_CMake_Transition_Guide
The build process is now similar enough on all platforms, including Windows, that there are no longer sections dedicated to notes for specific platforms.
The default installation layout when compiling from source now matches that used for binary distributions. You will notice these differences for installations from source distributions:
mysqld is installed in
bin, notlibexec.mysql_install_db is installed in
scripts, notbin.The data directory is
data, notvar.
The make_binary_distribution and
make_win_bin_distscripts are now obsolete. To create a binary distribution, use make package.
Authentication Changes
MySQL now supports pluggable authentication, such that the server uses plugins to authenticate incoming client connections. Client programs load an authentication plugin that interacts properly with the corresponding server plugin.
Pluggable authentication enables two important capabilities, external authentication and proxy users:
Pluggable authentication makes it possible for clients to connect to the MySQL server with credentials that are appropriate for authentication methods other than native authentication based on passwords stored in the
mysql.usertable. For example, plugins can be created to use external authentication methods such as PAM, Windows login IDs, LDAP, or Kerberos.If a user is permitted to connect, an authentication plugin can return to the server a user name different from the name of the connecting user, to indicate that the connecting user is a proxy for another user. While the connection lasts, the proxy user is treated, for purposes of access control, as having the privileges of a different user. In effect, one user impersonates another.
Pluggable authentication entails these changes:
For user specifications in the
CREATE USERandGRANTstatements, there is a newIDENTIFIED WITHclause for specifying the authentication plugin.For the
mysql.usertable, there are new columns that specify plugin information. Theplugincolumn, if nonempty, indicates which plugin authenticates connections for an account. Theauthentication_stringcolumn is a string that the server passes to the plugin for connections by clients that authenticate using the plugin.For the
mysql_options()C API function, there are newMYSQL_DEFAULT_AUTHandMYSQL_PLUGIN_DIRoptions that enable client programs to load authentication plugins.For the mysql client, there are new
--default-authand--plugin-diroptions for specifying which authentication plugin and plugin directory to use. These options will be added to other clients in future releases.For the mysqltest client, there is a new
--plugin-diroption for specifying which plugin directory to use, and a newconnect()command argument to specify an authentication plugin.For the server plugin API, there is a new
MYSQL_AUTHENTICATION_PLUGINplugin type.A new client plugin API enables client programs to manage plugins.
The native authentication methods previously supported in MySQL have been reimplemented as plugins. These methods provide against the current password format and pre-MySQL 4.1.1 format that uses shorter password hash values. This change reimplements the native methods as plugins that cannot be unloaded. Existing clients authenticate as before with no changes needed. In particular, starting the server with the
--secure-authoption still prevents clients that have pre-4.1.1 password hashes from conecting, and--skip-grant-tablesstill disables all password checking.
Proxy user capability entails these changes:
There is a new
PROXYprivilege that can be managed with theGRANTandREVOKEstatements.The new
proxy_userandexternal_usersystem variables indicate whether the current session uses proxying.A new
mysql.proxies_privgrant table records proxy information for MySQL accounts.
Due to these changes, the server requires that a new grant table,
proxies_priv, be present in themysqldatabase. If you are upgrading to MySQL 5.5.7 from a previous MySQL release rather than performing a new installation, the server will find that this table is missing and exit during startup with the following message:Table 'mysql.proxies_priv' doesn't exist
To create the
proxies_privtable, start the server with the--skip-grant-tablesoption to cause it to skip the normal grant table checks, then run mysql_upgrade. For example:shell>
mysqld --skip-grant-tables &shell>mysql_upgradeThen stop the server and restart it normally.
You can specify other options on the mysqld command line if necessary. Alternatively, if your installation is configured so that the server normally reads options from an option file, use the
--defaults-fileoption to specify the file (enter each command on a single line):shell>
mysqld --defaults-file=/usr/local/mysql/etc/my.cnf--skip-grant-tables &shell>mysql_upgradeWith the
--skip-grant-tablesoption, the server does no password or privilege checking, so any client can connect and effectively have all privileges. For additional security, use the--skip-networkingoption as well to prevent remote clients from connecting.ЗамечаниеThe upgrade problem just described is fixed in MySQL 5.5.8. The server treats a missing
proxies_privtable as equivalent to an empty table.For additional information, consult these references:
Information about pluggable authentication, including installation and usage instructions: Section 5.5.6, “Pluggable Authentication”.
Information about proxy users: Section 5.5.7, “Proxy Users”.
Information about the server and client plugin API: Section 22.2.4, “Writing Plugins”.
Information about the C API functions for managing client plugins: See Section 21.9.10, “C API Client Plugin Functions”.
Information about current restrictions on the use of pluggable authentication, including which connectors support which plugins: See Section E.9, “Restrictions on Pluggable Authentication”. Third-party connector developers should read that section to determine the extent to which a connector can take advantage of pluggable authentication capabilities and what steps to take to become more compliant.
Functionality Added or Changed
Incompatible Change: Previously, if you flushed the logs using
FLUSH LOGSor mysqladmin flush-logs and mysqld was writing the error log to a file (for example, if it was started with the--log-erroroption), it renamed the current log file with the suffix-old, then created a new empty log file. This had the problem that a second log-flushing operation thus caused the original error log file to be lost unless you saved it under a different name. For example, you could use the following commands to save the file:shell>
mysqladmin flush-logsshell>mvhost_name.err-oldbackup-directoryTo avoid the preceding file-loss problem, renaming no longer occurs. The server merely closes and reopens the log file. To rename the file, you can do so manually before flushing. Then flushing the logs reopens a new file with the original file name. For example, you can rename the file and create a new one using the following commands:
shell>
mvshell>host_name.errhost_name.err-oldmysqladmin flush-logsshell>mvhost_name.err-oldbackup-directory(Bug #29751)
References: See also Bug #56821.
The unused and undocumented
thread_pool_sizesystem variable was removed. (Bug #57338)The
pstacklibrary was nonfunctional and has been removed, along with the--with-pstackoption for configure and the--enable-pstackoption for mysqld. (Bug #57210)Added a new
SHOW PROCESSLISTstate,Waiting for query cache lock. This indicates that a session is waiting to take the query cache lock while it performs some query cache operation. (Bug #56822)A new status variable,
Handler_read_last, displays the number of requests to read the last key in an index. WithORDER BY, the server issues a first-key request followed by several next-key requests, whereas withORDER BY DESC, the server issues a last-key request followed by several previous-key requests. (Bug #52312)Previously, the server supported values of
OFF,ON, andFORCEfor the--option format for controlling plugin loading using an option named after the plugin. Such options now support aplugin_name=valueFORCE_PLUS_PERMANENTvalue. This value is likeFORCE, but in addition prevents the plugin from being unloaded at runtime. If a user attempts to do so withUNINSTALL PLUGIN, an error occurs. See Section 5.1.7.1, “Installing and Uninstalling Plugins”.In addition, the
INFORMATION_SCHEMA.PLUGINStable now has aLOAD_OPTIONcolumn that indicates the plugin loading value (OFF,ON,FORCE, orFORCE_PLUS_PERMANENT). See Section 19.14, “TheINFORMATION_SCHEMA PLUGINSTable”.
Bugs Fixed
InnoDB Storage Engine: Incompatible Change: Security Fix: Issuing
TRUNCATE TABLEand examining the same table's information in theINFORMATION_SCHEMAdatabase at the same time could cause a crash in the debug version of the server.As a result of this change,
InnoDBalways uses the fast truncation technique, equivalent toDROP TABLEandCREATE TABLE. It no longer performs a row-by-row delete for tables with parent-child foreign key relationships.TRUNCATE TABLEreturns an error for such tables. Modify your SQL to issueDELETE FROMfor such tables instead. (Bug #54678)table_nameSecurity Fix: The server crashed for assignment of values of types other than
Geometryto items of typeGeometryCollection(MultiPoint,MultiCurve,MultiSurface). Now the server checks the value type and fails withbad geometry valueif it detects incorrect parameters. (Bug #55531)Security Fix: The
CONVERT_TZ()function crashed the server when the timezone argument was an emptySETcolumn value. (Bug #55424)Security Fix:
EXPLAIN EXTENDEDcaused a server crash with some prepared statements. (Bug #54494)Security Fix: In prepared-statement mode,
EXPLAINfor aSELECTfrom a derived table caused a server crash. (Bug #54488)Security Fix: The
PolyFromWKB()function could crash the server when improper WKB data was passed to the function. (Bug #51875, Bug #11759554, CVE-2010-3840)Performance: InnoDB Storage Engine: The master
InnoDBbackground thread could sometimes cause transient performance drops due to excessive flushing of modified pages. (Bug #56933)Incompatible Change: Replication: The behavior of
INSERT DELAYEDstatements when using statement-based replication has changed as follows:Previously, when using
binlog_format=STATEMENT, a warning was issued in the client when executingINSERT DELAYED; now, no warning is issued in such cases.Previously, when using
binlog_format=STATEMENT,INSERT DELAYEDwas logged asINSERT DELAYED; now, it is logged as anINSERT, without theDELAYEDoption.However, when
binlog_format=STATEMENT,INSERT DELAYEDcontinues to be executed asINSERT(without theDELAYEDoption). The behavior ofINSERT DELAYEDremains unchanged when usingbinlog_format=ROW:INSERT DELAYEDgenerates no warnings, is executed asINSERT DELAYED, and is logged using the row-based format.This change also affects
binlog_format=MIXED, becauseINSERT DELAYEDis no longer considered unsafe. Now, when the logging format isMIXED, no switch to row-based logging occurs. This means that the statement is logged as a simpleINSERT(that is, without theDELAYEDoption), using the statement-based logging format. (Bug #54579, Bug #11762035)References: See also Bug #56678, Bug #11763907, Bug #57666. This bug was introduced by Bug #39934, Bug #11749859.
Incompatible Change:
HANDLER ... READstatements that invoke stored functions can cause replication errors. Such statements are now disallowed and result in anER_NOT_SUPPORTED_YETerror. (Bug #54920)Important Change: InnoDB Storage Engine: The server could crash with an assertion, possibly leading to data corruption, while updating the primary key of an
InnoDBtable containingBLOBor other columns requiring off-page storage. This fix applies to theInnoDBPlugin in MySQL 5.1, and toInnoDB1.1 in MySQL 5.5. (Bug #55543)InnoDB Storage Engine: Replication: If the master had
innodb_file_per_table=OFF,innodb_file_format=Antelope(andinnodb_strict_mode=OFF), or both, certainCREATE TABLEoptions, such asKEY_BLOCK_SIZE, were ignored. This could permit the master to avoid raisingER_TOO_BIG_ROWSIZEerrors.However, the ignored
CREATE TABLEoptions were still written into the binary log, so that, if the slave hadinnodb_file_per_table=ONandinnodb_file_format=Barracuda, it could encounter anER_TOO_BIG_ROWSIZEerror while executing the record from the log, causing the slave SQL thread to abort and replication to fail.In the case where the master was running MySQL 5.1 and the slave was MySQL 5.5 (or later), the failure occurred when both master and slave were running with default values for
innodb_file_per_tableandinnodb_file_format. This could cause problems during upgrades.To address this issue, the default values for
innodb_file_per_tableandinnodb_file_formatare reverted to the MySQL 5.1 default values—that is,OFFandAntelope, respectively. (Bug #56318, Bug #11763590)InnoDB Storage Engine: The server could crash with a high volume of concurrent
LOCK TABLESandUNLOCK TABLESstatements. (Bug #57345)InnoDB Storage Engine:
InnoDBincorrectly reported an error when a cascading foreign key constraint deleted more than 250 rows. (Bug #57255)InnoDB Storage Engine: If the server crashed during an
ALTER TABLEoperation on anInnoDBtable, examining the table throughSHOW CREATE TABLEor querying theINFORMATION_SCHEMAtables could cause the server to stop with an assertion error. (Bug #56982)InnoDB Storage Engine: The output from the
SHOW ENGINE INNODB STATUScommand can now be up to 1MB. Formerly, it was truncated at 64KB. Monitoring applications that parse that output can check whether it exceeds this new, larger limit by testing theInnodb_truncated_status_writesstatus variable. (Bug #56922)InnoDB Storage Engine: For debug builds, a
SELECT ... FOR UPDATEstatement affecting a range of rows in anInnoDBtable could cause a server crash. (Bug #56716)InnoDB Storage Engine: Improved the performance of
UPDATEoperations onInnoDBtables, when only non-indexed columns are changed. (Bug #56340)InnoDB Storage Engine: When MySQL was restarted after a crash with the option
innodb_force_recovery=6, certain queries againstInnoDBtables could fail, depending onWHEREorORDER BYclauses.Usually in such a disaster recovery situation, you dump the entire table using a query without these clauses. During advanced troubleshooting, you might use queries with these clauses to diagnose the position of the corrupted data, or to recover data following the corrupted part. (Bug #55832)
InnoDB Storage Engine: The
CHECK TABLEcommand could cause a time-consuming verification of theInnoDBadaptive hash index memory structure. Now this extra checking is only performed in binaries built for debugging. (Bug #55716)InnoDB Storage Engine: A heavy workload with a large number of threads could cause a crash in the debug version of the server. (Bug #55699)
InnoDB Storage Engine: The server could crash on shutdown, if started with
--innodb-use-system-malloc=0. (Bug #55627)InnoDB Storage Engine: If the server crashed during a
RENAME TABLEoperation on anInnoDBtable, subsequent crash recovery could fail. This problem could also affect anALTER TABLEstatement that caused a rename operation internally. (Bug #55027)InnoDB Storage Engine: Setting the
PACK_KEYS=0table option for anInnoDBtable prevented new indexes from being added to the table. (Bug #54606)InnoDB Storage Engine: The server could crash when opening an
InnoDBtable linked through foreign keys to a long chain of child tables. (Bug #54582)InnoDB Storage Engine: Changed the locking mechanism for the
InnoDBdata dictionary duringROLLBACKoperations, to improve concurrency forREPLACEstatements. (Bug #54538)InnoDB Storage Engine: With multiple buffer pools enabled,
InnoDBcould flush more data from the buffer pool than necessary, causing extra I/O overhead. (Bug #54346)InnoDB Storage Engine:
InnoDBtransactions could be incorrectly committed during recovery, rather than rolled back, if the server crashed and was restarted after performingALTER TABLE ... ADD PRIMARY KEYon anInnoDBtable, or some other operation that involves copying the entire table. (Bug #53756)InnoDB Storage Engine:
InnoDBstartup messages now include the start and end times for buffer pool initialization, and the total buffer pool size. (Bug #48026)Partitioning: An
ALTER TABLEstatement acting on table partitions that failed while the affected table was locked could cause the server to crash. (Bug #56172)Partitioning: Multiple-table
UPDATEstatements involving a partitionedMyISAMtable could cause this table to become corrupted. Not all tables affected by theUPDATEneeded to be partitioned for this issue to be observed. (Bug #55458)Partitioning:
EXPLAIN PARTITIONSreturned bad estimates for range queries on partitionedMyISAMtables. In addition, values in therowscolumn ofEXPLAIN PARTITIONSoutput did not take partition pruning into account. (Bug #53806, Bug #46754)Replication:
SET PASSWORDcaused failure of row-based replication between a MySQL 5.1 master and a MySQL 5.5 slave.This fix makes it possible to replicate
SET PASSWORDcorrectly, using row-based replication between a master running MySQL 5.1.53 or a later MySQL 5.1 release to a slave running MySQL 5.5.7 or a later MySQL 5.5 release. (Bug #57098)References: See also Bug #55452, Bug #57357.
Replication: Prepared multiple-row
INSERT DELAYEDstatements were written to the binary log withoutDELAYED. (Bug #56678, Bug #11763907)References: This bug is a regression of Bug #54579, Bug #11762035.
Replication: Backticks used to enclose identifiers for savepoints were not preserved in the binary log, which could lead to replication failure when the identifier, stripped of backticks, could be misinterpreted, causing a syntax or other error.
This could cause problems with MySQL application programs making use of generated savepoint IDs. If, for instance,
java.sql.Connection.setSavepoint()is called without any parameters, Connector/J automatically generates a savepoint identifier consisting of a string of hexadecimal digits0-Fencased in backtick (`) characters. If such an ID took the form`(whereNeN`Nrepresents a string of the decimal digits0-9, andeis a literal uppercase or lowercase “E” character). Removing the backticks when writing the identifier into the binary log left behind a substring which the slave MySQL server tried to interpret as a floating point number, rather than as an identifier. The resulting syntax error caused loss of replication. (Bug #55961)References: See also Bug #55962.
Replication: When a slave tried to execute a transaction larger than the slave's value for
max_binlog_cache_size, it crashed. This was caused by an assertion that the server should roll back only the statement but not the entire transaction when the errorER_TRANS_CACHE_FULLoccurred. However, the slave SQL thread always rolled back the entire transaction whenever any error occurred, regardless of the type of error. (Bug #55375)Replication: The error message for
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGEwas hard coded in English insql_yacc.yy, so that it could not be translated inerrmsg.txtfor other languages.Additionally, this same error message was used for three separate error conditions:
When the heartbeat period exceeded the value of
slave_net_timeout.When the heartbeat period was nonnegative but shorter than 1 millisecond.
When the value for the heartbeat period was either negative or greater than the maximum permitted.
These issues have been addressed as follows:
By using three distinct error messages for each of the conditions listed previously.
By moving the sources for these error messages into the
errmsg-utf8.txtfile to facilitate translations into languages other than English.
(Bug #54144)
A buffer overrun could occur when formatting
DBL_MAXnumbers. (Bug #57209)COALESCE()in MySQL 5.5 could return a result different from MySQL 5.1 for some arguments. (Bug #57095)Constant
SUBTIME()expressions could return incorrect results. (Bug #57039)When mysqld was started as a service on Windows and mysqld was writing the error log to a file (for example, if it was started with the
--log-erroroption), the server reassigned the file descriptors of thestdoutandstderrstreams to the file descriptor of the log file. On Windows, ifstdoutorstderris not associated with an output stream, the file descriptor returns a negative value. Previously, this caused the file descriptor reassignment to fail and the server to abort. To avoid this problem on Windows, the server now first assigns thestdoutandstderrstreams to the log file stream by opening this file. This causes thestdoutandstderrfile descriptors to be nonzero and the server can successfully reassign them to the file descriptor of the log file. (Bug #56821)References: This bug is a regression of Bug #29751.
The server could crash inside
memcpy()when reading certain Performance Schema tables. (Bug #56761, Bug #58003)Deadlock could occur for heavily concurrent workloads consisting of a mix of DML, DDL, and
FLUSH TABLESstatements affecting the same set of tables. (Bug #56715, Bug #56404, Bug #56405)Memory leaks detected by Valgrind were corrected. (Bug #56709)
On Mac OS X,
RENAME TABLEraised an assertion if thelower_case_table_namessystem variable was 2 and the old table name was specified in uppercase. (Bug #56595)Performance for certain read-only queries, in particular
point_select, had deteriorated compared to previous versions. (Bug #56585)It was possible to compile mysqld with Performance Schema support but with a dummy atomic-operations implementation, which caused a server crash. This problem does not affect binary distributions. It is helpful as a safety measure for users who build MySQL from source. (Bug #56521)
Executing
XA ENDafter an XA transaction was already ended raised an assertion. (Bug #56448)A
SELECTstatement could produce a number of rows different from aCREATE TABLE ... SELECTthat was supposed to select the same rows. (Bug #56423)References: This bug is a regression of Bug #38999.
The server crashed if a table maintenance statement such as
ANALYZE TABLEorREPAIR TABLEwas executed on aMERGEtable and opening and locking a child table failed. For example, this could happen if a child table did not exist or if a lock timeout happened while waiting for a conflicting metadata lock to disappear.As a consequence of this bug fix, it is now possible to use
CHECK TABLEfor log tables without producing an error. (Bug #56422, Bug #56494)ALTER TABLEon aMERGEtable could result in deadlock with other connections. (Bug #56292, Bug #57002)Comparison of one
STR_TO_DATE()result with another could return incorrect results. (Bug #56271)The
tcmalloclibrary was missing from binary MySQL packages for Linux. (Bug #56267)An
INSERT DELAYEDstatement for aMERGEtable could cause deadlock if it occurred as part of a transaction or underLOCK TABLES, and there was a concurrent DDL orLOCK TABLES ... WRITEstatement that tried to lock one of its underlying tables. (Bug #56251)In debug builds, the server raised an assertion for
DROP DATABASEin installations that had an outdated or corruptedmysql.proctable. For example, this affected mysql_upgrade when run as part of a MySQL 5.1 to 5.5 upgrade. (Bug #56137)A negative
TIMEargument toMIN()orMAX()could raise an assertion. (Bug #56120)The ordering for supplementary characters in the
utf8mb4_bin,utf16_bin, andutf32_bincollations was incorrect. (Bug #55980)On Solaris with gcc 3.4.6,
ha_example.sowas built with DTrace support even if the server was not, causing plugin loading problems. (Bug #55966)Short (single-letter) command-line options did not work. (Bug #55873)
If a query specified a
DATEorDATETIMEvalue in a format different from'YYYY-MM-DD HH:MM:SS', a greater-than-or-equal (>=) condition matched only greater-than values in an indexedTIMESTAMPcolumn. (Bug #55779, Bug #50774, Bug #11758558)If a view was named as the destination table for
CREATE TABLE ... SELECT, the server produced a warning whether or notIF NOT EXISTSwas used. Now it produces a warning only whenIF NOT EXISTSis used, and an error otherwise. (Bug #55777)CASEexpressions with a mix of operands in different character sets sometimes returned incorrect results. (Bug #55744)After the fix for Bug #39653, the shortest available secondary index was used for full table scans. The primary clustered key was used only if no secondary index could be used. However, when the chosen secondary index includes all columns of the table being scanned, it is better to use the primary index because the amount of data to scan is the same but the primary index is clustered. This is now taken into account. (Bug #55656)
The server entered an infinite loop with high CPU utilization after an error occurred during flushing of the I/O cache. (Bug #55629)
For the Performance Schema, the default number of rwlock classes was increased to 30, and the default number of rwlock and mutex instances was increased to 1 million. These changes were made to account for the volume of data instrumented when the
InnoDBstorage engine is used (because of theInnoDBbuffer pool). (Bug #55576)If there was an active
SELECTstatement, an error arising during trigger execution could cause a server crash. (Bug #55421)Assignment of
InnoDBscalar subquery results to a variable resulted in unexpectedSlocks inREAD COMMITTEDtransation isolation level. (Bug #55382)In debug builds,
FLUSH TABLEfor atable_listWITH READ LOCKMERGEtable led to an assertion failure if one of the table's children was not present in the list of tables to be flushed. (Bug #55273)The server could crash during shutdown due to a race condition relating to Performance Schema cleanup. (Bug #55105, Bug #56324)
Queries involving predicates of the form
could return incorrect data due to incorrect handling by the range optimizer. (Bug #54802)constNOT BETWEENnot_indexed_columnANDindexed_columnWith an
UPDATE IGNOREstatement including a subquery that was evaluated using a temporary table, an error transferring the data from the temporary was ignored, causing an assertion to be raised. (Bug #54543)A bad
DBUG_PRINTstatement infill_schema_schemata()caused server crashes on Solaris. (Bug #54478)MIN()orMAX()with a subquery argument could raise a debug assertion for debug builds or return incorrect data for nondebug builds. (Bug #54465)If one session attempted to drop a database containing a table which another session had opened with
HANDLER, any instance ofALTER DATABASE,CREATE DATABASE, orDROP DATABASEissued by the latter session produced a deadlock. (Bug #54360)INFORMATION_SCHEMAplugins with nodeinit()method resulted in a memory leak. (Bug #54253)Row subqueries producing no rows were not handled as
UNKNOWNvalues in row-comparison expressions. (Bug #54190)Setting
SETUP_INSTRUMENTS.TIMER = 'NO'causedTIMER_WAITvalues for aggregations to beNULLrather than 0. (Bug #53874)The
max_lengthmetadata value ofMEDIUMBLOBtypes was reported as 1 byte greater than the correct value. (Bug #53296)If an application using the embedded server called
mysql_library_init()a second time after callingmysql_library_init()andmysql_library_end()to start and stop the server, the application crashed when reading option files. (Bug #53251)The fix for Bug #30234 caused the server to reject the
DELETEAccess compatibility syntax for multiple-tabletbl_name.* ...DELETEstatements. (Bug #53034)The
plugin_ftparser.handplugin_audit.hinclude files are part of the public API/ABI, but were not tested by the ABI check. (Bug #52821)An atomic “compare and swap” operation using x86 assembly code (32 bit) could access incorrect data, which would make it work incorrectly and lose the intended atomicity. This in turn caused the MySQL server to work on inconsistent data structures and return incorrect data. That code affected only 32-bit builds; the effect has been observed when icc was used to build binaries. With gcc, no incorrect results have been observed during tests, so this fix is a proactive one. Other compilers do not use this assembly code. (Bug #52419)
In
LOAD DATA INFILE, using aSETclause to set a column equal to itself caused a server crash. (Bug #51850)An assertion could be raised by
DELETEon a view that referenced another view which in turn (directly or indirectly) referenced more than one table. (Bug #51099)In some cases, when the left part of a
NOT INsubquery predicate was a row and containedNULLvalues, the query result was incorrect. (Bug #51070)CHECKSUM TABLEfor Performance Schema tables could cause a server crash due to uninitialized memory reads. (Bug #50557)For some queries, the optimizer produced incorrect results using the Index Merge access method with
InnoDBtables. (Bug #50402)EXPLAINproduced an incorrectrowsvalue for queries evaluated using an index scan and that includedLIMIT,GROUP BY, andORDER BYon a computed column. (Bug #50394)mysql_store_result()andmysql_use_result()are not for use with prepared statements and are not intended to be called followingmysql_stmt_execute(), but failed to return an error when invoked that way. (Bug #47485)Using
REPAIR TABLEon atbl_nameUSE_FRMMERGEtable caused the server to crash. (Bug #46339)If the global and session
debugsystem variables had the same value, the debug trace file could be closed twice, leading to freeing already freed memory and a server crash. (Bug #46165)If
ALTER EVENTfailed to load an event after altering it, an assertion could be raised. This could occur, for example, ifALTER EVENTwas killed withKILL QUERY. (Bug #44171)Trailing space removal for
utf32strings was done with non-multibyte-safe code, leading to incorrect result length and assertion failure. (Bug #42511)A malformed packet sent by the server when the query cache was in use resulted in lost-connection errors. (Bug #42503)
Multiple-statement execution could fail. (Bug #40877)
CREATE TABLEfailed if a column referred to in an index definition and foreign key definition had different lettercases in the two definitions. (Bug #39932)mysqlcheck behaved differently depending on the order in which options were given on the command line. (Bug #35269)
When invoked to display a help message, mysqld also displayed spurious warning or error messages. (Bug #30025)
Functionality Added or Changed
Incompatible Change: The
SHA2()function now returns a character string with the connection character set and collation. Previously, it returned a binary string. This is the same change made for several other encryption functions in MySQL 5.5.3. (Bug #54661)InnoDB Storage Engine: The mechanism that checks if there is enough space for redo logs was improved, reducing the chance of encountering this message:
ERROR: the age of the last checkpoint is. (Bug #39168)x, which exceeds the log group capacityyInnoDB Storage Engine: Improved performance and scalability on Windows systems, especially for Windows Vista and higher. Re-enabled the use of atomic instructions on Windows systems. For Windows Vista and higher, reduced the number of event handles used. To compile on Windows systems now requires Windows SDK v6.0 or later; either upgrade to Visual Studio 2008 or 2010, or for Visual Studio 2005, install Windows SDK Update for Windows Vista. (Bug #22268)
Previously,
MySQL-shared-compatRPMs for Linux contained both the current and previous client library versions for the target platform. Thus, the package contents overlapped withMySQL-sharedRPMs, which contain only the current client library version. This can result in problems in two cases:When the
MySQL-sharedRPM is installed but later it is determined that theMySQL-shared-compatRPM is needed (an application is installed that was linked against an older client library). Installing theMySQL-shared-compatRPM results in a conflict because both include the current library version. This can be overcome by using the--forceoption to RPM, or by first uninstalling theMySQL-sharedRPM (which breaks dependencies).When the
MySQL-shared-compatRPM is installed, but old applications that require it are removed or upgraded to the current library version. In this case,MySQL-shared-compatcannot be replaced withMySQL-sharedas long as current applications are installed. This can be overcome by using the--forceoption to RPM, which incurs the risk of breaking dependencies.
Now the
MySQL-shared-compatRPMs include only older client library versions and no longer include the current version, so that theMySQL-sharedandMySQL-shared-compatRPM contents no longer overlap. TheMySQL-shared-compatRPM can be installed even if theMySQL-sharedRPM is installed, without producing conflicts related to the current library version. TheMySQL-shared-compatRPM can be uninstalled when old applications are removed or upgraded to the current library version, without breaking applications that already use the current library version.If you previously installed the
MySQL-shared-compatRPM because you needed both the current and previous libraries, you should install both theMySQL-sharedandMySQL-shared-compatRPMs now. (Bug #56150)Overhead for the Performance Schema interface was reduced. (Bug #55087)
Within stored programs,
LIMITclauses now permit integer-valued routine parameters or local variables as parameters. (Bug #11918)Code was removed for the following no-longer-supported platforms: NetWare, MS-DOS, VMS, QNX, and 32-bit SPARC.
Bugs Fixed
InnoDB Storage Engine: Security Fix: After changing the values of the
innodb_file_formatorinnodb_file_per_tableconfiguration parameters, DDL statements could cause a server crash. (Bug #55039, CVE-2010-3676)Security Fix: During evaluation of arguments to extreme-value functions such as
LEAST()andGREATEST(), type errors did not propagate properly, causing the server to crash. (Bug #55826, CVE-2010-3833)Security Fix: The server could crash after materializing a derived table that required a temporary table for grouping. (Bug #55568, CVE-2010-3834)
Security Fix: A user-variable assignment expression that is evaluated in a logical expression context can be precalculated in a temporary table for
GROUP BY. However, when the expression value is used after creation of the temporary table, it was re-evaluated, not read from the table, and a server crash resulted. (Bug #55564, CVE-2010-3835)Security Fix: Joins involving a table with a unique
SETcolumn could cause a server crash. (Bug #54575, CVE-2010-3677)Security Fix: Pre-evaluation of
LIKEpredicates during view preparation could cause a server crash. (Bug #54568, Bug #11762026, CVE-2010-3836)Security Fix: Incorrect handling of
NULLarguments could lead to a crash forIN()orCASEoperations whenNULLarguments were either passed explicitly as arguments (forIN()) or implicitly generated by theWITH ROLLUPmodifier (forIN()andCASE). (Bug #54477, CVE-2010-3678)Security Fix:
GROUP_CONCAT()andWITH ROLLUPtogether could cause a server crash. (Bug #54476, CVE-2010-3837)Security Fix: Queries could cause a server crash if the
GREATEST()orLEAST()function had a mixed list of numeric andLONGBLOBarguments, and the result of such a function was processed using an intermediate temporary table. (Bug #54461, CVE-2010-3838)Security Fix: A malformed argument to the
BINLOGstatement could result in Valgrind warnings or a server crash. (Bug #54393, CVE-2010-3679)Security Fix: After
ALTER TABLEwas used on a temporary transactional table locked byLOCK TABLES, any later attempts to executeLOCK TABLESorUNLOCK TABLEScaused a server crash. (Bug #54117)Security Fix: Use of
TEMPORARYInnoDBtables with nullable columns could cause a server crash. (Bug #54044, CVE-2010-3680)Security Fix: Queries with nested joins could cause an infinite loop in the server when used from stored procedures and prepared statements. (Bug #53544, CVE-2010-3839)
Security Fix: Using
EXPLAINwith queries of the formSELECT ... UNION ... ORDER BY (SELECT ... WHERE ...)could cause a server crash. (Bug #52711, CVE-2010-3682)Security Fix: Bug #49124 was fixed.
Security Fix: Bug #49124 and Bug #11757121 were fixed.
Performance: InnoDB Storage Engine: The setting
innodb_change_buffering=allcould produce slower performance for some operations than the previous default,innodb_change_buffering=inserts. (Bug #54914)Performance: InnoDB Storage Engine: An
EXPLAINplan for anInnoDBtable could vary greatly in the estimated cost for aBETWEENclause. (Bug #53761)Incompatible Change: Replication: As of MySQL 5.5.6, handling of
CREATE TABLE IF NOT EXISTS ... SELECTstatements has been changed for the case that the destination table already exists:Previously, for
CREATE TABLE IF NOT EXISTS ... SELECT, MySQL produced a warning that the table exists, but inserted the rows and wrote the statement to the binary log anyway. By contrast,CREATE TABLE ... SELECT(withoutIF NOT EXISTS) failed with an error, but MySQL inserted no rows and did not write the statement to the binary log.MySQL now handles both statements the same way when the destination table exists, in that neither statement inserts rows or is written to the binary log. The difference between them is that MySQL produces a warning when
IF NOT EXISTSis present and an error when it is not.
This change in handling of
IF NOT EXISTSresults in an incompatibility for statement-based replication from a MySQL 5.1 master with the original behavior and a MySQL 5.5 slave with the new behavior. Suppose thatCREATE TABLE IF NOT EXISTS ... SELECTis executed on the master and the destination table exists. The result is that rows are inserted on the master but not on the slave. (Row-based replication does not have this problem.)To address this issue, statement-based binary logging for
CREATE TABLE IF NOT EXISTS ... SELECTis changed in MySQL 5.1 as of 5.1.51:If the destination table does not exist, there is no change: The statement is logged as is.
If the destination table does exist, the statement is logged as the equivalent pair of
CREATE TABLE IF NOT EXISTSandINSERT ... SELECTstatements. (If theSELECTin the original statement is preceded byIGNOREorREPLACE, theINSERTbecomesINSERT IGNOREorREPLACE, respectively.)
This change provides forward compatibility for statement-based replication from MySQL 5.1 to 5.5 because when the destination table exists, the rows will be inserted on both the master and slave. To take advantage of this compatibility measure, the 5.1 server must be at least 5.1.51 and the 5.5 server must be at least 5.5.6.
To upgrade an existing 5.1-to-5.5 replication scenario, upgrade the master first to 5.1.51 or higher. Note that this differs from the usual replication upgrade advice of upgrading the slave first.
A workaround for applications that wish to achieve the original effect (rows inserted regardless of whether the destination table exists) is to use
CREATE TABLE IF NOT EXISTSandINSERT ... SELECTstatements rather thanCREATE TABLE IF NOT EXISTS ... SELECTstatements.Along with the change just described, the following related change was made: Previously, if an existing view was named as the destination table for
CREATE TABLE IF NOT EXISTS ... SELECT, rows were inserted into the underlying base table and the statement was written to the binary log. As of MySQL 5.1.51 and 5.5.6, nothing is inserted or logged. (Bug #47442, Bug #47132, Bug #48814, Bug #49494)Incompatible Change: Several changes were made to Performance Schema tables:
The
SETUP_OBJECTStable was removed.The
PROCESSLISTtable was renamed toTHREADS.The
EVENTS_WAITS_SUMMARY_BY_EVENT_NAMEtable was renamed toEVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME.
(Bug #55416)
Incompatible Change: Handling of warnings and errors during stored program execution was problematic:
If one statement generated several warnings or errors, only the handler for the first was activated, even if another might be more appropriate. Now the server chooses the more appropriate handler.
Warning or error information could be lost.
(Bug #36185, Bug #5889, Bug #9857, Bug #23032)
Incompatible Change: If the server was started with
character_set_serverset toutf16, it crashed during full-text stopword initialization. Now the stopword file is loaded and searched usinglatin1ifcharacter_set_serverisucs2,utf16, orutf32.If any table was created with
FULLTEXTindexes while the server character set wasucs2,utf16, orutf32, it should be repaired using this statement:REPAIR TABLE
tbl_nameQUICK;(Bug #32391)
Important Change: Replication: The
LOAD DATA INFILEstatement is now considered unsafe for statement-based replication. When using statement-based logging mode, the statement now produces a warning; when using mixed-format logging, the statement is made using the row-based format. (Bug #34283)InnoDB Storage Engine: An assertion was raised if (1) an
InnoDBtable was created usingCREATE TABLE ... SELECTwhere the query used anINFORMATION_SCHEMAtable and a view existed in the database; or (2) any statement that modified anInnoDBtable had a subquery referencing anINFORMATION_SCHEMAtable. (Bug #55973)InnoDB Storage Engine: The
InnoDBstorage engine was not included in the default installation when using the configure script. (Bug #55547)InnoDB Storage Engine: For an
InnoDBtable with an auto-increment column, the server could crash if the first statement that references the table after a server restart is aSHOW CREATE TABLEstatement. (Bug #55277)InnoDB Storage Engine: The mysql_config tool did not output the requirement for the
aiolibrary formysqld-libs. (Bug #55215)InnoDB Storage Engine: Some memory used for
InnoDBasynchronous I/O was not freed at shutdown. (Bug #54764)InnoDB Storage Engine: Implementation of the 64-bit
dulintstructure inInnoDBwas not optimized for 64-bit processors, resulting in excessive storage and reduced performance. (Bug #54728)InnoDB Storage Engine: The output from the
SHOW ENGINE INNODB STATUScommand now includes information about “spin rounds” for RW-locks (both shared and exclusive locks). (Bug #54726)InnoDB Storage Engine: An
ALTER TABLEstatement could convert anInnoDBcompressed table (withrow_format=compressed) back to an uncompressed table (withrow_format=compact). (Bug #54679)InnoDB Storage Engine:
InnoDBcould issue an incorrect message on startup, if tables were created under the settinginnodb_file_per_table=ON. The message was of the formInnoDB: Warning: allocated tablespace. If you encounter this message after upgrading, create ann, old maximum was 0InnoDBtable withinnodb_file_per_table = ONand restart the server. The message should not be displayed any more. If you continue to encounter this message, or if you get it and haven't used a version without this fix, you might have corruption in your shared tablespace. If so, back up and reload your data. (Bug #54658)InnoDB Storage Engine: For debug builds, the database server could crash when renaming a table that had active transactions. (Bug #54453)
InnoDB Storage Engine: The server could crash during the recovery phase of startup, if it previously crashed while inserting
BLOBor other large columns that use off-page storage into anInnoDBtable created withROW_FORMAT=REDUNDANTorROW_FORMAT=COMPACT. (Bug #54408)InnoDB Storage Engine: For an
InnoDBtable created withROW_FORMAT=COMPRESSEDorROW_FORMAT=DYNAMIC, a query using theREAD UNCOMMITTEDisolation level could cause the server to stop with an assertion error, ifBLOBor other large columns that use off-page storage were being inserted at the same time. (Bug #54358)InnoDB Storage Engine: Fast index creation in the
InnoDB Plugincould fail, leaving the new secondary index corrupted. (Bug #54330)InnoDB Storage Engine: If a session executing
TRUNCATE TABLEon anInnoDBtable was killed duringopen_tables(), an assertion could be raised. (Bug #53757)InnoDB Storage Engine: The
Lock_timefield in the slow query log now reports a larger value, including the time forInnoDBlock waits at the statement level. (Bug #53496)InnoDB Storage Engine: Misimplementation of the
os_fast_mutex_trylock()function inInnoDBresulted in unnecessary blocking and reduced performance. (Bug #53204)InnoDB Storage Engine:
InnoDBcould not create tables that used theutf32character set. (Bug #52199)InnoDB Storage Engine: Performing large numbers of
RENAME TABLEstatements caused excessive memory use. (Bug #47991)Partitioning: With
innodb_thread_concurrency = 1,ALTER TABLE ... REORGANIZE PARTITIONandSELECTcould deadlock. There were unreleased latches in theALTER TABLE ... REORGANIZE PARTITIONthread which were needed by theSELECTthread to be able to continue. (Bug #54747)Partitioning: An
ALTER TABLE ... ADD PARTITIONstatement run concurrently with a read lock caused spuriousER_TABLE_EXISTS_ERRORandER_NO_SUCH_TABLEerrors on subsequent attempts. (Bug #53676)References: See also Bug #53770.
Partitioning:
UPDATEandINSERTstatements affecting partitioned tables performed poorly when using row-based replication. (Bug #52517)References: This bug is a regression of Bug #39084.
Partitioning:
INSERT ON DUPLICATE KEY UPDATEstatements performed poorly on tables having many partitions. The handler function for reading a row from a specific index was not optimized in the partitioning handler. (Bug #52455)Partitioning:
ALTER TABLE ... TRUNCATE PARTITION, when called concurrently with transactional DML on the table, was executed immediately and did not wait for the concurrent transaction to release locks. As a result, theALTER TABLEstatement was written into the binary log before the DML statement, which led to replication failures when using row-based logging. (Bug #49907)References: See also Bug #42643.
Partitioning: When the storage engine used to create a partitioned table was disabled, attempting to drop the table caused the server to crash. (Bug #46086)
Replication: When using the row-based logging format, a failed
CREATE TABLE ... SELECTstatement was written to the binary log, causing replication to break if the failed statement was later re-run on the master. In such cases, aDROP TABLE ... IF EXISTstatement is now logged in the event that aCREATE TABLE ... SELECTfails. (Bug #55625)Replication: When using the row-based logging format, a
SET PASSWORDstatement was written to the binary log twice. (Bug #55452)Replication: When closing temporary tables, after the session connection was already closed, if the writing of the implicit
DROP TABLEstatement into the binary log failed, it was possible for the resulting error to be mishandled, triggering an assertion. (Bug #55387)Replication: Executing
SHOW BINLOG EVENTSincreased the value ofmax_allowed_packetapplying to the session that executed the statement. (Bug #55322)Replication: Setting
binlog_formattoROW, then creating and dropping a temporary table led to an assertion. (Bug #54925)Replication: When using mixed-format replication, changes made to a nontransactional temporary table within a transaction were not written into the binary log when the transaction was rolled back. This could lead to a failure in replication if the temporary table was used again afterwards. (Bug #54872)
References: See also Bug #53259.
Replication: If
binlog_formatwas explicitly switched fromSTATEMENTtoROWfollowing the creation of a temporary table, then on disconnection the master failed to write the expectedDROP TEMPORARY TABLEstatement into the binary log. As a consequence, temporary tables (and their corresponding files) accumulated as this scenario was repeated. (Bug #54842)References: See also Bug #52616.
Replication: If the SQL thread was started while the I/O thread was performing rotation of the relay log, the two threads could begin to race for the same I/O cache, leading to a server crash. (Bug #54509)
References: See also Bug #50364.
Replication: Two related issues involving temporary tables and transactions were introduced by a fix made in MySQL 5.1.37:
When a temporary table was created or dropped within a transaction, any failed statement that following the
CREATE TEMPORARY TABLEorDROP TEMPORARY TABLEstatement triggered a rollback, which caused the slave to diverge from the master.When a
CREATE TEMPORARY TABLE ... SELECT * FROM ...statement was executed within a transaction in which only tables using transactional storage engines were used and the transaction was rolled back at the end, the changes—including the creation of the temporary table—were not written to the binary log.
The current fix restores the correct behavior in both of these cases. (Bug #53560)
References: This bug was introduced by Bug #43929.
Replication: The value of
binlog_direct_non_transactional_updateshad no effect on statements mixing transactional tables and nontransactional tables, or mixing temporary tables and nontransactional tables.As part of the fix for this issue, updates to temporary tables are now handled as transactional or nontransactional according to their storage engine types. (In effect, the current fix reverts a change made previously as part of the fix for Bug #53259.)
In addition, unsafe mixed statements (that is, statements which access transactional table as well nontransactional or temporary tables, and write to any of them) are now handled as transactional when the statement-based logging format is in use. (Bug #53452)
References: See also Bug #51894.
Replication: A number of statements generated unnecessary warnings as potentially unsafe statements. (Due to the fix for Bug #51894, a temporary table is treated in this context as a transactional table, so that any mixed statement such as
t_innodb+t_myisamort_temp+t_myisamis flagged as unsafe.)To reduce the number of spurious warnings produced when this happened, some of the criteria used to classify a statements as safe or unsafe have been changed. For more information about handling of mixed statements, see Transactional, nontransactional, and mixed statements. (Bug #53259)
References: See also Bug #53452, Bug #54872.
Replication: When
binlog_format=STATEMENT, any statement that is flagged as being unsafe, possibly causing the slave to go out of sync, generates a warning. This warning is written to the server log, the warning count is returned to the client in the server's response, and the warnings are accessible throughSHOW WARNINGS.The current bug affects only the counts for warnings to the client and that are visible through
SHOW WARNINGS; it does not affect which warnings are written to the log. The current issue came about because the fix for an earlier issue caused warnings for substatements to be cleared whenever a new substatement was started. However, this suppressed warnings for unsafe statements in some cases. Now, such warnings are no longer cleared. (Bug #50312)References: This bug was introduced by Bug #36649.
Replication: Replication could break if a transaction involving both transactional and nontransactional tables was rolled back to a savepoint. It broke if a concurrent connection tried to drop a transactional table which was locked after the savepoint was set. This
DROP TABLEcompleted whenROLLBACK TO SAVEPOINTwas executed because the lock on the table was dropped by the transaction. When the slave later tried to apply the binary log events, it failed because the table had already been dropped. (Bug #50124)Replication: When
CURRENT_USER()orCURRENT_USERwas used to supply the name and host of the affected user or of the definer in any of the statementsDROP USER,RENAME USER,GRANT,REVOKE, andALTER EVENT, the reference toCURRENT_USER()orCURRENT_USERwas not expanded when written to the binary log. This resulted inCURRENT_USER()orCURRENT_USERbeing expanded to the user and host of the slave SQL thread on the slave, thus breaking replication. NowCURRENT_USER()andCURRENT_USERare expanded prior to being written to the binary log in such cases, so that the correct user and host are referenced on both the master and the slave. (Bug #48321)After an RPM installation, mysqld would be started with the
rootuser, rather than themysqluser. (Bug #56574)The embedded server raised an assertion when it attempted to load plugins. (Bug #56085)
FORMAT()did not respect the decimal point character if the locale was changed and always returned an ASCII value. (Bug #55912)CMake produced bad dependencies for the
sql/lex_hash.hfile during configuration. (Bug #55842)mysql_upgrade did not handle the
--ssloption properly. (Bug #55672)Using
MIN()orMAX()on a column containing the maximumTIMEvalue caused a server crash. (Bug #55648)Incorrect handling of user variable assignments as subexpressions could lead to incorrect results or server crashes. (Bug #55615)
The default compiler options for Mac OS X 10.5 were set incorrectly. (Bug #55601)
The server was not checking for errors generated during the execution of
Item::val_xxx()methods when copying data to a group, order, or distinct temp table's row. (Bug #55580)ORDER BYclauses that included user-variable expressions could raise a debug assertion. (Bug #55565)SHOW CREATE TRIGGERtook a stronger metadata lock than required. This caused the statement to be blocked unnecessarily. For example,LOCK TABLES ... WRITEin one session blockedSHOW CREATE TRIGGERin another session.Also, a
SHOW CREATE TRIGGERstatement issued inside a transaction did not release its metadata locks at the end of statement execution. Consequently,SHOW CREATE TRIGGERwas able to block other sessions from accessing the table (for example, usingALTER TABLE). (Bug #55498)A single-table
DELETEordered by a column that had a hash-type index could raise an assertion or cause a server crash. (Bug #55472)A call to
mysql_library_init()following a call tomysql_library_end()caused a client crash. (Bug #55345)The
-features=no%exceptoption was missing from the build for Solaris/x86. (Bug #55250)A statement that was aborted by
KILL QUERYwhile it waited on a metadata lock could raise an assertion in debug builds, or send OK to the client instead ofER_QUERY_INTERRUPTEDin regular builds. (Bug #55223)GROUP BYoperations usedmax_sort_lengthinconsistently. (Bug #55188)The Windows MSI installer failed during installation to preserve custom settings, such as the configured data directory. (Bug #55169)
InnoDBproduced no warning at startup about illegalinnodb_file_format_checkvalues. (Bug #55095)IF()with a subquery argument could raise a debug assertion for debug builds under some circumstances. (Bug #55077)Building MySQL on Solaris 8 x86 failed when using Sun Studio due to gcc inline assembly code. (Bug #55061)
When upgrading an existing install with an RPM on Linux, the MySQL server might not have been restarted properly. This was due to a naming conflict when upgrading from a
communitynamed RPM. Previous installations are now correctly removed, the MySQL initialization script is recreated, and the MySQL server is restarted as normal. (Bug #55015)The
thread_concurrencysystem variable was unavailable on non-Solaris systems. (Bug #55001)mysqld_safe contained a syntax error that prevented it from restarting the server. (Bug #54991)
If audit plugins were installed that were interested in
MYSQL_AUDIT_GENERAL_CLASSevents and the general query log was disabled, failedINSTALL PLUGINorUNINSTALL PLUGINstatements caused a server crash. (Bug #54989)Some functions did not calculate their
max_lengthmetadata value correctly. (Bug #54916)A
SHOW CREATE TABLEstatement issued inside a transaction did not release its metadata locks at the end of statement execution. Consequently,SHOW CREATE TABLEwas able to block other sessions from accessing the table (for example, usingALTER TABLE). (Bug #54905)INFORMATION_SCHEMA.ENGINESandSHOW ENGINESdescribedMyISAMas the default storage engine, but this is not true as of MySQL 5.5.5. (Bug #54832)The
MERGEstorage engine tried to use memory mapping on the underlyingMyISAMtables even on platforms that do not support it and even whenmyisam_use_mmapwas disabled. This led to a hang forINSERT INTO ... SELECT FROMstatements that selected from aMyISAMtable into aMERGEtable that contained the sameMyISAMtable. (Bug #54811, Bug #50788)Incorrect error handling could result in an
OPTIMIZE TABLEcrash. (Bug #54783)Performance Schema event collection for a thread could “leak” from one connection to another if the thread was used for one connection, then cached, then reused for another connection. (Bug #54782)
In debug builds, an assertion could be raised when the server tried to send an OK packet to the client after having failed to detect errors during processing of the
WHEREcondition of anUPDATEstatement. (Bug #54734)In a slave SQL thread or Event Scheduler thread, the
SLEEP()function could not sleep more than five seconds. (Bug #54729)SET sql_select_limit = 0did not work. (Bug #54682)Assignments of the
PASSWORD()orOLD_PASSWORD()function to a user variable did not preserve the character set of the function return value. (Bug #54668)A signal-handler redefinition for
SIGUSR1was removed. The redefinition could cause the server to encounter a kernel deadlock on Solaris when there are many active threads. Other POSIX platforms might also be affected. (Bug #54667)Queries that named view columns in a
GROUP BYclause could cause a server crash. (Bug #54515)The Performance Schema displayed spurious startup error messages when the server was run in bootstrap mode. (Bug #54467)
For distributions built with CMake rather than the GNU autotools, mysql lacked
pagersupport, and some scripts were built without the execute bit set. (Bug #54466, Bug #54129)The server failed to disregard sort order for some zero-length tuples, leading to an assertion failure. (Bug #54459)
A join with an aggregated function and impossible
WHEREcondition returned an extra row. (Bug #54416)Ошибки during processing of
WHEREconditions inHANDLER ... READstatements were not detected, so the handler code still tried to send EOF to the client, raising an assertion. (Bug #54401)If a session tried to drop a database containing a table opened with
HANDLERin another session, anyDATABASEstatement (CREATE,DROP,ALTER) executed by that session produced a deadlock. (Bug #54360)Deadlocks involving
INSERT DELAYEDstatements were not detected. The server could crash if the delayed handler thread was killed due to a conflicting shared metadata lock. (Bug #54332)After
ALTER TABLEwas used on a temporary transactional table locked byLOCK TABLES, any later attempts to executeLOCK TABLESorUNLOCK TABLEScaused a server crash. (Bug #54117)INSERT IGNORE INTO ... SELECTstatements could raise a debug assertion. (Bug #54106)SHOW CREATE EVENTreleased all metadata locks held by the current transaction. This invalidated any existing savepoints and raised an assertion ifROLLBACK TO SAVEPOINTwas executed. (Bug #54105)A client could supply data in chunks to a prepared statement parameter other than of type
TEXTorBLOBusing themysql_stmt_send_long_data()C API function (orCOM_STMT_SEND_LONG_DATAcommand). This led to a crash because other data types are not valid for long data. (Bug #54041)mysql_secure_installation did not properly identify local accounts and could incorrectly remove nonlocal
rootaccounts. (Bug #54004)A client with automatic reconnection enabled saw the error message
Lost connection to MySQL server during queryif the connection was lost between themysql_stmt_prepare()andmysql_stmt_execute()C API functions. However,mysql_stmt_errno()returned 0, not the corresponding error number 2013. (Bug #53899)INFORMATION_SCHEMA.COLUMNSreported incorrect precision forBIGINT UNSIGNEDcolumns. (Bug #53814)The patch for Bug #36569 caused performance regressions and incorrect execution of some
UPDATEstatements. (Bug #53737, Bug #53742)Missing Performance Schema tables were not reported in the error log at server startup. (Bug #53617)
mysql_upgrade could incorrectly remove
TRIGGERprivileges. (Bug #53613)SHOW ENGINE PERFORMANCE_SCHEMA STATUSunderreported the amount of memory allocated by the Performance Schema. (Bug #53566)Portability problems in
SHOW STATUScould lead to incorrect results on some platforms. (Bug #53493)Builds of MySQL generated a large number of warnings. (Bug #53445)
Performance Schema header files were not installed in the correct directory. (Bug #53255)
The server could crash when processing subqueries with empty results. (Bug #53236)
With
lower_case_table_namesset to a nonzero value, searches for table or database names inINFORMATION_SCHEMAtables could produce incorrect results. (Bug #53095)Use of
uintintypelib.hcaused compilation problems in Windows. This was changed tounsigned int. (Bug #52959)The
mysql-debug.pdbsupplied with releases did not match the corresponding mysqld.exe. (Bug #52850)The
PERFORMANCE_SCHEMAdatabase was not correctly created and populated on Windows. (Bug #52809)The
large_pagessystem variable was tied to the--large-filescommand-line option, not the--large-pagesoption. (Bug #52716)Attempts to access a nonexistent Performance Schema table resulted in a misleading error message. (Bug #52586)
The ABI check for MySQL failed to compile with gcc 4.5. (Bug #52514)
The Performance Schema could enter an infinite loop if required to create a large number of mutex instances. (Bug #52502)
mysql_secure_installation sometimes failed to locate the mysql client. (Bug #52274)
Some queries involving
GROUP BYand a function that returnedDATEraised a debug assertion. (Bug #52159)If a symbolic link was used in a file path name, the Performance Schema did not resolve all file I/O events to the same name. (Bug #52134)
PARTITION BY KEYon autf32ENUMcolumn raised a debugging assertion. (Bug #52121)A pending
FLUSH TABLESstatement unnecessarily aborted transactions. (Bug #52117)tbl_listWITH READ LOCKFLUSH TABLES WITH READ LOCKin one session andFLUSH TABLESin another session were mutually exclusive.tbl_listWITH READ LOCKThis bug fix involved several changes to the states displayed by
SHOW PROCESSLIST:Table lockwas replaced withWaiting for table level lock.Waiting for tablewas replaced withWaiting for table flush.These states are new:
Waiting for global metadata lock,Waiting for schema metadata lock,Waiting for stored function metadata lock,Waiting for stored procedure metadata lock,Waiting for table metadata lock.
(Bug #52044)
Reading a
ucs2data file withLOAD DATA INFILEwas subject to three problems. 1) Incorrect parsing of the file asucs2data, resulting in incorrect length of the parsed string. This is fixed by truncating the invalid trailing bytes (incomplete multibyte characters) when reading from the file. 2) Reads from a properucs2file did not recognize newline characters. This is fixed by first checking whether a byte is a newline (or any other special character) before reading it as a part of a multibyte character. 3) When using user variables to hold column data, the character set of the user variable was set incorrectly to the database charset. This is fixed by setting it to the character set specified in theLOAD DATA INFILEstatement, if any. (Bug #51876)XA STARThad a race condition that could cause a server crash. (Bug #51855)The results of some
ORDER BY ... DESCqueries were sorted incorrectly. (Bug #51431)Index Mergebetween three indexes could return incorrect results. (Bug #50389)MIN()andMAX()returned incorrect results forDATEcolumns if the set of values included'0000-00-00'. (Bug #49771)Searches in
INFORMATION_SCHEMAtables for rows matching a nonexistent database produced an error instead of an empty query result. (Bug #49542)DROP DATABASEfailed if there was aTEMPORARYtable with the same name as a non-TEMPORARYtable in the database. (Bug #48067)An assertion occurred in
ha_myisammrg.ccline 1137:DBUG_ASSERT(this->file->children_attached);
The problem was found while running RQG tests and the assertion occurred during
REPAIR,OPTIMIZE, andANALYZEoperations. (Bug #47633)The optimization method of the
ARCHIVEstorage engine did not preserve the.frmfile embedded in the.ARZfile when rewriting the.ARZfile for optimization. This meant anARCHIVEtable that had been optimized could not be discovered.The
ARCHIVEengine stores the.frmfile in the.ARZfile so it can be transferred from machine to machine without also needing to copy the.frmfile. The engine subsequently restores the embedded.frmduring discovery. (Bug #45377)With
character_set_connectionset toutf16orutf32,CREATE TABLE t1 AS SELECT HEX() ...caused a server crash. (Bug #45263)The
my_like_range_functions returned badly formed maximum strings for Asian character sets, which caused problems for storage engines. (Bug #45012)xxx()A debugging assertion could be raised after a write failure to a closed socket. (Bug #42496)
Enumeration plugin variables were subject to a type-casting error, causing inconsistent results between different platforms. (Bug #42144)
Sort-
index_mergefor join tables other than the first table used excessive memory. (Bug #41660)DROP TABLEheld a lock duringunlink()file system operations, causing performance problems ifunlink()took a long time. (Bug #41158)Rows inserted in a table by one session were not immediately visible to another session that queried the table, even if the insert had committed. (Bug #37521)
Statements of the form
UPDATE ... WHERE ... ORDER BYused afilesorteven when not required. (Bug #36569)References: See also Bug #53737, Bug #53742.
Reading from a temporary
MERGEtable, with two nontemporary childMyISAMtables, resulted in the error:ERROR 1168 (HY000): Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
(Bug #36171)
safemallocwas excessively slow under certain conditions and has been removed. The--skip-safemallocserver option has also been removed, and the--with-debug=fullconfiguration option is no different from--with-debug. (Bug #34043)Threads that were calculating the estimated number of records for a range scan did not respond to the
KILLstatement. That is, if arangejoin type is possible (even if not selected by the optimizer as a join type of choice and thus not shown byEXPLAIN), the query in thestatisticsstate (shown by theSHOW PROCESSLIST) did not respond to theKILLstatement. (Bug #25421)Problems in the atomic operations implementation could lead to server crashes. (Bug #22320, Bug #52261)
icc Notes
This is the final release of MySQL 5.5 for which Generic Linux MySQL binary packages built with the icc compiler on x86 and x86_64 will be offered. These were previously produced as an alternative to our main packages built using gcc, as they provided noticeable performance benefits. In recent times the performance differences have diminished and build and runtime problems have surfaced, thus it is no longer viable to continue producing them.
We continue to use the icc compiler to produce our distribution-specific RPM packages on ia64.
InnoDB Notes
InnoDBhas been upgraded to version 1.1.1. This version is considered of “early adopter” quality.InnoDBis now the default storage engine, rather thanMyISAM, in the regular and enterprise versions of MySQL. This change has the following consequences:Existing tables are not affected by this change, only new tables that are created.
Some of the
InnoDBoption settings also change, so that the default configuration represents the best practices forInnoDBfunctionality, reliability, and file management:innodb_file_format=Barracudarather thanAntelope,innodb_strict_mode=ONrather thanOFF, andinnodb_file_per_table=ONrather thanOFF.The system tables remain in
MyISAMformat.MyISAMremains the default storage engine for the embedded version of MySQL.
Follow these steps to ensure a smooth transition when upgrading:
Familiarize yourself with the new default setting for the
InnoDBfile-per-table option, which creates a separate.ibdfile for each user table. Adapt any backup procedure to include these files. For details, see Section 13.3.3, “Using Per-Table Tablespaces”.Test the installation and operation for any applications that you run on the database server, to determine if they use any features specific to
MyISAMthat cause problems during installation (when the tables are created) or at runtime (whenMyISAM-specific features might fail, or reliance onMyISAMsettings for performance might become apparent). TheInnoDB“strict” mode might also alert you to problems while setting up tables for an application.As a preliminary test for individual tables rather than an entire application, you can use the statement
ALTER TABLEto convert an existing table to use thetable_nameENGINE=INNODB;InnoDBstorage engine, and then run compatibility and performance tests.Where necessary, add
ENGINE=MYISAMclauses toCREATE TABLEstatements, for tables that require features specific toMyISAM, such as full-text search.Benchmark the most important queries, to check whether you need to make changes to the table indexes.
Measure the performance of applications under typical load, to check whether you need to change any additional
InnoDBconfiguration settings.As a last resort, if a database server is devoted entirely to applications that can only run with
MyISAMtables, you could add adefault-storage-engineline in the configuration file, or a--default-storage-engineoption in the database server startup command, to re-enableMyISAMas the default storage engine for that server. For details about setting the default storage engine, see Section 13.1, “Setting the Storage Engine”.
Functionality Added or Changed
Incompatible Change: All numeric operators and functions on integer, floating-point and
DECIMALvalues now throw an “out of range” error (ER_DATA_OUT_OF_RANGE) rather than returning an incorrect value orNULL, when the result is out of the supported range for the corresponding data type. See Section 10.2.6, “Out-of-Range and Overflow Handling”. (Bug #8433)InnoDB Storage Engine: The
INFORMATION_SCHEMA.INNODB_TRXtable now includes a number of fields that duplicate information from theSHOW ENGINE INNODB STATUSoutput. You no longer need to parse that output to get complete transaction information. (Bug #53336)InnoDB Storage Engine:
InnoDBstores redo log records in a hash table during recovery. On 64-bit systems, this hash table was 1/8 of the buffer pool size. To reduce memory usage, the dimension of the hash table was reduced to 1/64 of the buffer pool size (or 1/128 on 32-bit systems). (Bug #53122)Previously, the
innodb_file_format_checksystem variable served a dual purpose. Setting it at server startup would keepInnoDBfrom starting if any tables used a more recent file format than supported by the current level ofInnoDB. IfInnoDBcould start, the same system variable was set to the “highest” file format value used by anyInnoDBtable in the database. Thus, its value could change from the value you specified.Now, checking and recording the file format tag are handled using separate variables.
innodb_file_format_checkcan be set to 1 or 0 at server startup to enable or disable whetherInnoDBchecks the file format tag in the system tablespace. If the tag is checked and is higher than that supported by the current version ofInnoDB, an error occurs andInnoDBdoes not start. If the tag is not higher,InnoDBsets the value ofinnodb_file_format_maxto the file format tag.For background information about
InnoDBfile-format management, see Section 13.4.4, “InnoDB File-Format Management”. (Bug #49792, Bug #53654)The
Rows_examinedvalue in slow query log rows now is nonzero forUPDATEandDELETEstatements that modify rows. (Bug #49756)For events of
MYSQL_AUDIT_GENERAL_CLASS, the event subclass was not passed to audit plugins even though the server passed the subclass to the plugin handler. The subclass is now available through the following changes:The
struct mysql_event_generalstructure has a newevent_subclassmember.The new member changes the interface, so the audit plugin interface version,
MYSQL_AUDIT_INTERFACE_VERSION, has been incremented from0x0100to0x0200. Plugins that require access to the new member must be recompiled to use version0x0200or higher.
The
NULL_AUDITexample plugin in theplugin/audit_nulldirectory has been modified to count events of each subclass, based on theevent_subclassvalue. See Section 22.2.4.8, “Writing Audit Plugins”. (Bug #47059)The deprecated mysql_fix_privilege_tables script has been removed. (Bug #42589)
A new system variable,
skip_name_resolve, is set from the value of the--skip-name-resolveserver option. This provides a way to determine at runtime whether the server uses name resolution for client connections. (Bug #37168)Added the
SHA2()function, which calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512). (Contributed by Bill Karwin) (Bug #13174)Windows MSI package installers create and set up the data directory that the installed server will use, but now also create a pristine “template” data directory named
dataunder the installation directory. This directory can be useful when the machine will be used to run multiple instances of MySQL: After an installation has been performed using an MSI package, the template data directory can be copied to set up additional MySQL instances. See Section 5.6, “Running Multiple MySQL Instances on One Machine”.It is now possible to build MySQL on all platforms using CMake instead of the GNU autotools. (Prior to MySQL 5.5.5, CMake support was limited to Windows.) For instructions on using CMake to build MySQL, see Section 2.9, “Installing MySQL from Source”.
Bugs Fixed
Security Fix: The server could crash if there were alternate reads from two indexes on a table using the
HANDLERinterface. (Bug #54007, CVE-2010-3681)Security Fix: Bug #53933 was fixed.
Security Fix: Bug #53907 was fixed.
Security Fix: The server failed to check the table name argument of a
COM_FIELD_LISTcommand packet for validity and compliance to acceptable table name standards. This could be exploited to bypass almost all forms of checks for privileges and table-level grants by providing a specially crafted table name argument toCOM_FIELD_LIST.In MySQL 5.0 and above, this permitted an authenticated user with
SELECTprivileges on one table to obtain the field definitions of any table in all other databases and potentially of other MySQL instances accessible from the server's file system.Additionally, for MySQL version 5.1 and above, an authenticated user with
DELETEorSELECTprivileges on one table could delete or read content from any other table in all databases on this server, and potentially of other MySQL instances accessible from the server's file system. (Bug #53371, CVE-2010-1848)Security Fix: The server was susceptible to a buffer-overflow attack due to a failure to perform bounds checking on the table name argument of a
COM_FIELD_LISTcommand packet. By sending long data for the table name, a buffer is overflown, which could be exploited by an authenticated user to inject malicious code. (Bug #53237, CVE-2010-1850)Security Fix:
LOAD DATA INFILEdid not check for SQL errors and sent an OK packet even when errors were already reported. Also, an assert related to client/server protocol checking in debug servers sometimes was raised when it should not have been. (Bug #52512, CVE-2010-3683)Security Fix: Bug #52357 was fixed.
Security Fix: Bug #52315 was fixed.
Security Fix: Privilege checking for
UNINSTALL PLUGINwas incorrect. (Bug #51770, CVE-2010-1621)Security Fix: The server could be tricked into reading packets indefinitely if it received a packet larger than the maximum size of one packet. (Bug #50974, CVE-2010-1849)
Security Fix: Bug #48157 was fixed.
Performance: InnoDB Storage Engine: Deadlock detection could be a bottleneck in
InnoDBprocessing, if many transactions attempted to update the same row simultaneously. The algorithm has been improved to enhance performance and scalability, in the InnoDB Plugin for MySQL 5.1, and in InnoDB 1.1 for MySQL 5.5. (Bug #49047)Performance: While looking for the shortest index for a covering index scan, the optimizer did not consider the full row length for a clustered primary key, as in
InnoDB. Secondary covering indexes are now preferred, making full table scans less likely. (Bug #39653)References: See also Bug #55656.
Incompatible Change:
TRUNCATE TABLEdid not take an exclusive lock on a table if truncation was done by deleting all rows in the table. ForInnoDBtables, this could break proper isolation becauseInnoDBended up aborting some granted locks when truncating a table. Now an exclusive metadata lock is taken beforeTRUNCATE TABLEcan proceed. This guarantees that no other transaction is using the table.Incompatible change: Truncation using delete no longer fails if
sql_safe_updatesis enabled (this was an undocumented side effect). (Bug #42643)Incompatible Change: After
SET TRANSACTION ISOLATION LEVELto set the isolation level for the next transaction, the session value of thetx_isolationsystem variable could appear to change to the transaction isolation level after completion of statements within the transaction. Now the current transaction isolation level is now established at transaction start. If there was aSET TRANSACTION ISOLATION LEVEL statement, the value is taken from it. Otherwise, the sessiontx_isolationvalue is used. A change in the session value while a transaction is active is still permitted, but no longer affects the current transaction isolation level. This is an incompatible change. A change in the session isolation level made while there is no active transaction overrides aSET TRANSACTION ISOLATION LEVELstatement, if there was any. (Bug #20837)Important Change: Replication: It was possible to set
sql_log_binwith session scope inside a transaction or subquery. (Bug #53437)Important Change: Replication: When changing
binlog_formatorbinlog_direct_non_transactional_updates, permissions were not checked prior to checking the scope and context of the variable being changed.As a result of this fix, an error is no longer reported when—in the context of a transaction or a stored function—you try to set a value for a session variable that is the same as its previous value, or for a variable whose scope is global only. (Bug #51277)
Important Change: Replication: When invoked,
CHANGE MASTER TOandSET GLOBAL sql_slave_skip_counternow cause information to be written to the error log about the slave's state prior to execution of the statement. ForCHANGE MASTER TO, this information includes the previous values ofMASTER_HOST,MASTER_PORT,MASTER_LOG_FILE, andMASTER_LOG_POS. ForSET GLOBAL sql_slave_skip_counter, this information includes the previous values ofRELAY_LOG_FILE,RELAY_LOG_POS, andsql_slave_skip_counter. (Bug #43406, Bug #43407)Important Change: When using fast
ALTER TABLE, different internal ordering of indexes in the MySQL optimizer and theInnoDBstorage engine could cause error messages about possibly mixed up.frmfiles and incorrect index use. (Bug #47622)InnoDB Storage Engine: Replication:
TRUNCATE TABLEperformed on a temporary table using theInnoDBstorage engine was logged even when using row-based mode. (Bug #51251)InnoDB Storage Engine: Replication: Reading from a table that used a self-logging storage engine and updating a table that used a transactional engine (such as
InnoDB) generated changes that were written to the binary log using statement format which could make slaves diverge. However, when using mixed logging format, such changes should be written to the binary log using row format. (This issue did not occur when reading from tables using a self-logging engine and updatingMyISAMtables, as this was already handled by checking for combinations of nontransactional and transactional engines.) Now such statements are classified as unsafe, and in mixed mode, cause a switch to row-based logging. (Bug #49019)InnoDB Storage Engine: The server could crash with a message
InnoDB: Assertion failure in thread, typically during shutdown on a Windows system. (Bug #53947)nnnnInnoDB Storage Engine: Some combinations of
SELECTandSELECT FOR UPDATEstatements could fail with errors about locks, or incorrectly release a row lock during a semi-consistent read operation. (Bug #53674)InnoDB Storage Engine: Adding a unique key on multiple columns, where one of the columns is
NULL, could mistakenly report duplicate key errors. (Bug #53290)InnoDB Storage Engine: Fixed a checksum error reported for compressed tables when the
--innodb_checksumsoption is enabled. Although the message stated that the table was corrupted, the table is actually fine. (Bug #53248)InnoDB Storage Engine: When reporting a foreign key constraint violation during
INSERT,InnoDBcould display uninitialized data for theDB_TRX_IDandDB_ROLL_PTRsystem columns. (Bug #53202)InnoDB Storage Engine: The values of
innodb_buffer_pool_pages_totalandinnodb_buffer_pool_pages_miscin theinformation_schema.global_statustable could be computed incorrectly. (Bug #52983)InnoDB Storage Engine:
InnoDBpage splitting could enter an infinite loop for compressed tables. (Bug #52964)InnoDB Storage Engine: An overly strict assertion could fail during the purge of delete-marked records in
DYNAMICorCOMPRESSEDInnoDBtables that contain column prefix indexes. (Bug #52746)InnoDB Storage Engine:
InnoDBattempted to choose off-page storage without ensuring that there was an “off-page storage” flag in the record header. To correct this, inDYNAMICandCOMPRESSEDformats,InnoDBstores locally any non-BLOBcolumns having a maximum length not exceeding 256 bytes. This is because there is no room for the “external storage” flag when the maximum length is 255 bytes or less. This restriction trivially holds inREDUNDANTandCOMPACTformats, because thereInnoDBalways stores locally columns having a length up tolocal_len= 788 bytes. (Bug #52745)InnoDB Storage Engine: The server could crash during shutdown, if started with the option
--innodb_use_sys_malloc=0. (Bug #52546)InnoDB Storage Engine: Connections waiting for an
InnoDBrow lock ignoredKILLuntil the row lock wait ended. Now,KILLduring lock wait results in “query interrupted” instead of “lock wait timeout exceeded”. The corresponding transaction is rolled back. (Bug #51920)InnoDB Storage Engine:
InnoDBchecks to see whether a row could possibly exceed the maximum size if all columns are fully used. This producedRow size too largeerrors for some tables that could be created with the built-inInnoDBfrom older MySQL versions. Now the check is only done wheninnodb_strict_modeis enabled or if the table is dynamic or compressed. (Bug #50495)InnoDB Storage Engine: Multi-statement execution could fail with an error about foreign key constraints. This problem could affect calls to
mysql_query()andmysql_real_query(), andCALLstatements that invoke stored procedures. (Bug #48024)InnoDB Storage Engine: A mismatch between index information maintained within the
.frmfiles and the corresponding information in the InnoDB system tablespace could produce this error:[ERROR] Index(Bug #44571)indexoftablehasncolumns unique inside InnoDB, but MySQL is asking statistics formcolumns. Have you mixed up .frm files from different installations?Partitioning: Replication: Attempting to execute
LOAD DATAon a partitionedMyISAMtable while using statement-based logging mode caused the master to hang or crash. (Bug #51851)Partitioning: Replication: The
NO_DIR_IN_CREATEserver SQL mode was not enforced when defining subpartitions. In certain cases, this could lead to failures on replication slaves. (Bug #42954)Partitioning: Rows inserted into a table created using a
PARTITION BY LIST COLUMNSoption referencing multiple columns could be inserted into the wrong partition. (Bug #52815)Partitioning: Partition pruning on
RANGEpartitioned tables did not always work correctly; the last partition was not excluded if the range was beyond it (when not usingMAXVALUE). Now the last partition is not included if the partitioning function value is not within the range. (Bug #51830)Partitioning: Attempting to partition a table using a
DECIMALcolumn caused the server to crash; this was not supported and is now specifically not permitted. (Bug #51347)Partitioning:
ALTER TABLEstatements that cause table partitions to be renamed or dropped (such asALTER TABLE ... ADD PARTITION,ALTER TABLE ... DROP PARTITION, andALTER TABLE ... REORGANIZE PARTITION) — when run concurrently with queries against theINFORMATION_SCHEMA.PARTITIONStable — could fail, cause the affected partitioned tables to become unusable, or both. This was due to the fact that theINFORMATION_SCHEMAdatabase ignored the name lock imposed by theALTER TABLEstatement on the partitions affected. In particular, this led to problems withInnoDBtables, becauseInnoDBwould accept the rename operation, but put it in a background queue, so that subsequent rename operations failed whenInnoDBwas unable to find the correct partition. Now,INFORMATION_SCHEMAhonors name locks imposed by ongoingALTER TABLEstatements that cause partitions to be renamed or dropped. (Bug #50561)References: See also Bug #47343, Bug #45808.
Partitioning: The
insert_idserver system variable was not reset following an insert that failed on a partitionedMyISAMtable having anAUTO_INCREMENTcolumn. (Bug #50392)Partitioning: Foreign keys are not supported on partitioned tables. However, it was possible using an
ALTER TABLEstatement to set a foreign key on a partitioned table; it was also possible to partition a table with a single foreign key. (Bug #50104)Partitioning: It was possible to execute a
CREATE TEMPORARY TABLE tmp LIKE ptstatement, whereptis a partitioned table, even though partitioned temporary tables are not permitted. This caused the server to crash. Now a check is performed to prevent such statements from being executed. (Bug #49477)Partitioning: When attempting to perform DDL on a partitioned table and the table's
.parfile could not be found, the server returned the inaccurate error message Out of memory; restart server and try again (needed 2 bytes). Now in such cases, the server returns the error Failed to initialize partitions from .par file. (Bug #49161)Partitioning:
GROUP BYqueries performed poorly for some partitioned tables. This was due to the block size not being set for partitioned tables, thus the keys per block was not correct, which could cause such queries to be optimized incorrectly. (Bug #48229)References: See also Bug #37252.
Partitioning:
REPAIR TABLEfailed for partitionedARCHIVEtables. (Bug #46565)Replication: When using unique keys on
NULLcolumns in row-based replication, the slave sometimes chose the wrong row when performing an update. This happened because a table having a unique key on such a column could have multiple rows containingNULLfor the column used by the unique key, and the slave merely picked the first row containingNULLin that column. (Bug #53893)Replication: When a
CREATE TEMPORARY TABLE ... SELECTstatement was executed within a transaction that updated only transactional engines and was later rolled back (for example, due to a deadlock) the changes—including the creation of the temporary table—were not written to the binary log, which caused subsequent updates to this table to fail on the slave. (Bug #53421)Replication: When using the statement-based logging format, statements that used
CONNECTION_ID()were always kept in the transaction cache; consequently, nontransactional changes that should have been flushed before the transaction were kept in the transaction cache. (Bug #53075)References: This bug was introduced by Bug #51894.
Replication: In some cases, attempting to update a column with a value of an incompatible type resulted in a mismatch between master and slave because the column value was set to its implicit default value on the master (as expected), but the same column on the slave was set to
NULL. (Bug #52868)Replication: ACK packets in semisynchronous replication were not checked for length and malformed packets could cause a server crash. (Bug #52748)
Replication: When temporary tables were in use, switching the binary logging format from
STATEMENTtoROWdid not take effect until all temporary tables were dropped. (The existence of temporary tables should prevent switching the format only fromROWtoSTATEMENTfrom taking effect, not the reverse.) (Bug #52616)Replication: A buffer overrun in the handling of
DATEcolumn values could cause mysqlbinlog to fail when reading logs containing certain combinations of DML statements on a table having aDATEcolumn followed by dropping the table. (Bug #52202)Replication: The failure of a
REVOKEstatement was logged with the wrong error code, causing replication slaves to stop even when the failure was expected on the master. (Bug #51987)Replication: Issuing any DML on a temporary table
tempfollowed byDROP TEMPORARY TABLE temp, both within the same transaction, caused replication to fail.The fix introduces a change to statement-based binary logging with respect to temporary tables. Within a transaction, changes to temporary tables are saved to the transaction cache and written to the binary log when the transaction commits. Otherwise, out-of-order logging of events could occur. This means that temporary tables are treated similar to transactional tables for purposes of caching and logging. This affects assessment of statements as safe or unsafe and the associated error message was changed from:
Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements that read from both transactional and non-transactional tables and write to any of them are unsafe.
To:
Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements that read from both transactional (or a temporary table of any engine type) and non-transactional tables and write to any of them are unsafe.
(Bug #51894)
References: See also Bug #51291, Bug #53075, Bug #53259, Bug #53452, Bug #54872. This bug was introduced by Bug #46364.
Replication: The internal flag indicating whether a user value was signed or unsigned (
unsigned_flag) could sometimes change between the time that the user value was recorded for logging purposes and the time that the value was actually written to the binary log, which could lead to inconsistency. Nowunsigned_flagis copied when the user variable value is copied, and the copy ofunsigned_flagis then used for logging. (Bug #51426, Bug #11759138)References: See also Bug #49562, Bug #11757508.
Replication: Enabling
binlog_direct_non_transactional_updatescauses nontransactional changes to be written to the binary log upon committing the statement. However, even when not enabled, the addition of this variable introduced a number of undesired changes in behavior:When using
ROWorMIXEDlogging mode: Nontransactional changes executed within a transaction prior to any transactional changes were written to the statement cache, but those following any transactional changes were written to the transactional cache instead, causing these (later) nontransactional changes to be lost.When using
ROWorMIXEDlogging mode: When rolling back a transaction, any nontransactional changes that might be in the transaction cache were disregarded and truncated along with the transactional changes.When using
STATEMENTlogging mode: A statement that combined transactional and nontransactional changes prior to any other transactional changes within the transaction, but failed, was kept in the transactional cache until the transaction ended, rather than being written to the binary log at the instant of failure (and not deferred to the end of the transaction).
These problems have been handled as follows:
The setting for
binlog_direct_non_transactional_updatesno longer has any effect when the value ofbinlog_formatis eitherROWorMIXED. This addresses the first two issues previously listed.When using statement-based logging with
binlog_direct_non_transactional_updatesset toON, any statement combining transactional and nontransactional changes within the same transaction is now stored in the transaction cache, whether or not it succeeds, and regardless of its order of execution among any transactional statements within that transaction. This means that such a statement is now written to the binary log only on transaction commit or rollback.
(Bug #51291)
References: This bug was introduced by Bug #46364.
Replication: When using temporary tables, the binary log needs to insert a pseudo-thread ID for threads that are using temporary tables, each time a switch happens between two threads, both of which are using temporary tables. However, if a thread issued a failing statement before exit, its ID was not recorded in the binary log, and this in turn caused the ID for the next thread that tried to do something with a temporary table not to be logged as well. Subsequent replays of the binary log failed with the error Table ... doesn't exist. (Bug #51226)
References: This bug is a regression of Bug #35583.
Replication: If the master was using
sql_mode='TRADITIONAL', duplicate key errors were not sent to the slave, which received0rather than the expected error code. This caused replication to fail even when such an error was expected. (Bug #51055)Replication: DDL statements that lock tables (such as
ALTER TABLE,CREATE INDEX, andCREATE TRIGGER) caused spurious ER_BINLOG_ROW_MODE_AND_STMT_ENGINE or ER_BINLOG_STMT_MODE_AND_ROW_ENGINE errors, even though they did not insert rows into any tables.ЗамечаниеThe error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE is generated when
binlog_format=ROWand a statement modifies a table restricted to statement-based logging; ER_BINLOG_STMT_MODE_AND_ROW_ENGINE is generated whenbinlog_format=STATEMENTand a statement modifies a table restricted to row-based logging.(Bug #50479)
References: This bug was introduced by Bug #39934, Bug #11749859.
Replication: When run with the
--databaseoption, mysqlbinlog printedROLLBACKstatements but did not print any correspondingSAVEPOINTstatements. (Bug #50407)Replication: When a
CREATE EVENTstatement was followed by an additional statement and the statements were executed together as a single statement, theCREATE EVENTstatement was padded with “garbage” characters when written to the binary log. This led to a syntax error when the event was read from the log. (Bug #50095)Replication: When using a nontransactional table on the master with autocommit disabled, no
COMMITwas recorded in the binary log following a statement affecting this table. If the slave's copy of the table used a transactional storage engine, the result on the slave was as though a transaction had been started, but never completed. (Bug #49522)References: See also Bug #29288.
The
make_binary_distributiontarget to make could fail on some platforms because the lines generated were too long for the shell. (Bug #54590)Inconsistent checking of the relationship between
SHOWstatements andINFORMATION_SCHEMAqueries caused such queries to fail sometimes. (Bug #54422)A crash occurred if a table that was locked with
LOCK TABLESwas listed twice in aDROP TABLEstatement. (Bug #54282)ALTER TABLEfor views is not legal but did not produce an error. (If you need to rename a view, useRENAME TABLE.) (Bug #53976)Valgrind warnings resulting from passing incomplete
DATETIMEvalues to theTIMESTAMP()function were corrected. (Bug #53942)Builds of the embedded mysqld failed due to a missing element of the
struct NET. (Bug #53908, Bug #53912)The definition of the
MY_INITmacro inmy_sys.hincluded an extraneous semicolon, which could cause compilation failure. (Bug #53906)Queries that used
MIN()orMAX()on indexed columns could be optimized incorrectly. (Bug #53859)UPDATEon anInnoDBtable modifying the same index that was used to satisfy theWHEREcondition could trigger a debug assertion under some circumstances. (Bug #53830)MySQL incorrectly processed
ALTER DATABASE `#mysql50#wherespecial` UPGRADE DATA DIRECTORY NAMEspecialwas.,.., or a sequence starting with./or../. It used the server data directory (which contains other regular databases) as the database directory. (Bug #53804, CVE-2010-2008)OPTIMIZE TABLEcould be run on a table in use by a transaction in a different session, causing repeatable read to break. (Bug #53798)InnoDBcrashed when replacing duplicates in a table after a fastALTER TABLEadded a unique index. (Bug #53592)For
InnoDBtables, the error handler for a fastCREATE INDEXdid not reset the error state of the transaction before attempting to undo a failed operation, resulting in a crash. (Bug #53591)For single-table
DELETEstatements that used quick select and index scan simultaneously caused a server crash or assertion failure. (Bug #53450)Certain path names passed to
LOAD_FILE()could cause a server crash. (Bug #53417)If the
completion_typesession variable was changed after a stored procedure or prepared statement had been cached, the change had no effect on subsequent executions of the procedure or statement. (Bug #53346)The
AND CHAINoption forCOMMITandROLLBACKfailed to preserve the current transaction isolation level. Settingcompletion_typeto 1 also failed to do so. (Bug #53343)Incorrect results could be returned for
LEFT JOINofInnoDBtables with an impossibleWHEREcondition. (Bug #53334)The
Lock_timevalue in the slow query log was negative for stored routines. (Bug #53191)Setting the
innodb_change_bufferingsystem variable toDEFAULTproduced an incorrect result. (Bug #53165)mysqldump and
SELECT ... INTO OUTFILEtruncated longBLOBandTEXTvalues to 766 bytes. (Bug #53088)On some systems, such as Mac OS X, the
sockaddr_inandsockaddr_in6structures contain a non-standard field (sin_len/sin6_len) that must be set but was not. This resulted in hostname lookup failure. (Bug #52923)In the debug version of the server, the
FreeState()function could in some circumstances be called twice, leading to an assertion failure. (Bug #52884)Concurrent
SHOW COLUMNSstatements could cause a server crash. (Bug #52856)With a non-
latin1ASCII-based current character set, the server inappropriately convertedDATETIMEvalues to strings. This resulted in the optimizer not using indexes on such columns. (Bug #52849)mysqld_safe set
plugin_dirusing a hardcoded default path name rather than a path depending onbasedir. (Bug #52737)Semi-consistent read was implemented for
InnoDBto address Bug #3300. Semi-consistent reads do not block when a nonmatching record is already locked by some other transaction. If the record is not locked, a lock is acquired, but is released if the record does not match theWHEREcondition. However, semi-consistent read was attempted even forUPDATEstatements having aWHEREcondition of the formpk_col1=constant1, ..., pk_colN=constantN. Some code failed that was designed with the assumption that semi-consistent read would be only attempted on table scans. (Bug #52663)Setting
@@GLOBAL.debugto an empty string failed to clear the current debug settings. (Bug #52629)SHOW CREATE TABLEwas blocked if the table was write locked by another session. (Bug #52593)The
lengthandmax_lengthmetadata values were incorrect for columns with theTEXTfamily of data types that used multibyte character sets. This bug was introduced in MySQL 5.5.3. (Bug #52520)mysql_upgrade attempted to work with stored routines before they were available. (Bug #52444)
The
check_table_is_closed()debugging function did not protect access to theMyISAMopen tables list, with the result that server crashes could occur during table drop or rename operations. (Bug #52432)Spurious duplicate-key errors occurred for multiple-column indexes on
BINARYcolumns. (Bug #52430)EXPLAIN EXTENDEDcrashed trying to resolve references to freed temporary table columns forGROUP_CONCAT()ORDER BYarguments. (Bug #52397)During MySQL server installation using the MSI package on Windows, the
default-character-setoption would be included in the default configuration template file. This caused the MySQL server to fail to start properly. (Bug #52380)Two sessions trying to set the global
event_schedulersystem variable toOFFresulted in one of them hanging waiting for the event scheduler to stop. (Bug #52367)There was a race condition between flags used for signaling that a query was killed, which led to error-reporting and lock-acquisition problems. (Bug #52356)
For a concurrent load of 16 or more connections containing many
LOCK TABLES WRITEstatements for the same table, server throughput was significantly lower for MySQL 5.5.3 and 5.5.4 than for earlier versions (10%–40% lower depending on concurrency). (Bug #52289)Operations on geometry data types failed on some systems for builds compiled with Sun Studio. (Bug #52208)
The optimizer could attempt to evaluate the
WHEREclause before any rows had been read, resulting in a server crash. (Bug #52177)Cast operations on
NULLDECIMALvalues could cause server crashes or Valgrind warnings. (Bug #52168)An assertion was raised as a result of a
NULLstring being passed to thedtoacode. (Bug #52165)A memory leak occurred due to missing deallocation of the
comparatorsarray (a member of theArg_comparatorclass). (Bug #52124)For debug builds, creating a view containing a subquery that might require collation adjustment caused an assertion to be raised. For example, this could occur if some items had different collations but the result collation could be adjusted to the one of them. (Bug #52120)
Aggregate functions could incorrectly return
NULLin outer join queries. (Bug #52051)For outer joins, the optimizer could fail to properly calculate table dependencies. (Bug #52005)
A
COUNT(DISTINCT)query on a view could cause a server crash. (Bug #51980)For LDML-defined collations, some data structures were not initialized properly to enable
UPPER()andLOWER()to work correctly. (Bug #51976)On Windows,
LOAD_FILE()could cause a crash for some pathnames. (Bug #51893)Invalid memory reads occurred for
HANDLER ... READ NEXTafter a failedHANDLER ... READ FIRST. (Bug #51877)After
TRUNCATE TABLEof aMyISAMtable, subsequent queries could crash the server ifmyisam_use_mmapwas enabled. (Bug #51868)If
myisam_sort_buffer_sizewas set to a small value, table repair forMyISAMtables withFULLTEXTindexes could crash the server. (Bug #51866)Stored routine DDL statements were written to the binary log using statement-based format regardless of the current logging format. (Bug #51839)
A problem with equality propagation optimization for prepared statements and stored procedures caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug #51650)
References: See also Bug #8115, Bug #8849.
The optimizer performed an incorrect join type when
COALESCE()appeared within anIN()operation. (Bug #51598)Locking involving the
LOCK_plugin,LOCK_global_system_variables, andLOCK_statusmutexes could deadlock. (Bug #51591)Executing a
LOAD XML INFILEstatement could sometimes lead to a server crash. (Bug #51571)The server crashed when the optimizer attempted to determine constant tables but a table storage engine did not support exact record count. (Bug #51494)
The server could crash populating the
INFORMATION_SCHEMA.PROCESSLISTtable due to lack of mutex protection. (Bug #51377)Use of
HANDLERstatements with tables that had spatial indexes caused a server crash. (Bug #51357)With an XA transaction active,
SET autocommit = 1could cause side effects such as memory corruption or a server crash. (Bug #51342)Corrupt
MyISAMtables were automatically repaired even whenmyisam_recover_optionswas set toOFF. (Bug #51327)Following a bulk insert into a
MyISAMtable, ifMyISAMfailed to build indexes using repair by sort, data file corruption could occur. (Bug #51307)CHECKSUM TABLEcould compute the checksum forBITcolumns incorrectly. (Bug #51304)ALTER TABLEonInnoDBtables (including partitioned tables) acquired exclusive locks on rows of the table being altered. If there was a concurrent transaction that did locking reads from this table, this sometimes led to a deadlock that was not detected by the metadata lock subsystem or by InnoDB (and was reported only after exceedinginnodb_lock_wait_timeout). (Bug #51263)A
HAVINGclause on a joined table in some cases failed to eliminate rows which should have been excluded from the result set. (Bug #51242)Two sessions trying to set the global
event_schedulersystem variable to different values could deadlock. (Bug #51160)InnoDBfast index creation could incorrectly use a table copy in some cases. (Bug #50946)The Loose Index Scan optimization method assumed that it could depend on the partitioning engine to maintain interval endpoint information, as if it were a storage engine. (Bug #50939)
The type inference used for view columns caused some columns in views to be handled as the wrong type, as compared to the same columns in base tables.
DATEcolumns in base tables were treated asTIMEcolumns in views, and base tableTIMEcolumns as viewDATETIMEcolumns. (Bug #50918)A syntactically invalid trigger could cause the server to crash when trying to list triggers. (Bug #50755)
Previously, the server held a global mutex while performing file operations such as deleting an
.frmor data file, or reading index statistics from a data file. Now the mutex is not held for these operations. Instead, the server uses metadata locks. (Bug #50589, Bug #51557, Bug #49463)User-defined variables of type
REALthat containedNULLwere handled improperly when assigned to a column of another type. (Bug #50511)Setting
--secure-file-privto the empty string left the value unaffected. (Bug #50373)Calculation of intervals for Event Scheduler events was not portable. (Bug #50087)
The
YEARvalues2000and0000could be treated as equal. (Bug #49910)Performing a single in-place
ALTER TABLEcontainingADD INDEXandDROP INDEXoptions that used the same index name could result in a corrupt table definition file. Now suchALTER TABLEstatements are no longer performed in place. (Bug #49838)mysql_upgrade did not detect when
CSVlog tables incorrectly contained columns that could beNULL. Now these columns are altered to beNOT NULL. (Bug #49823)support-files/mysql.spec.shhad unnecessary Perl dependencies. (Bug #49723)Selecting from
INFORMATION_SCHEMA.ROUTINESorINFORMATION_SCHEMA.PARAMETERSresulted in a memory leak. (Bug #48729)In MySQL 5.1,
READ COMMITTEDwas changed to use less locking due to the availability of row-based binary logging (see the Note underREAD COMMITTEDat Section 12.3.6, “SET TRANSACTIONСинтаксис”). However,READ UNCOMMITTEDdid not have the same change, so it was using more locks than the higher isolation level, which is unexpected. This was changed so thatREAD UNCOMMITTEDnow also uses the lesser amount of locking and has the same restrictions for binary logging. (Bug #48607)On Intel x86 machines, the optimizer could choose different execution plans for a query depending on the compiler version and optimization flags used to build the server binary. (Bug #48537)
A trigger could change the behavior of assigning
NULLto aNOT NULLcolumn. (Bug #48525)The server crashed when it could not determine the best execution plan for queries involving outer joins with nondeterministic
ONclauses such as the ones containing theRAND()function, a user-defined function, or aNOT DETERMINISTICstored function. (Bug #48483)EXPLAINcould cause a server crash for some queries with subqueries. (Bug #48419)The
MERGEengine failed to open a child table from a different database if the child table or database name contained characters that were subject to table name to file name encoding.Further, the
MERGEengine did not properly open a child table from the same database if the child table name contained characters such as'/', or'#'. (Bug #48265)On Windows, the server failed to find a description for Event ID 100. (Bug #48042)
A query that read from a derived table (of the form
SELECT ... FROM (SELECT ...)) produced incorrect results when the following conditions were present:The table subquery contained a derived query (
(SELECT ...) AS).columnThe derived query could potentially produce zero rows or a single
NULL(that is, no rows matched, or the query used an aggregate function such asSUM()running over zero rows).The table subquery joined at least two tables.
The join condition involved an index.
(Bug #47904)
The optimization to read
MIN()orMAX()values from an index did not properly handle comparisons withNULLvalues. This could produce incorrect results forMIN()orMAX()when theWHEREclause tested aNOT NULLcolumn forNULL. (Bug #47762)Killing a query during the optimization phase of a subquery could cause a server crash. (Bug #47761)
Using
REPLACEto update a previously inserted negative value in anAUTO_INCREMENTcoumn of anInnoDBtable caused the table auto-increment value to be updated to 2147483647. (Bug #47720)The query shown by
EXPLAIN EXTENDEDplusSHOW WARNINGScould produce results different from the original query. (Bug #47669)MyISAMcould write uninitialized data to new index pages. Now zeros are written to unused bytes in the pages. (Bug #47598)OPTIMIZE TABLEfor anInnoDBtable could raise an assertion if another session issued a concurrentDROP TABLE. (Bug #47459)For updates to
InnoDBtables,TIMESTAMPcolumns could be updated even when no values actually changed. (Bug #47453)Setting
myisam_repair_threadslarger than 1 could result in the cardinality for all indexes of aMyISAMtable being set to 1 after parallel index repair. (Bug #47444)mysqld_safe did not always pass
--open-files-limitthrough to mysqld. mysqld_safe did not treat dashes and underscores as equivalent in option names. (Bug #47095)When the transaction isolation level was
REPEATABLE READand binary logging used statement or mixed format,SELECTstatements with subqueries referencingInnoDBtables unnecessarily acquired shared locks on rows in these tables. (Bug #46947)In debug builds, if the listed columns in the view definition of the table used in an
INSERT ... SELECTstatement mismatched, an assertion was raised in the query cache invalidation code following the failing statement. (Bug #46615)For the
COMMITandROLLBACKstatements, theAND CHAINandRELEASEmodifiers should be mutually exclusive, but the parser permitted both to be specified. (Bug #46527)If the server is started with
--skip-grant-tables, plugin loading and unloading should be prohibited, but the server failed to rejectINSTALL PLUGINandUNINSTALL PLUGINstatements. (Bug #46261)gcc 4.4.0 could fail to compile
dtoa.c. (Bug #45882)ALTER TABLE ... ADD COLUMNfor a table with multiple foreign keys caused a server crash. (Bug #45052)Manual pages for a few little-used programs were missing from RPM packages. (Bug #44370)
Using an initial command with
mysql_options(..., MYSQL_INIT_COMMAND, ...)that generated multiple result sets (such as a stored procedure or a multi-statement command) left the connection unusable. (Bug #42373)The server could crash with an out of memory error when trying to parse a query that was too long to fit in memory. Now the parser rejects such queries with an
ER_OUT_OF_RESOURCESerror. (Bug #42064)InnoDBcould fail to create a unique index onNULLcolumns. (Bug #41904)For a query that selected from a view and used an alias for the view, the metadata used the alias name rather than the view name in the
MYSQL_FIELD.tablemember. (Bug #41788)mysql_upgrade did not create temporary files properly. (Bug #41057)
It was possible for
DROP TABLEof oneMyISAMtable to remove the data and index files of a differentMyISAMtable. (Bug #40980)If the arguments to a
CONCAT()call included a local routine variable, selecting the return value into a user variable could produce an incorrect result. (Bug #40625)Column names displayed from the
PARTITION_EXPRESSIONcolumn of theINFORMATION_SCHEMA.PARTITIONStable did not include escape characters as necessary. (Bug #39338)When
SET TRANSACTION ISOLATION LEVELwas used to set the isolation level for the next transaction, the level could persist for subsequent transactions. (Bug #39170)When using
UNINSTALL PLUGINto remove a loaded plugin, open tables and connections caused mysqld to hang until the open connections had been closed. (Bug #39053)Valgrind warnings in the
InnoDBcompare_record()function were corrected. (Bug #38999)The optimizer sometimes used
filesortforORDER BYwhen it should have used an index. (Bug #38745)Setting the session value of the
debugsystem variable also set the global value. (Bug #38054)Accessing a
MERGEtable with an empty underlying table list incorrectly resulted in a “wrong index” error message rather than “end of file.” (Bug #35274)The test for
readlineduring configuration failed when trying to build MySQL in a directory other than the source tree root. (Bug #35250)mysqld could fail during execution when using SSL. (Bug #34236)
A query on a
FEDERATEDtable in which the data was ordered by aTEXTcolumn returned incorrect results. For example, a query such as the following produced incorrect results if columncolumn1was aTEXTcolumn:SELECT * FROM table1 ORDER BY column1;
(Bug #32426)
MySQL Makefiles relied on GNU extensions. (Bug #30708)
The parser allocated too much memory for a query string containing multiple statements. (Bug #27863)
The behavior of the RPM installation for both new installations and upgrade installations has changed.
During a new installation, the server boot scripts are installed, but the MySQL server is not started at the end of the installation, since the status of the system during an unattended installation is not known.
During an upgrade installation using the RPM packages, if the server is running when the upgrade occurs, the server is stopped, the upgrade occurs, and server is restarted. If the server is not already running when the RPM upgrade occurs, the server is not started at the end of the installation.
The boot scripts for MySQL are installed in the appropriate directories in
/etc, so the MySQL server will be restarted automatically at the next machine reboot. (Bug #27072)ROW_COUNT()returned a meaningful value only for some DML statements. Now it returns a value as follows:DDL statements: 0. This applies to statements such as
CREATE TABLEorDROP TABLE.DML statements other than
SELECT: The number of affected rows. This applies to statements such asUPDATE,INSERT, orDELETE(as before), but now also to statements such asALTER TABLEandLOAD DATA INFILE.SELECT: -1 if the statement returns a result set, or the number of rows “affected” if it does not. For example, forSELECT * FROM t1,ROW_COUNT()returns -1. ForSELECT * FROM t1 INTO OUTFILE ',file_name'ROW_COUNT()returns the number of rows written to the file.SIGNALstatements: 0.
(Bug #21818)
RPM Notes
debuginfoRPM packages are no longer being built or published.
InnoDB Notes
InnoDBhas been upgraded to version 1.1. This version is considered of Beta quality.For information about
InnoDBfeatures, see Section 13.4, “New Features of InnoDB 1.1”. For general information about usingInnoDBin MySQL, see Section 13.3, “TheInnoDBStorage Engine”.
Functionality Added or Changed
InnoDB Storage Engine:
InnoDBnow has ainnodb_use_native_aiosystem variable that can be disabled at startup if there is a problem with the asynchronous I/O subsystem in the OS. This variable applies to Linux systems only, where the MySQL server now has a dependency on thelibaiolibrary.
Bugs Fixed
Performance: InnoDB Storage Engine: The redo scan during
InnoDBrecovery used excessive CPU. The efficiency of this scan was improved, significantly speeding up crash recovery. (Bug #49535, Bug #29847)Performance: InnoDB Storage Engine:
InnoDBpage-freeing operations were made faster for compressed blocks, speeding upALTER TABLE,DROP TABLE, and other operations on compressed tables that free compressed blocks. One symptom of the older behavior could be 100% CPU use during these operations. (Bug #35077)InnoDB Storage Engine: The AIX implementation of
readdir_r()causedInnoDBerrors. (Bug #50691)InnoDB Storage Engine: The limit of 1023 concurrent data-modifying transactions has been raised. The limit is now 128 × 1023 concurrent transactions that generate undo records. You can remove any workarounds that require changing the proper structure of your transactions, such as committing more frequently or delaying DML operations to the end of a transaction. See Section 13.4.7.19, “Better Scalability with Multiple Rollback Segments”. (Bug #26590)
A unique index on a column prefix could not be upgraded to a primary index even if there was no primary index already defined. (Bug #51378)
InnoDBdid not reset tableAUTO_INCREMENTvalues to the last used values after a server restart. (Bug #49032)When using the
EXAMPLEstorage engine, when the engine had been built as a plugin (instead of built in), and DTrace probes had been enabled during the build, loading the storage engine library failed due to a missing object table entry.
Performance Schema Notes
MySQL Server now includes the Performance Schema, a feature for monitoring server execution at a low level. The implementation uses the
PERFORMANCE_SCHEMAstorage engine and theperformance_schemadatabase. The Performance Schema focuses primarily on performance data. This differs fromINFORMATION_SCHEMA, which serves for inspection of metadata. For more information, see Глава 20, MySQL Performance Schema.Performance Schema support is included in binary MySQL distributions but is disabled by default. To enable it, start the server with the
--performance_schemaoption.To create the
performance_schemadatabase if you are upgrading from an earlier release, run mysql_upgrade and restart the server. See Section 4.4.7, “mysql_upgrade — Check Tables for MySQL Upgrade”.
InnoDB Notes
This release includes
InnoDB1.0.6. This version is considered of Release Candidate (RC) quality.
Functionality Added or Changed
Performance: The performance of internal functions that trim multiple spaces from strings when comparing them has been improved. (Bug #14637)
Incompatible Change:
CREATE VIEWandDROP VIEWnow are prohibited while aLOCK TABLESstatement is in effect. (Bug #56571)Incompatible Change: The following obsolete constructs have been removed. Where alternatives are shown, applications should be updated to use them.
The
log_bin_trust_routine_creatorssystem variable (uselog_bin_trust_function_creators).The
myisam_max_extra_sort_file_sizesystem variable.The
record_buffersystem variable (useread_buffer_size).The
sql_log_updatesystem variable.The
table_typesystem variable (usestorage_engine).The
FRAC_SECONDmodifier for theTIMESTAMPADD()function (useMICROSECOND).The
TYPEtable option to specify the storage engine forCREATE TABLEorALTER TABLE(useENGINE).The
SHOW TABLE TYPESSQL statement (useSHOW ENGINES).The
SHOW INNODB STATUSandSHOW MUTEX STATUSSQL statements (useSHOW ENGINE INNODB STATUSSHOW ENGINE INNODB MUTEX).The
SHOW PLUGINSQL statement (useSHOW PLUGINS).The
LOAD TABLE ... FROM MASTERandLOAD DATA FROM MASTERSQL statements (use mysqldump or mysqlhotcopy to dump tables and mysql to reload dump files).The
BACKUP TABLEandRESTORE TABLESQL statements (use mysqldump or mysqlhotcopy to dump tables and mysql to reload dump files).TIMESTAMP(data type: The ability to specify a display width ofN)N(use withoutN).The
--default-character-setand--default-collationserver options (use--character-set-serverand--collation-server).The
--delay-key-write-for-all-tablesserver option (use--delay-key-write=ALL).The
--enable-lockingand--skip-lockingserver options (use--external-lockingand--skip-external-locking).The
--log-bin-trust-routine-creatorsserver option (use--log-bin-trust-function-creators).The
--log-long-formatserver option.The
--log-updateserver option.The
--master-server options to set replication parameters (use thexxxCHANGE MASTER TOstatement instead):--master-host,--master-user,--master-password,--master-port,--master-connect-retry,--master-ssl,--master-ssl-ca,--master-ssl-capath,--master-ssl-cert,--master-ssl-cipher,--master-ssl-key.The
--safe-show-databaseserver option.The
--skip-symlinkand--use-symbolic-linksserver options (use--skip-symbolic-linksand--symbolic-links).The
--sql-bin-update-sameserver option.The
--warningsserver option (use--log-warnings).The
--no-named-commandsoption for mysql (use--skip-named-commands).The
--no-pageroption for mysql (use--skip-pager).The
--no-teeoption for mysql (use--skip-tee).The
--positionoption for mysqlbinlog (use--start-position).The
--alloption for mysqldump (use--create-options).The
--first-slaveoption for mysqldump (use--lock-all-tables).The
--config-fileoption for mysqld_multi (use--defaults-extra-file).The
--set-variable=andvar_name=value-Ogeneral-purpose options for setting program variables (usevar_name=value--).var_name=value
(Bug #48048)
References: See also Bug #47974, Bug #56408.
Incompatible Change: Aliases for wildcards (as in
SELECT t.* AS 'alias' FROM t) are no longer accepted and result in an error. Previously, such aliases were ignored silently. (Bug #27249)Incompatible Change: Implicit conversion of a number or temporal value to string now produces a value that has a character set and collation determined by the
character_set_connectionandcollation_connectionsystem variables. (These variables commonly are set withSET NAMES. For information about connection character sets, see Section 9.1.4, “Connection Character Sets and Collations”.)This change means that such a conversion results in a character (nonbinary) string (a
CHAR,VARCHAR, orLONGTEXTvalue), except when the connection character set is set tobinary. In that case, the conversion result is a binary string (aBINARY,VARBINARY, orLONGBLOBvalue).Previously, an implicit conversion always produced a binary string, regardless of the connection character set. Such implicit conversions to string typically occur for functions that are passed numeric or temporal values when string values are more usual, and thus could have effects beyond the type of the converted value. Consider the expression
CONCAT(1, 'abc'). The numeric argument1was converted to the binary string'1'and the concatenation of that value with the nonbinary string'abc'produced the binary string'1abc'.This change in conversion behavior affects several functions that expect string arguments because a numeric or temporal argument converted to a string now results in a character rather than binary string argument:
String functions:
CONCAT(),CONCAT_WS(),ELT(),EXPORT_SET(),INSERT(),LCASE(),LEFT(),LOWER(),LPAD(),LTRIM(),MID(),QUOTE(),REPEAT(),REPLACE(),REVERSE(),RIGHT(),RPAD(),RTRIM(),SOUNDEX(),SUBSTRING(),TRIM(),UCASE(),UPPER().Date and time functions:
ADDDATE(),ADDTIME(),DATE_ADD(),DATE_SUB(),DAYNAME(),GET_FORMAT(),MONTHNAME(),SUBDATE(),SUBTIME(),TIMESTAMPADD().
These functions remain unaffected:
CHAR()without aUSINGclause still returnsVARBINARY.Functions that previously returned
utf8strings still do so. Examples includeCHARSET()andCOLLATION().
Encryption and compression functions that expect string arguments and previously returned binary strings are affected depending on the content of the return value:
If the return value contains only ASCII characters, the function now returns a character string with the connection character set and collation:
MD5(),OLD_PASSWORD(),PASSWORD(),SHA(),SHA1(). TheASTEXT()andASWKT()spatial functions also fall into this category.If the return value can contain non-ASCII characters, the function still returns a binary string:
AES_ENCRYPT(),COMPRESS(),DES_ENCRYPT(),ENCODE(),ENCRYPT().
The
INET_NTOA()return value contains only ASCII characters, and this function now returns a character string with the connection character set and collation rather than a binary string.Incompatible Change: Several changes were made to processing of server system variables and command-line options to make their treatment more consistent.
General changes:
The help message text displayed by mysqld --verbose --help now consistently uses dashes to show the names of options and system variables that can be set at server startup. Previously, the message used both dashes and underscores (generally with dashes for options and underscores for system variables). For example, the help message now displays
--log-outputand--general-log, whereas previously it displayed--log-outputand--general_log.This is a display-only change. The permissible syntax for setting options and variables remains unchanged:
At server startup, you can specify options and variables on the command line or in option files using either dashes or underscores.
For those system variables that can be set at runtime (for example, using
SET), you must specify them using underscores.
There are fewer session-only system variables. These variables now have a global value:
autocommit,foreign_key_checks,profiling,sql_auto_is_null,sql_big_selects,sql_buffer_result,sql_log_bin,sql_log_off,sql_notes,sql_quote_show_create,sql_safe_updates,sql_warnings,unique_checks.For those variables, you can now set the global value to change the value from which the session value is initialized for new sessions.
The following list shows the variables that remain session-only. They apply only in the context of a specific session so that a global value is of no use:
debug_sync,error_count,identity,insert_id,last_insert_id,pseudo_thread_id,rand_seed1,rand_seed2,timestamp,warning_count.All system variables are accessible at runtime using
@@syntax (@@GLOBAL.,var_name@@SESSION.,var_name@@). Previously, this syntax produced an error for some variables.var_nameAll system variables are included as appropriate in the output from
SHOW {GLOBAL, SESSION} VARIABLESand theINFORMATION_SCHEMA.GLOBAL_VARIABLESandINFORMATION_SCHEMA.SESSION_VARIABLEStables. Previously, some variables were not displayed.“As appropriate” in the preceding item means that
SHOW GLOBAL VARIABLESandINFORMATION_SCHEMA.GLOBAL_VARIABLESno longer include session-only system variables. Previously, these included the global value of a variable if it had one, and the session value if not. (SHOW SESSION VARIABLESstill includes global-only variables.)The server now enforces type checking for assignments to system variables, so it is more consistent and strict about rejecting invalid values.
For attempts to assign a negative value to an unsigned system variable, the server truncates the value to the minimum permitted value. Previously, there was sometimes wraparound to a large positive value.
Some system variables (typically those that control memory or disk allocation) are permitted to take only values that are a multiple of a given block size, and assigning a value not a block size multiple causes truncation to the nearest multiple. (For example,
net_buffer_lengthmust be a multiple of 1024. Assigning 16384 results in a value of 16384, whereas assigning 16383 results in a value of 15360.) A warning now occurs when adjustment of the specified value takes place. Previously, adjustment was silent.More system variables can be assigned the value
DEFAULTto set them to their default value. Previously, this syntax produced an error in some cases.All variables that have a
SETdata type value can be set to an integer value that is treated like a bit mask. Previously, this did not work for some SET-type variables.The default value for several system variables no longer differs between 32-bit and 64-bit builds. Previously, the values differed by about 100 bytes for some variables.
There are no longer any write-only system variables. For example,
SELECT @@rand_seed1returns 0, notVariable 'rand_seed1' can only be set, not read.
Variable-specific changes:
The
concurrent_insertsystem variable now is handled as an enumeration with the permissible valuesNEVER,AUTO, andALWAYS. The corresponding integer values 0, 1, and 2 are still recognized.The
completion_typesystem variable now is handled as an enumeration with the permissible valuesNO_CHAIN,CHAIN, andRELEASE. The corresponding integer values 0, 1, and 2 are still recognized.For
concurrent_insertandcompletion_type, the string form of the value is displayed bySHOW VARIABLESandSELECT @@.var_nameThe unused
rpl_recovery_ranksystem variable is deprecated.The
storage_enginesystem variable is deprecated in favor of the new system variabledefault_storage_engine. This enables pairing of the--default-storage-enginecommand-line option with a system variable of a more closely corresponding name.The
--myisam-recoveroption is renamed to--myisam-recover-optionsto pair better with the name of themyisam_recover_optionssystem variable. The old option name still works because it is recognized as an unambiguous prefix of the new name. (Option prefix recognition occurs as described in Section 4.2.3, “Specifying Program Options”.)--myisam-recover-optionshas a new permissible valueOFF.Attempts to drop the default key cache produce an error. Previously, it produced only a warning and status of success even though the attempt failed.
References: See also Bug #34437, Bug #34635, Bug #11747961, Bug #34829, Bug #34878, Bug #25430.
Incompatible Change: The server now includes
dtoa, a library for conversion between strings and numbers by David M. Gay. In MySQL, this library provides the basis for improved conversion between string orDECIMALvalues and approximate-value (FLOAT/DOUBLE) numbers:Consistent conversion results across platforms, which eliminates, for example, Unix versus Windows conversion differences.
Accurate representation of values in cases where results previously did not provide sufficient precision, such as for values close to IEEE limits.
Conversion of numbers to string format with the best possible precision. The precision of
dtoais always the same or better than that of the standard C library functions.
Because the conversions produced by this library differ in some cases from previous results, the potential exists for incompatibilities in applications that rely on previous results. For example, applications that depend on a specific exact result from previous conversions might need adjustment to accommodate additional precision.
For additional information about the properties of
dtoaconversions, see Section 11.2, “Type Conversion in Expression Evaluation”.References: See also Bug #12860, Bug #21497, Bug #26788, Bug #24541, Bug #34015.
Incompatible Change: The Unicode implementation has been extended to provide support for supplementary characters that lie outside the Basic Multilingual Plane (BMP). Noteworthy features:
utf16andutf32character sets have been added. These correspond to the UTF-16 and UTF-32 encodings of the Unicode character set, and they both support supplementary characters.The
utf8mb4character set has been added. This is similar toutf8, but its encoding allows up to four bytes per character to enable support for supplementary characters.The
ucs2character set is essentially unchanged except for the inclusion of some newer BMP characters.
In most respects, upgrading to MySQL 5.5 should present few problems with regard to Unicode usage, although there are some potential areas of incompatibility. These are the primary areas of concern:
For the variable-length character data types (
VARCHARand theTEXTtypes), the maximum length in characters is less forutf8mb4columns than forutf8columns.For all character data types (
CHAR,VARCHAR, and theTEXTtypes), the maximum number of characters that can be indexed is less forutf8mb4columns than forutf8columns.
Consequently, if you want to upgrade tables from
utf8toutf8mb4to take advantage of supplementary-character support, it may be necessary to change some column or index definitions.For additional details about the new Unicode character sets and potential incompatibilities, see Section 9.1.10, “Unicode Support”, and Section 9.1.11, “Upgrading from Previous to Current Unicode Support”.
Incompatible Change: Several columns were added to the
INFORMATION_SCHEMA.ROUTINEStable to provide information about theRETURNSclause data type for stored functions:DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,CHARACTER_SET_NAME, andCOLLATION_NAME.This change produces an incompatibility for applications that depend on column order in the
ROUTINEStable because the new columns appear between theROUTINE_TYPEandDTD_IDENTIFIERcolumns. Such applications may need to be adjusted to account for the new columns.Important Change: Replication:
RESET MASTERandRESET SLAVEnow reset the values shown forLast_IO_Error,Last_IO_Errno,Last_SQL_Error, andLast_SQL_Errnoin the output ofSHOW SLAVE STATUS. (Bug #34654)References: See also Bug #44270.
Important Change: The
--skip-thread-priorityoption is now deprecated such that the server will not change the thread priorities by default. Giving threads different priorities might yield marginal improvements in some platforms (where it actually works), but it might instead cause significant degradation depending on the thread count and number of processors. Meddling with the thread priorities is a not a safe bet as it is very dependent on the behavior of the CPU scheduler and system where MySQL is being run. (Bug #35164, Bug #37536)Cluster Replication: Replication: MySQL Replication now supports attribute promotion and demotion for row-based replication between columns of different but similar types on the master and the slave. For example, it is possible to promote an
INTcolumn on the master to aBIGINTcolumn on the slave, and to demote aTEXTcolumn to aVARCHARcolumn.The implementation of type demotion distinguishes between lossy and non-lossy type conversions, and their use on the slave can be controlled by setting the
slave_type_conversionsglobal server system variable.For more information, see Row-based replication: attribute promotion and demotion. (Bug #47163, Bug #46584)
Replication: For replication based on row-based and mix-format binary logging, it is now safe to mix transactional and nontransactional statements within a transaction. The nontransactional statements are logged immediately rather than waiting until the transaction ends, ensuring that their results are logged and replicated correctly regardless of the result of the transaction.
mysqltest has a new
--max-connectionsoption to set a higher number of maximum permitted server connections than the default 128. This option can also be passed using mysql-test-run.pl. (Bug #51135)mysql-test-run.pl has a new
--portbaseoption and a correspondingMTR_PORT_BASEenvironment variable for setting the port range, as an alternative to the existing--build-threadoption. (Bug #50182)SHOW PROFILE CPUhas been ported to Windows. Thanks to Alex Budovski for the patch. (Bug #50057)mysql-test-run.pl now has a
--gprofoption that runs the server through the gprof profiler, much the same way the currently supported--gcovoption runs it through gcov. (Bug #49345)mysqltest now has a
lowercase_resultcommand that converts the output of the next statement to lowercase. This is useful for test cases where the lettercase may vary between platforms. (Bug #48863)mysqltest now has a
remove_files_wildcardcommand that removes files matching a pattern from a directory. (Bug #39774)MySQL support for adding collations using LDML specifications did not support the
<i>identity rule that indicates one character sorts identically to another. The<i>rule now is supported. See Section 9.4.4.2, “LDML Синтаксис Supported in MySQL”. (Bug #37129)For boolean options, the option-processing library now prints additional information in the
--helpmessage: If the option is enabled by default, the message says so and indicates that the--skipform of the option disables the option. This affects all compiled MySQL programs that use the library. (Bug #35224)The use of the
SQL_CACHEandSQL_NO_CACHEoptions inSELECTstatements now is checked more restrictively: 1) Previously, both options could be given in the same statement. This is no longer true; only one can be given. 2) Previously, these options could be given inSELECTstatements that were not at the top-level. This is no longer true; the options are not permitted in subqueries (including subqueries in theFROMclause, andSELECTstatements in unions other than the firstSELECT. (Bug #35020)The mysql client now has an
--auto-vertical-outputoption, which causes result sets to be displayed vertically if they are too wide for the current window, and uses normal tabular format otherwise. (This applies to statements terminated by;or\G.) (Bug #26780)TRUNCATE TABLEnow is permitted for a table for which aWRITElock has been acquired withLOCK TABLES. (Bug #20667)References: See also Bug #46452.
FLUSH LOGSnow takes an optionallog_typevalue so thatFLUSHcan be used to flush only a specified log type. Theselog_typeLOGSlog_typeoptions are permitted:BINARYcloses and reopens the binary log files.ENGINEcloses and reopens any flushable logs for installed storage engines.ERRORcloses and reopens the error log file.GENERALcloses and reopens the general query log file.RELAYcloses and reopens the relay log files.SLOWcloses and reopens the slow query log file.
Thanks to Eric Bergen for the patch to implement this feature. (Bug #14104)
Previously, prepared
CALLstatements could be used through the C API only for stored procedures that produce at most one result set, and applications could not use placeholders forOUTorINOUTparameters. For preparedCALLstatements used usingPREPAREandEXECUTE, placeholders could not be used forOUTorINOUTparameters.For the C API, prepared
CALLsupport now is expanded in the following ways:A stored procedure can produce any number of result sets. The number of columns and the data types of the columns need not be the same for all result sets.
The final values of
OUTandINOUTparameters are available to the calling application after the procedure returns. These parameters are returned as an extra single-row result set following any result sets produced by the procedure itself. The row contains the values of theOUTandINOUTparameters in the order in which they are declared in the procedure parameter list.A new C API function,
mysql_stmt_next_result(), is available for processing stored procedure results. See Section 21.9.16, “C API Support for PreparedCALLStatements”.The
CLIENT_MULTI_RESULTSflag now is enabled by default. It no longer needs to be enabled when you callmysql_real_connect(). (This flag is necessary for executing stored procedures because they can produce multiple result sets.)
For
PREPAREandEXECUTE, placeholder support forOUTandINOUTparameters is now available. See Section 12.2.1, “CALLСинтаксис”. (Bug #11638, Bug #17898)MySQL now supports IPv6 connections to the local host, using the address
::1. For example:shell>
mysql -h ::1The address
::1can be specified in account names in statements such asCREATE USER,GRANT, andREVOKE. For example:mysql>
CREATE USER 'bill'@'::1' IDENTIFIED BY 'secret';mysql>GRANT SELECT ON mydb.* TO 'bill'@'::1';The default set of accounts created during MySQL installation now includes an account for
'root'@'::1'.See Section 5.4.3, “Specifying Account Names”, and Section 2.10.2, “Securing the Initial MySQL Accounts”. (Bug #8836)
Three options were added to mysqldump make it easier to generate a dump from a slave server:
--dump-slaveis similar to--master-data, but theCHANGE MASTER TOstatement contains binary log coordinates for the slave's master host, not the slave itself.--apply-slave-statementscausesSTOP SLAVEandSTART SLAVEstatements to be added before theCHANGE MASTER TOstatement and at the end of the output, respectively.--include-master-host-portcauses theCHANGE MASTER TOstatement to includeMASTER_PORTandMASTER_HOSToptions for the slave's master.
(Bug #8368)
mysqladmin now permits the password value to be omitted following the
passwordcommand. In this case, mysqladmin prompts for the password value, which enables you to avoid specifying the password on the command line. Omitting the password value should be done only ifpasswordis the final command on the mysqladmin command line. Otherwise, the next argument is taken as the password. (Bug #5724)Code that produces query IDs and updates the value of the
Threads_runningstatus variable no longer acquires a global lock that also protects the list of all connections. Instead, it relies on atomic increment and decrement instructions. This improves scalability and to a certain extent alleviates the problem described in Bug #11751904.References: See also Bug #42930.
The
optimizer_switchsystem variable now has anengine_condition_pushdownflag to control whether storage engine condition pushdown optimization is used. As a consequence, theengine_condition_pushdownsystem variable now is deprecated.The server now provides a pluggable audit interface that enables information about server operations to be reported to interested parties. Audit plugins may register with the audit interface to receive notification about server operations. When an auditable event occurs within the server, the server determines whether notification is needed. For each registered audit plugin, the server checks the event against those event classes in which the plugin is interested and passes the event to the plugin if there is a match. For more information, see Section 22.2.3.6, “Audit Plugins”.
Some conversions between Japanese character sets are more efficient.
When the server detects
MyISAMtable corruption, it now writes additional information to the error log, such as the name and line number of the source file, and the list of threads accessing the table. Пример:Got an error from thread_id=1, mi_dynrec.c:368. This is useful information to include in bug reports.The
TABLESPACEStable has been added toINFORMATION_SCHEMAfor tracking tablespace details.Added the
PARAMETERStable toINFORMATION_SCHEMA. ThePARAMETERStable provides information about stored procedure and function parameters, and about return values for stored functions.The maximum length of table comments was extended from 60 to 2048 characters. The maximum length of column comments was extended from 255 to 1024 characters. Index definitions now can include a comment of up to 1024 characters.
Bugs Fixed
Security Fix: The server crashed if an account with the
CREATE ROUTINEprivilege but not theEXECUTEprivilege attempted to create a stored procedure. (Bug #44798)Security Enhancement: When the
DATA DIRECTORYorINDEX DIRECTORYclause of aCREATE TABLEstatement referred to a subdirectory of the data directory through a symlinked component of the data directory path, it was accepted, when for security reasons it should be rejected. (Bug #39277)Performance: Replication: When writing events to the binary log, transactional events (that is, events that operate on transactional tables) are written to a thread-specific transaction cache, which is then written to the binary log on commit. To handle nontransactional events, there was a lock taken on the binary log (when entering the function
MYSQL_BIN_LOG::write()), even when the event was written to the transaction cache instead of the binary log, causing a major bottleneck in replication performance. (Bug #42757)Incompatible Change: Replication: The
binlog_formatsystem variable can no longer be set inside a transaction. In other words, the binary logging format can no longer be changed while a transaction is in progress. (Bug #47863)Incompatible Change: Replication: Concurrent statements using a stored function and
DROP FUNCTIONfor that function could break statement-based replication.DDL statements for stored procedures and functions are now prohibited while a
LOCK TABLESstatement is in effect. (Bug #30977)References: See also Bug #57663.
Incompatible Change: For debug builds, attempts to execute
RESETstatements within a transaction that had acquired metadata locks led to an assertion failure.As a result of this bug fix,
RESETstatements now cause an implicit commit. (Bug #51336)Incompatible Change: A deadlock occurred for this sequence of events: Session 1 locked a table using
LOCK TABLES; Session 2 dropped the database containing the table; Session 1 created any database.As a consequence of this bug fix,
CREATE DATABASEis not permitted within a session that has an activeLOCK TABLESstatement. (Bug #49988)Incompatible Change:
CREATE TABLEstatements (includingCREATE TABLE ... LIKE) are now prohibited whenever aLOCK TABLESstatement is in effect.One consequence of this change is that
CREATE TABLE ... LIKEmakes the same checks asCREATE TABLEand does not just copy the.frmfile. This means that if the current SQL mode is different from the mode in effect when the original table was created, the table definition might be considered invalid for the new mode and the statement will fail. (Bug #42546, Bug #11751609)Incompatible Change: Due to work done for Bug #989,
FLUSH TABLESis not permitted when there is an activeLOCK TABLES ... READ. This caused a problem with mysqlhotcopy, which used that sequence of statements. mysqlhotcopy now usesFLUSH TABLESto flush and lock tables. If mysqlhotcopy is used with a server older than MySQL 5.5.3 that does not support this statement, it has a new optiontbl_listWITH READ LOCK--old_serverthat causes it to use the previous statement sequence.To provide a workaround for the restriction that
FLUSH TABLESis no longer permitted when there is an activeLOCK TABLES ... READ,FLUSH TABLEShas a new variant,FLUSH TABLES, that enables tables to be flushed and locked in a single operation. As a result of this change, applications that previously used this statement sequence to lock and flush tables will fail:tbl_listWITH READ LOCKLOCK TABLES
tbl_listREAD; FLUSH TABLEStbl_list;Such applications should now use this statement instead:
FLUSH TABLES
tbl_listWITH READ LOCK;(Bug #42465)
Incompatible Change: For application compatibility reasons, when
sql_auto_is_nullis 1, MySQL convertstoauto_inc_colIS NULL. However, this was being done regardless of whether the predicate was alone or at the top level. Now it occurs only when it is a single top-level predicate.auto_inc_col= LAST_INSERT_ID()In conjunction with this bug fix, the default value of the
sql_auto_is_nullsystem variable has been changed from 1 to 0, which may cause incompatibilities with existing applications. (Bug #41371)Incompatible Change: The parser accepted illegal syntax in a
FOREIGN KEYclause:Multiple
MATCHclauses.Multiple
ON DELETEclauses.Multiple
ON UPDATEclauses.MATCHclauses specified afterON UPDATEorON DELETE. In case of multiple redundant clauses, this leads to confusion, and implementation-dependent results.
These illegal syntaxes are now properly rejected. Existing applications that used them will require adjustment. (Bug #34455)
Incompatible Change: The parser accepted an
INTOclause in nestedSELECTstatements, which is invalid because such statements must return their results to the outer context. This syntax is no longer permitted. (Bug #33204)Incompatible Change: The
Lockedthread state was equivalent to theTable lockstate and has been removed. It no longer appears inSHOW PROCESSLISToutput. (Bug #28870)Incompatible Change: Several changes were made to alias resolution in multiple-table
DELETEstatements so that it is no longer possible to have inconsistent or ambiguous table aliases.In MySQL 5.1.23, alias declarations outside the
table_referencespart of the statement were disallowed for theUSINGvariant of multiple-tableDELETEsyntax, to reduce the possibility of ambiguous aliases that could lead to ambiguous statements that have unexpected results such as deleting rows from the wrong table.Now alias declarations outside
table_referencesare disallowed for all multiple-tableDELETEstatements. Alias declarations are permitted only in thetable_referencespart.Incorrect:
DELETE FROM t1 AS a2 USING t1 AS a1 INNER JOIN t2 AS a2; DELETE t1 AS a2 FROM t1 AS a1 INNER JOIN t2 AS a2;
Correct:
DELETE FROM t1 USING t1 AS a1 INNER JOIN t2 AS a2; DELETE t1 FROM t1 AS a1 INNER JOIN t2 AS a2;
Previously, for alias references in the list of tables from which to delete rows in a multiple-table delete, the default database is used unless one is specified explicitly. For example, if the default database is
db1, the following statement does not work because the unqualified alias referencea2is interpreted as having a database ofdb1:DELETE a1, a2 FROM db1.t1 AS a1 INNER JOIN db2.t2 AS a2 WHERE a1.id=a2.id;
To correctly match an alias that refers to a table outside the default database, you must explicitly qualify the reference with the name of the proper database:
DELETE a1, db2.a2 FROM db1.t1 AS a1 INNER JOIN db2.t2 AS a2 WHERE a1.id=a2.id;
Now alias resolution does not require qualification and alias references should not be qualified with the database name. Qualified names are interpreted as referring to tables, not aliases.
Statements containing alias constructs that are no longer permitted must be rewritten. (Bug #27525)
References: See also Bug #30234.
Incompatible Change:
DROP TABLEnow is permitted only if you have acquired aWRITElock withLOCK TABLES, or if you hold no locks, or if the table is aTEMPORARYtable.Previously, if other tables were locked, you could drop a table with a read lock or no lock, which could lead to deadlocks between clients. The new stricter behavior means that some usage scenarios will fail when previously they did not. (Bug #25858)
Incompatible Change: If a data definition language (DDL) statement occurred for a table that was being used by another session in an active transaction, statements could be written to the binary log in the wrong order. For example, this could happen if
DROP TABLEoccurred for a table being used in a transaction. This is now prevented by deferring release of metadata locks on tables used within a transaction until the transaction ends.This bug fix results in some incompatibilities with previous versions:
A table that is being used by a transaction within one session cannot be used in DDL statements by other sessions until the transaction ends.
FLUSH TABLESis not permitted when there is an activeLOCK TABLES ... READ. UseFLUSH TABLESinstead. This causes a problem with mysqlhotcopy, fixed in Bug #42465.tbl_listWITH READ LOCK
(Bug #989, Bug #39675)
Important Change: Replication: For an engine that supported only row-based replication, replication stopped with an error when executing row events.
For information about changes in how the binary logging format is determined in relation to statement type and storage engine logging capabilities, see Section 5.2.4.3, “Mixed Binary Logging Format”.
As part of the fix for this issue, the
EXAMPLEstorage engine is now changed so that it supports statement-based logging only. Previously, it supported row-based logging only. (Bug #39934, Bug #11749859)Important Change: The IPv6 loopback address
::1was interpeted as a hostname rather than a numeric IP address.In addition, the IPv6-enabled server on Windows interpeted the hostname
localhostas::1only, which failed to match the default'root'@'127.0.0.1'account in themysql.userprivilege table.ЗамечаниеAs a result of this fix, a
'root'@'::1'account is added to themysql.usertable as one of the default accounts created during MySQL installation.(Bug #43006)
References: See also Bug #38247, Bug #45283, Bug #45584, Bug #45606.
InnoDB Storage Engine: Replication: Column length information generated by
InnoDBdid not match that generated byMyISAM, which caused invalid metadata to be written to the binary log when trying to replicateBITcolumns. (Bug #49618)InnoDB Storage Engine:
SHOW INNODB STATUScould display incorrect information about deadlocks, when the deadlock detection routine stops early (to avoid excessive CPU usage). (Bug #49001)InnoDB Storage Engine: Concurrent execution of
ALTER TABLEforInnoDBtable and a transaction that tried to read and then update the table could result in a deadlock between table-level locks andInnoDBrow locks, which was detected only after theinnodb_lock_wait_timeouttimeout occurred. (Bug #37346)Partitioning: When using a debug build of MySQL, if a query against a partitioned table having an index on one or more
DOUBLEcolumns used that index, the server failed with an assertion. (Bug #45816)Partitioning: The first time that a query against the
INFORMATION_SCHEMA.TABLEStable for partitioned tables using theARCHIVEengine was run, it returned invalid data. If the server had been restarted since such a table had been created, or if the table had never actually been opened, itsDATA_LENGTHwas reported as 0 bytes. (The second and subsequent attempts to issue the same query returned the expected result.) (Bug #44622)Partitioning:
ALTER TABLEon a partitioned table caused unnecessary deadlocks. (Bug #43867)References: See also Bug #46654. This bug is a regression of Bug #40181.
Partitioning: Attempting to drop a partitioned table from one connection while waiting for the completion of an
ALTER TABLEthat had been issued from a different connection, and that changed the storage engine used by the table, could cause the server to crash. (Bug #42438)Partitioning: After attempting to create a duplicate index on a partitioned table (and having the attempt fail as expected), a subsequent attempt to create a new index on the table caused the server to hang. (Bug #40181)
Partitioning: When used on a partitioned table,
ALTER TABLEproduced the wrong error message when the name of a nonexistent storage engine was used in theENGINEclause. (Bug #35765)Partitioning: When one user was in the midst of a transaction on a partitioned table, a second user performing an
ALTER TABLEon this table caused the server to hang. (Bug #34604)Partitioning: Portions of the partitioning code were refactored in response to potential regression issues uncovered while working on the fix for Bug #31210. (Bug #32115)
References: See also Bug #40281.
Replication: When using the row-based or mixed replication format with a debug build of the MySQL server, inserts into columns using the
utf32character set on the master caused the slave to crash. (Bug #51787)References: See also Bug #51716.
Replication: When using the row-based or mixed replication format, column values using the
utf16character set on the master were padded incorrectly on the slave. (Bug #51716)References: See also Bug #51787.
Replication: An issue internal to the code, first seen in Bug #49132 but not completely resolved in the fix for that bug, was removed. This should prevent similar issues to those in the previous bug with
binlog_formatchanges following DDL statements.For developers working with the MySQL Server code: the public class variable
THD::current_stmt_binlog_row_basedwas supposed to have been removed as part of the fix for Bug #39934, but was still present in the code. If a developer later tried to use this variable, it could cause the previous issues to re-occur, and possibly new ones to arise. The variable has now been removed; the previously added class functionsTHD::is_current_stmt_binlog_format_row(),THD::set_current_stmt_binlog_format_row(), andTHD::clear_current_stmt_binlog_format_row()should be used instead. (Bug #51021)References: See also Bug #11749859.
Replication: Adding an index to a table on the master caused the slave to stop logging slow queries to the slow query log. (Bug #50620)
Replication: If a
CHANGE MASTER TOstatement setMASTER_HEARTBEAT_PERIODto 30 or higher,Slave_received_heartbeatsdid not increase on the slave. This caused the slave to reconnect before the time indicated byslave_net_timeouthad elapsed.This issue affected big-endian 64-bit platforms such as Solaris/SPARC. (Bug #50296)
Replication: The error message given when trying to replicate (using statement-based mode) insertions into an
AUTO_INCREMENTcolumn by a stored function or a trigger was improved. (Bug #50192)Replication: The server could deadlock when
FLUSH LOGSwas executed concurrently with DML statements. To fix this problem, nontransactional changes are now always flushed before transactional changes. (Bug #50038)Replication: Metadata for
GEOMETRYfields was not properly stored by the slave in its definitions of tables. (Bug #49836)References: See also Bug #48776.
Replication: Statement-based replication of user variables having numeric data types did not always work correctly. (Bug #49562, Bug #11757508)
Replication: When using the semisynchronous replication plugin on Windows, the wait time calculated when the master was waiting for reply from the slave was incorrect. In addition, when the wait time was less than the current time, the master did not wait for a reply at all.
This issue was caused by the fact that a different internal function was used to get current time by the plugin on Windows as opposed to other platforms, and this function was not correctly implemented. Now the Windows version of the plugin uses the same function as other platforms for this purpose. (Bug #49557)
Replication: Due to a change in the format of the information used by the slave to connect to the master, which could cause to reject connection attempts to older masters by newer slaves. (Bug #49259)
References: This bug was introduced by Bug #13963.
Replication: When using row-based logging, a failing
INSERT ... SELECTstatement on a nontransactional table was not flagged correctly, such that, if a rollback was requested and no other nontransactional table had been updated, nothing was written to the binary log. (Bug #47175)References: See also Bug #40278.
Replication: When using row-based replication, the incomplete logging of a group of events involving both transaction and nontransactional tables could cause
STOP SLAVEto hang. (Bug #45940)References: See also Bug #319, Bug #38205.
Replication: There were two related issues concerning handling of unsafe statements and setting of the binary logging format when there were open temporary tables on the master, and the existing replication format was row-based or mixed:
When using
binlog_format=ROW, and an unsafe statement was executed while there were open temporary tables on the master, the statementSET @@session.binlog_format = MIXEDfailed with the error Cannot switch out of the row-based binary log format when the session has open temporary tables.When using
binlog_format=MIXED, and an unsafe statement was executed while there were open temporary tables on the master, the statementSET @@session.binlog_format = STATEMENTcaused any subsequent DML statements to be written to the binary log using the row-based format instead of the statement-based format.
(Bug #45855, Bug #45856)
Replication: Statements that updated
AUTO_INCREMENTcolumns in multiple tables were logged using the row-based format when--binlog_formatwas set toMIXED, but did not cause an Unsafe statement warning to be generated when--binlog_formatwas set toSTATEMENT. (Bug #45827)References: See also Bug #39934, Bug #11749859.
Replication: Even though
INSERT DELAYEDstatements are unsafe for statement-based replication, they caused the statement only to be logged in row format when the binary logging format wasMIXED, but did not cause a warning to be generated when the binary logging format wasSTATEMENT. (Bug #45825)Replication: When using
MIXEDbinary logging format, statements containing aLIMITclause and occurring in stored routines were not written to the log as row events. (Bug #45785)Replication: When using statement-based replication, database-level character sets were not always honored by the replication SQL thread. This could cause data inserted on the master using
LOAD DATAto be replicated using the wrong character set.ЗамечаниеThis was not an issue when using row-based replication.
(Bug #45516)
Replication:
STOP SLAVEdid not flush the relay log or themaster.infoorrelay-log.infofiles, which could lead to corruption if the server crashed. (Bug #44188)Replication: Large transactions and statements could corrupt the binary log if the size of the cache (as set by
max_binlog_cache_size) was not large enough to store the changes.Now, for transactions that do not fit into the cache, the statement is not logged, and the statement generates an error instead.
For nontransactional changes that do not fit into the cache, the statement is also not logged—an incident event is logged after committing or rolling back any pending transaction, and the statement then raises an error.
ЗамечаниеIf a failure occurs before the incident event is written the binary log, the slave does not stop, and the master does not report any errors.
(Bug #43929, Bug #11752675)
References: See also Bug #37148, Bug #11748696, Bug #46166, Bug #11754544.
Replication: On Windows,
RESET MASTERfailed in the event of a missing binlog file rather than issuing a warning and completing the rest of the statement. (Bug #42150, Bug #42218)Replication: Executing the sequence of statements
RESET SLAVE,RESET MASTER, andFLUSH LOGS, when binary log or relay log files listed in the index file could not be found, could cause the server to crash. This could happen, for example, when these files had been moved or deleted manually. (Bug #41902)Replication: MySQL creates binary logs in a numbered sequence, with a maximum possible 4294967295 concurrent log files, 4294967295 being the maximum value for an unsigned long integer. However, binary log file extensions were turned into negative numbers once the variable used to hold the value reached the maximum value for a signed long integer (2147483647). Consequently, when the sequence value was incremented to the next (negative) number, MySQL tried to create the file using a
.000000extension, causing the server to fail since this file already existed.Negative file extensions are no longer permitted, and an error is returned when the limit is reached. In addition,
FLUSH LOGSnow also reports warnings to the user, if the extension number has reached the limit, and warnings are printed to the error log when the limit is approaching. (Bug #40611)Replication: Issuing concurrent
STOP SLAVE,START SLAVE, andRESET SLAVEstatements using different connections caused the replication slave to crash. (Bug #38716)References: See also Bug #38715, Bug #44312.
Replication: A slave compiled using
--with-libeventand run with--thread-handling=pool-of-threadscould sometimes crash. (Bug #36929)Replication: mysqlbinlog sometimes failed when trying to create temporary files; this was because it ignored the specified temp file directory and tried to use the system
/tmpdirectory instead. (Bug #35546)References: See also Bug #35543.
Replication: A
CHANGE MASTER TOstatement with noMASTER_HEARTBEAT_PERIODoption failed to reset the heartbeat period to its default value. (Bug #34686)Replication: Formerly, only slaves that had been started with the
--report-hostsoption were visible in the output ofSHOW SLAVE HOSTS. Now, all slaves that are registered with the master appear inSHOW SLAVE HOSTSoutput.As part of the fix for this issue, the
Rpl_recovery_rankcolumn, which had appeared in the output ofSHOW SLAVE HOSTSin some MySQL releases, was removed because the corresponding server variablerpl_recovery_rank(now deprecated) was never actually used. (Bug #13963)References: See also Bug #21132, Bug #21869.
mysqld_safe did not pass the correct default value of
plugin_dirto mysqld. (Bug #51938)mysqld_multi failed due to a syntax error in the script. (Bug #51468)
ALTER TABLEon aMERGEtable that has been locked usingLOCK TABLES ... WRITEincorrectly produced anER_TABLE_NOT_LOCKED_FOR_WRITEerror. (Bug #51240)The mysql could default to the
asciicharacter set, which is not a valid character set choice for MySQL. Thelatin1character set will now be used when an ASCII environment has been identified. (Bug #51166)On some Unix/Linux platforms, an error during build from source could be produced, referring to a missing
LT_INITprogram. This is due to versions of libtool 2.1 and earlier. (Bug #51009)Referring to a subquery result in a
HAVINGclause could produce incorrect results. (Bug #50995)Aggregate functions on
TIMESTAMPcolumns could yield incorrect or undefined results. (Bug #50888)The optimizer normally prefers use of
filesortplus the join cache to a full index scan. But this combination was used even if the index is clustered, in which case, the clustered index scan can be faster. (Bug #50843)For debug builds,
SHOW BINARY LOGSraised an assertion if binary logging was not enabled. (Bug #50780)The server did not recognize that the stored procedure cache became invalid if a view was created or modified within a procedure, resulting in a crash. (Bug #50624)
Incorrect handling of
BITcolumns in temporary tables could lead to spurious duplicate-key errors. (Bug #50591)The second or subsequent invocation of a stored procedure containing
DROP TRIGGERcould cause a server crash. (Bug #50423)The return values for calls to put information into the stored routine cache were not consistently checked, raising an assertion. (Bug #50412)
Full-text queries that used the truncation operator (
*) could enter an infinite loop. (Bug #50351)For debug builds, an assertion was incorrectly raised in the optimizer when matching
ORDER BYexpressions. (Bug #50335)Queries optimized with
GROUP_MIN_MAXdid not clean upKEYREADoptimizations properly, causing subsequent queries to return incomplete rows. (Bug #49902)mysql --show-warnings crashed if the server connection was lost. (Bug #49646)
For string-valued system variables containing multibyte characters, the byte length was used in contexts where the character length was more appropriate. (Bug #49645)
SHOW VARIABLESdid not correctly display string-valued system variables that contained\0characters. (Bug #49644)MySQL program option-processing code incorrectly displayed some options when printing ambiguous-option errors. (Bug #49640)
For dynamic format
MyISAMtables containingLONGTEXTcolumns, a bulkINSERT ... ON DUPLICATE KEY UPDATEor bulkREPLACEcould cause corruption. (Bug #49628)Setting
binlog_formattoDEFAULTassigned a value different from the default. (Bug #49540)For debug builds, with
sql_safe_updatesenabled, a multiple-tableUPDATEwith theIGNOREmodifier could raise an assertion. (Bug #49534)EXPLAIN EXTENDEDcrashed trying to print column names for a subquery in theFROMclause when the table had gone out of scope. (Bug #49487)For
InnoDBtables, the test for using an index forORDER BYsorting did not distinguish between primary keys and secondary indexes and expected primary key values to be concatenated to index values the way they are to secondary key values. (Bug #49324)mysqltest no longer permits you to execute an SQL statement on a connection after doing a
sendcommand, unless you do areapfirst. This was previously accepted but could produce unpredictable results. (Bug #49269)Valgrind warnings for several logging messages were corrected. (Bug #49130)
For debug builds on Windows, warnings about incorrect use of debugging directives were written to the error log. The directives were rewritten to eliminate these messages. (Bug #49025)
Plugins in a binary release could not be installed into a debug version of the server. (Bug #49022)
On POSIX systems, calls to
select()with a file descriptor set larger thanFD_SETSIZEresulted in unpredictable I/O errors; for example, when a large number of tables required repair. (Bug #48929)A dependent subquery containing
COUNT(DISTINCTcould be evaluated incorrectly. (Bug #48920)col_name))If a stored function contained a
RETURNstatement with anENUMvalue in theucs2character set,SHOW CREATE FUNCTIONandSELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINESreturned incorrect values. (Bug #48766)An
.ARZfile missing from the database directory caused the server to crash. (Bug #48757)Running
SHOW CREATE TABLEon a viewv1that contained a function which accessed another viewv2could trigger a infinite loop if the view referenced within the function (v2) caused a warning to be raised while being opened. (Bug #48449)Invalid memory reads could occur following a query that referenced a
MyISAMtable multiple times with a write lock. (Bug #48438)For debug builds, creating a view containing a row constructor raised an assertion. (Bug #48294)
An aliasing violation in the C API could lead to a crash. (Bug #48284)
Slow
CALLstatements were not always logged to the slow query log because execution time for multiple-statement stored procedures was assessed incorrectly. (Bug #47905)For debug builds, killing a
SELECTretrieving from a view that was processing a function raised an assertion. (Bug #47736)Failure to open a view with a nonexistent
DEFINERwas improperly handled and the server crashed later attempting to lock the view. (Bug #47734)If a prepared statement used both a
MERGEtable and a stored function or trigger, execution sometimes failed with a No such table error. (Bug #47648)CREATE VIEWraised an assertion if a temporary table existed with the same name as the view. (Bug #47635)Renaming a column of an
InnoDBtable caused the server to go out of sync with theInnoDBdata dictionary. To avoid this issue, renaming a column uses the older technique of copying all the table data rather than updating the table in-place. (Bug #47621)If a temporary table was created with the same name as a view referenced in a stored routine, routine execution could raise an assertion. (Bug #47313)
Selecting from the process list in the embedded server caused a crash. (Bug #47304)
References: See also Bug #43733.
Programs did not exit if the option file specified by
--defaults-filewas not found. (Bug #47216)Attempts to print octal numbers with
my_vsnprintf()could cause a crash. (Bug #47212)Corrected a potential problem of unintended file overwriting when the
MY_DONT_OVERWRITE_FILEflag was used. (Bug #47126)Deadlock occurred if one session was running a multiple-statement transaction that involved a single partitioned table and another session attempted to alter the table. (Bug #46654)
Valgrind warnings about memory allocation overruns for handling
CREATE FUNCTIONstatements for UDFs were corrected. (Bug #46570)The server could crash attempting to flush privileges after receipt of a
SIGHUPsignal. (Bug #46495)If
INSERT INTOinvoked a stored function that modifiedtbl_nametbl_name, the server crashed. (Bug #46374)HANDLERstatements within a transaction that already holds metadata locks could lead to deadlocks.Before this fix, all handlers for
TEMPORARYtables were reset whenever any base table was opened. (Bug #46224)For queries that used
GROUP_CONCAT(DISTINCT ...), the value ofmax_heap_table_sizewas used for memory allocation, which could be excessive. Now the minimum ofmax_heap_table_sizeandtmp_table_sizeis used. (Bug #46018)Improperly closing tables when
INSERT DELAYEDneeded to reopen tables could cause an assertion failure. (Bug #45949)References: See also Bug #18484.
Grouping by a subquery in a query with a
DISTINCTaggregate function led to incorrect and unordered grouping values. (Bug #45640)For an IPv6-enabled MySQL server, privileges specified using standard IPv4 addresses for hosts were not matched (only IPv4-mapped addresses were handled correctly).
As part of the fix for this bug, a new build option
--disable-ipv6has been introduced. Compiling MySQL with this option causes all IPv6-specific code in the server to be ignored.ImportantIf the server has been compiled using
--disable-ipv6, it is not able to resolve hostnames correctly when run in an IPv6 environment.(Bug #45606)
References: See also Bug #38247, Bug #43006, Bug #45283, Bug #45584.
The hostname cache failed to work correctly. (Bug #45584)
References: See also Bug #38247, Bug #43006, Bug #45283, Bug #45606.
A Windows Installation using the GUI installer would fail with:
MySQL Server 5.1 Setup Wizard ended prematurely The wizard was interrupted before MySQL Server 5.1. could be completely installed. Your system has not been modified. To complete installation at another time, please run setup again. Click Finish to exit the wizard
This was due to a step in the MSI installer that could fail to execute correctly on some environments. (Bug #45418)
Propagation of a large unsigned numeric constant in
WHEREexpressions could lead to incorrect results. This also affectedEXPLAIN EXTENDED, which printed incorrect numeric constants in such transformedWHEREexpressions. (Bug #45360)There was no timeout for attempts to acquire metadata locks (for example, a
DROP TABLEattempt for a table that was open in another transaction would not time out).To handle such situations, there is now a
lock_wait_timeoutsystem variable that specifies the timeout in seconds for attempts to acquire metadata locks. The permitted values range from 1 to 31536000 (1 year). The default is 31536000.This timeout applies to all statements that use metadata locks. These include DML and DDL operations on tables, views, stored procedures, and stored functions, as well as
LOCK TABLES,FLUSH TABLES WITH READ LOCK, andHANDLERstatements.The timeout value applies separately for each metadata lock attempt. A given statement can require more than one lock, so it is possible for the statement to block for longer than the
lock_wait_timeoutvalue before reporting a timeout error. When lock timeout occurs,ER_LOCK_WAIT_TIMEOUTis reported.lock_wait_timeoutdoes not apply to delayed inserts, which always execute with a timeout of 1 year. This is done to avoid unnecessary timeouts because a session that issues a delayed insert receives no notification of delayed insert timeouts.In addition: The unused
table_lock_wait_timeoutsystem variable was removed. TheLOW_PRIORITYmodifier forLOCK TABLES ... WRITElocks now has no effect. The meaning ofLOW_PRIORITYremains as before in other contexts, such as forINSERTorDELETEstatements.innodb_table_locks=0no longer has an effect for tables locked explicitly withLOCK TABLES ... WRITE. It still has an effect for tables locked for read or write byLOCK TABLES ... WRITEimplicitly (for example, through triggers) or byLOCK TABLES ... READ. (Bug #45225, Bug #56272)Valgrind warnings about uninitialized variables in optimizer code were corrected. (Bug #45195)
Killing a delayed-insert thread could cause a server crash. (Bug #45067)
Execution of
FLUSH TABLESorFLUSH TABLES WITH READ LOCKconcurrently withLOCK TABLESresulted in deadlock. (Bug #45066)The
mysql_real_connect()C API function only attempted to connect to the first IP address returned for a hostname. This could be a problem if a hostname mapped to multiple IP address and the server was not bound to the first one returned. Nowmysql_real_connect()attempts to connect to all IPv4 or IPv6 addresses that a domain name maps to. (Bug #45017)References: See also Bug #47757.
For plugins that did not have command-line options other than the ones to select the plugin itself, those options were not displayed in the mysqld help message. (Bug #44797)
Some plugins configured as mandatory could be disabled at server startup. (Bug #44691)
InnoDBtook a shared row lock when executingSELECTstatements inside a stored function as a part of a transaction usingREPEATABLE READ. This prevented other transactions from updating the row. (Bug #44613)MySQL Server permitted the creation of a merge table based on views but crashed when attempts were made to read from that table. The following example demonstrates this:
#Create a test table CREATE TABLE tmp (id int, c char(2)); #Create two VIEWs upon it CREATE VIEW v1 AS SELECT * FROM tmp; CREATE VIEW v2 AS SELECT * FROM tmp; #Finally create a MERGE table upon the VIEWs CREATE TABLE merge (id int, c char(2)) ENGINE=MERGE UNION(v1, v2); #Reading from the merge table lead to a crash SELECT * FROM merge;
The final statement generated the crash. (Bug #44040)
A natural join of
INFORMATION_SCHEMAtables could cause an assertion failure. (Bug #43834)When used in conjunction with
LOCK TABLES,FLUSH TABLEwaited for all tables with old versions to clear from the table definition list, rather than only the named tables. (Bug #43685)tbl_listHANDLERstatements are now not permitted if a table lock has been acquired withLOCK TABLES. (Bug #43272)In the embedded server, stack overflow checks for recursive stored procedure calls did not work and stack overflow could occur. (Bug #43201)
The server could crash if an attempt to open a
MERGEtable childMyISAMtable failed. (Bug #42862)Sign loss could occur in several contexts:
SEC_TO_TIME()could lose the sign of negative arguments.MAKETIME()could lose the sign of negative arguments.Comparison of
TIMEvalues could lose the sign of operands.
(Bug #42661, Bug #42662, Bug #42664)
Setting
key_buffer_sizeto a negative value could lead to very large allocations. Now an error occurs. (Bug #42103)An assertion failure could occur if
OPTIMIZE TABLEwas started on anInnoDBtable and the table was altered to a different storage engine during the optimization operation. (Bug #42074)The state of a thread for the embedded server was always displayed as
Writing to net, which is incorrect because there is no network connection for the embedded server. (Bug #41971)The patch for Bug #10374 broke named-pipe and shared-memory connections on Windows. (Bug #41860)
Purging the stored-routine cache could take a long time and render the server unresponsive. (Bug #41804)
Command-line options for enumeration-type plugin variables were not honored. (Bug #41010)
System variables could be set to invalid values. (Bug #40988)
The
CSVstorage engine did not parse'\X'characters when they occurred in unquoted fields. (Bug #40814)When archive tables were joined on their primary keys, a query returned no result if the optimizer chose to use this index. (Bug #40677)
mysqld_safe did not treat dashes and underscores as equivalent in option names. Thanks to Erik Ljungstrom for the patch to fix this bug. (Bug #40368)
SHOW CREATE VIEWreturned invalid SQL if the definition contained aSELECT'statement where thestring'stringwas longer than the maximum length of a column name, due to the fact that this text was also used as an alias (in theASclause).Because not all names retrieved from arbitrary
SELECTstatements can be used as view column names due to length and format restrictions, the server now checks the conformity of automatically generated column names and rewrites according to a predefined format any names that are not acceptable as view column names before storing the final view definition on disk.In such cases, the name is now rewritten as
Name_exp_, whereposposis the position of the column. To avoid this conversion scheme, define explicit, valid names for view columns using thecolumn_listclause of theCREATE VIEWstatement.As part of this fix, aliases are now generated only for top-level statements. (Bug #40277)
Threads were set to the
Table lockstate in such a way that use of this state by other threads to check for a lock wait was subject to a race condition. (Bug #39897)Plugin shutdown could lead to an assertion failure caused by using an already destroyed mutex in the metadata locking subsystem. (Bug #39674)
Dropping a locked
Mariatable leads to an assertion failure. (Bug #39395)Host name lookup failure could lead to a server crash. (Bug #39153)
flush_cache_records()did not correctly check for errors that should cause statement execution to stop, leading to a server crash. (Bug #39022)InnoDBlogged an error repeatedly trying to load a page into the buffer pool, filling the error log and using excessive disk space. Now the number of attempts is limited to 100, after which the operation aborts with a message. (Bug #38901)Valgrind warnings that occurred for
SHOW TABLE STATUSwithInnoDBtables were silenced. (Bug #38479)An IPv6-enabled MySQL server did not resolve the IP addresses of incoming connections correctly, with the result that a connection that attempted to match any privilege table entries using fully-qualified domain names for hostnames or hostnames using wildcards were dropped. (Bug #38247)
References: See also Bug #43006, Bug #45283, Bug #45584, Bug #45606.
For
CREATE TABLE ... LIKEwith aMERGEsource table that included aUNIONclause, that clause was omitted from the definition of the destination table. (Bug #37371)Previously, statements inside a stored program did not clear the warning list. For example, warnings or errors generated by statements within a trigger or stored function would be accumulated and added to the message list for the statement that activated the trigger or invoked the function, “polluting” the output of
SHOW WARNINGSorSHOW ERRORSfor the outer statement. Normally, messages for a statement that can generate messages replace messages from the previous such statement. The effect was that a statement could have a different effect on the message list depending on whether it executed inside or outside of a stored program.Now within a stored program, successive statements that can generate messages update the message list and replace messages from the previous such statement. Only messages from the last of these statements is copied to the message list for the outer statement. (Bug #36649)
myisampack --join did not create the destination table
.frmfile. (Bug #36573)The parser incorrectly permitted MySQL error code 0 to be specified for a condition handler. (This is incorrect because the condition must be a failure condition and 0 indicates success.) (Bug #36510)
When parsing or formatting interval values of
DAY_MICROSECONDtype, fractional seconds were not handled correctly when more-significant fields were implied or omitted. (Bug #36466)mysql_install_db failed if run as
rootand the root directory (/) was not writable. (Bug #36462)mysql_stmt_prepare()did not reset the list of messages (those messages available usingSHOW WARNINGS). (Bug #36004)A global read lock obtained with
FLUSH TABLES WITH READ LOCKdid not prevent sessions from creating tables. (Bug #35935)mysqlbinlog left temporary files on the disk after shutdown, leading to the pollution of the temporary directory, which eventually caused mysqlbinlog to fail. This caused problems in testing and other situations where mysqlbinlog might be invoked many times in a relatively short period of time. (Bug #35543)
When building MySQL when using a different target directory (for example using the
VPATHenvironment variable), the build of the embeddedreadlinecomponent failed. (Bug #35250)String-valued system variables could be assigned literal values, but could not be assigned values using expressions. Now expressions are legal. (Bug #34883, Bug #46314)
The
sql_modesystem variable could be assigned the illegal value of'?'. (Bug #34834)Compiling MySQL on FreeBSD failed due to missing definitions for certain network constants. (Bug #34292)
Creation of a temporary
BLOBorTEXTcolumn could create a column with the wrong maximum length. (Bug #33969)INSERT INTO ... VALUES(DEFAULT)failed to insert the correct value forENUMcolumns. ForMyISAMtables, an empty value was inserted. ForCSVtables, the table became corrupt. (Bug #33717)When
read_onlywas enabled, the server incorrectly prevented data modifications toTEMPORARYtables belonging to transactional storage engines such asInnoDB. (Bug #33669)Constant expressions in
WHERE,HAVING, orONclauses were not cached, but were evaluated for each row. This caused a slowdown of query execution, especially if constant user-defined functions or stored functions were used. (Bug #33546)Plugins could find the unqualified form of their system variables but not the qualified form. For example, a plugin
pwith a system variablesvcould findsvbut notp_sv. (Bug #32902)Killing a statement that invoked a stored function could return an incorrect error message indicating table corruption rather than that the statement had been interrupted. (Bug #32140)
Occurrence of an error within a stored routine did not always cause immediate statement termination. (Bug #31881)
For
DROP FUNCTION(that is, when the function name is qualified with the database name), the statement should apply only to a stored function nameddb_name.func_namefunc_namein the given database. However, if a UDF with the same name existed, the statement dropped the UDF instead. (Bug #31767)mysqld sometimes miscalculated the number of digits required when storing a floating-point number in a
CHARcolumn. This caused the value to be truncated, or (when using a debug build) caused the server to crash. (Bug #26788)References: See also Bug #12860.
ALTER TABLEcould not be used to add columns to a table if the table had an index on autf8column with aTEXTdata type. (Bug #26180)If an operation had an
InnoDBtable, and two triggers,AFTER UPDATEandAFTER INSERT, competing for different resources (such as two distinctMyISAMtables), the triggers were unable to execute concurrently. In addition,INSERTandUPDATEstatements for theInnoDBtable were unable to run concurrently. (Bug #26141)Statements to create, alter, or drop a view were not waiting for completion of statements that were using the view, which led to incorrect sequences of statements in the binary log when statement-based logging was enabled. (Bug #25144)
Previously, the server handled character data types for a stored routine parameter, local routine variable created with
DECLARE, or stored function return value as follows: If theCHARACTER SETattribute was present, theCOLLATEattribute was not supported, so the character set's default collation was used. (This includes use ofBINARY, which in this context specifies the binary collation of the character set.) If there was noCHARACTER SETattribute, the database character set and its default collation were used.Now for character data types, if there is a
CHARACTER SETattribute in the declaration, the specified character set and its default collation is used. If theCOLLATEis also present, that collation is used rather than the default collation. If there is noCHARACTER SETattribute, the database character set and collation in effect at routine creation time are used. (The database character set and collation are given by the value of thecharacter_set_databaseandcollation_databasesystem variables.) (Bug #24690)Data truncated for columnwarnings were generated for some (constant) values that did not have too high precision. (Bug #24541)col_numat rowrow_numA statement that caused a circular wait among statements did not return a deadlock error. Now the server detects deadlock and returns
ER_LOCK_DEADLOCK. (Bug #22876)CREATE TABLE ... LIKEdid not always produce an error is the source table column defaults were illegal for the current version of MySQL. (This could occur if the table was created using an older server that was less restrictive about legal default values.) (Bug #22090)Several data-modification statements were not being counted toward the
MAX_UPDATES_PER_HOURuser resource limit. (Bug #21793)When inserting an extraordinarly large value into a
DOUBLEcolumn, the value could be truncated in such a way that the new value cannot be reloaded manually or from the output of mysqldump. (Bug #21497)The value of
sql_slave_skip_counterwas empty when displayed bySHOW VARIABLESorINFORMATION_SCHEMA.GLOBAL_VARIABLES. (Bug #20413, Bug #37187)For
INSERT DELAYEDstatements issued for a table while anALTER TABLEoperation on the table was in progress, the server could return a spuriousServer shutdown in progresserror. (Bug #18484)References: See also Bug #45949.
Delayed-insert threads were counted as connected but not as created, incorrectly leading to a
Threads_connectedvalue greater than theThreads_createdvalue. (Bug #17954)The character set was not being properly initialized for
CAST()with a type such asCHAR(2) BINARY, which resulted in incorrect results or a server crash. (Bug #17903)Stored procedure exception handlers were catching fatal errors (such as out of memory errors), which could cause execution not to stop to due a continue handler. Now fatal errors are not caught by exception handlers and a fatal error is returned to the client. (Bug #15192)
Zero-padding of exponent values was not the same across platforms. (Bug #12860)
For
CREATE TABLE, the parser did not enforce that parentheses were present in aCHECK (clause; now it does. The parser did not enforce thatexpr)CONSTRAINT [without a followingsymbol]CHECKclause was illegal; now it does. (Bug #11714, Bug #35578, Bug #38696)If a connection was waiting for a
GET_LOCK()lock or aSLEEP()call, and the connection aborted, the server did not detect this and thus did not close the connection. This caused a waste of system resources allocated to dead connections. Now the server checks such a connection every five seconds to see whether it has been aborted. If so, the connection is killed (and any lock request is aborted). (Bug #10374)perror did not work for errors described in the
sql/share/errmsg.txtfile. (Bug #10143)The grammar for
GROUP BY, when used withWITH CUBEorWITH ROLLUP, caused a conflict with the grammar for view definitions that includedWITH CHECK OPTION. (Bug #9801)For the
DIVoperator, incorrect results could occur for noninteger operands that exceedBIGINTrange. Now, if either operand has a noninteger type, the operands are converted toDECIMALand divided usingDECIMALarithmetic before converting the result toBIGINT. If the result exceedsBIGINTrange, an error occurs. (Bug #8457, Bug #11745058)References: See also Bug #59241.
Labels in stored routines did not work if the character set was not
latin1. (Bug #7088)Previously, for some Asian CJK character sets, the
UPPER()andLOWER()functions worked only for basic Latin letters (A-Z,a-z). The affected character sets areujis,sjis,gb2312,cp932,eucjpms,big5,euckr, andgbk.Now
UPPER()andLOWER()perform case conversion correctly for all characters in these character sets, with the exception that if a character set contains a character in only one lettercase, conversion to the other lettercase cannot be done.
InnoDB Notes
This release includes
InnoDB1.0.6. This version is considered of Release Candidate (RC) quality.
Functionality Added or Changed
Replication: Introduced the
binlog_direct_non_transactional_updatessystem variable. Enabling this variable causes updates using the statement-based logging format to tables using nontransactional engines to be written directly to the binary log, rather than to the transaction cache.Before enabling this variable, be certain that you have no dependencies between transactional and nontransactional tables. A statement that both selects from an
InnoDBtable and inserts into aMyISAMtable is an example of such a dependency. For more information, see Section 15.1.3.4, “Binary Log Options and Variables”. (Bug #46364)References: See also Bug #28976, Bug #40116.
Bugs Fixed
Security Fix: For servers built with yaSSL, a preauthorization buffer overflow could cause memory corruption or a server crash. We thank Evgeny Legerov from Intevydis for providing us with a proof-of-concept script that permitted us to reproduce this bug. (Bug #50227, CVE-2009-4484)
Performance: Partitioning: When used on partitioned tables, the
records_in_rangehandler call checked more partitions than necessary. The fix for this issue reduces the number of unpruned partitions checked for statistics in partition range checking, which has resulted in some partition operations being performed up to 2-10 times faster than before this change was made, when testing with tables having 1024 partitions. (Bug #48846)References: See also Bug #37252, Bug #47261.
Performance: The method for comparing
INFORMATION_SCHEMAnames and database names was nonoptimal and an improvement was made: When the database name length is already known, a length check is made first and content comparison skipped if the lengths are unequal. (Bug #49501)Performance: The
MD5()andSHA1()functions had excessive overhead for short strings. (Bug #49491)Incompatible Change: In
plugin.h, theMYSQL_REPLICATION_PLUGINsymbol was out of synchrony with its value in MySQL 6.0 because the lower-valuedMYSQL_AUDIT_PLUGINwas not present. To correct this,MYSQL_AUDIT_PLUGINhas been added in MySQL 5.5, changing the value ofMYSQL_REPLICATION_PLUGINfrom 5 to 6. Attempts to load the audit plugin produce an error occurs because only theMYSQL_AUDIT_PLUGINsymbol was added, not the audit plugin itself. This error will go away when the audit plugin is added to MySQL 5.5 (in 5.5.3). Replication plugins from earlier 5.5.x releases must be recompiled against the current release before they will work with the current release. (Bug #49894)Important Change: Replication: The
RAND()function is now marked as unsafe for statement-based replication. Using this function now generates a warning whenbinlog_format=STATEMENTand causes the format to switch to row-based logging whenbinlog_format=MIXED.This change is being introduced because, when
RAND()was logged in statement mode, the seed was also written to the binary log, so the replication slave generated the same sequence of random numbers as was generated on the master. While this could make replication work in some cases, the order of affected rows was still not guaranteed when this function was used in statements that could update multiple rows, such asUPDATEorINSERT ... SELECT; if the master and the slave retrieved rows in different order, they began to diverge. (Bug #49222)Partitioning: InnoDB Storage Engine: When an
ALTER TABLE ... REORGANIZE PARTITIONstatement on anInnoDBtable failed due toinnodb_lock_wait_timeoutexpiring while waiting for a lock,InnoDBdid not clean up any temporary files or tables which it had created. Attempting to reissue theALTER TABLEstatement following the timeout could lead to storage engine errors, or possibly a crash of the server. (Bug #47343)InnoDB Storage Engine: Creating or dropping a table with 1023 transactions active caused an assertion failure. (Bug #49238)
InnoDB Storage Engine: If
innodb_force_recoverywas set to 4 or higher, the server could crash when opening anInnoDBtable containing an auto-increment column. MySQL versions 5.1.31 and later were affected. (Bug #46193)Replication:
FLUSH LOGScould in some circumstances crash the server. This occurred because the I/O thread could concurrently access the relay log I/O cache while another thread was performing theFLUSH LOGS, which closes and reopens the relay log and, while doing so, initializes (or re-initializes) its I/O cache. This could cause problems if some other thread (in this case, the I/O thread) is accessing it at the same time.Now the thread performing the
FLUSH LOGSoperation takes a lock on the relay log before actually flushing it. (Bug #50364)References: See also Bug #53657.
Replication: With semisynchronous replication, memory allocated for handling transactions could be freed while still in use, resulting in a server crash. (Bug #50157)
Replication: In some cases, inserting into a table with many columns could cause the binary log to become corrupted. (Bug #50018)
References: See also Bug #42749.
Replication: When using row-based replication, setting a
BITorCHARcolumn of aMyISAMtable toNULL, then trying to delete from the table, caused the slave to fail with the error Can't find record intable. (Bug #49481, Bug #49482)Replication: A
LOAD DATA INFILEstatement that loaded data into a table having a column name that had to be quoted (such as`key` INT) caused replication to fail when logging in mixed or statement mode. In such cases, the master wrote theLOAD DATAevent into the binary log without quoting the column name. (Bug #49479)References: See also Bug #47927. This bug is a regression of Bug #43746.
Replication: When logging in row-based mode, DDL statements are actually logged as statements; however, statements that affected temporary tables and followed DDL statements failed to reset the binary log format to
ROW, with the result that these statements were logged using the statement-based format. Now the state ofbinlog_formatis restored after a DDL statement has been written to the binary log. (Bug #49132)Replication: Spatial data types caused row-based replication to crash. (Bug #48776)
Replication: When using row-based logging, the statement
CREATE TABLE t IF NOT EXIST ... SELECTwas logged asCREATE TEMPORARY TABLE t IF NOT EXIST ... SELECTwhentalready existed as a temporary table. This was caused by the fact that the temporary table was opened and the results of theSELECTwere inserted into it when a temporary table existed and had the same name.Now, when this statement is executed,
tis created as a base table, the results of theSELECTare inserted into it—even if there already exists a temporary table having the same name—and the statement is logged correctly. (Bug #47418)References: See also Bug #47442.
Replication: Due to a change in the size of event representations in the binary log, when replicating from a MySQL 4.1 master to a slave running MySQL 5.0.60 or later, the
START SLAVE UNTILstatement did not function correctly, stopping at the wrong position in the log. Now the slave detects that the master is using the older version of the binary log format, and corrects for the difference in event size, so that the slave stops in the correct position. (Bug #47142)Replication: Manually removing entries from the binary log index file on a replication master could cause the server to repeatedly send the same binary log file to slaves. (Bug #28421)
The SSL certificates in the test suite were about to expire. They have been updated with expiration dates in the year 2015. (Bug #50642)
SPATIALindexes were permitted on columns with nonspatial data types, resulting in a server crash for subsequent table inserts. (Bug #50574)Index prefixes could be specified with a length greater than the associated column, resulting in a server crash for subsequent table inserts. (Bug #50542)
Use of loose index scan optimization for an aggregate function with
DISTINCT(for example,COUNT(DISTINCT)) could produce incorrect results. (Bug #50539)The
printstackfunction does not exist on Solaris 8 or earlier, which led to a compilation failure. (Bug #50409)A user could see tables in
INFORMATION_SCHEMA.TABLESwithout appropriate privileges for them. (Bug #50276)Debug output for join structures was garbled. (Bug #50271)
The server crashed when an
InnoDBbackground thread attempted to write a message containing a partitioned table name to the error log. (Bug #50201)Within a stored routine, selecting the result of
CONCAT_WS()with a routine parameter argument into a user variable could return incorrect results. (Bug #50096)The
filesortsorting method applied to aCHAR(0)column could lead to a server crash. (Bug #49897)EXPLAIN EXTENDED UNION ... ORDER BYcaused a crash when theORDER BYreferred to a nonconstant or full-text function or a subquery. (Bug #49734)Some prepared statements could raise an assertion when re-executed. (Bug #49570)
sql_buffer_resulthad an effect on non-SELECTstatements, contrary to the documentation. (Bug #49552)In some cases a subquery need not be evaluated because it returns only aggregate values that can be calculated from table metadata. This sometimes was not handled by the enclosing subquery, resulting in a server crash. (Bug #49512)
Mixing full-text searches and row expressions caused a crash. (Bug #49445)
mysql-test-run.pl now recognizes the
MTR_TESTCASE_TIMEOUT,MTR_SUITE_TIMEOUT,MTR_SHUTDOWN_TIMEOUT, andMTR_START_TIMEOUTenvironment variables. If they are set, their values are used to set the--testcase-timeout,--suite-timeout,--shutdown-timeout, and--start-timeoutoptions, respectively. (Bug #49210)Several
strmake()calls had an incorrect length argument (too large by one). (Bug #48983)On Fedora 12,
strmov()did not guarantee correct operation for overlapping source and destination buffer. Calls were fixed to use an overlap-safe version instead. (Bug #48866)With one thread waiting for a lock on a table, if another thread dropped the table and created a new table with the same name and structure, the first thread did not notice that the table had been re-created and tried to used cached metadata that belonged to the old table but had been freed. (Bug #48157)
If an invocation of a stored procedure failed in the table-open stage, subsequent invocations that did not fail in that stage could cause a crash. (Bug #47649)
A crash occurred when a user variable that was assigned to a subquery result was used as a result field in a
SELECTstatement with aggregate functions. (Bug #47371)When the mysql client was invoked with the
--verticaloption, it ignored the--skip-column-namesoption. (Bug #47147)The optimizer could continue to execute a query after a storage engine reported an error, leading to a server crash. (Bug #46175)
If
EXPLAINencountered an error in the query, a memory leak occurred. (Bug #45989)A race condition on the privilege hash tables permitted one thread to try to delete elements that had already been deleted by another thread. A consequence was that
SET PASSWORDorFLUSH PRIVILEGEScould cause a crash. (Bug #35589, Bug #35591)1) In rare cases, if a thread was interrupted during a
FLUSH PRIVILEGESoperation, a debug assertion occurred later due to improper diagnostics area setup. 2) AKILLoperation could cause a console error message referring to a diagnostic area state without first ensuring that the state existed. (Bug #33982)ALTER TABLEwith bothDROP COLUMNandADD COLUMNclauses could crash or lock up the server. (Bug #31145)The
Table_locks_waitedwaited variable was not incremented in the cases that a lock had to be waited for but the waiting thread was killed or the request was aborted. (Bug #30331)
When the publishing process for MySQL 5.5.1 was already running, the MySQL team was informed about a security problem in the SSL connect area (a possibility to crash the server). The problem is caused by a buffer overflow in the yaSSL library. MySQL Servers using OpenSSL are not affected; it can occur only when SSL (using yaSSL) is enabled.
This problem is under detailed investigation with the various versions, configurations, and platforms. When that has finished, the problem will be fixed as soon as possible, and new binaries for the affected versions will be released. However, building and testing these binaries in the various configurations on the various platforms will take some time. The bug is tracked with CVE ID CVE-2009-4484. We repeat the general security hint: If it is not absolutely necessary that external machines can connect to your database instance, we recommend that the server's connection port be blocked by a firewall to prevent any such illegitimate accesses.
Update: This bug is fixed in MySQL 5.5.2.
InnoDB Notes
InnoDBhas been upgraded to version 1.0.6. This version is considered of Release Candidate (RC) quality. Section 13.4.12, “InnoDB Storage Engine Change History”, may contain information in addition to those changes reported here.
RPM Notes
The version information in RPM package files has been changed:
The “level” field of a MySQL version number is now also included in the RPM version and in the package file name.
The RPM “release” value now counts from 1, not 0.
For example, the generic x86 server RPM file of 5.5.1-m2 is named
MySQL-server-5.5.1_m2-1.glibc23.i386.rpm. This improves consistency with other formats that also include the level in the file name (for this version: “m2”). For example, thetar.gzfile name ismysql-5.5.1-m2-linux-i686-glibc23.tar.gz. The different separator, underscore'_'for RPM, is required by the syntax of RPM.
Functionality Added or Changed
Partitioning: The
UNIX_TIMESTAMP()function is now supported in partitioning expressions usingTIMESTAMPcolumns. For example, it now possible to create a partitioned table such as this one:CREATE TABLE t (c TIMESTAMP) PARTITION BY RANGE ( UNIX_TIMESTAMP(c) ) ( PARTITION p0 VALUES LESS THAN (631148400), PARTITION p1 VALUES LESS THAN (946681200), PARTITION p2 VALUES LESS THAN (MAXVALUE) );All other expressions involving
TIMESTAMPvalues are now rejected with an error for attempts to create a new partitioned table or to alter an existing partitioned table.When accessing an existing partitioned table having a timezone-dependent partitioning function (where the table was using a previous version of MySQL), a warning rather than an error is issued. In such cases, you should fix the table. One way of doing this is to alter the table's partitioning expression so that it uses
UNIX_TIMESTAMP(). (Bug #42849)
Bugs Fixed
Performance: When the query cache is fragmented, the size of the free block lists in the memory bins grows, which causes query cache invalidation to become slow. There is now a 50ms timeout for a
SELECTstatement waiting for the query cache lock. If the timeout expires, the statement executes without using the query cache. (Bug #39253)References: See also Bug #21074.
Incompatible Change: Replication: The file names for the semisynchronous plugins were prefixed with
lib, unlike file names for other plugins. The file names no longer have alibprefix.This change introduces an incompatibility if the plugins had been installed using the previous names. To handle this, uninstall the older version before installing the newer version. For example, use these statements for the master side plugins on Unix:
mysql>
UNINSTALL PLUGIN rpl_semi_sync_master;mysql>INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';If you do not uninstall the older version first, attempting to install the newer version results in an error:
mysql>
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';ERROR 1125 (HY000): Function 'rpl_semi_sync_master' already existsFor the slave side, similar statements apply:
mysql>
UNINSTALL PLUGIN rpl_semi_sync_slave;mysql>INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';Important Change: Replication: The following functions have been marked unsafe for statement-based replication:
None of the functions just listed are guaranteed to replicate correctly when using the statement-based format because they can produce different results on the master and the slave. The use of any of these functions while
binlog_formatis set toSTATEMENTis logged with the warning, Statement is not safe to log in statement format. Whenbinlog_formatis set toMIXED, the binary logging format is automatically switched to the row-based format whenever one of these functions is used. (Bug #47995)Important Change: After a binary upgrade to MySQL 5.1 from a MySQL 5.0 installation that contains
ARCHIVEtables:Before MySQL 5.1.42, accessing those tables will cause the server to crash, even if you have run mysql_upgrade or
CHECK TABLE ... FOR UPGRADE.As of MySQL 5.1.42, the server will not open 5.0
ARCHIVEtables at all.
In either case, the solution is to use mysqldump to dump all 5.0
ARCHIVEtables before upgrading, and reload them into MySQL 5.1 after upgrading. The same problem occurs for binary downgrades from MySQL 5.1 to 5.0. (Bug #47012)InnoDB Storage Engine: When compiling on Windows, an error in the CMake definitions for
InnoDBcaused the engine to be built incorrectly. (Bug #49502)Partitioning: When
SHOW CREATE TABLEwas invoked for a table that had been created using theCOLUMNSkeyword or theTO_SECONDS()function, the output contained the wrong MySQL version number in the conditional comments. (Bug #49591)Partitioning: A query that searched on a
ucs2column failed if the table was partitioned. (Bug #48737)Partitioning: In some cases, it was not possible to add a new column to a table that had subpartitions. (Bug #48276)
Partitioning:
SELECT COUNT(*)from a partitioned table failed when using theONLY_FULL_GROUP_BYSQL mode. (Bug #46923)References: This bug was introduced by Bug #45807.
Partitioning:
SUBPARTITION BY KEYfailed withDEFAULT CHARSET=utf8. (Bug #45904)Replication: When using row-based logging,
TRUNCATE TABLEwas written to the binary log even if the affected table was temporary, causing replication to fail. (Bug #48350)Replication: A flaw in the implementation of the purging of binary logs could result in orphaned files being left behind in the following circumstances:
If the server failed or was killed while purging binary logs.
If the server failed or was killed after creating of a new binary log when the new log file was opened for the first time.
In addition, if the slave was not connected during the purge operation, it was possible for a log file that was in use to be removed; this could lead data loss and possible inconsistencies between the master and slave. (Bug #45292)
Replication: When using the
STATEMENTorMIXEDlogging format, the statementsLOAD DATA CONCURRENT LOCAL INFILEandLOAD DATA CONCURRENT INFILEwere logged asLOAD DATA LOCAL INFILEandLOAD DATA LOCAL INFILE, respectively (in other words, theCONCURRENTkeyword was omitted). As a result, when using replication with either of these logging modes, queries on the slaves were blocked by the replication SQL thread while trying to execute the affected statements. (Bug #34628)Cluster Replication: When
expire_logs_dayswas set, the thread performing the purge of the log files could deadlock, causing all binary log operations to stop. (Bug #49536)For debug builds on Windows,
SAFEMALLOCwas defined inconsistently, leading to mismatches when usingmy_malloc()andmy_free(). (Bug #49811)The mysql.server script had incorrect shutdown logic. (Bug #49772)
The
push_warning_printf()function was being called with an invalid error level,MYSQL_ERROR::WARN_LEVEL_ERROR, causing an assertion failure. To fix the problem,MYSQL_ERROR::WARN_LEVEL_ERRORhas been replaced byMYSQL_ERROR::WARN_LEVEL_WARN. (Bug #49638)The result of comparison between nullable
BIGINTandINTcolumns was inconsistent. (Bug #49517)A Valgrind error in
make_cond_for_table_from_pred()was corrected. Thanks to Sergey Petrunya for the patch to fix this bug. (Bug #49506)Incorrect cache initialization prevented storage of converted constant values and could produce incorrect comparison results. (Bug #49489)
Comparisons involving
YEARvalues could produce incorrect results. (Bug #49480)References: See also Bug #43668.
Valgrind warnings for
CHECKSUM TABLEwere corrected. (Bug #49465)Specifying an index algorithm (such as
BTREE) forSPATIALorFULLTEXTindexes caused a server crash. These index types do not support algorithm specification, and it is not longer permitted to do so. (Bug #49250)The optimizer sometimes incorrectly handled conditions of the form
WHERE. (Bug #49199)col_name='const1' ANDcol_name='const2'Execution of
DECODE()andENCODE()could be inefficient because multiple executions within a single statement reinitialized the random generator multiple times even with constant parameters. (Bug #49141)With binary logging enabled,
REVOKE ... ON {PROCEDURE|FUNCTION} FROM ...could cause a crash. (Bug #49119)The
LIKEoperator did not work correctly when using an index for aucs2column. (Bug #49028)check_key_in_view()was missing aDBUG_RETURNin one code branch, causing a crash in debug builds. (Bug #48995)If a query involving a table was terminated with
KILL, a subsequentSHOW CREATE TABLEfor that table caused a server crash. (Bug #48985)Privileges for stored routines were ignored for mixed-case routine names. (Bug #48872)
References: See also Bug #41049.
Building MySQL on Fedora Core 12 64-bit failed, due to errors in comp_err. (Bug #48864)
Concurrent
ALTER TABLEoperations on anInnoDBtable could raise an assertion. (Bug #48782)Incomplete reset of internal
TABLEstructures could cause a crash witheq_reftable access in subqueries. (Bug #48709)During query execution, ranges could be merged incorrectly for
ORoperations and return an incorrect result. (Bug #48665)The
InnoDBTable Monitor reported theFLOATandDOUBLEdata types incorrectly. (Bug #48526)Re-execution of a prepared statement could cause a server crash. (Bug #48508)
With row-based binary logging, the server crashed for statements of the form
CREATE TABLE IF NOT EXISTS. This occurred because the server handled the existing view as a table when logging the statement. (Bug #48506)existing_viewLIKEtemporary_tableThe error message for
ER_UPDATE_INFOwas subject to buffer overflow or truncation. (Bug #48500)DISTINCTwas ignored for queries withGROUP BY WITH ROLLUPand onlyconsttables. (Bug #48475)Loose index scan was inappropriately chosen for some
WHEREconditions. (Bug #48472)The server could crash and corrupt the tablespace if the
InnoDBtablespace was configured with too small a value, or ifinnodb_file_per_tablewas enabled and manyCREATE TEMPORARY TABLEstatements were executed and the temporary file directory filled up. (Bug #48469)Parts of the range optimizer could be initialized incorrectly, resulting in Valgrind errors. (Bug #48459)
A bad typecast could cause query execution to allocate large amounts of memory. (Bug #48458)
SHOW BINLOG EVENTScould fail with a error:Wrong offset or I/O error. (Bug #48357)Valgrind warnings related to binary logging of
LOAD DATA INFILEstatements were corrected. (Bug #48340)On Windows,
InnoDBcould not be built as a statically linked library. (Bug #48317)mysql_secure_installation did not work on Solaris. (Bug #48086)
When running mysql_secure_installation, the command failed if the
rootpassword contained multiple space,'\','#', or quote characters. (Bug #48031)MATCH IN BOOLEAN MODEsearches could return too many results inside a subquery. (Bug #47930)User-defined collations with an ID less than 256 were not initialized correctly when loaded and caused a server crash. (Bug #47756)
If a session acquired a global read lock with
FLUSH TABLES WITH READ LOCK, acquired a lock for one table withLOCK TABLES, and issued anINSERT DELAYEDstatement for another table, deadlock could occur. (Bug #47682)The mysql client
statuscommand displayed an incorrect value for the server character set. (Bug #47671)Connecting to a 4.1.x server from a 5.1.x or higher mysql client resulted in a memory-free error when disconnecting. (Bug #47655)
Queries containing
GROUP BY ... WITH ROLLUPthat did not use indexes could return incorrect results. (Bug #47650)Assignment of a system variable sharing the same base name as a declared stored program variable in the same context could lead to a crash. (Bug #47627)
On Solaris, the server printed no stack trace to the error log after a crash. (Bug #47391)
The first execution of
STOP SLAVE UNTILstopped too early. (Bug #47210)The
innodb_file_format_checksystem variable could not be set at runtime toDEFAULTor to the value of a user-defined variable. (Bug #47167)The
IGNOREclause on aDELETEstatement masked an SQL statement error that occurred during trigger processing. (Bug #46425)Valgrind errors for
InnoDBwere corrected. (Bug #45992, Bug #46656)The return value was not checked for some
my_hash_insert()calls. (Bug #45613)It was possible for
init_available_charsets()not to initialize correctly. (Bug #45058)GROUP BYon aconstant(single-row)InnoDBtable joined to other tables caused a server crash. (Bug #44886)For a
VARCHAR(column,N)ORDER BY BINARY(sorted using only the firstcol_name)Nbytes of the column, even though column values could be longer thanNbytes if they contained multibyte characters. (Bug #44131)For
YEAR(2)values,MIN(),MAX(), and comparisons could yield incorrect results. (Bug #43668)Comparison with
NULLvalues sometimes did not produce a correct result. (Bug #42760)In debug builds, killing a
LOAD XML INFILEstatement raised an assertion.Implemented in the course of fixing this bug, mysqltest has a new
send_evalcommand that combines the functionality of the existingsendandevalcommands. (Bug #42520)The server could crash when attempting to access a non-conformant
mysql.procsystem table. For example, the server could crash when invoking stored procedure-related statements after an upgrade from MySQL 5.0 to 5.1 without running mysql_upgrade. (Bug #41726)The mysql_upgrade command added three columns to the
mysql.proctable (character_set_client,collation_connection, anddb_collation), but did not populate the columns with correct values. This led to error messages reported during stored procedure execution. (Bug #41569)Use of
InnoDBmonitoring (SHOW ENGINE INNODB STATUSor one of theInnoDBMonitor tables) could cause a server crash due to invalid access to a shared variable in a concurrent environment. (Bug #38883)When compressed
MyISAMfiles were opened, they were always memory mapped, sometimes causing memory-swapping problems. To deal with this, a new system variable,myisam_mmap_size, was added to permit limiting the amount of memory used for memory mapping ofMyISAMfiles. (Bug #37408)On Windows, the mysql_secure_installation command failed to load the
Term::ReadKeymodule, which was required for correct operation. (Bug #35106)If the
--log-binserver option was set to a directory name with a trailing component separator character, the basename of the binary log files was empty, so that the created files were named.000001and.index. The same thing occurred with the--log-bin-index,--relay-log, and--relay-log-indexoptions. Now the server reports and error and exits. (Bug #34739)If a comparison involved a constant value that required type conversion, the converted value might not be cached, resulting in repeated conversion and poorer performance. (Bug #34384)
Using the
SHOW ENGINE INNODB STATUSstatement when using partitions inInnoDBtables causedInvalid (old?) table or database nameerrors to be logged. (Bug #32430)Output from mysql --html did not encode the
'<','>', or'&'characters. (Bug #27884)Under heavy load with a large query cache, invalidating part of the cache could cause the server to freeze (that is, to be unable to service other operations until the invalidation was complete). (Bug #21074)
References: See also Bug #39253.
On some Windows systems,
InnoDBcould reportOperating system error number 995 in a file operationdue to transient driver or hardware problems.InnoDBnow retries the operation and addsRetry attempt is madeto the error message. (Bug #3139)
Previously, MySQL development proceeded by including a large set of features and moving them over many versions within a release series through several stages of maturity (Alpha, Beta, and so forth). This development model had a disadvantage in that problems with only part of the code could hinder timely release of the whole. As you might have found when testing MySQL Server 6.0, alpha quality code could jeopardize the stability of the entire release. (One consequence of this was that MySQL Server 6.0 has been withdrawn.)
MySQL development now uses a milestone model. The move to this model provides for more frequent milestone releases, with each milestone proceeding through a small number of releases having a focus on a specific subset of thoroughly tested features. Following the releases for one milestone, development proceeds with the next milestone; that is, another small number of releases that focuses on the next small set of features, also thoroughly tested.
MySQL 5.5.0-m2 is the first release for Milestone 2. The new features of this milestone may be considered to be initially of beta quality. For subsequent Milestone 2 releases, we plan to use increasing version numbers (5.5.1 and higher) while continuing to employ the “-m2” suffix. For Milestone 3, we plan to change the suffix to “-m3”. Version designators with “-alpha” or “-beta” suffixes are no used.
You may notice that the MySQL 5.5.0 release is designated as Milestone 2 rather than Milestone 1. This is because MySQL 5.4 was actually designated as Milestone 1, although we had not yet begun referring to milestone numbers as part of version numbers at the time.
InnoDB Notes
The
InnoDB Pluginis included in MySQL 5.5 releases as the built-in version ofInnoDB. The version of theInnoDBin this release is 1.0.5 and is considered of Release Candidate (RC) quality.This version of
InnoDBoffers new features, improved performance and scalability, enhanced reliability and new capabilities for flexibility and ease of use. Among the features are “Fast index creation,” table and index compression, file format management, newINFORMATION_SCHEMAtables, capacity tuning, multiple background I/O threads, and group commit.For information about these features, see InnoDB Plugin 1.0 for MySQL 5.1 User’s Guide. For general information about using
InnoDBin MySQL, see Section 13.3, “TheInnoDBStorage Engine”.In this version of
InnoDB, theinnodb_file_io_threadssystem variable has been removed and replaced withinnodb_read_io_threadsandinnodb_write_io_threads. If you upgrade from MySQL 5.1 to MySQL 5.5 and previously explicitly setinnodb_file_io_threadsat server startup, you must change your configuration. Either remove any reference toinnodb_file_io_threadsor replace it with references toinnodb_read_io_threadsandinnodb_write_io_threads.
Functionality Added or Changed
Incompatible Change: MySQL Server now includes a plugin services interface that complements the plugin API. The services interface enables server functionality to be exposed as a “service” that plugins can access using function calls. The
libmysqlserviceslibrary provides access to the available services and dynamic plugins now must be linked against this library (use the-lmysqlservicesflag). See Section 22.2.5, “MySQL Services for Plugins”. (Bug #48461)Incompatible Change: Two status variables have been added to
SHOW STATUSoutput.Innodb_buffer_pool_read_aheadandInnodb_buffer_pool_read_ahead_evictedindicate the number of pages read in by theInnoDBread-ahead background thread, and the number of such pages evicted without ever being accessed, respectively. Also, the status variablesInnodb_buffer_pool_read_ahead_rndandInnodb_buffer_pool_read_ahead_seqstatus variables have been removed. (Bug #42885)Incompatible Change: The deprecated
--default-table-typeserver option has been removed (use--default-storage-engine). (Bug #34818)Incompatible Change: The
TRADITIONALSQL mode now includesNO_ENGINE_SUBSTITUTION. (Bug #21099)Incompatible Change: Several changes have been made regarding the language and character set of error messages:
The
languagesystem variable has been removed and replaced with the newlc_messages_dirandlc_messagessystem variables.lc_messages_dirhas only a global value and is read only.lc_messageshas global and session values and can be modified at runtime, so the error message language can be changed while the server is running, and individual clients each can have a different error message language by changing their sessionlc_messagesvalue to a different locale name.The
--languageoption for specifying the directory for the error message file is now deprecated. The newlc_messages_dirandlc_messagessystem variables should be used instead, and the server treats--languageas an alias forlc_messages_dir.Error messages previously were constructed in a mix of character sets. This issue is resolved by constructing error messages internally within the server using UTF-8 and returning them to the client in the character set specified by the
character_set_resultssystem variable. The content of error messages therefore may in some cases differ from the messags returned previously.
See Section 9.2, “Setting the Error Message Language”, and Section 9.1.6, “Character Set for Error Messages”.
References: See also Bug #46218, Bug #46236.
Partitioning: New
PARTITION BY RANGE COLUMNS(andcolumn_list)PARTITION BY LIST COLUMNS(options are added for thecolumn_list)CREATE TABLEandALTER TABLEstatements.A major benefit of
RANGE COLUMNSandLIST COLUMNSpartitioning is that they make it possible to define ranges or lists based on column values that use string, date, or datetime values.These new extensions also broaden the scope of partition pruning to provide better coverage for queries using comparisons on multiple columns in the
WHEREclause, some examples beingWHERE a = 1 AND b < 10andWHERE a = 1 AND b = 10 AND c < 10.See Section 17.2.1, “
RANGEPartitioning”, Section 17.2.2, “LISTPartitioning”, and Section 17.4, “Partition Pruning”.Partitioning: A new
ALTER TABLEoption,TRUNCATE PARTITION, makes it possible to delete rows from one or more selected partitions only. Unlike the case withALTER TABLE ... DROP PARTITION,ALTER TABLE ... TRUNCATE PARTITIONmerely deletes all rows from the specified partition or partitions, and does not change the definition of the table.Partitioning: It is now possible to assign indexes on partitioned
MyISAMtables to key caches using theCACHE INDEXand to preload such indexes into the cache usingLOAD INDEX INTO CACHEstatements. Cache assignment and preloading of indexes for such tables can be performed for one, several, or all partitions of the table.This functionality is supported for only those partitioned tables that employ the
MyISAMstorage engine.Replication: The global server variable
sync_relay_logis introduced for use on replication slaves. Setting this variable to a nonzero integer valueNcauses the slave to synchronize the relay log to disk after everyNevents. Setting its value to 0 permits the operating system to handle synchronization of the file. The action of this variable, when enabled, is analogous to how thesync_binlogvariable works with regard to binary logs on a replication master.The global server variables
sync_master_infoandsync_relay_log_infoare introduced for use on replication slaves to control synchronization of, respectively, themaster.infoandrelay.infofiles.In each case, setting the variable to a nonzero integer value
Ncauses the slave to synchronize the corresponding file to disk after everyNevents. Setting its value to 0 permits the operating system to handle synchronization of the file instead.The actions of these variables, when enabled, are analogous to how the
sync_binlogvariable works with regard to binary logs on a replication master.An additional system variable
relay_log_recoveryis also now available. When enabled, this variable causes a replication slave to discard relay log files obtained from the replication master following a crash.These variables can also be set in
my.cnf, or by using the--sync-relay-log,--sync-master-info,--sync-relay-log-info, and--relay-log-recoveryserver options.For more information, see Section 15.1.3.3, “Replication Slave Options and Variables”. (Bug #31665, Bug #35542, Bug #40337)
Replication: Because
SHOW BINLOG EVENTScannot be used to read events from relay log files, a newSHOW RELAYLOG EVENTSstatement has been added for this purpose. (Bug #28777)Replication: In circular replication, it was sometimes possible for an event to propagate such that it would be reapplied on all servers. This could occur when the originating server was removed from the replication circle and so could no longer act as the terminator of its own events, as normally happens in circular replication.
To prevent this from occurring, a new
IGNORE_SERVER_IDSoption is introduced for theCHANGE MASTER TOstatement. This option takes a list of replication server IDs; events having a server ID which appears in this list are ignored and not applied. For more information, see Section 12.4.2.1, “CHANGE MASTER TOСинтаксис”.In conjunction with the introduction of
IGNORE_SERVER_IDS,SHOW SLAVE STATUShas two new fields.Replicate_Ignore_Server_Idsdisplays information about ignored servers.Master_Server_Iddisplays theserver_idvalue from the master. (Bug #25998)References: See also Bug #27808.
Replication: A replication heartbeat mechanism has been added to facilitate monitoring. This provides an alternative to checking log files, making it possible to detect in real time when a slave has failed.
Configuration of heartbeats is done using a new
MASTER_HEARTBEAT_PERIOD =clause for theintervalCHANGE MASTER TOstatement (see Section 12.4.2.1, “CHANGE MASTER TOСинтаксис”); monitoring can be done by checking the values of the status variablesSlave_heartbeat_periodandSlave_received_heartbeats(see Section 5.1.5, “Server Status Variables”).The addition of replication heartbeats addresses a number of issues:
Relay logs were rotated every
slave_net_timeoutseconds even if no statements were being replicated.SHOW SLAVE STATUSdisplayed an incorrect value forSeconds_Behind_Masterfollowing aFLUSH LOGSstatement.Replication master-slave connections used
slave_net_timeoutfor connection timeouts.
(Bug #20435, Bug #29309, Bug #30932)
Replication: MySQL now supports an interface for semisynchronous replication: A commit performed on the master side blocks before returning to the session that performed the transaction until at least one slave acknowledges that it has received and logged the events for the transaction. Semisynchronous replication is implemented through an optional plugin component. See Section 15.3.8, “Semisynchronous Replication”.
On Linux (and perhaps other systems), the performance of MySQL Server can be improved by using a different
malloc()implementation, developed by Google and calledtcmalloc. The gain is noticeable with a higher number of simultaneous users. To support use of this library, the following changes have been made:The server is linked against the default
malloc()provided by the respective platform.Binary distributions for Linux include
libtcmalloc_minimal.so(a shared library that can be linked against at runtime) inpkglibdir(that is, the same directory within the package where server plugins and similar object files are located). The version oftcmallocincluded with MySQL comes fromgoogle-perftools1.4.If you want to try
tcmallocbut are using a binary distribution for a non-Linux platform or a source distribution, you can install Google'stcmalloc. Some distributions provide it in agoogle-perftoolspackage or with a similar name, or you can download it from Google at http://code.google.com/p/google-perftools/ and compile it yourself.mysqld_safe now supports a
--malloc-liboption that enables administrators to specify that mysqld should usetcmalloc.
The
--malloc-liboption works by modifying theLD_PRELOADenvironment value to affect dynamic linking to enable the loader to find the memory-allocation library when mysqld runs:If the option is not given, or is given without a value (
--malloc-lib=),LD_PRELOADis not modified and no attempt is made to usetcmalloc.If the option is given as
--malloc-lib=tcmalloc, mysqld_safe looks for atcmalloclibrary in/usr/liband then in the MySQLpkglibdirlocation (for example,/usr/local/mysql/libor whatever is appropriate). Iftmallocis found, its path name is added to the beginning of theLD_PRELOADvalue for mysqld. Iftcmallocis not found, mysqld_safe aborts with an error.If the option is given as
--malloc-lib=, that full path is added to the beginning of the/path/to/some/libraryLD_PRELOADvalue. If the full path points to a nonexistent or unreadable file, mysqld_safe aborts with an error.For cases where mysqld_safe adds a path name to
LD_PRELOAD, it adds the path to the beginning of any existing value the variable already has.
As a result of the preceding changes, Linux users can use the
libtcmalloc_minimal.sonow included in binary packages by adding these lines to themy.cnffile:[mysqld_safe] malloc-lib=tcmalloc
Those lines also suffice for users on any platform who have installed a
tcmallocpackage in/usr/lib. To use a specifictcmalloclibrary, specify its full path name. Пример:[mysqld_safe] malloc-lib=/opt/lib/libtcmalloc_minimal.so
(Bug #47549)
The
InnoDBbuffer pool is divided into two sublists: A new sublist containing blocks that are heavily used by queries, and an old sublist containing less-used blocks and from which candidates for eviction are taken. In the default operation of the buffer pool, a block when read in is loaded at the midpoint and then moved immediately to the head of the new sublist as soon as an access occurs. In the case of a table scan (such as performed for a mysqldump operation), each block read by the scan ends up moving to the head of the new sublist because multiple rows are accessed from each block. This occurs even for a one-time scan, where the blocks are not otherwise used by other queries. Blocks may also be loaded by the read-ahead background thread and then moved to the head of the new sublist by a single access. These effects can be disadvantageous because they push blocks that are in heavy use by other queries out of the new sublist to the old sublist where they become subject to eviction.InnoDBnow provides two system variables that enable LRU algorithm tuning:Specifies the approximate percentage of the buffer pool used for the old block sublist. The range of values is 5 to 95. The default value is 37 (that is, 3/8 of the pool).
Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before it can be moved to the new sublist. The default value is 0: A block inserted into the old sublist moves immediately to the new sublist the first time it is accessed, no matter how soon after insertion the access occurs. If the value is greater than 0, blocks remain in the old sublist until an access occurs at least that many ms after the first access. For example, a value of 1000 causes blocks to stay in the old sublist for 1 second after the first access before they become eligible to move to the new sublist.
See Section 7.9.1, “The
InnoDBBuffer Pool”. (Bug #45015)The
have_community_featuressystem variable was renamed tohave_profiling.Previously, to enable profiling, it was necessary to run configure with the
--enable-community-featuresand--enable-profilingoptions. Now only--enable-profilingis needed. (Bug #44651)Columns that provide a catalog value in
INFORMATION_SCHEMAtables (for example,TABLES.TABLE_CATALOG) now have a value ofdefrather thanNULL. (Bug #35427)Previously, mysqldump would not dump the
INFORMATION_SCHEMAdatabase and ignored it if it was named on the command line. Now, mysqldump will dumpINFORMATION_SCHEMAif it is named on the command line. Currently, this requires that the--skip-lock-tables(or--skip-opt) option be given. (Bug #33762)Several undocumented C API functions were removed:
mysql_manager_close(),mysql_manager_command(),mysql_manager_connect(),mysql_manager_fetch_line(),mysql_manager_init(),mysql_disable_reads_from_master(),mysql_disable_rpl_parse(),mysql_enable_reads_from_master(),mysql_enable_rpl_parse(),mysql_master_query(),mysql_master_send_query(),mysql_reads_from_master_enabled(),mysql_rpl_parse_enabled(),mysql_rpl_probe(),mysql_rpl_query_type(),mysql_set_master(),mysql_slave_query(), andmysql_slave_send_query(). (Bug #31952, Bug #31954)Sinhala collations
utf8_sinhala_cianducs2_sinhala_ciwere added for theutf8anducs2character sets. (Bug #26474)If the value of the
--log-warningsoption is greater than 1, the server now writes access-denied errors for new connection attempts to the error log (for example, if a client user name or password is incorrect). (Bug #25822)On Windows, use of POSIX I/O interfaces in
mysyswas replaced with Win32 API calls (CreateFile(),WriteFile(), and so forth) and the default maximum number of open files has been increased to 16384. The maximum can be increased further by using the--open-files-limit=option at server startup. (Bug #24509)NMySQL now implements the SQL standard
SIGNALandRESIGNALstatements. See Section 12.6.7, “Condition Handling”. (Bug #11661)The undocumented, deprecated, and not useful
SHOW COLUMN TYPESstatement has been removed. (Bug #5299)The
libmysqlclientclient library is now built as a thread-safe library. Thelibmysqlclient_rclient library is still present for compatibility, but is just a symlink tolibmysqlclient.The
FORMAT()function now supports an optional third parameter that enables a locale to be specified to be used for the result number's decimal point, thousands separator, and grouping between separators. Permissible locale values are the same as the legal values for thelc_time_namessystem variable (see Section 9.7, “MySQL Server Locale Support”). For example, the result fromFORMAT(1234567.89,2,'de_DE')is1.234.567,89. If no locale is specified, the default is'en_US'.The Greek locale
'el_GR'is now a permissible value for thelc_time_namessystem variable.Previously, in the absence of other information, the MySQL client programs
mysql,mysqladmin,mysqlcheck,mysqlimport, andmysqlshowused the compiled-in default character set, usuallylatin1.Now these clients can autodetect which character set to use based on the operating system setting, such as the value of the
LANGorLC_ALLlocale environment language on Unix system or the code page setting on Windows systems. For systems on which the locale is available from the OS, the client uses it to set the default character set rather than using the compiled-in default. Thus, users can configure the locale in their environment for use by MySQL clients. For example, settingLANGtoru_RU.KOI8-Rcauses thekoi8rcharacter set to be used. The OS character set is mapped to the closest MySQL character set if there is no exact match. If the client does not support the matching character set, it uses the compiled-in default. (For example,ucs2is not supported as a connection character set.)An implication of this change is that if your environment is configured to use a non-
latin1locale, MySQL client programs will use a different connection character set than previously, as though you had issued an implicitSET NAMESstatement. If the previous behavior is required, start the client with the--default-character-set=latin1option.Third-party applications that wish to use character set autodetection based on the OS setting can use the following
mysql_options()call before connecting to the server:mysql_options(mysql, MYSQL_SET_CHARSET_NAME, MYSQL_AUTODETECT_CHARSET_NAME);See Section 9.1.4, “Connection Character Sets and Collations”.
mysql_upgrade now has an
--upgrade-system-tablesoption that causes only the system tables to be upgraded. With this option, data upgrades are not performed.The
CREATE TABLESPACEprivilege has been introduced. This privilege exists at the global (superuser) level and enables you to create, alter, and drop tablespaces and logfile groups.The server now supports a Debug Sync facility for thread synchronization during testing and debugging. To compile in this facility, configure MySQL with the
--enable-debug-syncoption. Thedebug_syncsystem variable provides the user interface Debug Sync. mysqld and mysql-test-run.pl support a--debug-sync-timeoutoption to enable the facility and set the default synchronization point timeout.Added the
TO_SECONDS()function, which converts a date or datetime value to a number of seconds since the year 0. This is a general-purpose function, but is useful for partitioning. You may use this function in partitioning expressions, and partition pruning is supported for tables defined using such expressions.Parser performance was improved for identifier scanning and conversion of ASCII string literals.
The
LOAD XML INFILEstatement was added. This statement makes it possible to read data directly from XML files into database tables. For more information, see Section 12.2.7, “LOAD XMLСинтаксис”.
Bugs Fixed
Important Change: Security Fix: It was possible to circumvent privileges through the creation of
MyISAMtables employing theDATA DIRECTORYandINDEX DIRECTORYoptions to overwrite existing table files in the MySQL data directory. Use of the MySQL data directory inDATA DIRECTORYandINDEX DIRECTORYis no longer permitted. This is now also true of these options when used with partitioned tables and individual partitions of such tables. (Bug #32167, CVE-2008-2079)References: See also Bug #39277.
Security Fix: MySQL clients linked against OpenSSL could be tricked not to check server certificates. (Bug #47320, CVE-2009-4028)
Security Fix: The server crashed if an account without the proper privileges attempted to create a stored procedure. (Bug #44658)
Performance: The server unnecessarily acquired a query cache mutex even with the query cache disabled, resulting in a small performance decrement which could show up as threads often in the “invalidating query cache entries (table)” state, particularly on a replication slave with row-based replication. Now if the server is started with
query_cache_typeset to 0, it does not acquire the query cache mutex. This has the implication that the query cache cannot be enabled at runtime. (Bug #38551)Performance: The
InnoDBadaptive hash latch is released (if held) for several potentially long-running operations. This improves throughput for other queries if the current query is removing a temporary table, changing a temporary table from memory to disk, usingCREATE TABLE ... SELECT, or performing aMyISAMrepair on a table used within a transaction. (Bug #32149)Incompatible Change: Replication: Concurrent transactions that inserted rows into a table with an
AUTO_INCREMENTcolumn could break statement-based or mixed-format replication error 1062 Duplicate entry '...' for key 'PRIMARY' on the slave. This was especially likely to happen when one of the transactions activated a trigger that inserted rows into the table with theAUTO_INCREMENTcolumn, although other conditions could also cause the issue to manifest.As part of the fix for this issue, any statement that causes a trigger or function to update an
AUTO_INCREMENTcolumn is now considered unsafe for statement-based replication. For more information, see Section 15.4.1.1, “Replication andAUTO_INCREMENT”. (Bug #45677)References: See also Bug #42415, Bug #48608, Bug #50440, Bug #53079.
Incompatible Change: For system variables that take values of
ONorOFF,OFwas accepted as a legal variable. Now system variables that take “enumeration” values must be assigned the full value. This affects some other variables that previously could be assigned using unambiguous prefixes of permissible values, such astx_isolation. (Bug #34828)Incompatible Change: In binary installations of MySQL, the supplied binary-configure script would start and configure MySQL, even when command help was requested with the
--helpcommand-line option. The--helpoption, if provided, no longer starts and installs the server. (Bug #30954)Incompatible Change: Access privileges for several statements are more accurately checked:
CHECK TABLErequires some privilege for the table.CHECKSUM TABLErequiresSELECTfor the table.CREATE TABLE ... LIKErequiresSELECTfor the source table andCREATEfor the destination table.SHOW COLUMNSdisplays information only for those columns for which you have some privilege.SHOW CREATE TABLErequires some privilege for the table (previously requiredSELECT).SHOW CREATE VIEWrequiresSHOW VIEWandSELECTfor the view.SHOW INDEXrequires some privilege for any column.SHOW OPEN TABLESdisplays only tables for which you have some privilege on any column.
(Bug #27145)
Important Change: Replication:
MyISAMtransactions replicated to a transactional slave left the slave in an unstable condition. This was due to the fact that, when replicating from a nontransactional storage engine to a transactional engine withautocommitdisabled, noBEGINandCOMMITstatements were written to the binary log; thus, on the slave, a never-ending transaction was started.The fix for this issue includes enforcing
autocommitmode on the slave by replicating allautocommit=1statements from the master. (Bug #29288)Important Change: Replication: The
CHANGE MASTER TOstatement required the value forRELAY_LOG_FILEto be an absolute path, whereas theMASTER_LOG_FILEpath could be relative.The inconsistent behavior is resolved by permitting relative paths for
RELAY_LOG_FILE, and by using the same basename forRELAY_LOG_FILEas forMASTER_LOG_FILE. For more information, see Section 12.4.2.1, “CHANGE MASTER TOСинтаксис”. (Bug #12190, Bug #11745232)Important Change: An option that requires a value, when specified in an option file without a value, was assigned the text of the next line in the file as the value. Now, if you fail to specify a required value in an option file, the server aborts with an error.
This change does not effect how options are handled by the server when they are used on the command line. For example, starting the server using mysqld_safe
--relay-log --relay-log-index& causes the server to create relay log files named--relay-log-index.000001,--relay-log-index.000002, and so on, because the--relay-logoption expects an argument. (Bug #25192)Partitioning: An
ALTER TABLE ... ADD PARTITIONstatement that causedopen_files_limitto be exceeded led to a MySQL server crash. (Bug #46922)References: See also Bug #47343.
Partitioning: When performing an
INSERT ... SELECTinto a partitioned table,read_buffer_sizebytes of memory were allocated for every partition in the target table, resulting in consumption of large amounts of memory when the table had many partitions (more than 100).This fix changes the method used to estimate the buffer size required for each partition and limits the total buffer size to a maximum of approximately 10 times
read_buffer_size. (Bug #45840)Partitioning: The cardinality of indexes on partitioned tables was calculated using the first partition in the table, which could result in suboptimal query execution plans being chosen. Now the partition having the most records is used instead, which should result in better use of indexes and thus improved performance of queries against partitioned tables in many if not most cases. (Bug #44059)
Partitioning: Truncating a partitioned
MyISAMtable did not reset theAUTO_INCREMENTvalue. (Bug #35111)Partitioning: For partitioned tables with more than ten partitions, a full table scan was used in some cases when only a subset of the partitions were needed. (Bug #33730)
Replication: When using statement-based or mixed-format replication, the database name was not written to the binary log when executing a
LOAD DATA INFILEstatement. This caused problems when the table being loaded belonged to a database other than the current database; data could be loaded into the wrong table (if a table having the same name existed in the current database) or replication could fail (if no table having that name existed in the current database). Now a table referenced in aLOAD DATA INFILEstatement is always logged using its fully qualified name when the database to which it belongs is not the current database. (Bug #48297)Replication: When a session was closed on the master, temporary tables belonging to that session were logged with the wrong database names when either of the following conditions was true:
The length of the name of the database to which the temporary table belonged was greater than the length of the current database name.
The current database was not set.
(Bug #48216)
References: See also Bug #46861, Bug #48297.
Replication: When using row-based replication, changes to nontransactional tables that occurred early in a transaction were not immediately flushed upon committing a statement. This behavior could break consistency since changes made to nontransactional tables become immediately visible to other connections. (Bug #47678)
References: See also Bug #47287, Bug #46864, Bug #43929, Bug #11752675, Bug #46129. This bug is a regression of Bug #40116.
Replication: When mysqlbinlog
--verbosewas used to read a binary log that had been written using row-based format, the output for events that updated some but not all columns of tables was not correct. (Bug #47323)Replication: Performing
ALTER TABLE ... DISABLE KEYSon a slave table caused row-based replication to fail. (Bug #47312)Replication: When using the row-based format to replicate a transaction involving both transactional and nontransactional engines, which contained a DML statement affecting multiple rows, the statement failed. If this transaction was followed by a
COMMIT, the master and the slave could diverge, because the statement was correctly rolled back on the master, but was applied on the slave. (Bug #47287)References: See also Bug #46864.
Replication:
BEGINstatements were not included in the output of mysqlbinlog. (Bug #46998)Replication: A problem with the
BINLOGstatement in the output of mysqlbinlog could break replication; statements could be logged with the server ID stored within events by theBINLOGstatement rather than the ID of the running server. With this fix, the server ID of the server executing the statements can no longer be overridden by the server ID stored in the binary log'sformat descriptionstatement. (Bug #46640)References: This bug was introduced by Bug #32407.
Replication: When using row-based replication,
DROP TEMPORARY TABLE IF EXISTSwas written to the binary log if the table named in the statement did not exist, even though aDROP TEMPORARY TABLEstatement should never be logged in row-based logging mode, whether the table exists or not. (Bug #46572)Replication: The internal function
get_master_version_and_clock()(defined insql/slave.cc) ignored errors and passed directly when queries failed, or when queries succeeded but the result retrieved was empty. Now this function tries to reconnect the master if a query fails due to transient network problems, and to fail otherwise. The I/O thread now prints a warning if the same system variables do not exist on master (in the event the master is a very old version of MySQL, compared to the slave.) (Bug #45214)Replication: Replicating
TEXTorVARCHARcolumns declared asNULLon the master butNOT NULLon the slave caused the slave to crash. (Bug #43789)References: See also Bug #38850, Bug #43783, Bug #43785, Bug #47741, Bug #48091.
Replication: By default, all statements executed by the mysql_upgrade program on the master are written to the binary log, then replicated to the slave. In some cases, this can result in problems; for example, it attempted to alter log tables on replicated databases (this failed due to logging being enabled).
As part of this fix, a mysql_upgrade option,
--write-binlog, is added. Its inverse,--skip-write-binlog, can be used to disable binary logging while the upgrade is in progress. (Bug #43579)Replication: Two issues encountered on replication slaves during startup were fixed:
A failure while allocating the master info structure caused the slave to crash.
A failure during recovery caused the relay log file not to be properly initialized which led to a crash on the slave.
(Bug #43075)
Replication: When the logging format was set without binary logging being enabled, the server failed to start. Now in such cases, the server starts successfully,
binlog_formatis set, and a warning is logged instead of an error. (Bug #42928)Replication: On the master, if a binary log event is larger than
max_allowed_packet, the error messageER_MASTER_FATAL_ERROR_READING_BINLOGis sent to a slave when it requests a dump from the master, thus leading the I/O thread to stop. On a slave, the I/O thread stops when receiving a packet larger thanmax_allowed_packet.In both cases, however, there was no
Last_IO_Errorreported, which made it difficult to determine why the slave had stopped in such cases. Now,Last_IO_Erroris reported whenmax_allowed_packetis exceeded, and provides the reason for which the slave I/O thread stopped. (Bug #42914)References: See also Bug #14068, Bug #47200, Bug #47303.
Replication: When using statement-based replication and the transaction isolation level was set to
READ COMMITTEDor a less strict level,InnoDBreturned an error even if the statement in question was filtered out according to the--binlog-do-dbor--binlog-ignore-dbrules in effect at the time. (Bug #42829)Replication: When using row-based format, replication failed with the error Could not execute Write_rows event on table ...; Field '...' doesn't have a default value when an
INSERTwas made on the master without specifying a value for a column having no default, even if strict server SQL mode was not in use and the statement would otherwise have succeeded on the master. Now the SQL mode is checked, and the statement is replicated unless strict mode is in effect. For more information, see Section 5.1.6, “Server SQL Modes”. (Bug #38173)References: See also Bug #38262, Bug #43992.
Replication: When
autocommitwas set equal to1after starting a transaction, the binary log did not commit the outstanding transaction. This happened because the binary log commit function saw only the values of the new settings, and decided that there was nothing to commit.This issue was first observed when using the
Falconstorage engine, but it is possible that it affected other storage engines as well. (Bug #37221)Replication:
FLUSH LOGSdid not close and reopen the binary log index file. (Bug #34582)References: See also Bug #48738.
Replication: An error message relating to permissions required for
SHOW SLAVE STATUSwas confusing. (Bug #34227)Replication: The
--base64-outputoption for mysqlbinlog was not honored for all types of events. This interfered in some cases with performing point-in-time recovery. (Bug #32407)References: See also Bug #46640, Bug #34777.
Replication: The value of
Slave_IO_runningin the output ofSHOW SLAVE STATUSdid not distinguish between all 3 possible states of the slave I/O thread (not running; running but not connected; connected). Now the valueConnecting(rather thanNo) is shown when the slave I/O thread is running but the slave is not connected to a replication master.The server system variable
Slave_runningalso reflects this change, and is now consistent with what is shown forSlave_IO_running. (Bug #30703, Bug #41613, Bug #51089)Replication: Queries written to the slow query log on the master were not written to the slow query log on the slave. (Bug #23300)
References: See also Bug #48632.
Replication: Valgrind revealed an issue with mysqld that was corrected: memory corruption in replication slaves when switching databases. (Bug #19022)
API: The fix for Bug #24507 could lead in some cases to client application failures due to a race condition. Now the server waits for the “dummy” thread to return before exiting, thus making sure that only one thread can initialize the POSIX threads library. (Bug #42850)
Certain
INTERVALexpressions could cause a crash on 64-bit systems. (Bug #48739)Following a literal, the
COLLATEclause was mishandled such that different results could be produced depending on whether an index was used. (Bug #48447)SUM()artificially increased the precision of aDECIMALargument, which was truncated when a temporary table was created to hold the results. (Bug #48370)References: See also Bug #45261.
GRANTandREVOKEcrashed if a user name was specified asCURRENT_USER(). (Bug #48319)If an outer query was invalid, a subquery might not be set up.
EXPLAIN EXTENDEDdid not expect this and caused a crash by trying to dereference improperly set up information. (Bug #48295)A query containing a view using temporary tables and multiple tables in the
FROMclause andPROCEDURE ANALYSE()caused a server crash.As a result of this bug fix,
PROCEDURE ANALYSE()is legal only in a top-levelSELECT. (Bug #48293)References: See also Bug #46184.
Error handling was missing for
SELECTstatements containing subqueries in theWHEREclause and that assigned aSELECTresult to a user variable. The server could crash as a result. (Bug #48291)An assertion could fail if the optimizer used a
SPATIALindex. (Bug #48258, Bug #47019)InnoDBmishandled memory-allocation failures in theos_mem_alloc_large()function. (Bug #48237)WHEREclauses withwere handled incorrectly if the outer value list contained multiple items at least one of which could beouter_value_listNOT INsubqueryNULL. (Bug #48177)Searches using a nondefault collation could return different results for a table depending on whether partitioning was used. (Bug #48161)
A combination of
GROUP BY WITH ROLLUP,DISTINCTand theconstjoin type in a query caused a server crash when the optimizer used a temporary table to resolveDISTINCT. (Bug #48131)The subquery optimizer had a memory leak. (Bug #48060)
Server shutdown failed on Windows. (Bug #48047)
In some cases, using a null microsecond part in a
WHEREcondition (for example,WHERE date_time_field <= 'YYYY-MM-DD HH:MM:SS.0000') could lead to incorrect results due to improperDATETIMEcomparison. (Bug #47963)A build configured using the
--without-serveroption did not compile the yaSSL code, so if--with-sslwas also used, the build failed. (Bug #47957)When a query used a
DATEorDATETIMEvalue formatted using any separator characters other than hyphen ('-') and a>=condition matching only the greatest value in an indexed column, the result was empty if an index range scan was employed. (Bug #47925)mysys/mf_keycache.crequires threading, but no test was made for thread support. (Bug #47923)For debug builds, an assertion could fail during the next statement executed for a temporary table after a multiple-table
UPDATEinvolving that table modified anAUTO_INCREMENTcolumn with a user-supplied value. (Bug #47919)The
mysys/mf_strip.cfile, which defines thestrip_sp()function, has been removed from the MySQL source. The function was no longer used within the main build, and the supplied function was causing symbol errors on Windows builds. (Bug #47857)When building storage engines on Windows it was not possible to specify additional libraries within the CMake file required for the build. An
${engine}_LIBSmacro has been included in the files to support these additional storage-engine specific libraries. (Bug #47797)When building a pluggable storage engine on Windows, the engine name could be based on the directory name where the engine was located, rather than the configured storage engine name. (Bug #47795)
During cleanup of a stored procedure's internal structures, the flag to ignore the errors for
INSERT IGNOREorUPDATE IGNOREwas not cleaned up, which could result in a server crash. (Bug #47788)If the first argument to
GeomFromWKB()function was a geometry value, the function just returned its value. However, it failed to preserve the argument'snull_valueflag, which caused an unexpectedNULLvalue to be returned to the caller, resulting in a server crash. (Bug #47780)InnoDBcould crash when updating spatial values. (Bug #47777)The
pthread_cond_wait()implementations for Windows could deadlock in some rare circumstances. (Bug #47768)The encoding of values for
SETstatements was incorrect, resulting in incorrect error messages. (Bug #47597)system_variable=identifierOn Windows, when an idle named pipe connection was forcibly closed with a
KILLstatement or because the server was being shut down, the thread that was closing the connection would hang infinitely.As a result of the work done for this bug, the
net_read_timeout,net_write_timeout, andwait_timeout, system variables now apply to connections over all transports, not just to TCP/IP. (Bug #47571, Bug #31621)On Mac OS X or Windows, sending a
SIGHUPsignal to the server or an asynchronous flush (triggered byflush_time) caused the server to crash. (Bug #47525)Debug builds could not be compiled with the Sun Studio compiler. (Bug #47474)
Queries of the form
SELECT SUM(DISTINCTcaused a server crash. (Bug #47421)varchar_key) FROMtbl_nameA function call could end without throwing an error or setting the return value. For example, this could happen when an error occurred while calculating the return value. This is fixed by setting the value to
NULLwhen an error occurs during evaluation of an expression. (Bug #47412)mysqladmin debug could crash on 64-bit systems. (Bug #47382)
A simple
SELECTwith implicit grouping could return many rows rather than a single row if the query was ordered by the aggregated column in the select list. (Bug #47280)An assertion could be raised for
CREATE TABLEif there was a pendingINSERT DELAYEDorREPLACE DELAYEDfor the same table. (Bug #47274)InnoDBraised errors in some cases in a manner not compatible withSIGNALandRESIGNAL. (Bug #47233)A multiple-table
UPDATEinvolving a natural join and a mergeable view raised an assertion. (Bug #47150)On FreeBSD, memory mapping for
MERGEtables could fail if underlying tables were empty. (Bug #47139)Solaris binary packages now are compiled with
-g0rather than-g. (Bug #47137)If an
InnoDBtable was created with theAUTO_INCREMENTtable option to specify an initial auto-increment value, and an index was added in a separate operation later, the auto-increment value was lost (subsequent inserts began at 1 rather than the specified value). (Bug #47125)Incorrect handling of predicates involving
NULLby the range optimizer could lead to an infinite loop during query execution. (Bug #47123)EXPLAINcaused a server crash for certain valid queries. (Bug #47106)Repair by sort or parallel repair of
MyISAMtables might not fail over to repair with key cache. (Bug #47073)InnoDBdid not compile on some Solaris systems. (Bug #47058)On Windows, when a failed I/O operation occurred with return code of
ERROR_WORKING_SET_QUOTA,InnoDBintentionally crashed the server. NowInnoDBsleeps for 100ms and retries the failed operation. (Bug #47055)The mysql_config script contained a reference to
@innodb_system_libs@that was not replaced with the corresponding library flags during the build process and ended up in the output of mysql_config --libs. (Bug #47007)The configure option
--without-serverdid not work. (Bug #46980)InnoDBnow ignores negative values supplied by a user for anAUTO_INCREMENTcolumn when calculating the next value to store in the data dictionary. SettingAUTO_INCREMENTcolumns to negative values is undefined behavior and this change should bring the behavior ofInnoDBcloser to what users expect. (Bug #46965)Failed multiple-table
DELETEstatements could raise an assertion. (Bug #46958)When MySQL crashed (or a snapshot was taken that simulates a crash), it was possible that internal XA transactions (used to synchronize the binary log and
InnoDB) could be left in aPREPAREDstate, whereas they should be rolled back. This occurred when theserver_idvalue changed before the restart, because that value was used to construct XID values.Now the restriction is relaxed that the
server_idvalue be consistent for XID values to be considered valid. The rollback phase should then be able to clean up all pending XA transactions. (Bug #46944)When creating a new instance on Windows using mysqld-nt and the
--installparameter, the value of the service would be set incorrectly, resulting in a failure to start the configured service. (Bug #46917)The test suite was missing from RPM packages. (Bug #46834)
For
InnoDBtables, an unnecessary table rebuild forALTER TABLEcould sometimes occur for metadata-only changes. (Bug #46760)The server could crash for queries with the following elements: 1. An “impossible where” in the outermost
SELECT; 2. An aggregate in the outermostSELECT; 3. A correlated subquery with aWHEREclause that includes an outer field reference as a top-levelWHEREsargable predicate; (Bug #46749)InnoDBdid not compile using gcc 4.1 on PowerPC systems. (Bug #46718)If
InnoDBreached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug #46672)References: See also Bug #18828.
A Valgrind error during index creation by
InnoDBwas corrected. (Bug #46657)Concurrent
INSERT INTO ... SELECTstatements for anInnoDBtable could cause anAUTO_INCREMENTassertion failure. (Bug #46650)The Serbian locale name
'sr_YU'is obsolete. It is still recognized for backward compatibility, but'sr_RS'now should be used instead. (Bug #46633)On Solaris and HP-UX systems with the environment set to the default
Clocale, MySQL client programs issued anUnknown OS character seterror. (Bug #46619)SHOW CREATE TRIGGERfor aMERGEtable trigger caused an assertion failure. (Bug #46614)DIVoperations that are out of range generated an errorError (Code 1264): Out of range value(correct), but also an error:Error (Code 1041): Out of memory(incorrect). (Bug #46606)If a transaction was rolled back inside
InnoDBdue to a deadlock or lock wait timeout, and a statement in the transaction had anIGNOREclause, the server could crash at the end of the statement or on shutdown. (Bug #46539)TRUNCATE TABLEfor a table that was opened withHANDLERdid not close the handler and left it in an inconsistent state that could lead to a server crash. NowTRUNCATE TABLEfor a table closes all open handlers for the table. (Bug #46456)Trailing spaces were not ignored for user-defined collations that mapped spaces to a character other than 0x20. (Bug #46448)
References: See also Bug #29468.
The server crashed if a shutdown occurred while a connection was idle. This happened because of a
NULLpointer dereference while logging to the error log. (Bug #46267)Dropping an
InnoDBtable that used an unknown collation (created on a different server, for example) caused a server crash. (Bug #46256)The GPL and commercial license headers had different sizes, so that error log, backtrace, core dump, and cluster trace file line numbers could be off by one if they were not checked against the version of the source used for the build. (For example, checking a GPL build backtrace against commercial sources.) (Bug #46216)
A query containing a subquery in the
FROMclause andPROCEDURE ANALYSE()caused a server crash. (Bug #46184)References: See also Bug #48293.
After an error such as a table-full condition,
INSERT IGNOREcould cause an assertion failure for debug builds. (Bug #46075)On 64-bit systems,
--skip-innodbdid not skipInnoDBstartup. (Bug #46043)InnoDBdid not disallow creation of an index with the nameGEN_CLUST_INDEX, which is used internally. (Bug #46000)CREATE TABLE ... SELECTcould cause a server crash if no default database was selected. (Bug #45998)Configuring MySQL for DTrace support resulted in a build failure on Solaris if the directory for the dtrace executable was not in
PATH. (Bug #45810)An infinite hang and 100% CPU usage occurred after a handler tried to open a merge table.
If the command mysqladmin shutdown was executed during the hang, the debug server generated the following assert:
mysqld: table.cc:407: void free_table_share(TABLE_SHARE*): Assertion `share->ref_count == 0' failed. 090610 14:54:04 - mysqld got signal 6 ;
(Bug #45781)
During the build of the Red Hat IA64 MySQL server RPM, the system library link order was incorrect. This made the resulting Red Hat IA64 RPM depend on "libc.so.6.1(GLIBC_PRIVATE)(64bit)", thus preventing installation of the package. (Bug #45706)
The
caseinfomember of theCHARSET_INFOstructure was not initialized for user-defined Unicode collations, leading to a server crash. (Bug #45645)Appending values to an
ENUMorSETdefinition is a metadata change for whichALTER TABLEneed not rebuild the table, but it was being rebuilt anyway. (Bug #45567)The
socketsystem variable was unavailable on Windows. (Bug #45498)The combination of
MIN()orMAX()in the select list withWHEREandGROUP BYclauses could lead to incorrect results. (Bug #45386)Truncation of
DECIMALvalues could lead to assertion failures; for example, when deducing the type of a table column from a literalDECIMALvalue. (Bug #45261)References: See also Bug #48370.
Client flags were incorrectly initialized for the embedded server, causing several tests in the
jptest suite to fail. (Bug #45159)Concurrent execution of statements requiring a table-level lock and statements requiring a non-table-level write lock for a table could deadlock. (Bug #45143)
For settings of
lower_case_table_namesgreater than 0, some queries forINFORMATION_SCHEMAtables left entries with incorrect lettercase in the table definition cache. (Bug #44738)mysqld_safe could fail to find the logger program. (Bug #44736)
Some Perl scripts in AIX packages contained an incorrect path to the perl executable. (Bug #44643)
With
InnoDB, renaming a table column and then creating an index on the renamed column caused a server crash to the.frmfile and theInnoDBdata directory going out of sync. NowInnoDB1.0.5 returns an error instead:ERROR 1034 (HY000): Incorrect key file for table '. To work around the problem, create another table with the same structure and copy the original table to it. (Bug #44571)tbl_name'; try to repair itFor debug builds, executing a stored procedure as a prepared statement could sometimes cause an assertion failure. (Bug #44521)
Using
mysql_stmt_execute()to call a stored procedure could cause a server crash. (Bug #44495)InnoDBdid not always disallow creating tables containing columns with names that match the names of internal columns, such asDB_ROW_ID,DB_TRX_ID,DB_ROLL_PTR, andDB_MIX_ID. (Bug #44369)An
InnoDBerror message incorrectly referred to the nonexistentinnodb_max_files_openvariable rather than toinnodb_open_files. (Bug #44338)SELECT ... WHERE ... IN (NULL, ...)was executed using a full table scan, even if the same query without theNULLused an efficient range scan. (Bug #44139)References: See also Bug #18360.
InnoDBuse ofSELECT MAX(could cause a crash when MySQL data dictionaries went out of sync. (Bug #44030)autoinc_column)LOAD DATA INFILEstatements were written to the binary log in such a way that parsing problems could occur when re-executing the statement from the log. (Bug #43746)Selecting from the process list in the embedded server caused a crash. (Bug #43733)
References: See also Bug #47304.
Attempts to enable
large_pageswith a shared memory segment larger than 4GB caused a server crash. (Bug #43606)For
ALTER TABLE, renaming aDATETIMEorTIMESTAMPcolumn unnecessarily caused a table copy operation. (Bug #43508)The weekday names for the Romanian
lc_time_nameslocale'ro_RO'were incorrect. Thanks to Andrei Boros for the patch to fix this bug. (Bug #43207)XA STARTcould cause an assertion failure or server crash when it is called after a unilateral rollback issued by the Resource Manager (both in a regular transaction and after an XA transaction). (Bug #43171)Redefining a trigger could cause an assertion failure. (Bug #43054)
The
FORCE INDEX FOR ORDER BYindex hint was ignored when join buffering was used. (Bug #43029)DROP DATABASEdid not clear the message list. (Bug #43012, Bug #43138)The
NUM_FLAGbit of theMYSQL_FIELD.flagsmember now is set for columns of typeMYSQL_TYPE_NEWDECIMAL. (Bug #42980)Incorrect handling of range predicates combined with
ORoperators could yield incorrect results. (Bug #42846)Failure to treat
BITvalues as unsigned could lead to unpredictable results. (Bug #42803)For the embedded server on Windows,
InnoDBcrashed wheninnodb_file_per_tablewas enabled and a table name was in full path format. (Bug #42383)SHOW ERRORSreturned an empty result set after an attempt to drop a nonexistent table. (Bug #42364)If the server was started with an option that had a missing or invalid value, a subsequent error that normally would cause the server to shut down could cause it to crash instead. (Bug #42244)
Some queries with nested outer joins could lead to crashes or incorrect results because an internal data structure was handled improperly. (Bug #42116)
The server used the wrong lock type (always
TL_READinstead ofTL_READ_NO_INSERTwhen appropriate) for tables used in subqueries ofUPDATEstatements. This led in some cases to replication failure because statements were written in the wrong order to the binary log. (Bug #42108)A Valgrind warning in
open_tables()was corrected. (Bug #41759)In a replication scenario with
innodb_locks_unsafe_for_binlogenabled on the slave, where rows were changed only on the slave (not through replication), in some rare cases, many messages of the following form were written to the slave error log:InnoDB: Error: unlock row could not find a 4 mode lock on the record. (Bug #41756)After renaming a user, granting that user privileges could result in the user having privileges additional to those granted. (Bug #41597)
The mysql-stress-test.pl test script was missing from the
noinstallpackages on Windows. (Bug #41546)With a nonstandard
InnoDBpage size, some error messages became inaccurate.ЗамечаниеChanging the page size is not a supported operation and there is no guarantee that
InnoDBwill function normally with a page size other than 16KB. Problems compiling or running InnoDB may occur. In particular,ROW_FORMAT=COMPRESSEDinInnoDBassumes that the page size is at most 16KB and uses 14-bit pointers.A version of
InnoDBbuilt for one page size cannot use data files or log files from a version built for a different page size.(Bug #41490)
In some cases, the server did not recognize lettercase differences between
GRANTattributes such as table name or user name. For example, a user was able to perform operations on a table with privileges of another user with the same user name but in a different lettercase.In consequence of this bug fix, the collation for the
Routine_namecolumn of themysql.proctable is changed fromutf8_bintoutf8_general_ci. (Bug #41049)References: See also Bug #48872.
When a storage engine plugin failed to initialize before allocating a slot number, it would acidentally unplug the engine installed in slot 0. (Bug #41013)
Optimized builds of mysqld crashed when built with Sun Studio on SPARC platforms. (Bug #40244)
CREATE TABLEfailed if a column name in aFOREIGN KEYclause was given in a lettercase different from the corresponding index definition. (Bug #39932)The
mysql_stmt_close()C API function did not flush all pending data associated with the prepared statement. (Bug #39519)INFORMATION_SCHEMAaccess optimizations did not work properly in some cases. (Bug #39270)ALTER TABLEneglected to preserveROW_FORMATinformation from the original table, which could cause subsequentALTER TABLEandOPTIMIZE TABLEstatements to lose the row format forInnoDBtables. (Bug #39200)Simultaneous
ANALYZE TABLEoperations for anInnoDBtables could be subject to a race condition. (Bug #38996)mysqlbinlog option-processing code had a memory leak. (Bug #38468)
The
ALTER ROUTINEprivilege incorrectly permittedSHOW CREATE TABLE. (Bug #38347)Setting the
general_log_fileorslow_query_log_filesystem variable to a nonconstant expression caused the variable to become unset. (Bug #38124)For certain
SELECTstatements usingrefaccess, MySQL estimated an incorrect number of rows, which could lead to inefficient query plans. (Bug #38049)A workload consisting of
CREATE TABLE ... SELECTand DML operations could cause deadlock. (Bug #37433)The MySQL client library mishandled
EINPROGRESSerrors for connections in nonblocking mode. This could lead to replication failures on hosts capable of resolving both IPv4 and IPv6 network addresses, when trying to resolvelocalhost. (Bug #37267)References: See also Bug #44344.
Previously,
InnoDBperformedREPLACE INTO T SELECT ... FROM S WHERE ...by setting shared next-key locks on rows fromS. NowInnoDBselects rows fromSwith shared locks or as a consistent read, as forINSERT ... SELECT. This reduces lock contention between sessions. (Bug #37232)Some warnings were being reported as errors. (Bug #36777)
Privileges for
SHOW CREATE VIEWwere not being checked correctly. (Bug #35996)Different invocations of
CHECKSUM TABLEcould return different results for a table containing columns with spatial data types. (Bug #35570)Result set metadata for columns retrieved from
INFORMATION_SCHEMAtables did not have thedbororg_tablemembers of theMYSQL_FIELDstructure set. (Bug #35428)SHOW CREATE EVENToutput did not include theDEFINERclause. (Bug #35297)For its warning count, the
mysql_info()C API function could print the number of truncated data items rather than the number of warnings. (Bug #34898)Concurrent execution of
FLUSH TABLESalong withSHOW FUNCTION STATUSorSHOW PROCEDURE STATUScould cause a server crash. (Bug #34895)Executing
SHOW MASTER LOGSas a prepared statement without binary logging enabled caused a crash for debug builds. (Bug #34741)There were spurious warnings about
"Truncated incorrect DOUBLE value"in queries withMATCH ... AGAINSTand>or<with a constant (which was reported as an incorrectDOUBLEvalue) in theWHEREcondition. (Bug #34374)A
COMMENTlonger than 64 characters causedCREATE PROCEDUREto fail. (Bug #34197)mysql_real_connect()did not check whether theMYSQLconnection handler was already connected and connected again even if so. Now aCR_ALREADY_CONNECTEDerror occurs. (Bug #33831)INSTALL PLUGINandUNINSTALL PLUGINdid not handle plugin identifiers consistently with respect to lettercase. (Bug #33731)The default values for the general query log and slow query log file are documented to be based on the server host name and located in the data directory. However, they were in fact being based on the basename and location of the process ID (PID) file. The name and location defaults for the PID file are based on the server host name and data directory, so if it was not assigned a different name explicitly, its defaults were used and the general query log and slow query log file defaults were as documented. But if the PID file was assigned a value with the
--pid-fileoption, the defaults for the general query log and slow query log file were incorrect. This has been rectified so that the defaults for all three files are based on the server host name and data directory.A remaining problem is that the binary log and relay log
.andNNNNNN.indexbasename defaults are based on the PID file basename, contrary to the documentation. This issue is to be addressed as Bug #45359. (Bug #33693)The
SHOW FUNCTION CODEandSHOW PROCEDURE CODEstatements are not present in nondebug builds, but attempting to use them resulted in a “syntax error” message. Now the error message indicates that the statements are disabled and that you must use a debug build. (Bug #33637)The
LAST_DAY()andMAKEDATE()functions could returnNULL, but the result metadata indicatedNOT NULL. Thanks to Hiromichi Watari for the patch to fix this bug. (Bug #33629)Instance Manager (mysqlmanager) has been removed, but a reference to it still appeared in the mysql.server script. (Bug #33472)
There was a race condition between the event scheduler and the server shutdown thread. (Bug #32771)
When an
InnoDBtablespace filled up, an error was logged to the client, but not to the error log. Also, the error message was misleading and did not indicate the real source of the problem. (Bug #31183)ALTER TABLEstatements that added a column and added a nonpartial index on the column failed to add the index. (Bug #31031)For
consttables that were optimized away,EXPLAIN EXTENDEDdisplayed them in theFROMclause. Now they are not displayed. If all tables are optimized away,FROM DUALis displayed. (Bug #30302)There were cases where string-to-number conversions would produce warnings for
CHARvalues but not forVARCHARvalues. (Bug #28299)In mysql, using Control+C to kill the current query resulted in a
ERROR 1053 (08S01): Server shutdown in progress" messageif the query was waiting for a lock. (Bug #28141)When building MySQL on Windows from source, the
WITH_BERKELEY_STORAGE_ENGINEoption would fail to configureBDBsupport correctly. (Bug #27693)The default database is no longer changed to
NULL(“no database”) ifDROP DATABASEfor that database failed. (Bug #26704)DROP TABLEforINFORMATION_SCHEMAtables produced anUnknown tableerror rather than the more appropriateAccess denied. (Bug #24062)SELECT COUNT(DISTINCT)was slow compared withSELECT DISTINCT. Now the server can use loose index scan for certain forms of aggregate functions that useDISTINCT. See Section 7.13.10.1, “Loose Index Scan”. (Bug #21849, Bug #38213)Referring to a stored function qualified with the name of one database and tables in another database caused a “table doesn't exist” error. (Bug #18444)
A Table ... doesn't exist error could occur for statements that called a function defined in another database. (Bug #17199)
- D.2.1.1. Changes in MySQL Connector/ODBC 5.1.10 (02 February 2012)
- D.2.1.2. Changes in MySQL Connector/ODBC 5.1.9 (06 October 2011)
- D.2.1.3. Changes in MySQL Connector/ODBC 5.1.8 (07 November 2010)
- D.2.1.4. Changes in MySQL Connector/ODBC 5.1.7 (24 August 2010)
- D.2.1.5. Changes in MySQL Connector/ODBC 5.1.6 (09 November 2009)
- D.2.1.6. Changes in MySQL Connector/ODBC 5.1.5 (18 August 2008)
- D.2.1.7. Changes in MySQL Connector/ODBC 5.1.4 (15 April 2008)
- D.2.1.8. Changes in MySQL Connector/ODBC 5.1.3 (26 March 2008)
- D.2.1.9. Changes in MySQL Connector/ODBC 5.1.2 (13 February 2008)
- D.2.1.10. Changes in MySQL Connector/ODBC 5.1.1 (13 December 2007)
- D.2.1.11. Changes in MySQL Connector/ODBC 5.1.0 (10 September 2007)
Bugs Fixed
SQLFetchhas to return error if indicator pointer isNULLforNULLvalue. (Bug #13542600)In some cases, a
TIMESTAMPfield could be described asSQL_NO_NULLS. (Bug #13532987)A failure on one statement causes another statement to fail. (Bug #13097201, Bug #62657)
Only the source code and Windows binaries are available with this release.
The 64-bit MSI installer no longer contains 32-bit and 64-bit builds of the driver, like it did in previous versions. It now only includes 64-bit support.
Pluggable Authentication Notes
The binaries for this distribution of Connector/ODBC can now connect to MySQL server accounts that use the PAM or Windows Native Authentication Plugins for authentication. See Section 5.5.6.2, “The PAM Authentication Plugin”, and Section 5.5.6.3, “The Windows Native Authentication Plugin”. These capabilities result from linking the Connector/ODBC binaries against the MySQL 5.5.16
libmysqlrather than the MySQL 5.1libmysqlused previously. The newerlibmysqlincludes the client-side support needed for the server-side PAM and Windows authentication plugins.
Bugs Fixed
Some catalog functions (such as
SQLColumns(),SQLStatistics(), andSQLPrimaryKeys()) would only return one row, when called after pre-execution failed. (Bug #12824839)The CLI installer script
mysqlodbc-installerwas missing documentation about how to configure the optional data source parameters. (Bug #12810058)The
Install.batscript contained leftover3.51information, and did not properly install the5.1Connector/ODBC connector. (Bug #12781039)An off-by-one error, where
sqlwcharchrmight read oneSQLWCHARafter the end of a string. (Bug #61586)SQLExecutewould returnSQL_SUCCESS_WITH_INFOinstead ofSQL_ERROR, when column parameter binding was enabled. (Bug #59772)The Connector/ODBC driver did not call
mysql_thread_end()when a thread ended, which caused error messages like:Error in my_thread_global_end(): 1 threads didn't exit. (Bug #57727)When using MySQL Connector/ODBC to fetch data, if a
net_write_timeoutcondition occurred, the operation returned the standard "end of data" status, rather than an error. (Bug #39878)MS Access fields with
VARCHAR NOT NULLcolumns could not be altered. (Bug #31067)
Functionality Added or Changed
Documentation in
.CHMand.HLPformat has been removed from the distribution. (Bug #56232)
Bugs Fixed
For some procedure and parameter combinations
SQLProcedureColumns()did not work correctly. For example, it could not return records for an existing procedure with correct parameters supplied.Further, it returned incorrect data for column 7,
TYPE_NAME. For example, it returnedVARCHAR(20)instead ofVARCHAR. (Bug #57182)The MySQL Connector/ODBC MSI installer did not set the
InstallLocationvalue in the Microsoft Windows registry. (Bug #56978)In bulk upload mode,
SQLExecutewould returnSQL_SUCCESS, even when the uploaded data contained errors, such as primary key duplication, and foreign key violation. (Bug #56804)SQLDescribeColandSQLColAttributecould not be called beforeSQLExecute, if the query was parameterized and not all parameters were bound.Note, MSDN states that “For performance reasons, an application should not call
SQLColAttribute/SQLDescribeColbefore executing a statement.” However, it should still be possible to do so if performance reasons are not paramount. (Bug #56717)When
SQLNumResultCols()was called betweenSQLPrepare()andSQLExecute()the driver ranSET @@sql_select_limit=1, which limited the resultset to just one row. (Bug #56677)After installing MySQL Connector/ODBC, the system DSN created could not be configured or deleted. An error dialog was displayed, showing the error message “Invalid attribute string”.
In this case the problem was due to the fact that the driver could not parse the NULL-separated connection string. (Bug #56233)
When used after a call to
SQLTables(),SQLRowCount()did not return the correct value. (Bug #55870)When attempting to install the latest Connector/ODBC 5.1.6 on Windows using the MSI, with an existing 5.1.x version already installed, the following error was generated:
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
Also, the version number displayed in the ODBC Data Source Administrator/Drivers tab did not get updated when removing or installing a new version of 5.1.x. (Bug #54314)
Functionality Added or Changed
MySQL Connector/ODBC has been changed to support the
CLIENT_INTERACTIVEflag. (Bug #48603)
Bugs Fixed
SQLColAttribute(SQL_DESC_PRECISION...)function returned incorrect results for type identifiers that have a negative value:#define SQL_LONGVARCHAR (-1) returned 4294967295 #define SQL_BINARY (-2) returned 4294967294 #define SQL_VARBINARY (-3) returned 4294967293 #define SQL_LONGVARBINARY (-4) returned 4294967292 #define SQL_BIGINT (-5) returned 4294967291 #define SQL_TINYINT (-6) returned 4294967290 #define SQL_BIT (-7) returned 4294967289
They were returned as 32-bit unsigned integer values. This only happened on 64-bit Linux. (Bug #55024)
SQLColAttributeforSQL_DESC_OCTET_LENGTHreturned length including terminating null byte. It should not have included the null byte. (Bug #54206)The
SQLColumnsfunction returned the incorrect transfer octet length into the columnBUFFER_LENGTHforDECIMALtype. (Bug #53235)SQLForeignKeys()did not return the correct information. The list of foreign keys in other tables should not have included foreign keys that point to unique constraints in the specified table. (Bug #51422)When executing the
SQLProcedureColumns()ODBC function, the driver reported the following error:MySQL server does not provide the requested information
(Bug #50400)
In contrast to all other ODBC catalog functions
SQLTablePrivilegesrequired the user to haveSELECTprivilege on MySQL schemata, otherwise the function returned with an error:SQL Error. Native Code: 1142, SQLState: HY000, Return Code: -1 [MySQL][ODBC 5.1 Driver][mysqld-5.0.67-community-nt]SELECT command denied to user 'repadmin'@'localhost' for table 'tables_priv' [Error][SQL Error]Error executing SQLTablePrivileges for object cat: myrep, object Name: xxxxxxxxxx
(Bug #50195)
MySQL Connector/ODBC manually added a
LIMITclause to the end of certain SQL statements, causing errors for statements that contained code that should be positioned after theLIMITclause. (Bug #49726)If
NO_BACKSLASH_ESCAPESmode was used on a server, escaping binary data led to server query parsing errors. (Bug #49029)Bulk upload operations did not work for queries that used parameters. (Bug #48310)
Retrieval of the current catalog at the moment when a connection was not ready, such as when the connection had been broken or when not all pending results had been processed, resulted in the application crashing. (Bug #46910)
Describing a view or table caused
SQLPrepareto prefetch table data. For large tables this created an intolerable performance hit. (Bug #46411)If an application was invoked by the root user,
SQLDriverConnect()was not able to use the username and password in the connection string to connect to the database. (Bug #45378)Calling
SQLColAttributeon a date column did not setSQL_DESC_DATETIME_INTERVAL_CODE.SQLColAttributereturnedSQL_SUCCESSbut the integer passed in was not set toSQL_CODE_DATE. (Bug #44576)Conversions for many types were missing from the file
driver/info.c. (Bug #43855)The
SQLTables()function required approximately two to four minutes to return the list of 400 tables in a database. TheSHOW TABLE STATUSquery used bySQLTables()was extremely slow for InnoDB tables with a large number of rows because the query was calculating the approximate number of rows in each table. Further, the results could not be cached due to non-deterministic nature of the result set (the row count was re-calculated every time), impacting performance further. (Bug #43664)Executing
SQLForeignKeysto get imported foreign keys for tables took an excessively long time. For example, getting imported foreign keys for 252 tables to determine parent/child dependencies took about 3 minutes and 14 seconds for the 5.1.5 driver, whereas it took 3 seconds for the 3.5x.x driver. (Bug #39562)SQLDescribeColreturned incorrect column definitions forSQLTablesresult. (Bug #37621)When opening
ADO.Recordsetfrom Microsoft Access 2003, a run-time error occurred:ErrNo: -2147467259 ErrMessage: Data provider or other service returned an E_FAIL status.
(Bug #36996)
SQLPrimaryKeysWreturned mangled strings for table name, column name and primary key name. (Bug #36441)On Windows, the SOCKET parameter to the DSN was used as the named pipe name to connect to. This was not exposed in the Windows setup GUI. (Bug #34477)
MySQL Connector/ODBC returned a value of zero for a column with a non-zero value. This happened when the column had a data type of
BIT, and any numeric type was used inSQLBindCol. (Bug #32821)Option for handling bad dates was not available in the GUI. (Bug #30539)
Functionality Added or Changed
In the MySQL Data Source Configuration dialog, an excessive number of tabs were required to navigate to selection of a database. MySQL Connector/ODBC has been changed to make the tab order more practical, thereby enabling faster configuration of a Data Source. (Bug #42905)
Bugs Fixed
An error randomly occurred on Windows 2003 Servers (German language Version) serving classic ASP scripts on IIS6 MDAC version 2.8 SP2 on Windows 2003 SP2. The application connected to MySQL Server 5.0.44-log with a charset of UTF-8 Unicode (utf8). The MySQL server was running on Gentoo Linux.
The script error occurred sporadically on the following line of code:
SET my_conn = Server.CreateObject("ADODB.Connection") my_conn.Open ConnString <- ERRORThe connection was either a DSN or the explicit connection string:
Driver={MySQL ODBC 5.1 Driver};SERVER=abc.abc.abc.abc;DATABASE=dbname;UID=uidname;PWD=pwdname;PORT=3306;OPTION=67108864;The error occurred on connections established using either a DNS or a connection string.
When IISState and Debug Diagnostic Tool 1.0.0.152 was used to analyse the code, the following crash analysis was generated:
MYODBC5!UTF16TOUTF32+6In 4640-1242788336.dmp the assembly instruction at myodbc5!utf16toutf32+6 in C:\Programme\MySQL\Connector ODBC 5.1\myodbc5.dll from MySQL AB has caused an access violation exception (0xC0000005) when trying to read from memory location 0x194dd000 on thread 33
(Bug #44971)
MySQL Connector/ODBC overwrote the query log. MySQL Connector/ODBC was changed to append the log, rather than overwrite it. (Bug #44965)
MySQL Connector/ODBC failed to build with MySQL 5.1.30 due to incorrect use of the data type
bool. (Bug #42120)Inserting a new record using
SQLSetPosdid not correspond to the database name specified in theSELECTstatement when querying tables from databases other than the current one.SQLSetPosattempted to do theINSERTin the current database, but finished with aSQL_ERRORresult and “Table does not exist” message from MySQL Server. (Bug #41946)Calling
SQLDescribeCol()with a NULL buffer and nonzero buffer length caused a crash. (Bug #41942)MySQL Connector/ODBC updated some fields with random values, rather than with
NULL. (Bug #41256)When a column of type
DECIMALcontainingNULLwas accessed, MySQL Connector/ODBC returned a 0 rather than aNULL. (Bug #41081)In Access 97, when linking a table containing a
LONGTEXTorTEXTfield to a MySQL Connector/ODBC DSN, the fields were shown asTEXT(255)in the table structure. Data was therefore truncated to 255 characters. (Bug #40932)Calling
SQLDriverConnect()with aNULLpointer for the output buffer caused a crash ifSQL_DRIVER_NOPROMPTwas also specified:SQLDriverConnect(dbc, NULL, "DSN=myodbc5", SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT)
(Bug #40316)
Setting the ADO
Recordsetdecimal field value to 44.56 resulted in an incorrect value of 445600.0000 being stored when the record set was updated with theUpdatemethod. (Bug #39961)The
SQLTablesWAPI gave incorrect results. For example, table name and table type were returned asNULLrather than as the correct values. (Bug #39957)Connector/ODBC would crash when a character set was being used on the server that was not supported in the client, for example cp1251:
[MySQL][ODBC 5.1 Driver][mysqld-5.0.27-community-nt]Restricted data type attribute violation
The fix causes Connector/ODBC to return an error message instead of crashing. (Bug #39831)
Binding
SQL_C_BITto anINTEGERcolumn did not work.The
sql_get_data()function only worked correctly forBOOLEANcolumns that corresponded toSQL_C_BITbuffers. (Bug #39644)When the
SQLTablesmethod was called withNULLpassed as thetablenameparameter, only one row in theresultset, with table name ofNULLwas returned, instead of all tables for the given database. (Bug #39561)The
SQLGetInfo()function returned 0 forSQL_CATALOG_USAGEinformation. (Bug #39560)Connector/ODBC 5.1.5 was not able to connect if the connection string parameters contained spaces or tab symbols. For example, if the
SERVERparameter was specified as “SERVER= localhost” instead of “SERVER=localhost” the following error message will be displayed:[MySQL][ODBC 5.1 Driver] Unknown MySQL server host ' localhost' (11001).
(Bug #39085)
The pointer passed to the
SQLDriverConnectmethod to retrieve the output connection string length was one greater than it should have been due to the inclusion of the NULL terminator. (Bug #38949)Data-at-execution parameters were not supported during positioned update. This meant updating a long text field with a cursor update would erroneously set the value to null. This would lead to the error
Column 'column_name' cannot be nullwhile updating the database, even whencolumn_namehad been assigned a valid nonnull string. (Bug #37649)The
SQLDriverConnectmethod truncated theOutputConnectionStringparameter to 52 characters. (Bug #37278)The connection string option
Enable Auto-reconnectdid not work. When the connection failed, it could not be restored, and the errors generated were the same as if the option had not been selected. (Bug #37179)Insertion of data into a
LONGTEXTtable field did not work. If such an attempt was made the corresponding field would be found to be empty on examination, or contain random characters. (Bug #36071)No result record was returned for
SQLGetTypeInfofor theTIMESTAMPdata type. An application would receive the resultreturn code 100 (SQL_NO_DATA_FOUND). (Bug #30626)It was not possible to use MySQL Connector/ODBC to connect to a server using SSL. The following error was generated:
Runtime error '-2147467259 (80004005)': [MySQL][ODBC 3.51 Driver]SSL connection error.
(Bug #29955)
When the
recordSet.Updatefunction was called to update anadLongVarCharfield, the field was updated but the recordset was immediately lost. This happened with driver cursors, whether the cursor was opened in optimistic or pessimistic mode.When the next update was called the test code would exit with the following error:
-2147467259 : Query-based update failed because the row to update could not be found.
(Bug #26950)
Microsoft Access was not able to read
BIGINTvalues properly from a table with just two columns of typeBIGINTandVARCHAR.#DELETEappeared instead of the correct values. (Bug #17679)
Bugs Fixed
ODBC
TIMESTAMPstring format is not handled properly by Connector/ODBC. When passing aTIMESTAMPorDATEto Connector/ODBC, in the ODBC format: {d <date>} or {ts <timestamp>}, the string that represents this is copied once into the SQL statement, and then added again, as an escaped string. (Bug #37342)The connector failed to prompt for additional information required to create a DSN-less connection from an application such as Microsoft Excel. (Bug #37254)
SQLDriverConnectdoes not returnSQL_NO_DATAon cancel. The ODBC documentation specifies that this method should returnSQL_NO_DATAwhen the user cancels the dialog to connect. The connector, however, returnsSQL_ERROR. (Bug #36293)Assigning a string longer than 67 characters to the
TableTypeparameter resulted in a buffer overrun when theSQLTables()function was called. (Bug #36275)The ODBC connector randomly uses logon information stored in
odbc-profile, or prompts the user for connection information and ignores any settings stored inodbc-profile. (Bug #36203)After having successfully established a connection, a crash occurs when calling
SQLProcedures()followed bySQLFreeStmt(), using the ODBC C API. (Bug #36069)
Bugs Fixed
Wrong result obtained when using
sum()on adecimal(8,2)field type. (Bug #35920)The driver installer could not create a new DSN if many other drivers were already installed. (Bug #35776)
The
SQLColAttribute()function returnedSQL_TRUEwhen querying theSQL_DESC_FIXED_PREC_SCALE (SQL_COLUMN_MONEY)attribute of aDECIMALcolumn. Previously, the correct value ofSQL_FALSEwas returned; this is now again the case. (Bug #35581)On Linux,
SQLGetDiagRec()returnedSQL_SUCCESSin cases when it should have returnedSQL_NO_DATA. (Bug #33910)The driver crashes ODBC Administrator on attempting to add a new DSN. (Bug #32057)
Platform-Specific Notes
Important Change: You must uninstall previous 5.1.x editions of MySQL Connector/ODBC before installing the new version.
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
The installer for 64-bit Windows installs both the 32-bit and 64-bit driver. Please note that Microsoft does not yet supply a 64-bit bridge from ADO to ODBC.
Bugs Fixed
Important Change: In previous versions, the SSL certificate would automatically be verified when used as part of the MySQL Connector/ODBC connection. The default mode is now to ignore the verificate of certificates. To enforce verification of the SSL certificate during connection, use the
SSLVERIFYDSN parameter, setting the value to 1. (Bug #29955, Bug #34648)Inserting characters to a UTF8 table using surrogate pairs would fail and insert invalid data. (Bug #34672)
Installation of MySQL Connector/ODBC would fail because it was unable to uninstall a previous installed version. The file being requested would match an older release version than any installed version of the connector. (Bug #34522)
Using
SqlGetDatain combination withSQL_C_WCHARwould return overlapping data. (Bug #34429)Descriptor records were not cleared correctly when calling
SQLFreeStmt(SQL_UNBIND). (Bug #34271)The dropdown selection for databases on a server when creating a DSN was too small. The list size now automatically adjusts up to a maximum size of 20 potential databases. (Bug #33918)
Microsoft Access would be unable to use
DBEngine.RegisterDatabaseto create a DSN using the MySQL Connector/ODBC driver. (Bug #33825)MySQL Connector/ODBC erroneously reported that it supported the
CAST()andCONVERT()ODBC functions for parsing values in SQL statements, which could lead to bad SQL generation during a query. (Bug #33808)Using a linked table in Access 2003 where the table has a
BIGINTcolumn as the first column in the table, and is configured as the primary key, shows#DELETEDfor all rows of the table. (Bug #24535)Updating a
RecordSetwhen the query involves aBLOBfield would fail. (Bug #19065)
MySQL Connector/ODBC 5.1.2-beta, a new version of the ODBC driver for the MySQL database management system, has been released. This release is the second beta (feature-complete) release of the new 5.1 series and is suitable for use with any MySQL server version since MySQL 4.1, including MySQL 5.0, 5.1, and 6.0. (It will not work with 4.0 or earlier releases.)
Keep in mind that this is a beta release, and as with any other pre-production release, caution should be taken when installing on production level systems or systems with critical data.
Platform-Specific Notes
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
The installer for 64-bit Windows installs both the 32-bit and 64-bit driver. Please note that Microsoft does not yet supply a 64-bit bridge from ADO to ODBC.
Due to differences with the installation process used on Windows and potential registry corruption, it is recommended that uninstall any existing versions of MySQL Connector/ODBC 5.1.x before upgrading.
References: See also Bug #34571.
Functionality Added or Changed
Explicit descriptors are implemented. (Bug #32064)
A full implementation of SQLForeignKeys based on the information available from INFORMATION_SCHEMA in 5.0 and later versions of the server has been implemented.
Changed
SQL_ATTR_PARAMSET_SIZEto return an error until support for it is implemented.Disabled
MYSQL_OPT_SSL_VERIFY_SERVER_CERTwhen using an SSL connection.SQLForeignKeysusesINFORMATION_SCHEMAwhen it is available on the server, which enables more complete information to be returned.
Bugs Fixed
The
SSLCIPHERoption would be incorrectly recorded within the SSL configuration on Windows. (Bug #33897)Within the GUI interface, when connecting to a MySQL server on a nonstandard port, the connection test within the GUI would fail. The issue was related to incorrect parsing of numeric values within the DSN when the option was not configured as the last parameter within the DSN. (Bug #33822)
Specifying a nonexistent database name within the GUI dialog would result in an empty list, not an error. (Bug #33615)
When deleting rows from a static cursor, the cursor position would be incorrectly reported. (Bug #33388)
SQLGetInfo()reported characters forSQL_SPECIAL_CHARACTERSthat were not encoded correctly. (Bug #33130)Retrieving data from a
BLOBcolumn would fail withinSQLGetDatawhen the target data type wasSQL_C_WCHARdue to incorrect handling of the character buffer. (Bug #32684)Renaming an existing DSN entry would create a new entry with the new name without deleting the old entry. (Bug #31165)
Reading a
TEXTcolumn that had been used to store UTF8 data would result in the wrong information being returned during a query. (Bug #28617)SQLForeignKeyswould return an empty string for the schema columns instead ofNULL. (Bug #19923)When accessing column data,
FLAG_COLUMN_SIZE_S32did not limit the octet length or display size reported for fields, causing problems with Microsoft Visual FoxPro.The list of ODBC functions that could have caused failures in Microsoft software when retrieving the length of
LONGBLOBorLONGTEXTcolumns includes:SQLColumnsSQLColAttributeSQLColAttributesSQLDescribeColSQLSpecialColumns(theoretically can have the same problem)
(Bug #12805, Bug #30890)
Dynamic cursors on statements with parameters were not supported. (Bug #11846)
Evaluating a simple numeric expression when using the OLEDB for ODBC provider and ADO would return an error, instead of the result. (Bug #10128)
Adding or updating a row using
SQLSetPos()on a result set with aliased columns would fail. (Bug #6157)
MySQL Connector/ODBC 5.1.1-beta, a new version of the ODBC driver for the MySQL database management system, has been released. This release is the first beta (feature-complete) release of the new 5.1 series and is suitable for use with any MySQL server version since MySQL 4.1, including MySQL 5.0, 5.1, and 6.0. (It will not work with 4.0 or earlier releases.)
Keep in mind that this is a beta release, and as with any other pre-production release, caution should be taken when installing on production level systems or systems with critical data.
Includes changes from Connector/ODBC 3.51.21 and 3.51.22.
Built using MySQL 5.0.52.
Platform-Specific Notes
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
The installer for 64-bit Windows installs both the 32-bit and 64-bit driver. Please note that Microsoft does not yet supply a 64-bit bridge from ADO to ODBC.
Due to differences with the installation process used on Windows and potential registry corruption, it is recommended that uninstall any existing versions of MySQL Connector/ODBC 5.1.x before upgrading.
References: See also Bug #34571.
Functionality Added or Changed
Incompatible Change: Replaced myodbc3i (now myodbc-installer) with MySQL Connector/ODBC 5.0 version.
Incompatible Change: Removed monitor (myodbc3m) and dsn-editor (myodbc3c).
Incompatible Change: Do not permit
SET NAMESin initial statement and in executed statements.A wrapper for the
SQLGetPrivateProfileStringW()function, which is required for Unicode support, has been created. This function is missing from the unixODBC driver manager. (Bug #32685)Added MSI installer for Windows 64-bit. (Bug #31510)
Implemented support for
SQLCancel(). (Bug #15601)Added support for
SQL_NUMERIC_STRUCT. (Bug #3028, Bug #24920)Removed nonthreadsafe configuration of the driver. The driver is now always built against the threadsafe version of libmysql.
Implemented native Windows setup library
Replaced the internal library which handles creation and loading of DSN information. The new library, which was originally a part of MySQL Connector/ODBC 5.0, supports Unicode option values.
The Windows installer now places files in a subdirectory of the
Program Filesdirectory instead of the Windows system directory.
Bugs Fixed
The
SET NAMESstatement has been disabled because it causes problems in the ODBC driver when determining the current client character set. (Bug #32596)SQLDescribeColWreturned UTF-8 column asSQL_VARCHARinstead ofSQL_WVARCHAR. (Bug #32161)ADO was unable to open record set using dynamic cursor. (Bug #32014)
ADO applications would not open a
RecordSetthat contained aDECIMALfield. (Bug #31720)Memory usage would increase considerably. (Bug #31115)
SQL statements are limited to 64KB. (Bug #30983, Bug #30984)
SQLSetPoswithSQL_DELETEadvances dynamic cursor incorrectly. (Bug #29765)Using an ODBC prepared statement with bound columns would produce an empty result set when called immediately after inserting a row into a table. (Bug #29239)
ADO Not possible to update a client side cursor. (Bug #27961)
Recordset
Update()fails when usingadUseClientcursor. (Bug #26985)MySQL Connector/ODBC would fail to connect to the server if the password contained certain characters, including the semicolon and other punctuation marks. (Bug #16178)
Fixed
SQL_ATTR_PARAM_BIND_OFFSET, and fixed row offsets to work with updatable cursors.SQLSetConnectAttr()did not clear previous errors, possibly confusingSQLError().SQLError()incorrectly cleared the error information, making it unavailable from subsequent calls toSQLGetDiagRec().NULL pointers passed to
SQLGetInfo()could result in a crash.SQL_ODBC_SQL_CONFORMANCEwas not handled bySQLGetInfo().SQLCopyDesc()did not correctly copy all records.Diagnostics were not correctly cleared on connection and environment handles.
This release is the first of the new 5.1 series and is suitable for use with any MySQL server version since MySQL 4.1, including MySQL 5.0, 5.1, and 6.0. (It will not work with 4.0 or earlier releases.)
Keep in mind that this is a alpha release, and as with any other pre-production release, caution should be taken when installing on production level systems or systems with critical data. Not all of the features planned for the final Connector/ODBC 5.1 release are implemented.
Functionality is based on Connector/ODBC 3.51.20.
Platform-Specific Notes
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
There are no installer packages for Microsoft Windows x64 Edition.
Due to differences with the installation process used on Windows and potential registry corruption, it is recommended that uninstall any existing versions of MySQL Connector/ODBC 5.1.x before upgrading.
References: See also Bug #34571.
Functionality Added or Changed
Added support for Unicode functions (
SQLConnectW, etc).Added descriptor support (
SQLGetDescField,SQLGetDescRec, etc).Added support for
SQL_C_WCHAR.
- D.2.2.1. Changes in MySQL Connector/ODBC 5.0.12 (Never released)
- D.2.2.2. Changes in MySQL Connector/ODBC 5.0.11 (31 January 2007)
- D.2.2.3. Changes in MySQL Connector/ODBC 5.0.10 (14 December 2006)
- D.2.2.4. Changes in MySQL Connector/ODBC 5.0.9 (22 November 2006)
- D.2.2.5. Changes in MySQL Connector/ODBC 5.0.8 (17 November 2006)
- D.2.2.6. Changes in MySQL Connector/ODBC 5.0.7 (08 November 2006)
- D.2.2.7. Changes in MySQL Connector/ODBC 5.0.6 (03 November 2006)
- D.2.2.8. Changes in MySQL Connector/ODBC 5.0.5 (17 October 2006)
- D.2.2.9. Changes in Connector/ODBC 5.0.3 (Connector/ODBC 5.0 Alpha 3) (20 June 2006)
- D.2.2.10. Changes in Connector/ODBC 5.0.2 (Never released)
- D.2.2.11. Changes in Connector/ODBC 5.0.1 (Connector/ODBC 5.0 Alpha 2) (05 June 2006)
Development on Connector/ODBC 5.0.x has ceased. New features and functionality will be incorporated into Connector/ODBC 5.1.
Bugs Fixed
Functionality Added or Changed
Added support for ODBC v2 statement options using attributes.
Driver now builds and is partially tested under Linux with the iODBC driver manager.
Bugs Fixed
Connection string parsing for DSN-less connections could fail to identify some parameters. (Bug #25316)
Updates of
MEMOorTEXTcolumns from within Microsoft Access would fail. (Bug #25263)Transaction support has been added and tested. (Bug #25045)
Internal function,
my_setpos_delete_ignore()could cause a crash. (Bug #22796)Fixed occasional mis-handling of the
SQL_NUMERIC_Ctype.Fixed the binding of certain integer types.
Connector/ODBC 5.0.10 is the sixth BETA release.
Functionality Added or Changed
Significant performance improvement when retrieving large text fields in pieces using
SQLGetData()with a buffer smaller than the whole data. Mainly used in Access when fetching very large text fields. (Bug #24876)Added initial unicode support in data and metadata. (Bug #24837)
Added initial support for removing braces when calling stored procedures and retrieving result sets from procedure calls. (Bug #24485)
Added loose handling of retrieving some diagnostic data. (Bug #15782)
Added wide-string type info for
SQLGetTypeInfo().
Bugs Fixed
Editing DSN no longer crashes ODBC data source administrator. (Bug #24675)
String query parameters are new escaped correctly. (Bug #19078)
Connector/ODBC 5.0.9 is the fifth BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Functionality Added or Changed
Added support for column binding as SQL_NUMERIC_STRUCT.
Added recognition of
SQL_C_SHORTandSQL_C_TINYINTas C types.
Bugs Fixed
Fixed wildcard handling of and listing of catalogs and tables in
SQLTables.Added limit of display size when requested using
SQLColAttribute/SQL_DESC_DISPLAY_SIZE.Fixed buffer length return for SQLDriverConnect.
ODBC v2 behavior in driver now supports ODBC v3 date/time types (since DriverManager maps them).
Catch use of
SQL_ATTR_PARAMSET_SIZEand report error until we fully support.Fixed statistics to fail if it couldn't be completed.
Corrected retrieval multiple field types bit and blob/text.
Fixed SQLGetData to clear the NULL indicator correctly during multiple calls.
Connector/ODBC 5.0.8 is the fourth BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Functionality Added or Changed
Also made
SQL_DESC_NAMEonly fill in the name if there was a data pointer given, otherwise just the length.Fixed display size to be length if max length isn’t available.
Wildcards now support escaped chars and underscore matching (needed to link tables with underscores in access).
Bugs Fixed
Fixed binding using
SQL_C_LONG.Fixed using wrong pointer for
SQL_MAX_DRIVER_CONNECTIONSinSQLGetInfo.Set default return to
SQL_SUCCESSif nothing is done forSQLSpecialColumns.Fixed MDiagnostic to use correct v2/v3 error codes.
Allow SQLDescribeCol to be called to retrieve the length of the column name, but not the name itself.
Length now used when handling bind parameter (needed in particular for
SQL_WCHAR) - this enables updating char data in MS Access.Updated retrieval of descriptor fields to use the right pointer types.
Fixed handling of numeric pointers in SQLColAttribute.
Fixed type returned for
MYSQL_TYPE_LONGtoSQL_INTEGERinstead ofSQL_TINYINT.Fix size return from
SQLDescribeCol.Fixed string length to chars, not bytes, returned by SQLGetDiagRec.
Connector/ODBC 5.0.7 is the third BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Functionality Added or Changed
Added support for
SQLStatisticstoMYODBCShell.Improved trace/log.
Bugs Fixed
SQLBindParameter now handles
SQL_C_DEFAULT.Corrected incorrect column index within
SQLStatistics. Many more tables can now be linked into MS Access.Fixed
SQLDescribeColreturning column name length in bytes rather than chars.
Connector/ODBC 5.0.6 is the second BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Features, Limitations, and Notes on this Release
MySQL Connector/ODBC supports both
UserandSystemDSNs.Installation is provided in the form of a standard Microsoft System Installer (MSI).
You no longer have to have MySQL Connector/ODBC 3.51 installed before installing this version.
Bugs Fixed
You no longer have to have MySQL Connector/ODBC 3.51 installed before installing this version.
MySQL Connector/ODBC supports both
UserandSystemDSNs.Installation is provided in the form of a standard Microsoft System Installer (MSI).
Connector/ODBC 5.0.5 is the first BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
You no longer have to have Connector/ODBC 3.51 installed before installing this version.
Bugs Fixed
You no longer have to have MySQL Connector/ODBC 3.51 installed before installing this version.
This is an implementation and testing release, and is not designed for use within a production environment.
Features, limitations and notes on this release:
The following ODBC API functions have been added in this release:
SQLBindParameterSQLBindCol
Connector/ODBC 5.0.2 was an internal implementation and testing release.
Features, limitations and notes on this release:
Connector/ODBC 5.0 is Unicode aware.
Connector/ODBC is currently limited to basic applications. ADO applications and Microsoft Office are not supported.
Connector/ODBC must be used with a Driver Manager.
The following ODBC API functions are implemented:
SQLAllocHandleSQLCloseCursorSQLColAttributeSQLColumnsSQLConnectSQLCopyDescSQLDisconnectSQLExecDirectSQLExecuteSQLFetchSQLFreeHandleSQLFreeStmtSQLGetConnectAttrSQLGetDataSQLGetDescFieldSQLGetDescRecSQLGetDiagFieldSQLGetDiagRecSQLGetEnvAttrSQLGetFunctionsSQLGetStmtAttrSQLGetTypeInfoSQLNumResultColsSQLPrepareSQLRowcountSQLTables
The following ODBC API function are implemented, but not yet support all the available attributes/options:
SQLSetConnectAttrSQLSetDescFieldSQLSetDescRecSQLSetEnvAttrSQLSetStmtAttr
- D.2.3.1. Changes in MySQL Connector/ODBC 3.51.30 (02 February 2012)
- D.2.3.2. Changes in MySQL Connector/ODBC 3.51.29 (04 October 2011)
- D.2.3.3. Changes in MySQL Connector/ODBC 3.51.28 (09 February 2011)
- D.2.3.4. Changes in MySQL Connector/ODBC 3.51.27 (20 November 2008)
- D.2.3.5. Changes in MySQL Connector/ODBC 3.51.26 (07 July 2008)
- D.2.3.6. Changes in MySQL Connector/ODBC 3.51.25 (11 April 2008)
- D.2.3.7. Changes in MySQL Connector/ODBC 3.51.24 (14 March 2008)
- D.2.3.8. Changes in MySQL Connector/ODBC 3.51.23 (09 January 2008)
- D.2.3.9. Changes in MySQL Connector/ODBC 3.51.22 (13 November 2007)
- D.2.3.10. Changes in MySQL Connector/ODBC 3.51.21 (08 October 2007)
- D.2.3.11. Changes in MySQL Connector/ODBC 3.51.20 (10 September 2007)
- D.2.3.12. Changes in MySQL Connector/ODBC 3.51.19 (10 August 2007)
- D.2.3.13. Changes in MySQL Connector/ODBC 3.51.18 (08 August 2007)
- D.2.3.14. Changes in MySQL Connector/ODBC 3.51.17 (14 July 2007)
- D.2.3.15. Changes in MySQL Connector/ODBC 3.51.16 (14 June 2007)
- D.2.3.16. Changes in MySQL Connector/ODBC 3.51.15 (07 May 2007)
- D.2.3.17. Changes in MySQL Connector/ODBC 3.51.14 (08 March 2007)
- D.2.3.18. Changes in MySQL Connector/ODBC 3.51.13 (Never released)
- D.2.3.19. Changes in MySQL Connector/ODBC 3.51.12 (11 February 2005)
- D.2.3.20. Changes in MySQL Connector/ODBC 3.51.11 (28 January 2005)
Bugs Fixed
SQLFetchhas to return error if indicator pointer isNULLforNULLvalue. (Bug #13542600)In some cases, a
TIMESTAMPfield could be described asSQL_NO_NULLS. (Bug #13532987)A failure on one statement causes another statement to fail. (Bug #13097201, Bug #62657)
MySQL Connector/ODBC manually added a
LIMITclause to the end of certain SQL statements, causing errors for statements that contained code that should be positioned after theLIMITclause. (Bug #49726)Describing a view or table caused
SQLPrepareto prefetch table data. For large tables this created an intolerable performance hit. (Bug #46411)
Pluggable Authentication Notes
The binaries for this distribution of Connector/ODBC can now connect to MySQL server accounts that use the PAM or Windows Native Authentication Plugins for authentication. See Section 5.5.6.2, “The PAM Authentication Plugin”, and Section 5.5.6.3, “The Windows Native Authentication Plugin”. These capabilities result from linking the Connector/ODBC binaries against the MySQL 5.5.16
libmysqlrather than the MySQL 5.1libmysqlused previously. The newerlibmysqlincludes the client-side support needed for the server-side PAM and Windows authentication plugins.
Bugs Fixed
Some catalog functions (such as
SQLColumns(),SQLStatistics(), andSQLPrimaryKeys()) would only return one row, when called after pre-execution failed. (Bug #12824839)An off-by-one error, where
sqlwcharchrmight read oneSQLWCHARafter the end of a string. (Bug #61586)SQLExecutewould returnSQL_SUCCESS_WITH_INFOinstead ofSQL_ERROR, when column parameter binding was enabled. (Bug #59772)The Connector/ODBC driver did not call
mysql_thread_end()when a thread ended, which caused error messages like:Error in my_thread_global_end(): 1 threads didn't exit. (Bug #57727)MS Access fields with
VARCHAR NOT NULLcolumns could not be altered. (Bug #31067)
Bugs Fixed
SQLColAttribute(...SQL_DESC_CASE_SENSITIVE...)returnedSQL_FALSEfor binary types andSQL_TRUEfor the rest. It should have returnedSQL_TRUEfor binary types, andSQL_FALSEfor the rest. (Bug #54212)SQLColAttributeforSQL_DESC_OCTET_LENGTHreturned length including terminating null byte. It should not have included the null byte. (Bug #54206)If
NO_BACKSLASH_ESCAPESmode was used on a server, escaping binary data led to server query parsing errors. (Bug #49029)Inserting a new record using
SQLSetPosdid not correspond to the database name specified in theSELECTstatement when querying tables from databases other than the current one.SQLSetPosattempted to do theINSERTin the current database, but finished with aSQL_ERRORresult and “Table does not exist” message from MySQL Server. (Bug #41946)When using MySQL Connector/ODBC to fetch data, if a
net_write_timeoutcondition occurred, the operation returned the standard "end of data" status, rather than an error. (Bug #39878)No result record was returned for
SQLGetTypeInfofor theTIMESTAMPdata type. An application would receive the resultreturn code 100 (SQL_NO_DATA_FOUND). (Bug #30626)Microsoft Access was not able to read
BIGINTvalues properly from a table with just two columns of typeBIGINTandVARCHAR.#DELETEappeared instead of the correct values. (Bug #17679)
Bugs Fixed
The client program hung when the network connection to the server was interrupted. (Bug #40407)
The connection string option
Enable Auto-reconnectdid not work. When the connection failed, it could not be restored, and the errors generated were the same as if the option had not been selected. (Bug #37179)It was not possible to use MySQL Connector/ODBC to connect to a server using SSL. The following error was generated:
Runtime error '-2147467259 (80004005)': [MySQL][ODBC 3.51 Driver]SSL connection error.
(Bug #29955)
Functionality Added or Changed
There is a new connection option,
FLAG_NO_BINARY_RESULT. When set this option disables charset 63 for columns with an emptyorg_table. (Bug #29402)
Bugs Fixed
When an
ADOConnectionis created and attempts to open a schema withADOConnection.OpenSchemaan access violation occurs inmyodbc3.dll. (Bug #30770)When
SHOW CREATE TABLEwas invoked and then the field values read, the result was truncated and unusable if the table had many rows and indexes. (Bug #24131)
Bugs Fixed
The
SQLColAttribute()function returnedSQL_TRUEwhen querying theSQL_DESC_FIXED_PREC_SCALE (SQL_COLUMN_MONEY)attribute of aDECIMALcolumn. Previously, the correct value ofSQL_FALSEwas returned; this is now again the case. (Bug #35581)The driver crashes ODBC Administrator on attempting to add a new DSN. (Bug #32057)
When accessing column data,
FLAG_COLUMN_SIZE_S32did not limit the octet length or display size reported for fields, causing problems with Microsoft Visual FoxPro.The list of ODBC functions that could have caused failures in Microsoft software when retrieving the length of
LONGBLOBorLONGTEXTcolumns includes:SQLColumnsSQLColAttributeSQLColAttributesSQLDescribeColSQLSpecialColumns(theoretically can have the same problem)
(Bug #12805, Bug #30890)
Bugs Fixed
Security Enhancement: Accessing a parameter with the type of
SQL_C_CHAR, but with a numeric type and a length of zero, the parameter marker would get stripped from the query. In addition, an SQL injection was possible if the parameter value had a nonzero length and was not numeric, the text would be inserted verbatim. (Bug #34575)Important Change: In previous versions, the SSL certificate would automatically be verified when used as part of the MySQL Connector/ODBC connection. The default mode is now to ignore the verificate of certificates. To enforce verification of the SSL certificate during connection, use the
SSLVERIFYDSN parameter, setting the value to 1. (Bug #29955, Bug #34648)When using ADO, the count of parameters in a query would always return zero. (Bug #33298)
Using tables with a single quote or other nonstandard characters in the table or column names through ODBC would fail. (Bug #32989)
When using Crystal Reports, table and column names would be truncated to 21 characters, and truncated columns in tables where the truncated name was the duplicated would lead to only a single column being displayed. (Bug #32864)
SQLExtendedFetch()andSQLFetchScroll()ignored the rowset size if theDon't cache resultDSN option was set. (Bug #32420)When using the ODBC
SQL_TXN_READ_COMMITTEDoption, 'dirty' records would be read from tables as if the option had not been applied. (Bug #31959)When creating a System DSN using the ODBC Administrator on Mac OS X, a User DSN would be created instead. The root cause is a problem with the iODBC driver manager used on Mac OS X. The fix works around this issue.
ЗамечаниеODBC Administrator may still be unable to register a System DSN unless the
/Library/ODBC/odbc.inifile has the correct permissions. You should ensure that the file is writable by theadmingroup.(Bug #31495)
Calling
SQLFetchorSQLFetchScrollwould return negative data lengths when usingSQL_C_WCHAR. (Bug #31220)SQLSetParam()caused memory allocation errors due to driver manager's mapping of deprecated functions (buffer length -1). (Bug #29871)Static cursor was unable to be used through ADO when dynamic cursors were enabled. (Bug #27351)
Using
connection.Executeto create a record set based on a table without declaring the cmd option asadCmdTablewill fail when communicating with versions of MySQL 5.0.37 and higher. The issue is related to the way thatSQLSTATEis returned when ADO tries to confirm the existence of the target object. (Bug #27158)Updating a
RecordSetwhen the query involves aBLOBfield would fail. (Bug #19065)With some connections to MySQL databases using MySQL Connector/ODBC, the connection would mistakenly report 'user cancelled' for accesses to the database information. (Bug #16653)
Platform-Specific Notes
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
There are no installer packages for Microsoft Windows x64 Edition.
Bugs Fixed
MySQL Connector/ODBC would incorrectly return
SQL_SUCCESSwhen checking for distributed transaction support. (Bug #32727)When using unixODBC or directly linked applications where the thread level is set to less than 3 (within
odbcinst.ini), a thread synchronization issue would lead to an application crash. This was becauseSQLAllocStmt()andSQLFreeStmt()did not synchronize access to the list of statements associated with a connection. (Bug #32587)Cleaning up environment handles in multithread environments could result in a five (or more) second delay. (Bug #32366)
Renaming an existing DSN entry would create a new entry with the new name without deleting the old entry. (Bug #31165)
Setting the default database using the
DefaultDatabaseproperty of an ADOConnectionobject would fail with the errorProvider does not support this property. TheSQLGetInfo()returned the wrong value forSQL_DATABASE_NAMEwhen no database was selected. (Bug #3780)
Functionality Added or Changed
The workaround for this bug was removed due to the fixes in MySQL Server 5.0.48 and 5.1.21.
References: This bug was introduced by Bug #10491.
Bugs Fixed
The
Englishlocale would be used when formatting floating point values. TheClocale is now used for these values. (Bug #32294)When accessing information about supported operations, the driver would return incorrect information about the support for
UNION. (Bug #32253)Unsigned integer values greater than the maximum value of a signed integer would be handled incorrectly. (Bug #32171)
The wrong result was returned by
SQLGetData()when the data was an empty string and a zero-sized buffer was specified. (Bug #30958)Added the
FLAG_COLUMN_SIZE_S32option to limit the reported column size to a signed 32-bit integer. This option is automatically enabled for ADO applications to provide a work around for a bug in ADO. (Bug #13776)
Bugs Fixed
When using a rowset/cursor and add a new row with a number of fields, subsequent rows with fewer fields will include the original fields from the previous row in the final
INSERTstatement. (Bug #31246)Uninitiated memory could be used when C/ODBC internally calls
SQLGetFunctions(). (Bug #31055)The wrong
SQL_DESC_LITERAL_PREFIXwould be returned for date/time types. (Bug #31009)The wrong
COLUMN_SIZEwould be returned bySQLGetTypeInfofor the TIME columns (SQL_TYPE_TIME). (Bug #30939)Clicking outside the character set selection box when configuring a new DSN could cause the wrong character set to be selected. (Bug #30568)
Not specifying a user in the DSN dialog would raise a warning even though the parameter is optional. (Bug #30499)
SQLSetParam()caused memory allocation errors due to driver manager's mapping of deprecated functions (buffer length -1). (Bug #29871)When using ADO, a column marked as
AUTO_INCREMENTcould incorrectly report that the column permittedNULLvalues. This was dur to an issue withNULLABLEandIS_NULLABLEreturn values from the call toSQLColumns(). (Bug #26108)MySQL Connector/ODBC would return the wrong the error code when the server disconnects the active connection because the configured
wait_timeouthas expired. Previously it would returnHY000. MySQL Connector/ODBC now correctly returns anSQLSTATEof08S01. (Bug #3456)
Bugs Fixed
Using
FLAG_NO_PROMPTdoesn't suppress the dialogs normally handled bySQLDriverConnect. (Bug #30840)The specified length of the user name and authentication parameters to
SQLConnect()were not being honored. (Bug #30774)The wrong column size was returned for binary data. (Bug #30547)
SQLGetData()will now always returnSQL_NO_DATA_FOUNDon second call when no data left, even if requested size is 0. (Bug #30520)SQLGetConnectAttr()did not reflect the connection state correctly. (Bug #14639)Removed check box in setup dialog for
FLAG_FIELD_LENGTH(identified asDon't Optimize Column Widthwithin the GUI dialog), which was removed from the driver in 3.51.18.
Connector/ODBC 3.51.19 fixes a specific issue with the 3.51.18 release. For a list of changes in the 3.51.18 release, see Section D.2.3.13, “Changes in MySQL Connector/ODBC 3.51.18 (08 August 2007)”.
Functionality Added or Changed
Because of Bug #10491 in the server, character string results were sometimes incorrectly identified as
SQL_VARBINARY. Until this server bug is corrected, the driver will identify all variable-length strings asSQL_VARCHAR.
Platform-Specific Notes
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
Binary packages for Sun Solaris are now available as
PKGpackages.Binary packages as disk images with installers are now available for Mac OS X.
A binary package without an installer is available for Microsoft Windows x64 Edition. There are no installer packages for Microsoft Windows x64 Edition.
Functionality Added or Changed
Incompatible Change: The
FLAG_DEBUGoption was removed.When connecting to a specific database when using a DSN, the system tables from the
mysqldatabase are no longer also available. Previously, tables from the mysql database (catalog) were listed asSYSTEM TABLESbySQLTables()even when a different catalog was being queried. (Bug #28662)Installed for Mac OS X has been re-instated. The installer registers the driver at a system (not user) level and makes it possible to create both user and system DSNs using the MySQL Connector/ODBC driver. The installer also fixes the situation where the necessary drivers would bge installed local to the user, not globally. (Bug #15326, Bug #10444)
MySQL Connector/ODBC now supports batched statements. To enable cached statement support, you must switch enable the batched statement option (
FLAG_MULTI_STATEMENTS, 67108864, or Allow multiple statements within a GUI configuration). Be aware that batched statements create an increased chance of SQL injection attacks and you must ensure that your application protects against this scenario. (Bug #7445)The
SQL_ATTR_ROW_BIND_OFFSET_PTRis now supported for row bind offsets. (Bug #6741)The
TRACEandTRACEFILEDSN options have been removed. Use the ODBC driver manager trace options instead.
Bugs Fixed
When using a table with multiple
TIMESTAMPcolumns, the finalTIMESTAMPcolumn within the table definition would not be updateable. Note that there is still a limitation in MySQL server regarding multipleTIMESTAMPcolumns. (Bug #30081)References: See also Bug #9927.
Fixed an issue where the myodbc3i would update the user ODBC configuration file (
~/Library/ODBC/odbcinst.ini) instead of the system/Library/ODBC/odbcinst.ini. This was caused because myodbc3i was not honoring thesandumodifiers for the-dcommand-line option. (Bug #29964)Getting table metadata (through the
SQLColumns()would fail, returning a bad table definition to calling applications. (Bug #29888)DATETIMEcolumn types would returnFALSEin place ofSQL_SUCCESSwhen requesting the column type information. (Bug #28657)The
SQL_COLUMN_TYPE,SQL_COLUMN_DISPLAYandSQL_COLUMN_PRECISIONvalues would be returned incorrectly bySQLColumns(),SQLDescribeCol()andSQLColAttribute()when accessing character columns, especially those generated throughconcat(). The lengths returned should now conform to the ODBC specification. TheFLAG_FIELD_LENGTHoption no longer has any affect on the results returned. (Bug #27862)Obtaining the length of a column when using a character set for the connection of
utf8would result in the length being returned incorrectly. (Bug #19345)The
SQLColumns()function could return incorrect information aboutTIMESTAMPcolumns, indicating that the field was not nullable. (Bug #14414)The
SQLColumns()function could return incorrect information aboutAUTO_INCREMENTcolumns, indicating that the field was not nullable. (Bug #14407)A binary package without an installer is available for Microsoft Windows x64 Edition. There are no installer packages for Microsoft Windows x64 Edition.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
BIT(n)columns are now treated asSQL_BITdata wheren = 1and binary data wheren > 1.The wrong value from
SQL_DESC_LITERAL_SUFFIXwas returned for binary fields.The
SQL_DATETIME_SUBcolumn in SQLColumns() was not correctly set for date and time types.The value for
SQL_DESC_FIXED_PREC_SCALEwas not returned correctly for values in MySQL 5.0 and later.The wrong value for
SQL_DESC_TYPEwas returned for date and time types.SQLConnect()andSQLDriverConnect()were rewritten to eliminate duplicate code and ensure all options were supported using both connection methods.SQLDriverConnect()now only requires the setup library to be present when the call requires it.The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
Binary packages as disk images with installers are now available for Mac OS X.
Binary packages for Sun Solaris are now available as
PKGpackages.The wrong value for
DECIMAL_DIGITSinSQLColumns()was reported forFLOATandDOUBLEfields, as well as the wrong value for the scale parameter toSQLDescribeCol(), and theSQL_DESC_SCALEattribute fromSQLColAttribute().The
SQL_DATA_TYPEcolumn inSQLColumns()results did not report the correct value for date and time types.
Platform-Specific Notes
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
Binary packages for Sun Solaris are now available as
PKGpackages.Binary packages as disk images with installers are now available for Mac OS X.
A binary package without an installer is available for Microsoft Windows x64 Edition. There are no installer packages for Microsoft Windows x64 Edition.
Functionality Added or Changed
It is now possible to specify a different character set as part of the DSN or connection string. This must be used instead of the
SET NAMESstatement. You can also configure the character set value from the GUI configuration. (Bug #9498, Bug #6667)Fixed calling convention ptr and wrong free in myodbc3i, and fixed the null terminating (was only one, not two) when writing DSN to string.
Dis-allow NULL ptr for null indicator when calling SQLGetData() if value is null. Now returns SQL_ERROR w/state 22002.
The setup library has been split into its own RPM package, to enable installing the driver itself with no GUI dependencies.
Bugs Fixed
myodbc3idid not correctly format driver info, which could cause the installation to fail. (Bug #29709)MySQL Connector/ODBC crashed with Crystal Reports due to a rproblem with
SQLProcedures(). (Bug #28316)Fixed a problem where the GUI would crash when configuring or removing a System or User DSN. (Bug #27315)
Fixed error handling of out-of-memory and bad connections in catalog functions. This might raise errors in code paths that had ignored them in the past. (Bug #26934)
For a stored procedure that returns multiple result sets, MySQL Connector/ODBC returned only the first result set. (Bug #16817)
Calling
SQLGetDiagFieldwithRecNumber 0, DiagIdentifier NOT 0returnedSQL_ERROR, preventing access to diagnostic header fields. (Bug #16224)Added a new DSN option (
FLAG_ZERO_DATE_TO_MIN) to retrieveXXXX-00-00dates as the minimum permitted ODBC date (XXXX-01-01). Added another option (FLAG_MIN_DATE_TO_ZERO) to mirror this but for bound parameters.FLAG_MIN_DATE_TO_ZEROonly changes0000-01-01to0000-00-00. (Bug #13766)If there was more than one unique key on a table, the correct fields were not used in handling
SQLSetPos(). (Bug #10563)When inserting a large
BLOBfield, MySQL Connector/ODBC would crash due to a memory allocation error. (Bug #10562)The driver was using
mysql_odbc_escape_string(), which does not handle theNO_BACKSLASH_ESCAPESSQL mode. Now it usesmysql_real_escape_string(), which does. (Bug #9498)SQLColumns()did not handle many of its parameters correctly, which could lead to incorrect results. The table name argument was not handled as a pattern value, and most arguments were not escaped correctly when they contained nonalphanumeric characters. (Bug #8860)There are no binary packages for Microsoft Windows x64 Edition.
There is no binary package for Mac OS X on 64-bit PowerPC because Apple does not currently provide a 64-bit PowerPC version of iODBC.
Correctly return error if
SQLBindColis called with an invalid column.Fixed possible crash if
SQLBindCol()was not called beforeSQLSetPos().The Mac OS X binary packages are only provided as tarballs, there is no installer.
The binary packages for Sun Solaris are only provided as tarballs, not the PKG format.
The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.
Functionality Added or Changed
MySQL Connector/ODBC now supports using SSL for communication. This is not yet exposed in the setup GUI, but must be enabled through configuration files or the DSN. (Bug #12918)
Bugs Fixed
Calls to SQLNativeSql() could cause stack corruption due to an incorrect pointer cast. (Bug #28758)
Using cursors on results sets with multi-column keys could select the wrong value. (Bug #28255)
SQLForeignKeysdoes not escape_and%in the table name arguments. (Bug #27723)When using stored procedures, making a
SELECTor second stored procedure call after an initial stored procedure call, the second statement will fail. (Bug #27544)SQLTables() did not distinguish tables from views. (Bug #23031)
Return values from
SQLTables()may be truncated. (Bug #22797)Data in
TEXTcolumns would fail to be read correctly. (Bug #16917)Specifying strings as parameters using the
adBSTRoradVarWChartypes, (SQL_WVARCHARandSQL_WLONGVARCHAR) would be incorrectly quoted. (Bug #16235)SQL_WVARCHAR and SQL_WLONGVARCHAR parameters were not properly quoted and escaped. (Bug #16235)
Using
BETWEENwith date values, the wrong results could be returned. (Bug #15773)When using the
Don't Cache Results(option value1048576) with Microsoft Access, the connection will fail using DAO/VisualBasic. (Bug #4657)
Bugs Fixed
MySQL Connector/ODBC would incorrectly claim to support
SQLProcedureColumns(by returning true when queried aboutSQLPROCEDURECOLUMNSwithSQLGetFunctions), but this functionality is not supported. (Bug #27591)An incorrect transaction isolation level may not be returned when accessing the connection attributes. (Bug #27589)
Adding a new DSN with the
myodbc3iutility under AIX would fail. (Bug #27220)When inserting data using bulk statements (through
SQLBulkOperations), the indicators for all rows within the insert would not updated correctly. (Bug #24306)Using
SQLProceduresdoes not return the database name within the returned resultset. (Bug #23033)The
SQLTransact()function did not support an empty connection handle. (Bug #21588)Using
SQLDriverConnectinstead ofSQLConnectcould cause later operations to fail. (Bug #7912)When using blobs and parameter replacement in a statement with
WHERE CURSOR OF, the SQL is truncated. (Bug #5853)MySQL Connector/ODBC would return too many foreign key results when accessing tables with similar names. (Bug #4518)
Functionality Added or Changed
Use of
SQL_ATTR_CONNECTION_TIMEOUTon the server has now been disabled. If you attempt to set this attribute on your connection theSQL_SUCCESS_WITH_INFOwill be returned, with an error number/string ofHYC00: Optional feature not supported. (Bug #19823)Added auto is null option to MySQL Connector/ODBC option parameters. (Bug #10910)
Added auto-reconnect option to MySQL Connector/ODBC option parameters.
Added support for the
HENVhandlers inSQLEndTran().
Bugs Fixed
On 64-bit systems, some types would be incorrectly returned. (Bug #26024)
When retrieving
TIMEcolumns, C/ODBC would incorrectly interpret the type of the string and could interpret it as aDATEtype instead. (Bug #25846)MySQL Connector/ODBC may insert the wrong parameter values when using prepared statements under 64-bit Linux. (Bug #22446)
Using MySQL Connector/ODBC, with
SQLBindColand binding the length to the return value fromSQL_LEN_DATA_AT_EXECfails with a memory allocation error. (Bug #20547)Using
DataAdapter, MySQL Connector/ODBC may continually consume memory when reading the same records within a loop (Windows Server 2003 SP1/SP2 only). (Bug #20459)When retrieving data from columns that have been compressed using
COMPRESS(), the retrieved data would be truncated to 8KB. (Bug #20208)The ODBC driver name and version number were incorrectly reported by the driver. (Bug #19740)
A string format exception would be raised when using iODBC, MySQL Connector/ODBC and the embedded MySQL server. (Bug #16535)
The
SQLDriverConnect()ODBC method did not work with recent MySQL Connector/ODBC releases. (Bug #12393)
Connector/ODBC 3.51.13 was an internal implementation and testing release.
Version 3.51.13 has no changelog entries.
Functionality Added or Changed
N/A
Bugs Fixed
Using stored procedures with ADO, where the
CommandTypehas been set correctly toadCmdStoredProc, calls to stored procedures would fail. (Bug #15635)File DSNs could not be saved. (Bug #12019)
SQLColumns()returned no information for tables that had a column named using a reserved word. (Bug #9539)
Bugs Fixed
mysql_list_dbcolumns()andinsert_fields()were retrieving all rows from a table. Fixed the queries generated by these functions to return no rows. (Bug #8198)SQLGetTypoInfo()returnedtinyblobforSQL_VARBINARYand nothing forSQL_BINARY. Fixed to returnvarbinaryforSQL_VARBINARY,binaryforSQL_BINARY, andlongblobforSQL_LONGVARBINARY. (Bug #8138)
- D.3.1. Changes in MySQL Connector/Net Version 6.5.x
- D.3.2. Changes in MySQL Connector/Net Version 6.4.x
- D.3.3. Changes in MySQL Connector/Net Version 6.3.x
- D.3.4. Changes in MySQL Connector/Net Version 6.2.x
- D.3.5. Changes in MySQL Connector/Net Version 6.1.x
- D.3.6. Changes in MySQL Connector/Net Version 6.0.x
- D.3.7. Changes in MySQL Connector/Net Version 5.3.x
- D.3.8. Changes in MySQL Connector/Net Version 5.2.x
- D.3.9. Changes in MySQL Connector/Net Version 5.1.x
- D.3.10. Changes in MySQL Connector/Net Version 5.0.x
- D.3.11. Changes in MySQL Connector/Net Version 1.0.x
- D.3.12. Changes in MySQL Connector/Net Version 0.9.0 (30 August 2004)
- D.3.13. Changes in MySQL Connector/Net Version 0.76
- D.3.14. Changes in MySQL Connector/Net Version 0.75
- D.3.15. Changes in MySQL Connector/Net Version 0.74
- D.3.16. Changes in MySQL Connector/Net Version 0.71
- D.3.17. Changes in MySQL Connector/Net Version 0.70
- D.3.18. Changes in MySQL Connector/Net Version 0.68
- D.3.19. Changes in MySQL Connector/Net Version 0.65
- D.3.20. Changes in MySQL Connector/Net Version 0.60
- D.3.21. Changes in MySQL Connector/Net Version 0.50
Changes in MySQL Connector/Net 6.5.2 (15 February 2012)
Bugs Fixed
When designating a primary key for a table in Table Designer, the key icon could fail to appear until the Table Designer was restarted. (Bug #13481246)
Changes in MySQL Connector/Net 6.5.1 (23 January 2012)
Bugs Fixed
IntelliSense would emit an error when the "
-" (minus) character was typed. (Bug #13522344)
Changes in MySQL Connector/Net 6.5.0 (22 December 2011)
Functionality Added or Changed
Added exception and command injector support.
Added fractional seconds support, as per MySQL Server 5.6 and above. For more information, see Section 10.3.4, “Fractional Seconds in Time Values”
Added better partial-trust support, thus allowing Connector/NET to run in a partial trust scenario. It will work correctly in a medium-trust level environment when the library is installed in the GAC.
Adds a
MySqlClientPermissionclass to help users define the security polices for the database connections within any application using a MySQL database.Added better IntelliSense support, including auto-completion when editing stored procedures or
.mysqlfiles.
This release fixes bugs since 6.4.3.
Functionality Added or Changed
Connector/Net now enables clients to connect to the server through accounts that use Windows native authentication. See Section 5.5.6.3, “The Windows Native Authentication Plugin”.
Bugs Fixed
(Bug #12897149)
When creating a tableadapter through a Dataset form in Visual Studio, the
MaxLengthof the field for aCHARcolumn could be set to 3 times the length of the table column. Although this many bytes could be needed to hold a UTF-8 character value, the length value was not appropriate for restricting the length of aTextBox. (Bug #12860224, Bug #62094)An error
out of sync with servercould occur when connecting in the Visual Studio Entity Framework. (Bug #12853286, Bug #61806)When adding a
MEDIUMTEXTorLONGTEXTcolumn Visual Studio, the facetFixed lengthhad to be set tofalse, even though these types allow arbitrary lengths. (Bug #12848277, Bug #54915)Executing a LINQ to Entity query could result in a
NullReferenceExceptionerror. (Bug #12776598, Bug #61729)MySqlDataReader.Closewas modified to use Default behavior when clearing remaining result sets. (Bug #61690, Bug #12723423)MySqlScriptwas modified to enable correct processing of theDELIMITERcommand when not followed by a new line. (Bug #61680, Bug #12732279)The ASP.NET membership provider was modified to create and query all related tables using lowercase names. (Bug #61108, Bug #12702009)
On Model First changed column types generated in SQL scripts to produce more suitable
MySqltypes. (Bug #59244, Bug #12707104)
This release fixes bugs since 6.4.2.
Bugs Fixed
When creating a tableadapter through a Dataset form in Visual Studio, the
MaxLengthof the field for aCHARcolumn could be set to 3 times the length of the table column. Although this many bytes could be needed to hold a UTF-8 character value, the length value was not appropriate for restricting the length of aTextBox. (Bug #12860224, Bug #62094)SchemaDefinition-5.5.ssdlwas modified to treatCHAR(36)columns as a GUID. (Bug #61657, Bug #12708208)SqlFragment.QuoteIdentifierwas modified to add MySQL quotes around identifiers. (Bug #61635, Bug #12707285)
This release fixes bugs since 6.4.1.
Bugs Fixed
Modified
MySqlConnection.BeginTransactionto throw aNotSupportedExceptionforSnapshotisolation level. (Bug #61589, Bug #12698020)Modified
ProviderManifest.xmlto mapTIMESTAMPdatabase columns to theDateTime.NET type. (Bug #55351, Bug #12652602)Fixed Entity Framework provider
GROUP BYclause generation by adding all group-by keys to theSELECTstatement. (Bug #46742, Bug #12622129)
First alpha release.
Functionality Added or Changed
Calling a stored procedure with output parameters caused a marked performance decrease. (Bug #60366, Bug #12425959)
Changed how the procedure schema collection is retrieved. If the connection string contains “
use procedure bodies=true” then aSELECTis performed on themysql.proctable directly, as this is up to 50 times faster than the current Information Schema implementation. If the connection string contains “use procedure bodies=false”, then the Information Schema collection is queried. (Bug #36694)
- D.3.3.1. Changes in MySQL Connector/Net 6.3.9 (Not yet released)
- D.3.3.2. Changes in MySQL Connector/Net 6.3.8 (16 December 2011)
- D.3.3.3. Changes in MySQL Connector/Net 6.3.7 (22 June 2011)
- D.3.3.4. Changes in MySQL Connector/Net 6.3.6 (03 January 2011)
- D.3.3.5. Changes in MySQL Connector/Net 6.3.5 (12 October 2010)
- D.3.3.6. Changes in MySQL Connector/Net 6.3.4 (01 September 2010, Generally Available)
- D.3.3.7. Changes in MySQL Connector/Net 6.3.3 (27 July 2010)
- D.3.3.8. Changes in MySQL Connector/Net 6.3.2 (24 May 2010, beta)
- D.3.3.9. Changes in MySQL Connector/Net 6.3.1 (02 March 2010)
- D.3.3.10. Changes in MySQL Connector/Net 6.3.0 (16 February 2010, alpha)
This release fixes bugs since 6.3.8.
Bugs Fixed
In Visual Studio's Server Explorer, right-clicking on a table in the Tables tree and selecting Create Trigger could cause an error,
Object reference not set to an instance of an object. (Bug #13511801)(Bug #11750161, Bug #40555)
Connector/NET would incorrectly map decimal values to ANSI strings. (Bug #62246, Bug #13050570)
Connector/NET incorrectly maps
PrimitiveTypeKind.Bytetotinyint, instead ofutinyint. AndPrimitiveTypeKind.SBytemapping was added, totinyint. (Bug #62135, Bug #13061713)On Model First changed column types generated in SQL scripts to produce more suitable
MySqltypes. (Bug #59244, Bug #12707104)
This release fixes bugs since 6.3.7.
Bugs Fixed
The columns added in descending sort order were not included in the index, as defined within the Server Explorer. (Bug #13481709)
When creating a foreign key relationship in Table Designer, changes to the
ON UPDATEandON CASCADEsettings were not reflected in the actual table definition, as displayed bySHOW CREATE TABLE. (Bug #13481348)The comment property and index type were not added in the definition of the index, as defined within the Server Explorer. (Bug #13481314)
Removing a method was not affecting the indexes list of the table object, as defined within the Table Designer. (Bug #13481313)
When a new column was added in Table Designer without selecting an associated data type, an error would occur trying to save the column definition. (Bug #13481298)
The default value for
VARCHARandCHARfield types would contain single quotation marks. (Bug #13442506)(Bug #11750161, Bug #40555)
Connector/NET experienced poor performance when adding parameters to the
MySQLCommand. (Bug #62653, Bug #13331475)The Unicode quotation mark character
U+0022was not escaped by theMySQLHelperclass. (Bug #62585, Bug #13092886)Using a return parameter without a name resulted in an
IndexOutOfRangeExceptionexception. (Bug #62416, Bug #13006969)The
Monoruntime did not support hashed passwords. (Bug #62203, Bug #13041618)MySqlDataReader.Closewas modified to use Default behavior when clearing remaining result sets. (Bug #61690, Bug #12723423)MySqlScriptwas modified to enable correct processing of theDELIMITERcommand when not followed by a new line. (Bug #61680, Bug #12732279)SchemaDefinition-5.5.ssdlwas modified to treatCHAR(36)columns as a GUID. (Bug #61657, Bug #12708208)SqlFragment.QuoteIdentifierwas modified to add MySQL quotes around identifiers. (Bug #61635, Bug #12707285)Modified
MySqlConnection.BeginTransactionto throw aNotSupportedExceptionforSnapshotisolation level. (Bug #61589, Bug #12698020)The ASP.NET membership provider was modified to create and query all related tables using lowercase names. (Bug #61108, Bug #12702009)
Modified
ProviderManifest.xmlto mapTIMESTAMPdatabase columns to theDateTime.NET type. (Bug #55351, Bug #12652602)
This release fixes bugs since 6.3.6.
Functionality Added or Changed
Calling a stored procedure with output parameters caused a marked performance decrease. (Bug #60366, Bug #12425959)
Bugs Fixed
MySQL Connector/Net 6.3.6 did not work with Visual Studio 2010. (Bug #60723, Bug #12394470)
MysqlDataReader.GetSchemaTablereturned incorrect values and types. (Bug #59989, Bug #11776346)All queries other than
INSERTwere executed individually instead of as a batch even though batching was enabled for the connection. (Bug #59616, Bug #11850286)MySQL Connector/Net generated an exception when executing a query consisting of ';', for example:
mycmd(";",mycon) mycmd.executenonquery()The exception generated was:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at MySql.Data.MySqlClient.MySqlCommand.TrimSemicolons(String sql) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
(Bug #59537, Bug #11766433)
Setting
Membership.ApplicationNamehad no effect. (Bug #59438, Bug #11770465)A
NullReferenceExceptionwas thrown on disposal of aTransactionScopeobject. (Bug #59346, Bug #11766272)The setup wizard failed with the error “Setup Wizard ended prematurely because of an error”. This was because it assumed .NET Framework version 4.0 was located on the C: drive, when it was actually located on the E: drive. (Bug #59301)
Fixed Entity Framework provider
GROUP BYclause generation by adding all group-by keys to theSELECTstatement. (Bug #46742, Bug #12622129)
This release fixes bugs since 6.3.5.
Functionality Added or Changed
Changed how the procedure schema collection is retrieved. If the connection string contains “
use procedure bodies=true” then aSELECTis performed on themysql.proctable directly, as this is up to 50 times faster than the current Information Schema implementation. If the connection string contains “use procedure bodies=false”, then the Information Schema collection is queried. (Bug #36694)
Bugs Fixed
MembershipProviderdid not generate hashes correctly if the algorithm was keyed. The Key of the algorithm should have been set if theHashAlgorithmwasKeyedHashAlgorithm. (Bug #58906)Code introduced to fix bug #54863 proved problematic on .NET version 3.5 and above. (Bug #58853)
The
MySqlTokenizercontained unnecessarySubstringandTrimcalls:string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();
The variable
tokenwas not used anywhere in the code. (Bug #58757)MySqlCommand.ExecuteReader(CommandBehavior)threw aNullReferenceExceptionwhen being called withCommandBehavior.CloseConnection, if the SQL statement contained a syntax error, or contained invalid data such as an invalid column name. (Bug #58652)ReadFieldLength()returned incorrect value forBIGINTautoincrement columns. (Bug #58373)When attempting to create an ADO.NET Entity Data Model, MySQL connections were not available. (Bug #58278)
MySQL Connector/Net did not support the
utf8mb4character set. When attempting to connect toutf8mb4tables or columns, an exceptionKeyNotFoundExceptionwas generated. (Bug #58244)Installation of MySQL Connector/Net 6.3.5 failed. The error reported was:
MySQL Connector Net 6.3.5 Setup Wizard ended prematurely because of an error. Your system has not been modified.
(Bug #57654)
When the tracing driver was used and an SQL statement was longer than 300 characters, an ArgumentOutOfRangeExcpetion occurred if the statement also contained a quoted character, and the 300th character was in the middle of a quoted token. (Bug #57641)
Calling the
Read()method on aDataReaderobtained fromMySqlHelper.ExecuteReadergenerated the following exception:Unhandled Exception: MySql.Data.MySqlClient.MySqlException: Invalid attempt to R ead when reader is closed. at MySql.Data.MySqlClient.MySqlDataReader.Read() at MySqlTest.MainClass.Main(String[] args)
(Bug #57501)
Default values returned for text columns were not quoted. This meant that the
COLUMN_DEFAULTfield of theGetSchemacolumns collection did not return a valid SQL expression. (Bug #56509)When using MySQL Connector/Net on Mono 2.8 using .NET 4.0, attempting to connect to a MySQL database generated the following exception:
Unhandled Exception: System.MissingMethodException: Method not found: 'System.Data.Common.DbConnection.EnlistTransaction'. at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlConnection:Open ()
(Bug #56509)
MySQL Connector/Net for .NET/Mono attempted to dynamically load the assembly
Mono.Posix.dllwhen a Unix socket was used to connect to the server. This failed and the connector was not able to use a Unix socket unless theMono.Posix.dllassembly was previously loaded by the program. (Bug #56410)The ADO.NET Entity Data Model could not add stored procedures from MySQL Server 5.0.45 but worked fine using MySQL Server 5.1. (Bug #55349)
In the ADO.NET Entity Data Model Wizard, the time to update a model scaled abnormally as the number of entities increased. (Bug #48791, Bug #12596237)
This release fixes bugs since 6.3.4.
Bugs Fixed
A typed dataset did not get the table name. (Bug #57894, Bug #11764989)
Setting
MySqlCommand.CommandTimeoutto 0 had no effect. It should have resulted in an infinite timeout. (Bug #57265)When performing a row-by-row update, only the first row was updated and all other rows were ignored. (Bug #57092)
MySQL Connector/Net experienced two problems as follows:
A call to
System.Data.Objects.ObjectContext.DatabaseExists()returned false, even if the database existed.A call to
System.Data.Objects.ObjectContext.CreateDatabase()created a database but with a name other than the one specified in the connection string. It then failed to use it when EDM objects were processed.
(Bug #56859)
Setting the
Default Command Timeoutconnection string option had no effect. (Bug #56806)When an output parameter was declared as type
MySqlDbType.Bit, it failed to return with the correct value. (Bug #56756)MySqlHelper.ExecuteReaderdid not include an overload acceptingMySqlParameterobjects when using aMySqlConnection. However,MySqlHelperdid include an overload forMySqlParameterobjects when using a string object containing the connection string to the database. (Bug #56755)MySQL Connector/Net 6.1.3 (GA) would not install on a Windows Server 2008 (Web Edition) clean installation. There were two problems:
If .NET framework version 4.0 was not installed, installation failed because c:\windows\microsoft.net\v4.0.* did not exist.
If .NET 4.0 was subsequently installed, then the following error was generated:
InstallFiles: File: MySql.Data.Entity.dll, Directory: , Size: 229888 MSI (s) (E0:AC) [15:20:26:196]: Assembly Error:The assembly is built by a runtime newer than the currently loaded runtime, and cannot be loaded. MSI (s) (E0:AC) [15:20:26:196]: Note: 1: 1935 2: 3: 0x8013101B 4: IStream 5: Commit 6: MSI (s) (E0:A0) [15:20:26:196]: Note: 1: 1304 2: MySql.Data.Entity.dll Error 1304. Error writing to file: MySql.Data.Entity.dll. Verify that you have access to that directory.
(Bug #56580)
First GA release. This release fixes bugs since 6.3.3.
Bugs Fixed
The calculation of
lockAgein the Session Provider sometimes generated aSystem.Data.SqlTypes.SqlNullValueException. (Bug #55701)Attempting to read
Double.MinValuefrom aDOUBLEcolumn in MySQL table generated the following exception:System.OverflowException : Value was either too large or too small for a Double. --OverflowException at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at MySql.Data.Types.MySqlDouble.MySql.Data.Types.IMySqlValue.ReadValue(MySqlPacket packet, Int64 length, Boolean nullVal) at MySql.Data.MySqlClient.NativeDriver.ReadColumnValue(Int32 index, MySqlField field, IMySqlValue valObject) at MySql.Data.MySqlClient.ResultSet.ReadColumnData(Boolean outputParms) at MySql.Data.MySqlClient.ResultSet.NextRow(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlDataReader.Read()
(Bug #55644)
Calling
MySqlDataAdapter.Update(DataTable)resulted in an unacceptable performance hit when updating large amounts of data. (Bug #55609)If using MySQL Server 5.0.x it was not possible to alter stored routines in Visual Studio. If the stored routine was clicked, and the context sensitive menu option, Alter Routine, selected, the following error was generated:
Unable to load object with error: Object reference not set to an instance of an object
(Bug #55170)
EventLog was not disposed in the SessionState provider. (Bug #52550)
When attempting to carry out an operation such as:
from p in db.Products where p.PostedDate>=DateTime.Now select p;
Where
p.PostedDateis aDateTimeOffset, and the underlying column type is aTIMESTAMP, the following exception was generated:MySqlException occurred Unable to serialize date/time value
MySQL Connector/Net has now been changed so that all
TIMESTAMPcolumns will be surfaced asDateTime. (Bug #52550)Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)
The
INSERTcommand was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)
This release fixes bugs since 6.3.2.
Bugs Fixed
MySqlDataAdapter.Update()generated concurrency violations for custom stored procedure driven update commands that usedUpdateRowSource.FirstReturnedRecord. (Bug #54895)Several calls to
DataAdapter.Update()with intervening changes toDataTableresulted inConcurrencyExceptionexceptions being generated. (Bug #54863)MySQL Connector/Net generated a null reference exception when
TransactionScopewas used by multiple threads. (Bug #54681)The icon for the MySQL Web Configuration Tool was not displayed in Visual Studio for Web Application Projects. (Bug #54571)
The
MySqlHelperobject did not have an overloaded version of theExecuteReadermethod that accepted aMySqlConnectionobject. (Bug #54570)If
MySqlDataAdapterwas used with anINSERTcommand where theVALUESclause contained an expression with parentheses in it, and set theadapter.UpdateBatchSizeparameter to be greater than one, then the call toadapter.Updateeither generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)The method
MySql.Data.Common.QueryNormalizer.CollapseValueListgenerated anArgumentOutOfRangeException. (Bug #54152, Bug #53865)MySQL Connector/Net did not process
Thread.Abort()correctly, and failed to cancel queries currently running on the server. (Bug #54012)MySQL Connector/Net 6.3.2 failed to install on Windows Vista. (Bug #53975)
Garbage Collector disposal of a
MySqlConnectionobject caused the following exception:System.IO.EndOfStreamException: Attempted to read past the end of the stream. MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count) MySql.Data.MySqlClient.MySqlStream.LoadPacket() Outer Exception Reading from the stream has failed. ...
(Bug #53457)
MySQL Connector/Net did not throw an
EndOfStreamExceptionexception whennet_write_timeoutwas exceeded. (Bug #53439)After a timeout exception, if an attempt was made to reuse a connection returned to the connection pool the following exception was generated:
[MySqlException (0x80004005): There is already an open DataReader associated with this Connection which must be closed first.] MySql.Data.MySqlClient.MySqlCommand.CheckState() +278 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +43 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6 Controls.SimpleCommand.ExecuteReader(String SQL) in ...:323 Albums.GetImagesByAlbum(SimpleCommand Cmd, Int32 iAlbum, String Order, String Limit) in ...:13 Forecast.Page_Load(Object sender, EventArgs e) in ...:70 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
(Bug #53357)
Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)
The MySQL Connector/Net installation failed due to
machine.configfiles not being present in configuration folders.MySQL Connector/Net has been changed to skip over configuration folders that do not contain a
machine.configfile. (Bug #52352)CHAR(36)columns were not recognized as GUIDs when used in views with entity models. (Bug #52085)When an application was subjected to increased concurrent load, MySQL Connector/Net generated the following error when calling stored procedures:
A DataTable named \'Procedure Parameters\' already belongs to this DataSet.(Bug #49118)
When the connection string option “Connection Reset = True” was used, a connection reset used the previously used encoding for the subsequent authentication operation. This failed, for example, if UCS2 was used to read the last column before the reset. (Bug #47153)
When batching was used in
MySqlDataAdapter, a connection was not opened automatically inMySqlDataAdapter.Update(). This resulted in anInvalidOperationExceptionexception being generated, with the message text “connection must be valid and open”.MySQL Connector/Net has been changed to behave more like SQL Server: if the connection is closed, it is opened for the duration of update operation. (Bug #38411)
Database name was emitted into typed datasets. This prevented users using the configured default database. (Bug #33870)
First Beta release. This release fixes bugs since 6.3.1.
Functionality Added or Changed
Procedure cacheing had a problem whereby if you created a procedure, dropped it, and recreated it with a different number of parameters an exception was generated.
MySQL Connector/Net has been changed so that if the procedure is recreated with a different number of parameters, it will still be recognized. (Bug #52562)
MySQL Connector/Net has been changed to include
MySqlDataReader.GetFieldType(string columnname). Further,MySqlDataReader.GetOrdinal()now includes the name of the column in the exception if the column is not found. (Bug #47467)
Bugs Fixed
After an exception, the internal datareader,
MySqlCommand.Connection.Reader, was not properly closed (it was not set to null). If another query was subsequently executed on that command object an exception was generated with the message “There is already an open DataReader associated with this Connection which must be closed first.” (Bug #55558)MySQL Connector/Net generated an exception when used to read a
TEXTcolumn containing more than 32767 bytes. (Bug #54040)In MySQL Connector/Net, the
MySqlConnection.Abort()method contained atry...catchconstruct, with an emptycatchblock. This meant that any exception generated at this point would not be caught. (Bug #52769)The procedure cache affected the MySQL Connector/Net performance, reducing it by around 65%. This was due to unnecessary calls of
String.Format(), related to debug logging. Even though the logging was disabled the string was still being formatted, resulting in impaired performance. (Bug #52475)If
FunctionsReturnString=truewas used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)In MySQL Connector/Net, the
LoadCharsetMap()function of theCharSetMapclass set the following incorrect mapping:mapping.Add("latin1", new CharacterSet("latin1", 1));This meant that, for example, the Euro sign was not handled correctly.
The correct mapping should have been:
mapping.Add("latin1", new CharacterSet("windows-1252", 1));This is because MySQL's
latin1character set is the same as thewindows-cp1252character set and it extends the official ISO 8859-1 or IANA latin1. (Bug #51927)A non-terminated string in SQL threw a CLR exception rather than a syntax exception. (Bug #51788)
When calling
ExecuteNonQueryon a command object, the following exception occurred:Index and length must refer to a location within the string. Parameter name: length
(Bug #51610)
MySQL Connector/Net 6.3.1 failed to install. (Bug #51407, Bug #51604)
When using table per type inheritance and listing the contents of the parent table, the result of the query was a list of child objects, even though there was no related child record with the same parent Id. (Bug #49850)
This release fixes bugs since 6.3.0.
Functionality Added or Changed
Connector/Net was not compatible with Visual Studio wizards that used square brackets to delimit symbols.
Connector/Net has been changed to include a new connection string option
Sql Server modethat supports use of square brackets to delimit symbols. (Bug #35852)
Bugs Fixed
Specifying a connection string where an option had no value generated an error, rather than the value being set to the default. For example, a connection string such as the following would result in an error:
server=localhost;user=root;compress=;database=test;port=3306;password=123456;
(Bug #51209)
The method
Command.TrimSemicolonsusedStringBuilder, and therefore allocated memory for the query even if it did not need to be trimmed. This led to excessive memory consumption when executing a number of large queries. (Bug #51149)MySqlCommand.Parameters.Clear()did not work. (Bug #50444)Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)
When the
UpdateBatchSizeproperty was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)When trying to create stored procedures from an SQL script, a
MySqlExceptionwas thrown when attempting to redefine theDELIMITER:MySql.Data.MySqlClient.MySqlException was unhandled Message="You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1" Source="MySql.Data" ErrorCode=-2147467259 Number=1064 StackTrace: à MySql.Data.MySqlClient.MySqlStream.ReadPacket() à MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) à MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() à MySql.Data.MySqlClient.MySqlDataReader.NextResult() à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() à MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() à MySql.Data.MySqlClient.MySqlScript.Execute()Note: The
MySqlScriptclass has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)A connection string set in
web.configcould not be reused after Visual Studio 2008 Professional was shut down. It continued working for the existing controls, but did not work for new controls added. (Bug #41629)
First alpha release of 6.3.
Functionality Added or Changed
Nested transaction scopes were not supported. MySQL Connector/Net now implements nested transaction scopes. A per-thread stack of scopes is maintained, which is necessary to handle nested scopes with the
RequiresNeworSuppressoptions. (Bug #45098)Support for MySQL Server 4.1 has been removed from MySQL Connector/Net starting with version 6.3.0. The connector will now throw an exception if you try to connect to a server of version less than 5.0.
Bugs Fixed
When adding a data set in Visual Studio 2008, the following error was generated:
Relations couldn't be addded. Column 'REFERENCED_TABLE_CATALOG' does not belong to table.
This was due to a 'REFERENCED_TABLE_CATALOG' column not being included in the foreign keys collection. (Bug #48974)
Attempting to execute a load data local infile on a file where the user did not have write permissions, or the file was open in an editor gave an access denied error. (Bug #48944)
The method
MySqlDataReader.GetSchemaTable()returned 0 in theNumericPrecisionfield for decimal and newdecimal columns. (Bug #48171)
- D.3.4.1. Changes in MySQL Connector/Net 6.2.6 (Not yet released)
- D.3.4.2. Changes in MySQL Connector/Net 6.2.5 (01 July 2011)
- D.3.4.3. Changes in MySQL Connector/Net 6.2.4 (30 August 2010)
- D.3.4.4. Changes in MySQL Connector/Net 6.2.3 (10 April 2010)
- D.3.4.5. Changes in MySQL Connector/Net 6.2.2 (22 December 2009, Generally Available)
- D.3.4.6. Changes in MySQL Connector/Net 6.2.1 (16 November 2009, beta)
- D.3.4.7. Changes in MySQL Connector/Net 6.2.0 (21 October 2009, alpha)
This release fixes bugs since 6.2.5.
Bugs Fixed
MySqlScriptwas modified to enable correct processing of theDELIMITERcommand when not followed by a new line. (Bug #61680, Bug #12732279)The ASP.NET membership provider was modified to create and query all related tables using lowercase names. (Bug #61108, Bug #12702009)
On Model First changed column types generated in SQL scripts to produce more suitable
MySqltypes. (Bug #59244, Bug #12707104)
This release fixes bugs since 6.2.4.
Bugs Fixed
SchemaDefinition-5.5.ssdlwas modified to treatCHAR(36)columns as a GUID. (Bug #61657, Bug #12708208)SqlFragment.QuoteIdentifierwas modified to add MySQL quotes around identifiers. (Bug #61635, Bug #12707285)Modified
MySqlConnection.BeginTransactionto throw aNotSupportedExceptionforSnapshotisolation level. (Bug #61589, Bug #12698020)MysqlDataReader.GetSchemaTablereturned incorrect values and types. (Bug #59989, Bug #11776346)All queries other than
INSERTwere executed individually instead of as a batch even though batching was enabled for the connection. (Bug #59616, Bug #11850286)MySQL Connector/Net generated an exception when executing a query consisting of ';', for example:
mycmd(";",mycon) mycmd.executenonquery()The exception generated was:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at MySql.Data.MySqlClient.MySqlCommand.TrimSemicolons(String sql) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
(Bug #59537, Bug #11766433)
Setting
Membership.ApplicationNamehad no effect. (Bug #59438, Bug #11770465)A
NullReferenceExceptionwas thrown on disposal of aTransactionScopeobject. (Bug #59346, Bug #11766272)MembershipProviderdid not generate hashes correctly if the algorithm was keyed. The Key of the algorithm should have been set if theHashAlgorithmwasKeyedHashAlgorithm. (Bug #58906)Code introduced to fix bug #54863 proved problematic on .NET version 3.5 and above. (Bug #58853)
The
MySqlTokenizercontained unnecessarySubstringandTrimcalls:string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();
The variable
tokenwas not used anywhere in the code. (Bug #58757)MySqlCommand.ExecuteReader(CommandBehavior)threw aNullReferenceExceptionwhen being called withCommandBehavior.CloseConnection, if the SQL statement contained a syntax error, or contained invalid data such as an invalid column name. (Bug #58652)ReadFieldLength()returned incorrect value forBIGINTautoincrement columns. (Bug #58373)MySQL Connector/Net did not support the
utf8mb4character set. When attempting to connect toutf8mb4tables or columns, an exceptionKeyNotFoundExceptionwas generated. (Bug #58244)A typed dataset did not get the table name. (Bug #57894, Bug #11764989)
Setting
MySqlCommand.CommandTimeoutto 0 had no effect. It should have resulted in an infinite timeout. (Bug #57265)When performing a row-by-row update, only the first row was updated and all other rows were ignored. (Bug #57092)
Setting the
Default Command Timeoutconnection string option had no effect. (Bug #56806)When an output parameter was declared as type
MySqlDbType.Bit, it failed to return with the correct value. (Bug #56756)MySqlHelper.ExecuteReaderdid not include an overload acceptingMySqlParameterobjects when using aMySqlConnection. However,MySqlHelperdid include an overload forMySqlParameterobjects when using a string object containing the connection string to the database. (Bug #56755)Default values returned for text columns were not quoted. This meant that the
COLUMN_DEFAULTfield of theGetSchemacolumns collection did not return a valid SQL expression. (Bug #56509)MySQL Connector/Net for .NET/Mono attempted to dynamically load the assembly
Mono.Posix.dllwhen a Unix socket was used to connect to the server. This failed and the connector was not able to use a Unix socket unless theMono.Posix.dllassembly was previously loaded by the program. (Bug #56410)Modified
ProviderManifest.xmlto mapTIMESTAMPdatabase columns to theDateTime.NET type. (Bug #55351, Bug #12652602)The ADO.NET Entity Data Model could not add stored procedures from MySQL Server 5.0.45 but worked fine using MySQL Server 5.1. (Bug #55349)
Fixed Entity Framework provider
GROUP BYclause generation by adding all group-by keys to theSELECTstatement. (Bug #46742, Bug #12622129)
This release fixes bugs since 6.2.3.
Functionality Added or Changed
Procedure cacheing had a problem whereby if you created a procedure, dropped it, and recreated it with a different number of parameters an exception was generated.
MySQL Connector/Net has been changed so that if the procedure is recreated with a different number of parameters, it will still be recognized. (Bug #52562)
Bugs Fixed
The calculation of
lockAgein the Session Provider sometimes generated aSystem.Data.SqlTypes.SqlNullValueException. (Bug #55701)Attempting to read
Double.MinValuefrom aDOUBLEcolumn in MySQL table generated the following exception:System.OverflowException : Value was either too large or too small for a Double. --OverflowException at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at MySql.Data.Types.MySqlDouble.MySql.Data.Types.IMySqlValue.ReadValue(MySqlPacket packet, Int64 length, Boolean nullVal) at MySql.Data.MySqlClient.NativeDriver.ReadColumnValue(Int32 index, MySqlField field, IMySqlValue valObject) at MySql.Data.MySqlClient.ResultSet.ReadColumnData(Boolean outputParms) at MySql.Data.MySqlClient.ResultSet.NextRow(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlDataReader.Read()
(Bug #55644)
After an exception, the internal datareader,
MySqlCommand.Connection.Reader, was not properly closed (it was not set to null). If another query was subsequently executed on that command object an exception was generated with the message “There is already an open DataReader associated with this Connection which must be closed first.” (Bug #55558)If using MySQL Server 5.0.x it was not possible to alter stored routines in Visual Studio. If the stored routine was clicked, and the context sensitive menu option, Alter Routine, selected, the following error was generated:
Unable to load object with error: Object reference not set to an instance of an object
(Bug #55170)
MySqlDataAdapter.Update()generated concurrency violations for custom stored procedure driven update commands that usedUpdateRowSource.FirstReturnedRecord. (Bug #54895)Several calls to
DataAdapter.Update()with intervening changes toDataTableresulted inConcurrencyExceptionexceptions being generated. (Bug #54863)The icon for the MySQL Web Configuration Tool was not displayed in Visual Studio for Web Application Projects. (Bug #54571)
The
MySqlHelperobject did not have an overloaded version of theExecuteReadermethod that accepted aMySqlConnectionobject. (Bug #54570)If
MySqlDataAdapterwas used with anINSERTcommand where theVALUESclause contained an expression with parentheses in it, and set theadapter.UpdateBatchSizeparameter to be greater than one, then the call toadapter.Updateeither generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)The method
MySql.Data.Common.QueryNormalizer.CollapseValueListgenerated anArgumentOutOfRangeException. (Bug #54152, Bug #53865)MySQL Connector/Net did not process
Thread.Abort()correctly, and failed to cancel queries currently running on the server. (Bug #54012)Garbage Collector disposal of a
MySqlConnectionobject caused the following exception:System.IO.EndOfStreamException: Attempted to read past the end of the stream. MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count) MySql.Data.MySqlClient.MySqlStream.LoadPacket() Outer Exception Reading from the stream has failed. ...
(Bug #53457)
MySQL Connector/Net did not throw an
EndOfStreamExceptionexception whennet_write_timeoutwas exceeded. (Bug #53439)After a timeout exception, if an attempt was made to reuse a connection returned to the connection pool the following exception was generated:
[MySqlException (0x80004005): There is already an open DataReader associated with this Connection which must be closed first.] MySql.Data.MySqlClient.MySqlCommand.CheckState() +278 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +43 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6 Controls.SimpleCommand.ExecuteReader(String SQL) in ...:323 Albums.GetImagesByAlbum(SimpleCommand Cmd, Int32 iAlbum, String Order, String Limit) in ...:13 Forecast.Page_Load(Object sender, EventArgs e) in ...:70 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
(Bug #53357)
Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)
In MySQL Connector/Net, the
MySqlConnection.Abort()method contained atry...catchconstruct, with an emptycatchblock. This meant that any exception generated at this point would not be caught. (Bug #52769)EventLog was not disposed in the SessionState provider. (Bug #52550)
The procedure cache affected the MySQL Connector/Net performance, reducing it by around 65%. This was due to unnecessary calls of
String.Format(), related to debug logging. Even though the logging was disabled the string was still being formatted, resulting in impaired performance. (Bug #52475)If
FunctionsReturnString=truewas used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)Periodically the session provider threw an
SqlNullValueExceptionexception. When this happened, the row within themy_aspnet_Sessionstable hadlockedalways set to '1'. The locked status never changed back to '0' and the user experienced the exception on every page, until their browser was closed and reopened (recreating a new sessionID), or thelockedvalue was manually changed to '0'. (Bug #52175)CHAR(36)columns were not recognized as GUIDs when used in views with entity models. (Bug #52085)In MySQL Connector/Net, the
LoadCharsetMap()function of theCharSetMapclass set the following incorrect mapping:mapping.Add("latin1", new CharacterSet("latin1", 1));This meant that, for example, the Euro sign was not handled correctly.
The correct mapping should have been:
mapping.Add("latin1", new CharacterSet("windows-1252", 1));This is because MySQL's
latin1character set is the same as thewindows-cp1252character set and it extends the official ISO 8859-1 or IANA latin1. (Bug #51927)Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)
When an application was subjected to increased concurrent load, MySQL Connector/Net generated the following error when calling stored procedures:
A DataTable named \'Procedure Parameters\' already belongs to this DataSet.(Bug #49118)
In the ADO.NET Entity Data Model Wizard, the time to update a model scaled abnormally as the number of entities increased. (Bug #48791, Bug #12596237)
The
INSERTcommand was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)When the connection string option “Connection Reset = True” was used, a connection reset used the previously used encoding for the subsequent authentication operation. This failed, for example, if UCS2 was used to read the last column before the reset. (Bug #47153)
Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)
When batching was used in
MySqlDataAdapter, a connection was not opened automatically inMySqlDataAdapter.Update(). This resulted in anInvalidOperationExceptionexception being generated, with the message text “connection must be valid and open”.MySQL Connector/Net has been changed to behave more like SQL Server: if the connection is closed, it is opened for the duration of update operation. (Bug #38411)
Database name was emitted into typed datasets. This prevented users using the configured default database. (Bug #33870)
This release fixes bugs since 6.2.2.
Functionality Added or Changed
MySQL Connector/Net has been changed to include
MySqlDataReader.GetFieldType(string columnname). Further,MySqlDataReader.GetOrdinal()now includes the name of the column in the exception if the column is not found. (Bug #47467)
Bugs Fixed
A non-terminated string in SQL threw a CLR exception rather than a syntax exception. (Bug #51788)
When calling
ExecuteNonQueryon a command object, the following exception occurred:Index and length must refer to a location within the string. Parameter name: length
(Bug #51610)
Specifying a connection string where an option had no value generated an error, rather than the value being set to the default. For example, a connection string such as the following would result in an error:
server=localhost;user=root;compress=;database=test;port=3306;password=123456;
(Bug #51209)
The method
Command.TrimSemicolonsusedStringBuilder, and therefore allocated memory for the query even if it did not need to be trimmed. This led to excessive memory consumption when executing a number of large queries. (Bug #51149)MySqlCommand.Parameters.Clear()did not work. (Bug #50444)When the
MySqlScript.execute()method was called, the following exception was generated:InvalidOperationException : The CommandText property has not been properly initialized.
(Bug #50344)
When using the Compact Framework the following exception occurred when attempting to connect to a MySQL Server:
System.InvalidOperationException was unhandled Message="Timeouts are not supported on this stream."
(Bug #50321)
Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)
When the
UpdateBatchSizeproperty was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)When using table per type inheritance and listing the contents of the parent table, the result of the query was a list of child objects, even though there was no related child record with the same parent Id. (Bug #49850)
MySqlDataReader.GetUInt64returned an incorrect value when reading aBIGINT UNSIGNEDcolumn containing a value greater than 2147483647. (Bug #49794)A
FormatExceptionwas generated when an empty string was returned from a stored function. (Bug #49642)When trying to create stored procedures from an SQL script, a
MySqlExceptionwas thrown when attempting to redefine theDELIMITER:MySql.Data.MySqlClient.MySqlException was unhandled Message="You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1" Source="MySql.Data" ErrorCode=-2147467259 Number=1064 StackTrace: à MySql.Data.MySqlClient.MySqlStream.ReadPacket() à MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) à MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() à MySql.Data.MySqlClient.MySqlDataReader.NextResult() à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() à MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() à MySql.Data.MySqlClient.MySqlScript.Execute()Note: The
MySqlScriptclass has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)Calling a User Defined Function using Entity SQL in the Entity Framework caused a
NullReferenceException. (Bug #45277)A connection string set in
web.configcould not be reused after Visual Studio 2008 Professional was shut down. It continued working for the existing controls, but did not work for new controls added. (Bug #41629)
First GA release of 6.2. This release fixes bugs since 6.2.1.
Bugs Fixed
When adding a data set in Visual Studio 2008, the following error was generated:
Relations couldn't be addded. Column 'REFERENCED_TABLE_CATALOG' does not belong to table.
This was due to a 'REFERENCED_TABLE_CATALOG' column not being included in the foreign keys collection. (Bug #48974)
Attempting to execute a load data local infile on a file where the user did not have write permissions, or the file was open in an editor gave an access denied error. (Bug #48944)
The method
MySqlDataReader.GetSchemaTable()returned 0 in theNumericPrecisionfield for decimal and newdecimal columns. (Bug #48171)MySQL Connector/Net generated an invalid operation exception during a transaction rollback:
System.InvalidOperationException: Connection must be valid and open to rollback transaction at MySql.Data.MySqlClient.MySqlTransaction.Rollback() at MySql.Data.MySqlClient.MySqlConnection.CloseFully() at MySql.Data.MySqlClient.MySqlPromotableTransaction.System.Transactions.IPromotableSinglePhaseNotification.Rollback(SinglePhaseEnlistment singlePhaseEnlistment) ...
(Bug #35330)
Connection objects were not garbage collected when not in use. (Bug #31996)
This release fixes bugs since 6.2.0.
Functionality Added or Changed
The
MySqlParameterclass now has a property namedPossibleValues. This property is NULL unless the parameter is created byMySqlCommandBuilder.DeriveParameters. Further, it will be NULL unless the parameter is of type enum or set - in this case it will be a list of strings that are the possible values for the column. This feature is designed as an aid to the developer. (Bug #48586)Prior to MySQL Connector/Net 6.2,
MySqlCommand.CommandTimeoutincluded user processing time, that is processing time not related to direct use of the connector. Timeout was implemented through a .NET Timer, that triggered afterCommandTimeoutseconds.MySQL Connector/Net 6.2 introduced timeouts that are aligned with how Microsoft handles
SqlCommand.CommandTimeout. This property is the cumulative timeout for all network reads and writes during command execution or processing of the results. A timeout can still occur in theMySqlReader.Readmethod after the first row is returned, and does not include user processing time, only IO operations.Further details on this can be found in the relevant Microsoft documentation.
Starting with MySQL Connector/Net 6.2, there is a background job that runs every three minutes and removes connections from pool that have been idle (unused) for more than three minutes. The pool cleanup frees resources on both client and server side. This is because on the client side every connection uses a socket, and on the server side every connection uses a socket and a thread.
Prior to this change, connections were never removed from the pool, and the pool always contained the peak number of open connections. For example, a web application that peaked at 1000 concurrent database connections would consume 1000 threads and 1000 open sockets at the server, without ever freeing up those resources from the connection pool.
MySQL Connector/Net now supports the processing of certificates when connecting to an SSL-enabled MySQL Server. For further information see the connection string option SSL Mode in the section Section 21.2.6, “Connector/Net Connection String Options Reference” and the tutorial Section 21.2.4.7, “Tutorial: Using SSL with MySQL Connector/Net”.
Bugs Fixed
Cloning of
MySqlCommandwas not typesafe. To clone aMySqlCommandit was necessary to do:MySqlCommand clone = (MySqlCommand)((ICloneable)comm).Clone();MySQL Connector/Net was changed so that it was possible to do:
MySqlCommand clone = comm.Clone();(Bug #48460)
When used, the
Encryptconnection string option caused a “Keyword not supported” exception to be generated.This option is in fact obsolete, and the option SSL Mode should be used instead. Although the
Encryptoption has been fixed so that it does not generate an exception, it will be removed completely in version 6.4. (Bug #48290)When building the
MySql.Dataproject with .NET Framework 3.5 installed, the following build output was displayed:Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
The project had been created using the .NET Framework 4.0, which was beta, instead of using the 3.5 framework. (Bug #48271)
It was not possible to retrieve a value from a MySQL server table, if the value was larger than that supported by the .NET type
System.Decimal.MySQL Connector/Net was changed to expose the
MySqlDecimaltype, along with the supporting methodGetMySqlDecimal. (Bug #48100)An entity model created from a schema containing a table with a column of type
UNSIGNED BIGINTand a view of the table did not behave correctly. When an entity was created and mapped to the view, the column that was of typeUNSIGNED BIGINTwas displayed asBIGINT. (Bug #47872)MySQL Connector/Net session support did not work with MySQL Server versions prior to 5.0, as the Session Provider used a call to
TIMESTAMPDIFF, which was not available on servers prior to 5.0. (Bug #47219)
The first alpha release of 6.2.
Bugs Fixed
When using a
BINARY(16)column to represent a GUID and having specified “old guids = true” in the connection string, the values were returned correctly until a null value was encountered in that field. After the null value was encountered a format exception was thrown with the following message:Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
(Bug #47928)
The Session Provider created invalid “session expires” on a random basis.
This was due to the fact that the Session Provider was incorrectly reading from the root
web.config, rather than from the application specificweb.config. (Bug #47815)When loading the
MySQLClient-mono.slnfile included with the Connector/Net source into Mono Develop, the following error occurred:/home/tbedford/connector-net-src/6.1/MySQLClient-mono.sln(22): Unsupported or unrecognized project: '/home/tbedford/connector-net-src/6.1/Installer/Installer.wixproj'
If the file was modified to remove this problem, then attempting to build the solution generated the following error:
/home/tbedford/connector-net-src/6.1/MySql.Data/Provider/Source/Connection.cs(280,46): error CS0115: `MySql.Data.MySqlClient.MySqlConnection.DbProviderFactory' is marked as an override but no suitable property found to override
(Bug #47048)
- D.3.5.1. Changes in MySQL Connector/Net 6.1.7 (Not released, Generally Available)
- D.3.5.2. Changes in MySQL Connector/Net 6.1.6 (Not released, Generally Available)
- D.3.5.3. Changes in MySQL Connector/Net 6.1.5 (30 August 2010, Generally Available)
- D.3.5.4. Changes in MySQL Connector/Net 6.1.4 (28 April 2010, Generally Available)
- D.3.5.5. Changes in MySQL Connector/Net 6.1.3 (16 November 2009, Generally Available)
- D.3.5.6. Changes in MySQL Connector/Net 6.1.2 (08 September 2009, Generally Available)
- D.3.5.7. Changes in MySQL Connector/Net 6.1.1 (20 August 2009, beta)
- D.3.5.8. Changes in MySQL Connector/Net 6.1.0 (15 July 2009, alpha)
This release fixes bugs since 6.1.6.
Bugs Fixed
MySqlScriptwas modified to enable correct processing of theDELIMITERcommand when not followed by a new line. (Bug #61680, Bug #12732279)SchemaDefinition-5.5.ssdlwas modified to treatCHAR(36)columns as a GUID. (Bug #61657, Bug #12708208)SqlFragment.QuoteIdentifierwas modified to add MySQL quotes around identifiers. (Bug #61635, Bug #12707285)The ASP.NET membership provider was modified to create and query all related tables using lowercase names. (Bug #61108, Bug #12702009)
This release fixes bugs since 6.1.5.
Bugs Fixed
Modified
MySqlConnection.BeginTransactionto throw aNotSupportedExceptionforSnapshotisolation level. (Bug #61589, Bug #12698020)MysqlDataReader.GetSchemaTablereturned incorrect values and types. (Bug #59989, Bug #11776346)All queries other than
INSERTwere executed individually instead of as a batch even though batching was enabled for the connection. (Bug #59616, Bug #11850286)MySQL Connector/Net generated an exception when executing a query consisting of ';', for example:
mycmd(";",mycon) mycmd.executenonquery()The exception generated was:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at MySql.Data.MySqlClient.MySqlCommand.TrimSemicolons(String sql) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
(Bug #59537, Bug #11766433)
Setting
Membership.ApplicationNamehad no effect. (Bug #59438, Bug #11770465)MembershipProviderdid not generate hashes correctly if the algorithm was keyed. The Key of the algorithm should have been set if theHashAlgorithmwasKeyedHashAlgorithm. (Bug #58906)Code introduced to fix bug #54863 proved problematic on .NET version 3.5 and above. (Bug #58853)
The
MySqlTokenizercontained unnecessarySubstringandTrimcalls:string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();
The variable
tokenwas not used anywhere in the code. (Bug #58757)MySqlCommand.ExecuteReader(CommandBehavior)threw aNullReferenceExceptionwhen being called withCommandBehavior.CloseConnection, if the SQL statement contained a syntax error, or contained invalid data such as an invalid column name. (Bug #58652)ReadFieldLength()returned incorrect value forBIGINTautoincrement columns. (Bug #58373)MySQL Connector/Net did not support the
utf8mb4character set. When attempting to connect toutf8mb4tables or columns, an exceptionKeyNotFoundExceptionwas generated. (Bug #58244)A typed dataset did not get the table name. (Bug #57894, Bug #11764989)
Setting
MySqlCommand.CommandTimeoutto 0 had no effect. It should have resulted in an infinite timeout. (Bug #57265)When performing a row-by-row update, only the first row was updated and all other rows were ignored. (Bug #57092)
Setting the
Default Command Timeoutconnection string option had no effect. (Bug #56806)When an output parameter was declared as type
MySqlDbType.Bit, it failed to return with the correct value. (Bug #56756)MySqlHelper.ExecuteReaderdid not include an overload acceptingMySqlParameterobjects when using aMySqlConnection. However,MySqlHelperdid include an overload forMySqlParameterobjects when using a string object containing the connection string to the database. (Bug #56755)Default values returned for text columns were not quoted. This meant that the
COLUMN_DEFAULTfield of theGetSchemacolumns collection did not return a valid SQL expression. (Bug #56509)MySQL Connector/Net for .NET/Mono attempted to dynamically load the assembly
Mono.Posix.dllwhen a Unix socket was used to connect to the server. This failed and the connector was not able to use a Unix socket unless theMono.Posix.dllassembly was previously loaded by the program. (Bug #56410)Modified
ProviderManifest.xmlto mapTIMESTAMPdatabase columns to theDateTime.NET type. (Bug #55351, Bug #12652602)The ADO.NET Entity Data Model could not add stored procedures from MySQL Server 5.0.45 but worked fine using MySQL Server 5.1. (Bug #55349)
Fixed Entity Framework provider
GROUP BYclause generation by adding all group-by keys to theSELECTstatement. (Bug #46742, Bug #12622129)
This release fixes bugs since 6.1.4.
Bugs Fixed
The calculation of
lockAgein the Session Provider sometimes generated aSystem.Data.SqlTypes.SqlNullValueException. (Bug #55701)Attempting to read
Double.MinValuefrom aDOUBLEcolumn in MySQL table generated the following exception:System.OverflowException : Value was either too large or too small for a Double. --OverflowException at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at MySql.Data.Types.MySqlDouble.MySql.Data.Types.IMySqlValue.ReadValue(MySqlPacket packet, Int64 length, Boolean nullVal) at MySql.Data.MySqlClient.NativeDriver.ReadColumnValue(Int32 index, MySqlField field, IMySqlValue valObject) at MySql.Data.MySqlClient.ResultSet.ReadColumnData(Boolean outputParms) at MySql.Data.MySqlClient.ResultSet.NextRow(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlDataReader.Read()
(Bug #55644)
If using MySQL Server 5.0.x it was not possible to alter stored routines in Visual Studio. If the stored routine was clicked, and the context sensitive menu option, Alter Routine, selected, the following error was generated:
Unable to load object with error: Object reference not set to an instance of an object
(Bug #55170)
MySqlDataAdapter.Update()generated concurrency violations for custom stored procedure driven update commands that usedUpdateRowSource.FirstReturnedRecord. (Bug #54895)Several calls to
DataAdapter.Update()with intervening changes toDataTableresulted inConcurrencyExceptionexceptions being generated. (Bug #54863)The icon for the MySQL Web Configuration Tool was not displayed in Visual Studio for Web Application Projects. (Bug #54571)
The
MySqlHelperobject did not have an overloaded version of theExecuteReadermethod that accepted aMySqlConnectionobject. (Bug #54570)If
MySqlDataAdapterwas used with anINSERTcommand where theVALUESclause contained an expression with parentheses in it, and set theadapter.UpdateBatchSizeparameter to be greater than one, then the call toadapter.Updateeither generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)The method
MySql.Data.Common.QueryNormalizer.CollapseValueListgenerated anArgumentOutOfRangeException. (Bug #54152, Bug #53865)Garbage Collector disposal of a
MySqlConnectionobject caused the following exception:System.IO.EndOfStreamException: Attempted to read past the end of the stream. MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count) MySql.Data.MySqlClient.MySqlStream.LoadPacket() Outer Exception Reading from the stream has failed. ...
(Bug #53457)
MySQL Connector/Net did not throw an
EndOfStreamExceptionexception whennet_write_timeoutwas exceeded. (Bug #53439)After a timeout exception, if an attempt was made to reuse a connection returned to the connection pool the following exception was generated:
[MySqlException (0x80004005): There is already an open DataReader associated with this Connection which must be closed first.] MySql.Data.MySqlClient.MySqlCommand.CheckState() +278 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +43 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6 Controls.SimpleCommand.ExecuteReader(String SQL) in ...:323 Albums.GetImagesByAlbum(SimpleCommand Cmd, Int32 iAlbum, String Order, String Limit) in ...:13 Forecast.Page_Load(Object sender, EventArgs e) in ...:70 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
(Bug #53357)
Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)
EventLog was not disposed in the SessionState provider. (Bug #52550)
CHAR(36)columns were not recognized as GUIDs when used in views with entity models. (Bug #52085)Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)
When an application was subjected to increased concurrent load, MySQL Connector/Net generated the following error when calling stored procedures:
A DataTable named \'Procedure Parameters\' already belongs to this DataSet.(Bug #49118)
In the ADO.NET Entity Data Model Wizard, the time to update a model scaled abnormally as the number of entities increased. (Bug #48791, Bug #12596237)
The
INSERTcommand was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)When the connection string option “Connection Reset = True” was used, a connection reset used the previously used encoding for the subsequent authentication operation. This failed, for example, if UCS2 was used to read the last column before the reset. (Bug #47153)
Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)
When batching was used in
MySqlDataAdapter, a connection was not opened automatically inMySqlDataAdapter.Update(). This resulted in anInvalidOperationExceptionexception being generated, with the message text “connection must be valid and open”.MySQL Connector/Net has been changed to behave more like SQL Server: if the connection is closed, it is opened for the duration of update operation. (Bug #38411)
Database name was emitted into typed datasets. This prevented users using the configured default database. (Bug #33870)
This release fixes bugs since 6.1.3.
Functionality Added or Changed
Procedure cacheing had a problem whereby if you created a procedure, dropped it, and recreated it with a different number of parameters an exception was generated.
MySQL Connector/Net has been changed so that if the procedure is recreated with a different number of parameters, it will still be recognized. (Bug #52562)
MySQL Connector/Net has been changed to include
MySqlDataReader.GetFieldType(string columnname). Further,MySqlDataReader.GetOrdinal()now includes the name of the column in the exception if the column is not found. (Bug #47467)
Bugs Fixed
In MySQL Connector/Net, the
MySqlConnection.Abort()method contained atry...catchconstruct, with an emptycatchblock. This meant that any exception generated at this point would not be caught. (Bug #52769)If
FunctionsReturnString=truewas used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)In MySQL Connector/Net, the
LoadCharsetMap()function of theCharSetMapclass set the following incorrect mapping:mapping.Add("latin1", new CharacterSet("latin1", 1));This meant that, for example, the Euro sign was not handled correctly.
The correct mapping should have been:
mapping.Add("latin1", new CharacterSet("windows-1252", 1));This is because MySQL's
latin1character set is the same as thewindows-cp1252character set and it extends the official ISO 8859-1 or IANA latin1. (Bug #51927)A non-terminated string in SQL threw a CLR exception rather than a syntax exception. (Bug #51788)
When calling
ExecuteNonQueryon a command object, the following exception occurred:Index and length must refer to a location within the string. Parameter name: length
(Bug #51610)
The method
Command.TrimSemicolonsusedStringBuilder, and therefore allocated memory for the query even if it did not need to be trimmed. This led to excessive memory consumption when executing a number of large queries. (Bug #51149)MySqlCommand.Parameters.Clear()did not work. (Bug #50444)When the
MySqlScript.execute()method was called, the following exception was generated:InvalidOperationException : The CommandText property has not been properly initialized.
(Bug #50344)
Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)
When the
UpdateBatchSizeproperty was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)When using table per type inheritance and listing the contents of the parent table, the result of the query was a list of child objects, even though there was no related child record with the same parent Id. (Bug #49850)
MySqlDataReader.GetUInt64returned an incorrect value when reading aBIGINT UNSIGNEDcolumn containing a value greater than 2147483647. (Bug #49794)A
FormatExceptionwas generated when an empty string was returned from a stored function. (Bug #49642)When adding a data set in Visual Studio 2008, the following error was generated:
Relations couldn't be addded. Column 'REFERENCED_TABLE_CATALOG' does not belong to table.
This was due to a 'REFERENCED_TABLE_CATALOG' column not being included in the foreign keys collection. (Bug #48974)
Attempting to execute a load data local infile on a file where the user did not have write permissions, or the file was open in an editor gave an access denied error. (Bug #48944)
The method
MySqlDataReader.GetSchemaTable()returned 0 in theNumericPrecisionfield for decimal and newdecimal columns. (Bug #48171)When trying to create stored procedures from an SQL script, a
MySqlExceptionwas thrown when attempting to redefine theDELIMITER:MySql.Data.MySqlClient.MySqlException was unhandled Message="You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1" Source="MySql.Data" ErrorCode=-2147467259 Number=1064 StackTrace: à MySql.Data.MySqlClient.MySqlStream.ReadPacket() à MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) à MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() à MySql.Data.MySqlClient.MySqlDataReader.NextResult() à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() à MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() à MySql.Data.MySqlClient.MySqlScript.Execute()Note: The
MySqlScriptclass has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)Calling a User Defined Function using Entity SQL in the Entity Framework caused a
NullReferenceException. (Bug #45277)A connection string set in
web.configcould not be reused after Visual Studio 2008 Professional was shut down. It continued working for the existing controls, but did not work for new controls added. (Bug #41629)
This release fixes bugs since 6.1.2.
Bugs Fixed
Cloning of
MySqlCommandwas not typesafe. To clone aMySqlCommandit was necessary to do:MySqlCommand clone = (MySqlCommand)((ICloneable)comm).Clone();MySQL Connector/Net was changed so that it was possible to do:
MySqlCommand clone = comm.Clone();(Bug #48460)
When building the
MySql.Dataproject with .NET Framework 3.5 installed, the following build output was displayed:Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
The project had been created using the .NET Framework 4.0, which was beta, instead of using the 3.5 framework. (Bug #48271)
If
MySqlConnection.GetSchemawas called for "Indexes" on a table named “b`a`d” as follows:DataTable schemaPrimaryKeys = connection.GetSchema( "Indexes", new string[] { null, schemaName, "b`a`d"});Then the following exception was generated:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a`d`' at line 1
(Bug #48101)
It was not possible to retrieve a value from a MySQL server table, if the value was larger than that supported by the .NET type
System.Decimal.MySQL Connector/Net was changed to expose the
MySqlDecimaltype, along with the supporting methodGetMySqlDecimal. (Bug #48100)For some character sets such as UTF-8, a
CHARcolumn would sometimes be incorrectly interpreted as aGUIDby MySQL Connector/Net.MySQL Connector/Net was changed so that a column would only be interpreted as a
GUIDif it had a character length of 36, as opposed to a byte length of 36. (Bug #47985)When using a
BINARY(16)column to represent a GUID and having specified “old guids = true” in the connection string, the values were returned correctly until a null value was encountered in that field. After the null value was encountered a format exception was thrown with the following message:Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
(Bug #47928)
An entity model created from a schema containing a table with a column of type
UNSIGNED BIGINTand a view of the table did not behave correctly. When an entity was created and mapped to the view, the column that was of typeUNSIGNED BIGINTwas displayed asBIGINT. (Bug #47872)The Session Provider created invalid “session expires” on a random basis.
This was due to the fact that the Session Provider was incorrectly reading from the root
web.config, rather than from the application specificweb.config. (Bug #47815)Attempting to build MySQL Connector/Net 6.1
MySQL.Datafrom source code on Windows failed with the following error:...\clones\6.1\MySql.Data\Provider\Source\NativeDriver.cs(519,29): error CS0122: 'MySql.Data.MySqlClient.MySqlPacket.MySqlPacket()' is inaccessible due to its protection level
(Bug #47354)
When tables were auto created for the Session State Provider they were set to use the MySQL Server's default collation, rather than the default collation set for the containing database. (Bug #47332)
When loading the
MySQLClient-mono.slnfile included with the Connector/Net source into Mono Develop, the following error occurred:/home/tbedford/connector-net-src/6.1/MySQLClient-mono.sln(22): Unsupported or unrecognized project: '/home/tbedford/connector-net-src/6.1/Installer/Installer.wixproj'
If the file was modified to remove this problem, then attempting to build the solution generated the following error:
/home/tbedford/connector-net-src/6.1/MySql.Data/Provider/Source/Connection.cs(280,46): error CS0115: `MySql.Data.MySqlClient.MySqlConnection.DbProviderFactory' is marked as an override but no suitable property found to override
(Bug #47048)
This is the first GA release of 6.1. This release fixes bugs since 6.1.1.
Bugs Fixed
The MySQL Connector/Net Session State Provider truncated session data to 64KB, due to its column types being set to
BLOB. (Bug #47339)MySQL Connector/Net generated the following exception when using the Session State provider:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MINUTEWHERE SessionId = 'dtmgga55x35oi255nrfrxe45' AND ApplicationId = 1 AND Loc' at line 1 Описание: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MINUTEWHERE SessionId = 'dtmgga55x35oi255nrfrxe45' AND ApplicationId = 1 AND Loc' at line 1(Bug #46939)
If an error occurred during connection to a MySQL Server, deserializing the error message from the packet buffer caused a
NullReferenceExceptionto be thrown. When the methodMySqlPacket::ReadString()attempted to retrieve the error message, the following line of code threw the exception:string s = encoding.GetString(bits, (int)buffer.Position, end - (int)buffer.Position);This was due to the fact that the encoding field had not been initialized correctly. (Bug #46844)
Input parameters were missing from Stored Procedures when using them with ADO.NET Data Entities. (Bug #44985)
MySQL Connector/Net did not time out correctly. The command timeout was set to 30 secs, but MySQL Connector/Net hung for several hours. (Bug #43761)
This is the first Beta release of 6.1.
Bugs Fixed
In the
MySqlDataReaderclass theGetSBytefunction returned abytevalue instead of ansbytevalue. (Bug #46620)The MySQL Connector/Net Profile Provider,
MySql.Web.Profile.MySQLProfileProvider, generated an error when running on Mono. When an attempt was made to save a string inProfile.Namethe string was not saved to themy_aspnet_Profilestable. If an attempt was made to force the save withProfile.Save()the following error was generated:Server Error in '/mono' Application -------------------------------------------------------------------------------- The requested feature is not implemented. Описание: HTTP 500. Error processing request. Stack Trace: System.NotImplementedException: The requested feature is not implemented. at MySql.Data.MySqlClient.MySqlConnection.EnlistTransaction (System.Transactions.Transaction transaction) [0x00000] at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] at MySql.Web.Profile.MySQLProfileProvider.SetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyValueCollection collection) [0x00000] -------------------------------------------------------------------------------- Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433(Bug #46375)
An exception was generated when using
TIMESTAMPcolumns with the Entity Framework. (Bug #46311)MySQL Connector/Net sometimes hung, without generating an exception. This happened if a read from a stream failed returning a 0, causing the code in
LoadPacket()to enter an infinite loop. (Bug #46308)When using MySQL Connector/Net 6.0.4 and a MySQL Server 4.1 an exception was generated when trying to execute:
connection.GetSchema("Columns", ...);The exception generated was:
'connection.GetSchema("Columns")' threw an exception of type 'System.ArgumentException'System.Data.DataTable {System.ArgumentException} base{"Input string was not in a correct format.Couldn't store <'Select'> in NUMERIC_PRECISION Column. Expected type is UInt64."}System.Exception {System.ArgumentException}(Bug #46270)
The MySQL Connector/Net method
StoredProcedure.GetParameters(string)ignored the programmer's setting of theUseProcedureBodiesoption. This broke any application for which the application's parameter names did not match the parameter names in the Stored Procedure, resulting in anArgumentExceptionwith the message “Parameter 'foo' not found in the collection.” and the following stack trace:MySql.Data.dll!MySql.Data.MySqlClient.MySqlParameterCollection.GetParameterFlexible(stri ng parameterName = "pStart", bool throwOnNotFound = true) Line 459C# MySql.Data.dll!MySql.Data.MySqlClient.StoredProcedure.Resolve() Line 157 + 0x25 bytesC# MySql.Data.dll!MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(System.Data.CommandBeha vior behavior = SequentialAccess) Line 405 + 0xb bytesC# MySql.Data.dll!MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(System.Data.Comma ndBehavior behavior = SequentialAccess) Line 884 + 0xb bytesC# System.Data.dll!System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System .Data.CommandBehavior behavior) + 0xb bytes System.Data.dll!System.Data.Common.DbDataAdapter.FillInternal(System.Data.DataSet dataset = {System.Data.DataSet}, System.Data.DataTable[] datatables = null, int startRecord = 0, int maxRecords = 0, string srcTable = "Table", System.Data.IDbCommand command = {MySql.Data.MySqlClient.MySqlCommand}, System.Data.CommandBehavior behavior) + 0x83 bytes System.Data.dll!System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) + 0x120 bytes System.Data.dll!System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet dataSet) + 0x5f bytes(Bug #46213)
Conversion of MySQL
TINYINT(1)tobooleanfailed. (Bug #46205, Bug #46359, Bug #41953)When populating a MySQL database table in Visual Studio using the Table Editor, if a
VARCHAR(10)column was changed to aVARCHAR(20)column an exception was generated:SystemArgumentException: DataGridViewComboBoxCell value is not valid. To replace this default dialog please handle the DataError Event.(Bug #46100)
The Entity Framework provider was not calling
DBSortExpressioncorrectly when theSkipandTakemethods were used, such as in the following statement:TestModel.tblquarantine.OrderByDescending(q => q.MsgDate).Skip(100).Take(100).ToList();This resulted in the data being unsorted. (Bug #45723)
The MySQL Connector/Net 6.0.4 installer failed with an error. The error message generated was:
There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.When was clicked to acknowledge the error the installer exited. (Bug #45474)
Calling the Entity Framework
SaveChanges()method of any MySQL ORM Entity with a column typeTIME, generated an error message:Unknown PrimitiveKind Time
(Bug #45457)
Insert into two tables failed when using the Entity Framework. The exception generated was:
The value given is not an instance of type 'Edm.Int32'(Bug #45077)
Ошибки occurred when using the Entity Framework with cultures that used a comma as the decimal separator. This was because the formatting for
SINGLE,DOUBLEandDECIMALvalues was not handled correctly. (Bug #44455)When attempting to connect to MySQL using the Compact Framework version of MySQL Connector/Net, an
IndexOutOfRangeExceptionexception was generated on trying to open the connection. (Bug #43736)When reading data, such as with a
MySqlDataAdapteron aMySqlConnection, MySQL Connector/Net could potentially enter an infinite loop inCompressedStream.ReadNextpacket()if compression was enabled. (Bug #43678)An error occurred when building MySQL Connector/Net from source code checked out from the public SVN repository. This happened on Linux using Mono and Nant. The Mono JIT compiler version was 1.2.6.0. The Nant version was 0.85.
When an attempt was made to build (for example) the MySQL Connector/Net 5.2 branch using the command:
$ nant -buildfile:Client.buildThe following error occurred:
BUILD FAILED Error loading buildfile. Encoding name 'Windows-1252' not supported. Parameter name: name(Bug #42411)
MySQL Connector/Net CHM documentation stated that MySQL Server 3.23 was supported. (Bug #42110)
In the case of long network inactivity, especially when connection pooling was used, connections were sometimes dropped, for example, by firewalls.
Note: The bugfix introduced a new
keepaliveparameter, which prevents disconnects by sending an empty TCP packet after a specified timeout. (Bug #40684)Calling a Stored Procedure with an output parameter through MySQL Connector/Net resulted in a memory leak. Calling the same Stored Procedure without an output parameter did not result in a memory leak. (Bug #36027)
This is the first Alpha release of 6.1.
Functionality Added or Changed
Changed GUID type - The backend representation of a guid type has been changed to be CHAR(36). This is so you can use the server UUID() function to populate a GUID table. UUID generates a 36 character string. Developers of older applications can add
old guids=trueto the connection string and the old BINARY(16) type will be used instead.Support for native output parameters - This is supported when connected to a server that supports native output parameters. This includes servers as of 5.5.3 and 6.0.8.
Session State Provider - This enables you to store the state of your website in a MySQL server.
Website Configuration Dialog - This is a new wizard that is activated by clicking a button on the toolbar at the top of the Visual Studio Solution Explorer. It works in conjunction with the ASP.Net administration pages, making it easier to activate and set advanced options for the different MySQL web providers included.
- D.3.6.1. Changes in MySQL Connector/Net 6.0.8 (Not released)
- D.3.6.2. Changes in MySQL Connector/Net 6.0.7 (30 August 2010)
- D.3.6.3. Changes in MySQL Connector/Net 6.0.6 (28 April 2010)
- D.3.6.4. Changes in MySQL Connector/Net 6.0.5 (12 November 2009)
- D.3.6.5. Changes in MySQL Connector/Net 6.0.4 (16 June 2009)
- D.3.6.6. Changes in MySQL Connector/Net 6.0.3 (28 April 2009)
- D.3.6.7. Changes in MySQL Connector/Net 6.0.2 (07 April 2009, beta)
- D.3.6.8. Changes in MySQL Connector/Net 6.0.1 (02 April 2009, beta)
- D.3.6.9. Changes in MySQL Connector/Net 6.0.0 (02 March 2009, alpha)
Fixes bugs since 6.0.7.
Bugs Fixed
MysqlDataReader.GetSchemaTablereturned incorrect values and types. (Bug #59989, Bug #11776346)All queries other than
INSERTwere executed individually instead of as a batch even though batching was enabled for the connection. (Bug #59616, Bug #11850286)MySQL Connector/Net generated an exception when executing a query consisting of ';', for example:
mycmd(";",mycon) mycmd.executenonquery()The exception generated was:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at MySql.Data.MySqlClient.MySqlCommand.TrimSemicolons(String sql) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
(Bug #59537, Bug #11766433)
Setting
Membership.ApplicationNamehad no effect. (Bug #59438, Bug #11770465)MembershipProviderdid not generate hashes correctly if the algorithm was keyed. The Key of the algorithm should have been set if theHashAlgorithmwasKeyedHashAlgorithm. (Bug #58906)Code introduced to fix bug #54863 proved problematic on .NET version 3.5 and above. (Bug #58853)
The
MySqlTokenizercontained unnecessarySubstringandTrimcalls:string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();
The variable
tokenwas not used anywhere in the code. (Bug #58757)MySqlCommand.ExecuteReader(CommandBehavior)threw aNullReferenceExceptionwhen being called withCommandBehavior.CloseConnection, if the SQL statement contained a syntax error, or contained invalid data such as an invalid column name. (Bug #58652)ReadFieldLength()returned incorrect value forBIGINTautoincrement columns. (Bug #58373)MySQL Connector/Net did not support the
utf8mb4character set. When attempting to connect toutf8mb4tables or columns, an exceptionKeyNotFoundExceptionwas generated. (Bug #58244)A typed dataset did not get the table name. (Bug #57894, Bug #11764989)
Setting
MySqlCommand.CommandTimeoutto 0 had no effect. It should have resulted in an infinite timeout. (Bug #57265)When performing a row-by-row update, only the first row was updated and all other rows were ignored. (Bug #57092)
Setting the
Default Command Timeoutconnection string option had no effect. (Bug #56806)When an output parameter was declared as type
MySqlDbType.Bit, it failed to return with the correct value. (Bug #56756)Default values returned for text columns were not quoted. This meant that the
COLUMN_DEFAULTfield of theGetSchemacolumns collection did not return a valid SQL expression. (Bug #56509)MySQL Connector/Net for .NET/Mono attempted to dynamically load the assembly
Mono.Posix.dllwhen a Unix socket was used to connect to the server. This failed and the connector was not able to use a Unix socket unless theMono.Posix.dllassembly was previously loaded by the program. (Bug #56410)The ADO.NET Entity Data Model could not add stored procedures from MySQL Server 5.0.45 but worked fine using MySQL Server 5.1. (Bug #55349)
Fixes bugs since 6.0.6.
Bugs Fixed
Attempting to read
Double.MinValuefrom aDOUBLEcolumn in MySQL table generated the following exception:System.OverflowException : Value was either too large or too small for a Double. --OverflowException at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at MySql.Data.Types.MySqlDouble.MySql.Data.Types.IMySqlValue.ReadValue(MySqlPacket packet, Int64 length, Boolean nullVal) at MySql.Data.MySqlClient.NativeDriver.ReadColumnValue(Int32 index, MySqlField field, IMySqlValue valObject) at MySql.Data.MySqlClient.ResultSet.ReadColumnData(Boolean outputParms) at MySql.Data.MySqlClient.ResultSet.NextRow(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlDataReader.Read()
(Bug #55644)
MySqlDataAdapter.Update()generated concurrency violations for custom stored procedure driven update commands that usedUpdateRowSource.FirstReturnedRecord. (Bug #54895)Several calls to
DataAdapter.Update()with intervening changes toDataTableresulted inConcurrencyExceptionexceptions being generated. (Bug #54863)The
MySqlHelperobject did not have an overloaded version of theExecuteReadermethod that accepted aMySqlConnectionobject. (Bug #54570)If
MySqlDataAdapterwas used with anINSERTcommand where theVALUESclause contained an expression with parentheses in it, and set theadapter.UpdateBatchSizeparameter to be greater than one, then the call toadapter.Updateeither generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)The method
MySql.Data.Common.QueryNormalizer.CollapseValueListgenerated anArgumentOutOfRangeException. (Bug #54152, Bug #53865)Garbage Collector disposal of a
MySqlConnectionobject caused the following exception:System.IO.EndOfStreamException: Attempted to read past the end of the stream. MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count) MySql.Data.MySqlClient.MySqlStream.LoadPacket() Outer Exception Reading from the stream has failed. ...
(Bug #53457)
After a timeout exception, if an attempt was made to reuse a connection returned to the connection pool the following exception was generated:
[MySqlException (0x80004005): There is already an open DataReader associated with this Connection which must be closed first.] MySql.Data.MySqlClient.MySqlCommand.CheckState() +278 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +43 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6 Controls.SimpleCommand.ExecuteReader(String SQL) in ...:323 Albums.GetImagesByAlbum(SimpleCommand Cmd, Int32 iAlbum, String Order, String Limit) in ...:13 Forecast.Page_Load(Object sender, EventArgs e) in ...:70 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
(Bug #53357)
Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)
EventLog was not disposed in the SessionState provider. (Bug #52550)
Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)
When an application was subjected to increased concurrent load, MySQL Connector/Net generated the following error when calling stored procedures:
A DataTable named \'Procedure Parameters\' already belongs to this DataSet.(Bug #49118)
In the ADO.NET Entity Data Model Wizard, the time to update a model scaled abnormally as the number of entities increased. (Bug #48791, Bug #12596237)
The
INSERTcommand was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)When the connection string option “Connection Reset = True” was used, a connection reset used the previously used encoding for the subsequent authentication operation. This failed, for example, if UCS2 was used to read the last column before the reset. (Bug #47153)
Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)
When batching was used in
MySqlDataAdapter, a connection was not opened automatically inMySqlDataAdapter.Update(). This resulted in anInvalidOperationExceptionexception being generated, with the message text “connection must be valid and open”.MySQL Connector/Net has been changed to behave more like SQL Server: if the connection is closed, it is opened for the duration of update operation. (Bug #38411)
Database name was emitted into typed datasets. This prevented users using the configured default database. (Bug #33870)
Fixes bugs since 6.0.5.
Functionality Added or Changed
Procedure cacheing had a problem whereby if you created a procedure, dropped it, and recreated it with a different number of parameters an exception was generated.
MySQL Connector/Net has been changed so that if the procedure is recreated with a different number of parameters, it will still be recognized. (Bug #52562)
MySQL Connector/Net has been changed to include
MySqlDataReader.GetFieldType(string columnname). Further,MySqlDataReader.GetOrdinal()now includes the name of the column in the exception if the column is not found. (Bug #47467)
Bugs Fixed
If using MySQL Server 5.0.x it was not possible to alter stored routines in Visual Studio. If the stored routine was clicked, and the context sensitive menu option, Alter Routine, selected, the following error was generated:
Unable to load object with error: Object reference not set to an instance of an object
(Bug #55170)
In MySQL Connector/Net, the
MySqlConnection.Abort()method contained atry...catchconstruct, with an emptycatchblock. This meant that any exception generated at this point would not be caught. (Bug #52769)If
FunctionsReturnString=truewas used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)In MySQL Connector/Net, the
LoadCharsetMap()function of theCharSetMapclass set the following incorrect mapping:mapping.Add("latin1", new CharacterSet("latin1", 1));This meant that, for example, the Euro sign was not handled correctly.
The correct mapping should have been:
mapping.Add("latin1", new CharacterSet("windows-1252", 1));This is because MySQL's
latin1character set is the same as thewindows-cp1252character set and it extends the official ISO 8859-1 or IANA latin1. (Bug #51927)A non-terminated string in SQL threw a CLR exception rather than a syntax exception. (Bug #51788)
When calling
ExecuteNonQueryon a command object, the following exception occurred:Index and length must refer to a location within the string. Parameter name: length
(Bug #51610)
The method
Command.TrimSemicolonsusedStringBuilder, and therefore allocated memory for the query even if it did not need to be trimmed. This led to excessive memory consumption when executing a number of large queries. (Bug #51149)MySqlCommand.Parameters.Clear()did not work. (Bug #50444)When the
MySqlScript.execute()method was called, the following exception was generated:InvalidOperationException : The CommandText property has not been properly initialized.
(Bug #50344)
Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)
When the
UpdateBatchSizeproperty was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)When using table per type inheritance and listing the contents of the parent table, the result of the query was a list of child objects, even though there was no related child record with the same parent Id. (Bug #49850)
MySqlDataReader.GetUInt64returned an incorrect value when reading aBIGINT UNSIGNEDcolumn containing a value greater than 2147483647. (Bug #49794)A
FormatExceptionwas generated when an empty string was returned from a stored function. (Bug #49642)When adding a data set in Visual Studio 2008, the following error was generated:
Relations couldn't be addded. Column 'REFERENCED_TABLE_CATALOG' does not belong to table.
This was due to a 'REFERENCED_TABLE_CATALOG' column not being included in the foreign keys collection. (Bug #48974)
Attempting to execute a load data local infile on a file where the user did not have write permissions, or the file was open in an editor gave an access denied error. (Bug #48944)
The method
MySqlDataReader.GetSchemaTable()returned 0 in theNumericPrecisionfield for decimal and newdecimal columns. (Bug #48171)When trying to create stored procedures from an SQL script, a
MySqlExceptionwas thrown when attempting to redefine theDELIMITER:MySql.Data.MySqlClient.MySqlException was unhandled Message="You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1" Source="MySql.Data" ErrorCode=-2147467259 Number=1064 StackTrace: à MySql.Data.MySqlClient.MySqlStream.ReadPacket() à MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) à MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() à MySql.Data.MySqlClient.MySqlDataReader.NextResult() à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() à MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() à MySql.Data.MySqlClient.MySqlScript.Execute()Note: The
MySqlScriptclass has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)Calling a User Defined Function using Entity SQL in the Entity Framework caused a
NullReferenceException. (Bug #45277)A connection string set in
web.configcould not be reused after Visual Studio 2008 Professional was shut down. It continued working for the existing controls, but did not work for new controls added. (Bug #41629)
This is a new release, fixing recently discovered bugs.
Bugs Fixed
Cloning of
MySqlCommandwas not typesafe. To clone aMySqlCommandit was necessary to do:MySqlCommand clone = (MySqlCommand)((ICloneable)comm).Clone();MySQL Connector/Net was changed so that it was possible to do:
MySqlCommand clone = comm.Clone();(Bug #48460)
If
MySqlConnection.GetSchemawas called for "Indexes" on a table named “b`a`d” as follows:DataTable schemaPrimaryKeys = connection.GetSchema( "Indexes", new string[] { null, schemaName, "b`a`d"});Then the following exception was generated:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a`d`' at line 1
(Bug #48101)
It was not possible to retrieve a value from a MySQL server table, if the value was larger than that supported by the .NET type
System.Decimal.MySQL Connector/Net was changed to expose the
MySqlDecimaltype, along with the supporting methodGetMySqlDecimal. (Bug #48100)An entity model created from a schema containing a table with a column of type
UNSIGNED BIGINTand a view of the table did not behave correctly. When an entity was created and mapped to the view, the column that was of typeUNSIGNED BIGINTwas displayed asBIGINT. (Bug #47872)When loading the
MySQLClient-mono.slnfile included with the Connector/Net source into Mono Develop, the following error occurred:/home/tbedford/connector-net-src/6.1/MySQLClient-mono.sln(22): Unsupported or unrecognized project: '/home/tbedford/connector-net-src/6.1/Installer/Installer.wixproj'
If the file was modified to remove this problem, then attempting to build the solution generated the following error:
/home/tbedford/connector-net-src/6.1/MySql.Data/Provider/Source/Connection.cs(280,46): error CS0115: `MySql.Data.MySqlClient.MySqlConnection.DbProviderFactory' is marked as an override but no suitable property found to override
(Bug #47048)
If an error occurred during connection to a MySQL Server, deserializing the error message from the packet buffer caused a
NullReferenceExceptionto be thrown. When the methodMySqlPacket::ReadString()attempted to retrieve the error message, the following line of code threw the exception:string s = encoding.GetString(bits, (int)buffer.Position, end - (int)buffer.Position);This was due to the fact that the encoding field had not been initialized correctly. (Bug #46844)
In the
MySqlDataReaderclass theGetSBytefunction returned abytevalue instead of ansbytevalue. (Bug #46620)The MySQL Connector/Net Profile Provider,
MySql.Web.Profile.MySQLProfileProvider, generated an error when running on Mono. When an attempt was made to save a string inProfile.Namethe string was not saved to themy_aspnet_Profilestable. If an attempt was made to force the save withProfile.Save()the following error was generated:Server Error in '/mono' Application -------------------------------------------------------------------------------- The requested feature is not implemented. Описание: HTTP 500. Error processing request. Stack Trace: System.NotImplementedException: The requested feature is not implemented. at MySql.Data.MySqlClient.MySqlConnection.EnlistTransaction (System.Transactions.Transaction transaction) [0x00000] at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] at MySql.Web.Profile.MySQLProfileProvider.SetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyValueCollection collection) [0x00000] -------------------------------------------------------------------------------- Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433(Bug #46375)
An exception was generated when using
TIMESTAMPcolumns with the Entity Framework. (Bug #46311)MySQL Connector/Net sometimes hung, without generating an exception. This happened if a read from a stream failed returning a 0, causing the code in
LoadPacket()to enter an infinite loop. (Bug #46308)When using MySQL Connector/Net 6.0.4 and a MySQL Server 4.1 an exception was generated when trying to execute:
connection.GetSchema("Columns", ...);The exception generated was:
'connection.GetSchema("Columns")' threw an exception of type 'System.ArgumentException'System.Data.DataTable {System.ArgumentException} base{"Input string was not in a correct format.Couldn't store <'Select'> in NUMERIC_PRECISION Column. Expected type is UInt64."}System.Exception {System.ArgumentException}(Bug #46270)
The MySQL Connector/Net method
StoredProcedure.GetParameters(string)ignored the programmer's setting of theUseProcedureBodiesoption. This broke any application for which the application's parameter names did not match the parameter names in the Stored Procedure, resulting in anArgumentExceptionwith the message “Parameter 'foo' not found in the collection.” and the following stack trace:MySql.Data.dll!MySql.Data.MySqlClient.MySqlParameterCollection.GetParameterFlexible(stri ng parameterName = "pStart", bool throwOnNotFound = true) Line 459C# MySql.Data.dll!MySql.Data.MySqlClient.StoredProcedure.Resolve() Line 157 + 0x25 bytesC# MySql.Data.dll!MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(System.Data.CommandBeha vior behavior = SequentialAccess) Line 405 + 0xb bytesC# MySql.Data.dll!MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(System.Data.Comma ndBehavior behavior = SequentialAccess) Line 884 + 0xb bytesC# System.Data.dll!System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System .Data.CommandBehavior behavior) + 0xb bytes System.Data.dll!System.Data.Common.DbDataAdapter.FillInternal(System.Data.DataSet dataset = {System.Data.DataSet}, System.Data.DataTable[] datatables = null, int startRecord = 0, int maxRecords = 0, string srcTable = "Table", System.Data.IDbCommand command = {MySql.Data.MySqlClient.MySqlCommand}, System.Data.CommandBehavior behavior) + 0x83 bytes System.Data.dll!System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) + 0x120 bytes System.Data.dll!System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet dataSet) + 0x5f bytes(Bug #46213)
Conversion of MySQL
TINYINT(1)tobooleanfailed. (Bug #46205, Bug #46359, Bug #41953)When populating a MySQL database table in Visual Studio using the Table Editor, if a
VARCHAR(10)column was changed to aVARCHAR(20)column an exception was generated:SystemArgumentException: DataGridViewComboBoxCell value is not valid. To replace this default dialog please handle the DataError Event.(Bug #46100)
In MySQL Connector/Net 6.0.4 using
GetProcDatagenerated an error because theparametersdata table was only created if MySQL Server was at least version 6.0.6, or if theUseProcedureBodiesconnection string option was set to true.Also the
DeriveParameterscommand generated a null reference exception. This was because theparametersdata table, which was null, was used in afor eachloop. (Bug #45952)The Entity Framework provider was not calling
DBSortExpressioncorrectly when theSkipandTakemethods were used, such as in the following statement:TestModel.tblquarantine.OrderByDescending(q => q.MsgDate).Skip(100).Take(100).ToList();This resulted in the data being unsorted. (Bug #45723)
The
EscapeStringcode carried out escaping by callingstring.Replacemultiple times. This resulted in a performance bottleneck, as for every line a new string was allocated and another was disposed of by the garbage collector. (Bug #45699)Adding the
Allow Batch=Falseoption to the connection string caused MySQL Connector/Net to generate the error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET character_set_results=NULL' at line 1(Bug #45502)
The MySQL Connector/Net 6.0.4 installer failed with an error. The error message generated was:
There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.When was clicked to acknowledge the error the installer exited. (Bug #45474)
A MySQL Connector/Net test program that connected to MySQL Server using the connection string option
compress=truecrashed, but only when running on Mono. The program worked as expected when running on Microsoft Windows.This was due to a bug in Mono. MySQL Connector/Net was modified to avoid using
WeakReferencesin theCompressedstream class, which was causing the crash. (Bug #45463)Calling the Entity Framework
SaveChanges()method of any MySQL ORM Entity with a column typeTIME, generated an error message:Unknown PrimitiveKind Time
(Bug #45457)
Insert into two tables failed when using the Entity Framework. The exception generated was:
The value given is not an instance of type 'Edm.Int32'(Bug #45077)
Input parameters were missing from Stored Procedures when using them with ADO.NET Data Entities. (Bug #44985)
Ошибки occurred when using the Entity Framework with cultures that used a comma as the decimal separator. This was because the formatting for
SINGLE,DOUBLEandDECIMALvalues was not handled correctly. (Bug #44455)When attempting to connect to MySQL using the Compact Framework version of MySQL Connector/Net, an
IndexOutOfRangeExceptionexception was generated on trying to open the connection. (Bug #43736)When reading data, such as with a
MySqlDataAdapteron aMySqlConnection, MySQL Connector/Net could potentially enter an infinite loop inCompressedStream.ReadNextpacket()if compression was enabled. (Bug #43678)An error occurred when building MySQL Connector/Net from source code checked out from the public SVN repository. This happened on Linux using Mono and Nant. The Mono JIT compiler version was 1.2.6.0. The Nant version was 0.85.
When an attempt was made to build (for example) the MySQL Connector/Net 5.2 branch using the command:
$ nant -buildfile:Client.buildThe following error occurred:
BUILD FAILED Error loading buildfile. Encoding name 'Windows-1252' not supported. Parameter name: name(Bug #42411)
After a Reference to "C:\Program Files\MySQL\MySQL Connector Net 5.2.4\Compact Framework\MySql.Data.CF.dll" was added to a Windows Mobile 5.0 project, the project then failed to build, generating a Microsoft Visual C# compiler error.
The error generated was:
Error 2 The type 'System.Runtime.CompilerServices.CompilerGeneratedAttribute' has no constructors defined MysqlTest Error 3 Internal Compiler Error (0xc0000005 at address 5A7E3714): likely culprit is 'COMPILE'.(Bug #42261)
MySQL Connector/Net CHM documentation stated that MySQL Server 3.23 was supported. (Bug #42110)
In the case of long network inactivity, especially when connection pooling was used, connections were sometimes dropped, for example, by firewalls.
Note: The bugfix introduced a new
keepaliveparameter, which prevents disconnects by sending an empty TCP packet after a specified timeout. (Bug #40684)MySQL Connector/Net generated the following exception:
System.NullReferenceException: Object reference not set to an instance of an object. bei MySql.Data.MySqlClient.MySqlCommand.TimeoutExpired(Object commandObject) bei System.Threading._TimerCallback.TimerCallback_Context(Object state) bei System.Threading.ExecutionContext.runTryCode(Object userData) bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading._TimerCallback.PerformTimerCallback(Object state)(Bug #40005)
Calling a Stored Procedure with an output parameter through MySQL Connector/Net resulted in a memory leak. Calling the same Stored Procedure without an output parameter did not result in a memory leak. (Bug #36027)
Using a
DataAdapterwith a linkedMySqlCommandBuilderthe following exception was thrown when trying to callda.Update(DataRow[] rows):Connection must be valid and open
(Bug #34657)
This is the first post-GA release, fixing recently discovered bugs.
Bugs Fixed
If a certain socket exception occurred when trying to establish a MySQL database connection, MySQL Connector/Net displayed an exception message that appeared to be unrelated to the underlying problem. This masked the problem and made diagnosing problems more difficult.
For example, if, when establishing a database connection using TCP/IP, Windows on the local machine allocated an ephemeral port that conflicted with a socket address still in use, then Windows/.NET would throw a socket exception with the following error text:
Only one usage of each socket address (protocol/network address/port) is normally permittedIP ADDRESS/PORT.However, MySQL Connector/Net masked this socket exception and displayed an exception with the following text:
Unable to connect to any of the specified MySQL hosts.
(Bug #45021)
A SQL query string containing an escaped backslash caused an exception to be generated:
Index and length must refer to a location within the string. Parameter name: length at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at MySql.Data.MySqlClient.MySqlTokenizer.NextParameter() at MySql.Data.MySqlClient.Statement.InternalBindParameters(String sql, MySqlParameterCollection parameters, MySqlPacket packet) at MySql.Data.MySqlClient.Statement.BindParameters() at MySql.Data.MySqlClient.PreparableStatement.Execute() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()(Bug #44960)
The Microsoft Visual Studio solution file
MySQL-VS2005.slnwas invalid. Several projects could not be loaded and thus it was not possible to build MySQL Connector/Net from source. (Bug #44822)The Data Set editor generated an error when attempts were made to modify insert, update or delete commands:
Error in WHERE clause near '@'. Unable to parse query text.(Bug #44512)
The DataReader in MySQL Connector/Net 6.0.3 considered a BINARY(16) field as a GUID with a length of 16. (Bug #44507)
When creating a new DataSet the following error was generated:
Failed to open a connection to database. Cannot load type with name 'MySQL.Data.VisualStudio.StoredProcedureColumnEnumerator'(Bug #44460)
The MySQL Connector/Net MySQLRoleProvider reported that there were no roles, even when roles existed. (Bug #44414)
MySQL Connector/Net was missing the capability to validate the server's certificate when using encryption. This made it possible to conduct a man-in-the-middle attack against the connection, which defeated the security provided by SSL. (Bug #38700)
First GA release.
Functionality Added or Changed
The
MySqlTokenizerfailed to split fieldnames from values if they were not separated by a space. This also happened if the string contained certain characters. As a resultMySqlCommand.ExecuteNonQueryraised an index out of range exception.The resulting errors are illustrated by the following examples. Note, the example statements do not have delimiting spaces around the
=operator.INSERT INTO anytable SET Text='test--test';
The tokenizer incorrectly interpreted the value as containing a comment.
UPDATE anytable SET Project='123-456',Text='Can you explain this ?',Duration=15 WHERE ID=4711;'A
MySqlExceptionwas generated, as the?in the value was interpreted by the tokenizer as a parameter sign. The error message generated was:Fatal error encountered during command execution. EXCEPTION: MySqlException - Parameter '?'' must be defined.(Bug #44318)
Bugs Fixed
MySQL.Datawas not displayed as a Reference inside Microsoft Visual Studio 2008 Professional.When a new C# project was created in Microsoft Visual Studio 2008 Professional,
MySQL.Datawas not displayed when , was selected. (Bug #44141)Column types for
SchemaProviderandISSchemaProviderdid not match.When the source code in
SchemaProvider.csandISSchemaProvider.cswere compared it was apparent that they were not using the same column types. The base provider used SQL such asSHOW CREATE TABLE, whileISSchemaProviderused the schema information tables. Column types used by the base class wereINT64and the column types used byISSchemaProviderwereUNSIGNED. (Bug #44123)
This is a new development release, fixing recently discovered bugs.
Bugs Fixed
MySQL Connector/Net 6.0.1 did not load in Microsoft Visual Studio 2008 and Visual Studio 2005 Pro.
The following error message was generated:
.NET Framework Data Provider for MySQL: The data provider object factory service was not found.(Bug #44064)
This is a new Beta development release, fixing recently discovered bugs.
Bugs Fixed
An insert and update error was generated by the decimal data type in the Entity Framework, when a German collation was used. (Bug #43574)
Generating an Entity Data Model (EDM) schema with a table containing columns with data types
MEDIUMTEXTandLONGTEXTgenerated a runtime error message “Max value too long or too short for Int32”. (Bug #43480)
Bugs Fixed
The Web Provider did not work at all on a remote host, and did not create a database when using
autogenerateschema="true". (Bug #39072)The MySQL Connector/Net installer program ended prematurely without reporting the specific error. (Bug #39019)
When called with an incorrect password the
MembershipProvider.GetPassword()method threw aMySQLExceptioninstead of aMembershipPasswordException. (Bug #38939)Possible overflow in
MySqlPacket.ReadLong(). (Bug #36997)The
TokenizeSqlmethod was adding query overhead and causing high CPU utilization for larger queries. (Bug #36836)
- D.3.8.1. Changes in MySQL Connector/Net 5.2.8 (Not released)
- D.3.8.2. Changes in MySQL Connector/Net 5.2.7 (15 July 2009)
- D.3.8.3. Changes in MySQL Connector/Net 5.2.6 (28 April 2009)
- D.3.8.4. Changes in MySQL Connector/Net 5.2.5 (19 November 2008)
- D.3.8.5. Changes in MySQL Connector/Net 5.2.4 (13 November 2008)
- D.3.8.6. Changes in MySQL Connector/Net 5.2.3 (19 August 2008)
- D.3.8.7. Changes in MySQL Connector/Net 5.2.2 (12 May 2008)
- D.3.8.8. Changes in MySQL Connector/Net 5.2.1 (27 February 2008)
- D.3.8.9. Changes in MySQL Connector/Net 5.2.0 (11 February 2008)
Bugs Fixed
If
MySqlConnection.GetSchemawas called for "Indexes" on a table named “b`a`d” as follows:DataTable schemaPrimaryKeys = connection.GetSchema( "Indexes", new string[] { null, schemaName, "b`a`d"});Then the following exception was generated:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a`d`' at line 1
(Bug #48101)
When the connection string option “Connection Reset = True” was used, a connection reset used the previously used encoding for the subsequent authentication operation. This failed, for example, if UCS2 was used to read the last column before the reset. (Bug #47153)
In the
MySqlDataReaderclass theGetSBytefunction returned abytevalue instead of ansbytevalue. (Bug #46620)When trying to create stored procedures from an SQL script, a
MySqlExceptionwas thrown when attempting to redefine theDELIMITER:MySql.Data.MySqlClient.MySqlException was unhandled Message="You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1" Source="MySql.Data" ErrorCode=-2147467259 Number=1064 StackTrace: à MySql.Data.MySqlClient.MySqlStream.ReadPacket() à MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) à MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() à MySql.Data.MySqlClient.MySqlDataReader.NextResult() à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) à MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() à MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() à MySql.Data.MySqlClient.MySqlScript.Execute()Note: The
MySqlScriptclass has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)The MySQL Connector/Net Profile Provider,
MySql.Web.Profile.MySQLProfileProvider, generated an error when running on Mono. When an attempt was made to save a string inProfile.Namethe string was not saved to themy_aspnet_Profilestable. If an attempt was made to force the save withProfile.Save()the following error was generated:Server Error in '/mono' Application -------------------------------------------------------------------------------- The requested feature is not implemented. Описание: HTTP 500. Error processing request. Stack Trace: System.NotImplementedException: The requested feature is not implemented. at MySql.Data.MySqlClient.MySqlConnection.EnlistTransaction (System.Transactions.Transaction transaction) [0x00000] at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] at MySql.Web.Profile.MySQLProfileProvider.SetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyValueCollection collection) [0x00000] -------------------------------------------------------------------------------- Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433(Bug #46375)
When using MySQL Connector/Net 6.0.4 and a MySQL Server 4.1 an exception was generated when trying to execute:
connection.GetSchema("Columns", ...);The exception generated was:
'connection.GetSchema("Columns")' threw an exception of type 'System.ArgumentException'System.Data.DataTable {System.ArgumentException} base{"Input string was not in a correct format.Couldn't store <'Select'> in NUMERIC_PRECISION Column. Expected type is UInt64."}System.Exception {System.ArgumentException}(Bug #46270)
The MySQL Connector/Net method
StoredProcedure.GetParameters(string)ignored the programmer's setting of theUseProcedureBodiesoption. This broke any application for which the application's parameter names did not match the parameter names in the Stored Procedure, resulting in anArgumentExceptionwith the message “Parameter 'foo' not found in the collection.” and the following stack trace:MySql.Data.dll!MySql.Data.MySqlClient.MySqlParameterCollection.GetParameterFlexible(stri ng parameterName = "pStart", bool throwOnNotFound = true) Line 459C# MySql.Data.dll!MySql.Data.MySqlClient.StoredProcedure.Resolve() Line 157 + 0x25 bytesC# MySql.Data.dll!MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(System.Data.CommandBeha vior behavior = SequentialAccess) Line 405 + 0xb bytesC# MySql.Data.dll!MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(System.Data.Comma ndBehavior behavior = SequentialAccess) Line 884 + 0xb bytesC# System.Data.dll!System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System .Data.CommandBehavior behavior) + 0xb bytes System.Data.dll!System.Data.Common.DbDataAdapter.FillInternal(System.Data.DataSet dataset = {System.Data.DataSet}, System.Data.DataTable[] datatables = null, int startRecord = 0, int maxRecords = 0, string srcTable = "Table", System.Data.IDbCommand command = {MySql.Data.MySqlClient.MySqlCommand}, System.Data.CommandBehavior behavior) + 0x83 bytes System.Data.dll!System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) + 0x120 bytes System.Data.dll!System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet dataSet) + 0x5f bytes(Bug #46213)
Conversion of MySQL
TINYINT(1)tobooleanfailed. (Bug #46205, Bug #46359, Bug #41953)If the application slept for longer than the specified
net_write_timeout, and then resumedReadoperations on a connection, then the application failed silently. (Bug #45978)When reading data, such as with a
MySqlDataAdapteron aMySqlConnection, MySQL Connector/Net could potentially enter an infinite loop inCompressedStream.ReadNextpacket()if compression was enabled. (Bug #43678)An error occurred when building MySQL Connector/Net from source code checked out from the public SVN repository. This happened on Linux using Mono and Nant. The Mono JIT compiler version was 1.2.6.0. The Nant version was 0.85.
When an attempt was made to build (for example) the MySQL Connector/Net 5.2 branch using the command:
$ nant -buildfile:Client.buildThe following error occurred:
BUILD FAILED Error loading buildfile. Encoding name 'Windows-1252' not supported. Parameter name: name(Bug #42411)
MySQL Connector/Net CHM documentation stated that MySQL Server 3.23 was supported. (Bug #42110)
Using a
DataAdapterwith a linkedMySqlCommandBuilderthe following exception was thrown when trying to callda.Update(DataRow[] rows):Connection must be valid and open
(Bug #34657)
Bugs Fixed
The
EscapeStringcode carried out escaping by callingstring.Replacemultiple times. This resulted in a performance bottleneck, as for every line a new string was allocated and another was disposed of by the garbage collector. (Bug #45699)A MySQL Connector/Net test program that connected to MySQL Server using the connection string option
compress=truecrashed, but only when running on Mono. The program worked as expected when running on Microsoft Windows.This was due to a bug in Mono. MySQL Connector/Net was modified to avoid using
WeakReferencesin theCompressedstream class, which was causing the crash. (Bug #45463)If a certain socket exception occurred when trying to establish a MySQL database connection, MySQL Connector/Net displayed an exception message that appeared to be unrelated to the underlying problem. This masked the problem and made diagnosing problems more difficult.
For example, if, when establishing a database connection using TCP/IP, Windows on the local machine allocated an ephemeral port that conflicted with a socket address still in use, then Windows/.NET would throw a socket exception with the following error text:
Only one usage of each socket address (protocol/network address/port) is normally permittedIP ADDRESS/PORT.However, MySQL Connector/Net masked this socket exception and displayed an exception with the following text:
Unable to connect to any of the specified MySQL hosts.
(Bug #45021)
The Microsoft Visual Studio solution file
MySQL-VS2005.slnwas invalid. Several projects could not be loaded and thus it was not possible to build MySQL Connector/Net from source. (Bug #44822)The MySQL Connector/Net MySQLRoleProvider reported that there were no roles, even when roles existed. (Bug #44414)
After a Reference to "C:\Program Files\MySQL\MySQL Connector Net 5.2.4\Compact Framework\MySql.Data.CF.dll" was added to a Windows Mobile 5.0 project, the project then failed to build, generating a Microsoft Visual C# compiler error.
The error generated was:
Error 2 The type 'System.Runtime.CompilerServices.CompilerGeneratedAttribute' has no constructors defined MysqlTest Error 3 Internal Compiler Error (0xc0000005 at address 5A7E3714): likely culprit is 'COMPILE'.(Bug #42261)
MySQL Connector/Net generated the following exception:
System.NullReferenceException: Object reference not set to an instance of an object. bei MySql.Data.MySqlClient.MySqlCommand.TimeoutExpired(Object commandObject) bei System.Threading._TimerCallback.TimerCallback_Context(Object state) bei System.Threading.ExecutionContext.runTryCode(Object userData) bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading._TimerCallback.PerformTimerCallback(Object state)(Bug #40005)
When a TableAdapter was created on a DataSet, it was not possible to use a stored procedure with variables. The following error was generated:
The method or operation is not implemented
(Bug #39409)
Functionality Added or Changed
A new connection string option has been added:
use affected rows. Whentruethe connection will report changed rows instead of found rows. (Bug #44194)
Bugs Fixed
Calling
GetSchema()onIndexesorIndexColumnsfailed where index or column names were restricted.In
SchemaProvider.cs, methodsGetIndexes()andGetIndexColumns()passed their restrictions directly toGetTables(). This only worked if the restrictions were no more specific thanschemaNameandtableName. IfIndexNamewas given, this was passed toGetTables()where it was treated asTableType. As a result no tables were returned, unless the index name happened to beBASE TABLEorVIEW. This meant that both methods failed to return any rows. (Bug #43991)GetSchema("MetaDataCollections")should have returned a table with a column named “NumberOfRestrictions” not “NumberOfRestriction”.This can be confirmed by referencing the Microsoft Documentation. (Bug #43990)
Requests sent to the MySQL Connector/Net role provider to remove a user from a role failed. The query log showed the query was correctly executed within a transaction which was immediately rolled back. The rollback was caused by a missing call to the
Completemethod of the transaction. (Bug #43553)When using
MySqlBulkLoader.Load(), the text file is opened byNativeDriver.SendFileToServer. If it encountered a problem opening the file as a stream, an exception was generated and caught. An attempt to clean up resources was then made in thefinally{}clause by callingfs.Close(), but since the stream was never successfully opened, this was an attempt to execute a method of a null reference. (Bug #43332)A null reference exception was generated when
MySqlConnection.ClearPool(connection)was called. (Bug #42801)MySQLMembershipProvider.ValidateUseronly used theuserIdto validate. However, it should also use theapplicationIdto perform the validation correctly.The generated query was, for example:
SELECT Password, PasswordKey, PasswordFormat, IsApproved, Islockedout FROM my_aspnet_Membership WHERE userId=13Note that
applicationIdis not used. (Bug #42574)There was an error in the
ProfileProviderclass in theprivate ProfileInfoCollection GetProfiles()function. The column of the final table was named “lastUpdatdDate” ('e' is missing) instead of the correct “lastUpdatedDate”. (Bug #41654)The
GetGuid()method ofMySqlDataReaderdid not treatBINARY(16)column data as a GUID. When operating on such a column aFormatExceptionexception was generated. (Bug #41452)When ASP.NET membership was configured to not require password question and answer using
requiresQuestionAndAnswer="false", aSqlNullValueExceptionwas generated when usingMembershipUser.ResetPassword()to reset the user password. (Bug #41408)If a
Stored Procedurecontained spaces in its parameter list, and was then called from MySQL Connector/Net, an exception was generated. However, the sameStored Procedurecalled from the MySQL Query Analyzer or the MySQL Client worked correctly.The exception generated was:
Parameter '0' not found in the collection.(Bug #41034)
The
DATETIMEformat contained an erroneous space. (Bug #41021)When
MySql.Web.Profile.MySQLProfileProviderwas configured, it was not possible to assign a name other than the default nameMySQLProfileProvider.If the name
SCC_MySQLProfileProviderwas assigned, an exception was generated when attempting to usePage.Context.Profile['custom prop'].The exception generated was:
The profile default provider was not found.
Note that the exception stated: 'the profile default provider...', even though a different name was explicitly requested. (Bug #40871)
When
ExecuteNonQuerywas called with a command type ofStored Procedureit worked for one user but resulted in a hang for another user with the same database permissions.However, if
CALLwas used in the command text andExecuteNonQuerywas used with a command type ofText, the call worked for both users. (Bug #40139)
Bugs Fixed
Visual Studio 2008 displayed the following error three times on start-up:
"Package Load Failure Package 'MySql.Data.VisualStudio.MySqlDataProviderPackage, MySql.VisualStudio, Version=5.2.4, Culture=neutral, PublicKeyToken=null' has failed to load properly (GUID = {79A115C9-B133-4891-9E7B-242509DAD272}). Please contact the package vendor for assistance. Application restart is recommended, due to possible environment corruption. Would you like to disable loading the package in the future? You may use 'devenve/resetskippkgs' to re-enable package loading."(Bug #40726)
Bugs Fixed
MySqlDataReaderdid not feature aGetSBytemethod. (Bug #40571)When working with stored procedures MySQL Connector/Net generated an exception
Unknown "table parameters" in information_schema. (Bug #40382)GetDefaultCollationandGetMaxLengthwere not thread safe. These functions called the database to get a set of parameters and cached them in two static dictionaries in the functionInitCollections. However, if many threads called them they would try to insert the same keys in the collections resulting in duplicate key exceptions. (Bug #40231)If connection pooling was not set explicitly in the connection string, MySQL Connector/Net added “;Pooling=False” to the end of the connection string when
MySqlCommand.ExecuteReader()was called.If connection pooling was explicitly set in the connection string, when
MySqlConnection.Open()was called it converted “Pooling=True” to “pooling=True”.If
MySqlCommand.ExecuteReader()was subsequently called, it concatenated “;Pooling=False” to the end of the connection string. The resulting connection string was thus terminated with “pooling=True;Pooling=False”. This disabled connection pooling completely. (Bug #40091)The connection string option
Functions Return Stringdid not set the correct encoding for the result string. Even though the connection string optionFunctions Return String=true;is set, the result ofSELECT DES_DECRYPT()contained “??” instead of the correct national character symbols. (Bug #40076)If, when using the
MySqlTransactiontransaction object, an exception was thrown, the transaction object was not disposed of and the transaction was not rolled back. (Bug #39817)After the
ConnectionStringproperty was initialized using the public setter ofDbConnectionStringBuilder, theGetConnectionStringmethod ofMySqlConnectionStringBuilderincorrectly returnednullwhentruewas assigned to theincludePassparameter. (Bug #39728)When using
ProfileProvider, attempting to update a previously saved property failed. (Bug #39330)Reading a negative time value greater than -01:00:00 returned the absolute value of the original time value. (Bug #39294)
Inserting a negative time value (negative
TimeSpan) into aTimecolumn through the use ofMySqlParametercausedMySqlExceptionto be thrown. (Bug #39275)When a data connection was created in the server explorer of Visual Studio 2008 Team, an error was generated when trying to expand stored procedures that had parameters.
Also, if TableAdapter was right-clicked and then , , selected, if you then attempted to select a stored procedure, the window would close and no error message would be displayed. (Bug #39252)
The Web Provider did not work at all on a remote host, and did not create a database when using
autogenerateschema="true". (Bug #39072)MySQL Connector/Net called hashed password methods not supported in Mono 2.0 Preview 2. (Bug #38895)
Functionality Added or Changed
Error string was returned after a 28000 second
wait_timeout. This has been changed to generate aConnectionState.Closedevent. (Bug #38119)Changed how the procedure schema collection is retrieved. If
use procedure bodies=truethen themysql.proctable is selected directly as this is up to 50 times faster than the currentinformation_schemaimplementation. Ifuse procedure bodies=false, then theinformation_schemacollection is queried. (Bug #36694)String escaping functionality has been moved from the
MySqlStringclass to theMySqlHelperclass, where it can be accessed by theEscapeStringmethod. (Bug #36205)
Bugs Fixed
The
GetOrdinal()method failed to return the ordinal if the column name string contained an accent. (Bug #38721)MySQL Connector/Net uninstaller did not clean up all installed files. (Bug #38534)
There was a short circuit evaluation error in the
MySqlCommand.CheckState()method. When the statementconnection == nullwas true aNullReferenceExceptionwas thrown and not the expectedInvalidOperationException. (Bug #38276)The provider did not silently create the user if the user did not exist. (Bug #38243)
Executing a command that resulted in a fatal exception did not close the connection. (Bug #37991)
When a prepared insert query is run that contains an
UNSIGNED TINYINTin the parameter list, the complete query and data that should be inserted is corrupted and no error is thrown. (Bug #37968)In a .NET application MySQL Connector/Net modifies the connection string so that it contains several occurrences of the same option with different values. This is illustrated by the example that follows.
The original connection string:
host=localhost;database=test;uid=*****;pwd=*****; connect timeout=25; auto enlist=false;pooling=false;The connection string after closing
MySqlDataReader:host=localhost;database=test;uid=*****;pwd=*****; connect timeout=25;auto enlist=false;pooling=false; Allow User Variables=True;Allow User Variables=False; Allow User Variables=True;Allow User Variables=False;(Bug #37955)
Unnecessary network traffic was generated for the normal case where the web provider schema was up to date. (Bug #37469)
MySqlReader.GetOrdinal()performance enhancements break existing functionality. (Bug #37239)The
autogenerateschemaoption produced tables with incorrect collations. (Bug #36444)GetSchemadid not work correctly when querying for a collection, if using a non-English locale. (Bug #35459)When reading back a stored double or single value using the .NET provider, the value had less precision than the one stored. (Bug #33322)
Using the MySQL Visual Studio plugin and a MySQL 4.1 server, certain field types (
ENUM) would not be identified correctly. Also, when looking for tables, the plugin would list all tables matching a wildcard pattern of the database name supplied in the connection string, instead of only tables within the specified database. (Bug #30603)
Bugs Fixed
Product documentation incorrectly stated '?' is the preferred parameter marker. (Bug #37349)
An incorrect value for a bit field would returned in a multi-row query if a preceding value for the field returned
NULL. (Bug #36313)Tables with
GEOMETRYfield types would return an unknown data type exception. (Bug #36081)When using the
MySQLProfileProvider, setting profile details and then reading back saved data would result in the default values being returned instead of the updated values. (Bug #36000)When creating a connection, setting the
ConnectionStringproperty ofMySqlConnectiontoNULLwould throw an exception. (Bug #35619)The
DbCommandBuilder.QuoteIdentifermethod was not implemented. (Bug #35492)When using encrypted passwords, the
GetPassword()function would return the wrong string. (Bug #35336)An error would be raised when calling
GetPassword()with aNULLvalue. (Bug #35332)When retrieving data where a field has been identified as containing a GUID value, the incorrect value would be returned when a previous row contained a
NULLvalue for that field. (Bug #35041)Using the
TableAdapter Wizardwould fail when generating commands that used stored procedures due to the change in supported parameter characters. (Bug #34941)When creating a new stored procedures, the new parameter code which permits the use of the
@symbol would interfere with the specification of aDEFINER. (Bug #34940)When using
SqlDataSourceto open a connection, the connection would not automatically be closed when access had completed. (Bug #34460)There was a high level of contention in the connection pooling code that could lead to delays when opening connections and submitting queries. The connection pooling code has been modified to try and limit the effects of the contention issue. (Bug #34001)
Using the
TableAdaptorwizard in combination with a suitableSELECTstatement, only the associatedINSERTstatement would also be created, rather than the requiredDELETEandUPDATEstatements. (Bug #31338)Fixed problem in datagrid code related to creating a new table. This problem may have been introduced with .NET 2.0 SP1.
Fixed profile provider that would throw an exception if you were updating a profile that already existed.
Bugs Fixed
When using the provider to generate or update users and passwords, the password checking algorithm would not validate the password strength or requirements correctly. (Bug #34792)
When executing statements that used stored procedures and functions, the new parameter code could fail to identify the correct parameter format. (Bug #34699)
The installer would fail to the DDEX provider binary if the Visual Studio 2005 component was not selected. The result would lead to MySQL Connector/Net not loading properly when using the interface to a MySQL server within Visual Studio. (Bug #34674)
A number of issues were identified in the case, connection and schema areas of the code for
MembershipProvider,RoleProvider,ProfileProvider. (Bug #34495)When using web providers, the MySQL Connector/Net would check the schema and cache the application id, even when the connection string had been set. The effect would be to break the membership provider list. (Bug #34451)
Attempting to use an isolation level other than the default with a transaction scope would use the default isolation level. (Bug #34448)
When altering a stored procedure within Visual Studio, the parameters to the procedure could be lost. (Bug #34359)
A race condition could occur within the procedure cache resulting the cache contents overflowing beyond the configured cache size. (Bug #34338)
Fixed problem with Visual Studio 2008 integration that caused pop-up menus on server explorer nodes to not function
The provider code has been updated to fix a number of outstanding issues.
Functionality Added or Changed
Performing
GetValue()on a fieldTINYINT(1)returned aBOOLEAN. While not a bug, this caused problems in software that expected anINTto be returned. A new connection string optionTreat Tiny As Booleanhas been added with a default value oftrue. If set tofalsethe provider will treatTINYINT(1)asINT. (Bug #34052)Added support for
DbDataAdapterUpdateBatchSize. Batching is fully supported including collapsing inserts down into the multi-value form if possible.DDEX provider now works under Visual Studio 2008 beta 2.
Added ClearPool and ClearAllPools features.
Bugs Fixed
Some speed improvements have been implemented in the
TokenizeSqlprocess used to identify elements of SQL statements. (Bug #34220)When accessing tables from different databases within the same
TransactionScope, the same user/password combination would be used for each database connection. MySQL Connector/Net does not handle multiple connections within the same transaction scope. An error is now returned if you attempt this process, instead of using the incorrect authorization information. (Bug #34204)The status of connections reported through the state change handler was not being updated correctly. (Bug #34082)
Incorporated some connection string cache optimizations sent to us by Maxim Mass. (Bug #34000)
In an open connection where the server had disconnected unexpectedly, the status information of the connection would not be updated properly. (Bug #33909)
Data cached from the connection string could return invalid information because the internal routines were not using case-sensitive semantics. This lead to updated connection string options not being recognized if they were of a different case than the existing cached values. (Bug #31433)
Column name metadata was not using the character set as defined within the connection string being used. (Bug #31185)
Memory usage could increase and decrease significantly when updating or inserting a large number of rows. (Bug #31090)
Commands executed from within the state change handeler would fail with a
NULLexception. (Bug #30964)When running a stored procedure multiple times on the same connection, the memory usage could increase indefinitely. (Bug #30116)
Using compression in the MySQL connection with MySQL Connector/Net would be slower than using native (uncompressed) communication. (Bug #27865)
The
MySqlDbType.Datetimehas been replaced withMySqlDbType.DateTime. The old format has been obsoleted. (Bug #26344)
- D.3.9.1. Changes in MySQL Connector/Net 5.1.8 (Not released)
- D.3.9.2. Changes in MySQL Connector/Net 5.1.7 (21 August 2008)
- D.3.9.3. Changes in MySQL Connector/Net 5.1.6 (12 May 2008)
- D.3.9.4. Changes in MySQL Connector/Net 5.1.5 (Not released)
- D.3.9.5. Changes in MySQL Connector/Net 5.1.4 (20 November 2007)
- D.3.9.6. Changes in MySQL Connector/Net 5.1.3 (21 September 2007, beta)
- D.3.9.7. Changes in MySQL Connector/Net 5.1.2 (18 June 2007)
- D.3.9.8. Changes in MySQL Connector/Net 5.1.1 (23 May 2007)
- D.3.9.9. Changes in MySQL Connector/Net 5.1.0 (01 May 2007)
Bugs Fixed
Calling
GetSchema()onIndexesorIndexColumnsfailed where index or column names were restricted.In
SchemaProvider.cs, methodsGetIndexes()andGetIndexColumns()passed their restrictions directly toGetTables(). This only worked if the restrictions were no more specific thanschemaNameandtableName. IfIndexNamewas given, this was passed toGetTables()where it was treated asTableType. As a result no tables were returned, unless the index name happened to beBASE TABLEorVIEW. This meant that both methods failed to return any rows. (Bug #43991)The
DATETIMEformat contained an erroneous space. (Bug #41021)If connection pooling was not set explicitly in the connection string, MySQL Connector/Net added “;Pooling=False” to the end of the connection string when
MySqlCommand.ExecuteReader()was called.If connection pooling was explicitly set in the connection string, when
MySqlConnection.Open()was called it converted “Pooling=True” to “pooling=True”.If
MySqlCommand.ExecuteReader()was subsequently called, it concatenated “;Pooling=False” to the end of the connection string. The resulting connection string was thus terminated with “pooling=True;Pooling=False”. This disabled connection pooling completely. (Bug #40091)MySQL Connector/Net generated the following exception:
System.NullReferenceException: Object reference not set to an instance of an object. bei MySql.Data.MySqlClient.MySqlCommand.TimeoutExpired(Object commandObject) bei System.Threading._TimerCallback.TimerCallback_Context(Object state) bei System.Threading.ExecutionContext.runTryCode(Object userData) bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading._TimerCallback.PerformTimerCallback(Object state)(Bug #40005)
If, when using the
MySqlTransactiontransaction object, an exception was thrown, the transaction object was not disposed of and the transaction was not rolled back. (Bug #39817)When a prepared insert query is run that contains an
UNSIGNED TINYINTin the parameter list, the complete query and data that should be inserted is corrupted and no error is thrown. (Bug #37968)Calling
MySqlDataAdapter.FillSchemaon aSELECTstatement that referred to a table that did not exist left the connection in a bad state. After this call, allSELECTstatements returned an empty result set. If theSELECTstatement referred to a table that did exist then everything worked as expected. (Bug #30518)
Bugs Fixed
There was a short circuit evaluation error in the
MySqlCommand.CheckState()method. When the statementconnection == nullwas true aNullReferenceExceptionwas thrown and not the expectedInvalidOperationException. (Bug #38276)Executing a command that resulted in a fatal exception did not close the connection. (Bug #37991)
In a .NET application MySQL Connector/Net modifies the connection string so that it contains several occurrences of the same option with different values. This is illustrated by the example that follows.
The original connection string:
host=localhost;database=test;uid=*****;pwd=*****; connect timeout=25; auto enlist=false;pooling=false;The connection string after closing
MySqlDataReader:host=localhost;database=test;uid=*****;pwd=*****; connect timeout=25;auto enlist=false;pooling=false; Allow User Variables=True;Allow User Variables=False; Allow User Variables=True;Allow User Variables=False;(Bug #37955)
As
MySqlDbType.DateTimeis not available inVB.Netthe warning The datetime enum value is obsolete was always shown during compilation. (Bug #37406)An unknown
MySqlErrorCodewas encountered when opening a connection with an incorrect password. (Bug #37398)Documentation incorrectly stated that “the DataColumn class in .NET 1.0 and 1.1 does not permit columns with type of UInt16, UInt32, or UInt64 to be autoincrement columns”. (Bug #37350)
SemaphoreFullExceptionis generated when application is closed. (Bug #36688)GetSchemadid not work correctly when querying for a collection, if using a non-English locale. (Bug #35459)When reading back a stored double or single value using the .NET provider, the value had less precision than the one stored. (Bug #33322)
Using the MySQL Visual Studio plugin and a MySQL 4.1 server, certain field types (
ENUM) would not be identified correctly. Also, when looking for tables, the plugin would list all tables matching a wildcard pattern of the database name supplied in the connection string, instead of only tables within the specified database. (Bug #30603)
Bugs Fixed
When creating a connection pool, specifying an invalid IP address will cause the entire application to crash, instead of providing an exception. (Bug #36432)
An incorrect value for a bit field would returned in a multi-row query if a preceding value for the field returned
NULL. (Bug #36313)The
MembershipProviderwill raise an exception when the connection string is configured withenablePasswordRetrival = trueandRequireQuestionAndAnswer = false. (Bug #36159)When calling
GetNumberOfUsersOnlinean exception is raised on the submitted query due to a missing parameter. (Bug #36157)Tables with
GEOMETRYfield types would return an unknown data type exception. (Bug #36081)When creating a connection, setting the
ConnectionStringproperty ofMySqlConnectiontoNULLwould throw an exception. (Bug #35619)The
DbCommandBuilder.QuoteIdentifermethod was not implemented. (Bug #35492)When using
SqlDataSourceto open a connection, the connection would not automatically be closed when access had completed. (Bug #34460)Attempting to use an isolation level other than the default with a transaction scope would use the default isolation level. (Bug #34448)
When altering a stored procedure within Visual Studio, the parameters to the procedure could be lost. (Bug #34359)
A race condition could occur within the procedure cache resulting the cache contents overflowing beyond the configured cache size. (Bug #34338)
Using the
TableAdaptorwizard in combination with a suitableSELECTstatement, only the associatedINSERTstatement would also be created, rather than the requiredDELETEandUPDATEstatements. (Bug #31338)
Functionality Added or Changed
Performing
GetValue()on a fieldTINYINT(1)returned aBOOLEAN. While not a bug, this caused problems in software that expected anINTto be returned. A new connection string optionTreat Tiny As Booleanhas been added with a default value oftrue. If set tofalsethe provider will treatTINYINT(1)asINT. (Bug #34052)
Bugs Fixed
Some speed improvements have been implemented in the
TokenizeSqlprocess used to identify elements of SQL statements. (Bug #34220)When accessing tables from different databases within the same
TransactionScope, the same user/password combination would be used for each database connection. MySQL Connector/Net does not handle multiple connections within the same transaction scope. An error is now returned if you attempt this process, instead of using the incorrect authorization information. (Bug #34204)The status of connections reported through the state change handler was not being updated correctly. (Bug #34082)
Incorporated some connection string cache optimizations sent to us by Maxim Mass. (Bug #34000)
In an open connection where the server had disconnected unexpectedly, the status information of the connection would not be updated properly. (Bug #33909)
MySQL Connector/Net would fail to compile properly with nant. (Bug #33508)
Problem with membership provider would mean that
FindUserByEmailwould fail with aMySqlExceptionbecause it was trying to add a second parameter with the same name as the first. (Bug #33347)Using compression in the MySQL connection with MySQL Connector/Net would be slower than using native (uncompressed) communication. (Bug #27865)
Bugs Fixed
Setting the size of a string parameter after the value could cause an exception. (Bug #32094)
Creation of parameter objects with noninput direction using a constructor would fail. This was cause by some old legacy code preventing their use. (Bug #32093)
A date string could be returned incorrectly by
MySqlDateTime.ToString()when the date returned by MySQL was0000-00-00 00:00:00. (Bug #32010)A syntax error in a set of batch statements could leave the data adapter in a state that appears hung. (Bug #31930)
Installing over a failed uninstall of a previous version could result in multiple clients being registered in the
machine.config. This would prevent certain aspects of the MySQL connection within Visual Studio to work properly. (Bug #31731)MySQL Connector/Net would incorrectly report success when enlisting in a distributed transaction, although distributed transactions are not supported. (Bug #31703)
Data cached from the connection string could return invalid information because the internal routines were not using case-sensitive semantics. This lead to updated connection string options not being recognized if they were of a different case than the existing cached values. (Bug #31433)
Trying to use a connection that was not open could return an ambiguous and misleading error message. (Bug #31262)
Column name metadata was not using the character set as defined within the connection string being used. (Bug #31185)
Memory usage could increase and decrease significantly when updating or inserting a large number of rows. (Bug #31090)
Commands executed from within the state change handeler would fail with a
NULLexception. (Bug #30964)Extracting data through XML functions within a query returns the data as
System.Byte[]. This was due to MySQL Connector/Net incorrectly identifyingBLOBfields as binary, rather than text. (Bug #30233)When running a stored procedure multiple times on the same connection, the memory usage could increase indefinitely. (Bug #30116)
Column types with only 1-bit (such as
BOOLEANandTINYINT(1)were not returned as boolean fields. (Bug #27959)When accessing certain statements, the command would timeout before the command completed. Because this cannot always be controlled through the individual command timeout options, a
default command timeouthas been added to the connection string options. (Bug #27958)The server error code was not updated in the
Data[]hash, which preventedDbProviderFactoryusers from accessing the server error code. (Bug #27436)The
MySqlDbType.Datetimehas been replaced withMySqlDbType.DateTime. The old format has been obsoleted. (Bug #26344)Changing the connection string of a connection to one that changes the parameter marker after the connection had been assigned to a command but before the connection is opened could cause parameters to not be found. (Bug #13991)
This is a new Beta development release, fixing recently discovered bugs.
Bugs Fixed
An incorrect
ConstraintExceptioncould be raised on anINSERTwhen adding rows to a table with a multiple-column unique key index. (Bug #30204)A
DATEfield would be updated with a date/time value, causing aMySqlDataAdapter.Update()exception. (Bug #30077)The Saudi Hijri calendar was not supported. (Bug #29931)
Calling
SHOW CREATE PROCEDUREfor routines with a hyphen in the catalog name produced a syntax error. (Bug #29526)Connecting to a MySQL server earlier than version 4.1 would raise a
NullException. (Bug #29476)The availability of a MySQL server would not be reset when using pooled connections (
pooling=true). This would lead to the server being reported as unavailable, even if the server become available while the application was still running. (Bug #29409)A
FormatExceptionerror would be raised if a parameter had not been found, instead ofResources.ParameterMustBeDefined. (Bug #29312)An exception would be thrown when using the Manage Role functionality within the web administrator to assign a role to a user. (Bug #29236)
Using the membership/role providers when
validationKeyordecryptionKeyparameters are set toAutoGenerate, an exception would be raised when accessing the corresponding values. (Bug #29235)Certain operations would not check the
UsageAdvisorsetting, causing log messages from the Usage Advisor even when it was disabled. (Bug #29124)Using the same connection string multiple times would result in
Database=appearing multiple times in the resulting string. (Bug #29123)dbnameVisual Studio Plugin: Adding a new query based on a stored procedure that uses the
SELECTstatement would terminate the query/TableAdapter wizard. (Bug #29098)Using
TransactionScopewould cause anInvalidOperationException. (Bug #28709)
This is a new Beta development release, fixing recently discovered bugs.
Bugs Fixed
Log messages would be truncated to 300 bytes. (Bug #28706)
Creating a user would fail due to the application name being set incorrectly. (Bug #28648)
Visual Studio Plugin: Adding a new query based on a stored procedure that used a
UPDATE,INSERTorDELETEstatement would terminate the query/TableAdapter wizard. (Bug #28536)Visual Studio Plugin: Query Builder would fail to show
TINYTEXTcolumns, and any columns listed after aTINYTEXTcolumn correctly. (Bug #28437)Accessing the results from a large query when using data compression in the connection would fail to return all the data. (Bug #28204)
Visual Studio Plugin: Update commands would not be generated correctly when using the TableAdapter wizard. (Bug #26347)
Bugs Fixed
Running the statement
SHOW PROCESSLISTwould return columns as byte arrays instead of native columns. (Bug #28448)Installation of the MySQL Connector/Net on Windows would fail if VisualStudio had not already been installed. (Bug #28260)
MySQL Connector/Net would look for the wrong table when executing
User.IsRole().(Bug #28251)Building a connection string within a tight loop would show slow performance. (Bug #28167)
The
UNSIGNEDflag for parameters in a stored procedure would be ignored when usingMySqlCommandBuilderto obtain the parameter information. (Bug #27679)Using
MySQLDataAdapter.FillSchema()on a stored procedure would raise an exception:Invalid attempt to access a field before calling Read(). (Bug #27668)DATETIMEfields from versions of MySQL bgefore 4.1 would be incorrectly parsed, resulting in a exception. (Bug #23342)Fixed password property on
MySqlConnectionStringBuilderto usePasswordPropertyTextattribute. This causes dots to show instead of actual password text.
Functionality Added or Changed
Now compiles for .NET CF 2.0.
Rewrote stored procedure parsing code using a new SQL tokenizer. Really nasty procedures including nested comments are now supported.
GetSchema will now report objects relative to the currently selected database. What this means is that passing in null as a database restriction will report objects on the currently selected database only.
Added Membership and Role provider contributed by Sean Wright (thanks!).
- D.3.10.1. Changes in MySQL Connector/Net 5.0.10 (Not released)
- D.3.10.2. Changes in MySQL Connector/Net 5.0.9 (Not released)
- D.3.10.3. Changes in MySQL Connector/Net 5.0.8 (21 August 2007)
- D.3.10.4. Changes in MySQL Connector/Net 5.0.7 (18 May 2007)
- D.3.10.5. Changes in MySQL Connector/Net 5.0.6 (22 March 2007)
- D.3.10.6. Changes in MySQL Connector/Net 5.0.5 (07 March 2007)
- D.3.10.7. Changes in MySQL Connector/Net 5.0.4 (Not released)
- D.3.10.8. Changes in MySQL Connector/Net 5.0.3 (05 January 2007)
- D.3.10.9. Changes in MySQL Connector/Net 5.0.2 (06 November 2006)
- D.3.10.10. Changes in MySQL Connector/Net 5.0.1 (01 October 2006)
- D.3.10.11. Changes in MySQL Connector/Net 5.0.0 (08 August 2006)
Bugs Fixed
If, when using the
MySqlTransactiontransaction object, an exception was thrown, the transaction object was not disposed of and the transaction was not rolled back. (Bug #39817)Executing a command that resulted in a fatal exception did not close the connection. (Bug #37991)
When a prepared insert query is run that contains an
UNSIGNED TINYINTin the parameter list, the complete query and data that should be inserted is corrupted and no error is thrown. (Bug #37968)In a .NET application MySQL Connector/Net modifies the connection string so that it contains several occurrences of the same option with different values. This is illustrated by the example that follows.
The original connection string:
host=localhost;database=test;uid=*****;pwd=*****; connect timeout=25; auto enlist=false;pooling=false;The connection string after closing
MySqlDataReader:host=localhost;database=test;uid=*****;pwd=*****; connect timeout=25;auto enlist=false;pooling=false; Allow User Variables=True;Allow User Variables=False; Allow User Variables=True;Allow User Variables=False;(Bug #37955)
When creating a connection pool, specifying an invalid IP address will cause the entire application to crash, instead of providing an exception. (Bug #36432)
GetSchemadid not work correctly when querying for a collection, if using a non-English locale. (Bug #35459)When reading back a stored double or single value using the .NET provider, the value had less precision than the one stored. (Bug #33322)
Bugs Fixed
The
DbCommandBuilder.QuoteIdentifermethod was not implemented. (Bug #35492)Setting the size of a string parameter after the value could cause an exception. (Bug #32094)
Creation of parameter objects with noninput direction using a constructor would fail. This was cause by some old legacy code preventing their use. (Bug #32093)
A date string could be returned incorrectly by
MySqlDateTime.ToString()when the date returned by MySQL was0000-00-00 00:00:00. (Bug #32010)A syntax error in a set of batch statements could leave the data adapter in a state that appears hung. (Bug #31930)
Installing over a failed uninstall of a previous version could result in multiple clients being registered in the
machine.config. This would prevent certain aspects of the MySQL connection within Visual Studio to work properly. (Bug #31731)Data cached from the connection string could return invalid information because the internal routines were not using case-sensitive semantics. This lead to updated connection string options not being recognized if they were of a different case than the existing cached values. (Bug #31433)
Column name metadata was not using the character set as defined within the connection string being used. (Bug #31185)
Memory usage could increase and decrease significantly when updating or inserting a large number of rows. (Bug #31090)
Commands executed from within the state change handeler would fail with a
NULLexception. (Bug #30964)When running a stored procedure multiple times on the same connection, the memory usage could increase indefinitely. (Bug #30116)
The server error code was not updated in the
Data[]hash, which preventedDbProviderFactoryusers from accessing the server error code. (Bug #27436)Changing the connection string of a connection to one that changes the parameter marker after the connection had been assigned to a command but before the connection is opened could cause parameters to not be found. (Bug #13991)
This version introduces a new installer technology.
Bugs Fixed
Extracting data through XML functions within a query returns the data as
System.Byte[]. This was due to MySQL Connector/Net incorrectly identifyingBLOBfields as binary, rather than text. (Bug #30233)An incorrect
ConstraintExceptioncould be raised on anINSERTwhen adding rows to a table with a multiple-column unique key index. (Bug #30204)A
DATEfield would be updated with a date/time value, causing aMySqlDataAdapter.Update()exception. (Bug #30077)Fixed bug where MySQL Connector/Net was hand building some date time patterns rather than using the patterns provided under CultureInfo. This caused problems with some calendars that do not support the same ranges as Gregorian.. (Bug #29931)
Calling
SHOW CREATE PROCEDUREfor routines with a hyphen in the catalog name produced a syntax error. (Bug #29526)The availability of a MySQL server would not be reset when using pooled connections (
pooling=true). This would lead to the server being reported as unavailable, even if the server become available while the application was still running. (Bug #29409)A
FormatExceptionerror would be raised if a parameter had not been found, instead ofResources.ParameterMustBeDefined. (Bug #29312)Certain operations would not check the
UsageAdvisorsetting, causing log messages from the Usage Advisor even when it was disabled. (Bug #29124)Using the same connection string multiple times would result in
Database=appearing multiple times in the resulting string. (Bug #29123)dbnameLog messages would be truncated to 300 bytes. (Bug #28706)
Accessing the results from a large query when using data compression in the connection will fail to return all the data. (Bug #28204)
Fixed problem where
MySqlConnection.BeginTransactionchecked the drivers status var before checking if the connection was open. The result was that the driver could report an invalid condition on a previously opened connection.Fixed problem where we were not closing prepared statement handles when commands are disposed. This could lead to using up all prepared statement handles on the server.
Fixed the database schema collection so that it works on servers that are not properly respecting the
lower_case_table_namessetting.Fixed problem where any attempt to not read all the records returned from a select where each row of the select is greater than 1024 bytes would hang the driver.
Fixed problem where a command timing out just after it actually finished would cause an exception to be thrown on the command timeout thread which would then be seen as an unhandled exception.
Fixed some serious issues with command timeout and cancel that could present as exceptions about thread ownership. The issue was that not all queries cancel the same. Some produce resultsets while others don't. ExecuteReader had to be changed to check for this.
Bugs Fixed
Running the statement
SHOW PROCESSLISTwould return columns as byte arrays instead of native columns. (Bug #28448)Building a connection string within a tight loop would show slow performance. (Bug #28167)
Using logging (with the
logging=trueparameter to the connection string) would not generate a log file. (Bug #27765)The
UNSIGNEDflag for parameters in a stored procedure would be ignored when usingMySqlCommandBuilderto obtain the parameter information. (Bug #27679)Using
MySQLDataAdapter.FillSchema()on a stored procedure would raise an exception:Invalid attempt to access a field before calling Read(). (Bug #27668)If you close an open connection with an active transaction, the transaction is not automatically rolled back. (Bug #27289)
When cloning an open
MySqlClient.MySqlConnectionwith thePersist Security Info=Falseoption set, the cloned connection is not usable because the security information has not been cloned. (Bug #27269)Enlisting a null transaction would affect the current connection object, such that further enlistment operations to the transaction are not possible. (Bug #26754)
Attempting to change the
Connection Protocolproperty within aPropertyGridcontrol would raise an exception. (Bug #26472)The
charactersetproperty would not be identified during a connection (also affected Visual Studion Plugin). (Bug #26147, Bug #27240)The
CreateFormatcolumn of theDataTypescollection did not contain a format specification for creating a new column type. (Bug #25947)DATETIMEfields from versions of MySQL bgefore 4.1 would be incorrectly parsed, resulting in a exception. (Bug #23342)
Bugs Fixed
Publisher listed in "Add/Remove Programs" is not consistent with other MySQL products. (Bug #27253)
DESCRIBE ....SQL statement returns byte arrays rather than data on MySQL versions older than 4.1.15. (Bug #27221)cmd.Parameters.RemoveAt("Id")will cause an error if the last item is requested. (Bug #27187)MySqlParameterCollectionand parameters added withInsertmethod can not be retrieved later usingParameterName. (Bug #27135)Exception thrown when using large values in
UInt64parameters. (Bug #27093)MySQL Visual Studio Plugin 1.1.2 does not work with MySQL Connector/Net 5.0.5. (Bug #26960)
Functionality Added or Changed
Reverted behavior that required parameter names to start with the parameter marker. We apologize for this back and forth but we mistakenly changed the behavior to not match what
SqlClientsupports. We now support using either syntax for adding parameters however we also respond exactly likeSqlClientin that if you ask for the index of a parameter using a syntax different from when you added the parameter, the result will be -1.Assembly now properly appears in the Visual Studio 2005 Add/Remove Reference dialog.
Fixed problem that prevented use of
SchemaOnlyorSingleRowcommand behaviors with stored procedures or prepared statements.Added
MySqlParameterCollection.AddWithValueand marked theAdd(name, value)method as obsolete.Return parameters created with DeriveParameters now have the name
RETURN_VALUE.Fixed problem with parameter name hashing where the hashes were not getting updated when parameters were removed from the collection.
Fixed problem with calling stored functions when a return parameter was not given.
Added
Use Procedure Bodiesconnection string option to enable calling procedures without using procedure metadata.
Bugs Fixed
MySqlConnection.GetSchemafails withNullReferenceExceptionfor Foreign Keys. (Bug #26660)MySQL Connector/Net would fail to install under Windows Vista. (Bug #26430)
Opening a connection would be slow due to host name lookup. (Bug #26152)
Incorrect values/formats would be applied when the
OldSyntaxconnection string option was used. (Bug #25950)Registry would be incorrectly populated with installation locations. (Bug #25928)
Times with negative values would be returned incorrectly. (Bug #25912)
Returned data types of a
DataTypescollection do not contain the right correct CLR data type. (Bug #25907)GetSchemaandDataTypeswould throw an exception due to an incorrect table name. (Bug #25906)MySqlConnectionthrows an exception when connecting to MySQL v4.1.7. (Bug #25726)SELECTdid not work correctly when using aWHEREclause containing a UTF-8 string. (Bug #25651)When closing and then re-opening a connection to a database, the character set specification is lost. (Bug #25614)
Filling a table schema through a stored procedure triggers a runtime error. (Bug #25609)
BINARYandVARBINARYcolumns would be returned as a string, not binary, data type. (Bug #25605)A critical
ConnectionPoolerror would result in repeatedSystem.NullReferenceException. (Bug #25603)The
UpdateRowSource.FirstReturnedRecordmethod does not work. (Bug #25569)When connecting to a MySQL Server earlier than version 4.1, the connection would hang when reading data. (Bug #25458)
Using
ExecuteScalar()with more than one query, where one query fails, will hang the connection. (Bug #25443)When a
MySqlConversionExceptionis raised on a remote object, the client application would receive aSerializationExceptioninstead. (Bug #24957)When connecting to a server, the return code from the connection could be zero, even though the host name was incorrect. (Bug #24802)
High CPU utilization would be experienced when there is no idle connection waiting when using pooled connections through
MySqlPool.GetConnection. (Bug #24373)MySQL Connector/Net would not compile properly when used with Mono 1.2. (Bug #24263)
Applications would crash when calling with
CommandTypeset toStoredProcedure.
This is a new Beta development release, fixing recently discovered bugs.
Version 5.0.4 has no changelog entries.
Functionality Added or Changed
Usage Advisor has been implemented. The Usage Advisor checks your queries and will report if you are using the connection inefficiently.
PerfMon hooks have been added to monitor the stored procedure cache hits and misses.
The
MySqlCommandobject now supports asynchronous query methods. This is implemented useg theBeginExecuteNonQueryandEndExecuteNonQuerymethods.Metadata from storaed procedures and stored function execution are cached.
The
CommandBuilder.DeriveParametersfunction has been updated to the procedure cache.The
ViewColumnsGetSchemacollection has been updated.Improved speed and performance by re-architecting certain sections of the code.
Support for the embedded server and client library have been removed from this release. Support will be added back to a later release.
The ShapZipLib library has been replaced with the deflate support provided within .NET 2.0.
SSL support has been updated.
Bugs Fixed
Additional text added to error message (Bug #25178)
An exception would be raised, or the process would hang, if
SELECTprivileges on a database were not granted and a stored procedure was used. (Bug #25033)When adding parameter objects to a command object, if the parameter direction is set to
ReturnValuebefore the parameter is added to the command object then when the command is executed it throws an error. (Bug #25013)Using
Driver.IsTooOld()would return the wrong value. (Bug #24661)When using a
DbNull.Valueas the value for a parameter value, and then later setting a specific value type, the command would fail with an exception because the wrong type was implied from theDbNull.Value. (Bug #24565)Stored procedure executions are not thread safe. (Bug #23905)
Deleting a connection to a disconnected server when using the Visual Studio Plugin would cause an assertion failure. (Bug #23687)
Nested transactions (which are unsupported)do not raise an error or warning. (Bug #22400)
Functionality Added or Changed
An
Ignore Prepareoption has been added to the connection string options. If enabled, prepared statements will be disabled application-wide. The default for this option is true.Implemented a stored procedure cache. By default, the connector caches the metadata for the last 25 procedures that are seen. You can change the numbver of procedures that are cacheds by using the
procedure cacheconnection string.Important change: Due to a number of issues with the use of server-side prepared statements, MySQL Connector/Net 5.0.2 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string properties:
ignore prepare=false
The default value of this property is true.
Bugs Fixed
One system where IPv6 was enabled, MySQL Connector/Net would incorrectly resolve host names. (Bug #23758)
Column names with accented characters were not parsed properly causing malformed column names in result sets. (Bug #23657)
An exception would be thrown when calling
GetSchemaTableandfieldswas null. (Bug #23538)A
System.FormatExceptionexception would be raised when invoking a stored procedure with anENUMinput parameter. (Bug #23268)During installation, an antivirus error message would be raised (indicating a malicious script problem). (Bug #23245)
Creating a connection through the Server Explorer when using the Visual Studio Plugin would fail. The installer for the Visual Studio Plugin has been updated to ensure that MySQL Connector/Net 5.0.2 must be installed. (Bug #23071)
Using Windows Vista (RC2) as a nonprivileged user would raise a
Registry key 'Global' access denied. (Bug #22882)Within Mono, using the
PreparedStatementinterface could result in an error due to aBitArraycopying error. (Bug #18186)MySQL Connector/Net did not work as a data source for the
SqlDataSourceobject used by ASP.NET 2.0. (Bug #16126)
Bugs Fixed
MySQL Connector/Net on a Turkish operating system, may fail to execute certain SQL statements correctly. (Bug #22452)
Starting a transaction on a connection created by
MySql.Data.MySqlClient.MySqlClientFactory, usingBeginTransactionwithout specifying an isolation level, causes the SQL statement to fail with a syntax error. (Bug #22042)The
MySqlexceptionclass is now derived from theDbExceptionclass. (Bug #21874)The
#would not be accepted within column/table names, even though it was valid. (Bug #21521)You can now install the MySQL Connector/Net MSI package from the command line using the
/passive,/quiet,/qoptions. (Bug #19994)Submitting an empty string to a command object through
prepareraises anSystem.IndexOutOfRangeException, rather than a MySQL Connector/Net exception. (Bug #18391)Incorrect field/data lengths could be returned for
VARCHARUTF8 columns. (Bug #14592)Using
ExecuteScalarwith a datetime field, where the value of the field is "0000-00-00 00:00:00", aMySqlConversionExceptionexception would be raised. (Bug #11991)An
MySql.Data.Types.MySqlConversionExceptionwould be raised when trying to update a row that contained a date field, where the date field contained a zero value (0000-00-00 00:00:00). (Bug #9619)Executing multiple queries as part of a transaction returns
There is already an openDataReader associated with this Connection which must be closed first. (Bug #7248)
Functionality Added or Changed
Replaced use of ICSharpCode with .NET 2.0 internal deflate support.
Refactored test suite to test all protocols in a single pass.
Added usage advisor warnings for requesting column values by the wrong type.
Reimplemented PacketReader/PacketWriter support into
MySqlStreamclass.Reworked connection string classes to be simpler and faster.
Added procedure metadata caching.
Added internal implemention of SHA1 so we don't have to distribute the OpenNetCF on mobile devices.
Implemented
MySqlClientFactoryclass.Added perfmon hooks for stored procedure cache hits and misses.
Implemented classes and interfaces for ADO.Net 2.0 support.
Added Async query methods.
Implemented Usage Advisor.
Completely refactored how column values are handled to avoid boxing in some cases.
Implemented
MySqlConnectionBuilderclass.
Bugs Fixed
CommandText: Question mark in comment line is being parsed as a parameter. (Bug #6214)
- D.3.11.1. Changes in MySQL Connector/Net 1.0.11 (Not released)
- D.3.11.2. Changes in MySQL Connector/Net 1.0.10 (24 August 2007)
- D.3.11.3. Changes in MySQL Connector/Net 1.0.9 (02 February 2007)
- D.3.11.4. Changes in MySQL Connector/Net 1.0.8 (20 October 2006)
- D.3.11.5. Changes in MySQL Connector/Net 1.0.7 (21 November 2005)
- D.3.11.6. Changes in MySQL Connector/Net 1.0.6 (03 October 2005)
- D.3.11.7. Changes in MySQL Connector/Net 1.0.5 (29 August 2005)
- D.3.11.8. Changes in MySQL Connector/Net 1.0.4 (20 January 2005)
- D.3.11.9. Changes in MySQL Connector/Net 1.0.3 (12 October 2004, gamma)
- D.3.11.10. Changes in MySQL Connector/Net 1.0.2 (15 November 2004, gamma)
- D.3.11.11. Changes in MySQL Connector/Net 1.0.1 (27 October 2004, beta)
- D.3.11.12. Changes in MySQL Connector/Net 1.0.0 (01 September 2004)
Bugs Fixed
Attempting to utilize MySQL Connector .Net version 1.0.10 throws a fatal exception under Mono when pooling is enabled. (Bug #33682)
Setting the size of a string parameter after the value could cause an exception. (Bug #32094)
Creation of parameter objects with noninput direction using a constructor would fail. This was cause by some old legacy code preventing their use. (Bug #32093)
Memory usage could increase and decrease significantly when updating or inserting a large number of rows. (Bug #31090)
Commands executed from within the state change handeler would fail with a
NULLexception. (Bug #30964)Extracting data through XML functions within a query returns the data as
System.Byte[]. This was due to MySQL Connector/Net incorrectly identifyingBLOBfields as binary, rather than text. (Bug #30233)Using compression in the MySQL connection with MySQL Connector/Net would be slower than using native (uncompressed) communication. (Bug #27865)
Changing the connection string of a connection to one that changes the parameter marker after the connection had been assigned to a command but before the connection is opened could cause parameters to not be found. (Bug #13991)
Bugs Fixed
An incorrect
ConstraintExceptioncould be raised on anINSERTwhen adding rows to a table with a multiple-column unique key index. (Bug #30204)The availability of a MySQL server would not be reset when using pooled connections (
pooling=true). This would lead to the server being reported as unavailable, even if the server become available while the application was still running. (Bug #29409)Publisher listed in "Add/Remove Programs" is not consistent with other MySQL products. (Bug #27253)
MySqlParameterCollectionand parameters added withInsertmethod can not be retrieved later usingParameterName. (Bug #27135)BINARYandVARBINARYcolumns would be returned as a string, not binary, data type. (Bug #25605)A critical
ConnectionPoolerror would result in repeatedSystem.NullReferenceException. (Bug #25603)When a
MySqlConversionExceptionis raised on a remote object, the client application would receive aSerializationExceptioninstead. (Bug #24957)High CPU utilization would be experienced when there is no idle connection waiting when using pooled connections through
MySqlPool.GetConnection. (Bug #24373)
Functionality Added or Changed
The ICSharpCode ZipLib is no longer used by the Connector, and is no longer distributed with it.
Important change: Binaries for .NET 1.0 are no longer supplied with this release. If you need support for .NET 1.0, you must build from source.
Improved
CommandBuilder.DeriveParametersto first try and use the procedure cache before querying for the stored procedure metadata. Return parameters created withDeriveParametersnow have the nameRETURN_VALUE.An
Ignore Prepareoption has been added to the connection string options. If enabled, prepared statements will be disabled application-wide. The default for this option is true.Implemented a stored procedure cache. By default, the connector caches the metadata for the last 25 procedures that are seen. You can change the numbver of procedures that are cacheds by using the
procedure cacheconnection string.Important change: Due to a number of issues with the use of server-side prepared statements, MySQL Connector/Net 5.0.2 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string properties:
ignore prepare=false
The default value of this property is true.
Bugs Fixed
Times with negative values would be returned incorrectly. (Bug #25912)
MySqlConnectionthrows aNullReferenceExceptionandArgumentNullExceptionwhen connecting to MySQL v4.1.7. (Bug #25726)SELECTdid not work correctly when using aWHEREclause containing a UTF-8 string. (Bug #25651)When closing and then re-opening a connection to a database, the character set specification is lost. (Bug #25614)
Trying to fill a table schema through a stored procedure triggers a runtime error. (Bug #25609)
Using
ExecuteScalar()with more than one query, where one query fails, will hang the connection. (Bug #25443)Additional text added to error message. (Bug #25178)
When adding parameter objects to a command object, if the parameter direction is set to
ReturnValuebefore the parameter is added to the command object then when the command is executed it throws an error. (Bug #25013)When connecting to a server, the return code from the connection could be zero, even though the host name was incorrect. (Bug #24802)
Using
Driver.IsTooOld()would return the wrong value. (Bug #24661)When using a
DbNull.Valueas the value for a parameter value, and then later setting a specific value type, the command would fail with an exception because the wrong type was implied from theDbNull.Value. (Bug #24565)Stored procedure executions are not thread safe. (Bug #23905)
The
CommandBuilderwould mistakenly add insert parameters for a table column with auto incrementation enabled. (Bug #23862)One system where IPv6 was enabled, MySQL Connector/Net would incorrectly resolve host names. (Bug #23758)
An
System.OverflowExceptionwould be raised when accessing a varchar field over 255 bytes. (Bug #23749)Nested transactions do not raise an error or warning. (Bug #22400)
Within Mono, using the
PreparedStatementinterface could result in an error due to aBitArraycopying error. (Bug #18186)
Functionality Added or Changed
Stored procedures are now cached.
The method for retrieving stored procedure metadata has been changed so that users without
SELECTprivileges on themysql.proctable can use a stored procedure.
Bugs Fixed
MySQL Connector/Net on a Turkish operating system, may fail to execute certain SQL statements correctly. (Bug #22452)
The
#would not be accepted within column/table names, even though it was valid. (Bug #21521)Calling
Closeon a connection after calling a stored procedure would trigger aNullReferenceException. (Bug #20581)You can now install the MySQL Connector/Net MSI package from the command line using the
/passive,/quiet,/qoptions. (Bug #19994)The DiscoverParameters function would fail when a stored procedure used a
NUMERICparameter type. (Bug #19515)When running a query that included a date comparison, a DateReader error would be raised. (Bug #19481)
IDataRecord.GetStringwould raiseNullPointerExceptionfor null values in returned rows. Method now throwsSqlNullValueException. (Bug #19294)Parameter substitution in queries where the order of parameters and table fields did not match would substitute incorrect values. (Bug #19261)
Submitting an empty string to a command object through
prepareraises anSystem.IndexOutOfRangeException, rather than a MySQL Connector/Net exception. (Bug #18391)An exception would be raised when using an output parameter to a
System.Stringvalue. (Bug #17814)CHAR type added to MySqlDbType. (Bug #17749)
A
SELECTquery on a table with a date with a value of'0000-00-00'would hang the application. (Bug #17736)The CommandBuilder ignored Unsigned flag at Parameter creation. (Bug #17375)
When working with multiple threads, character set initialization would generate errors. (Bug #17106)
When using an unsigned 64-bit integer in a stored procedure, the unsigned bit would be lost stored. (Bug #16934)
DataReaderwould show the value of the previous row (or last row with nonnull data) if the current row contained adatetimefield with a null value. (Bug #16884)Unsigned data types were not properly supported. (Bug #16788)
The connection string parser did not permit single or double quotation marks in the password. (Bug #16659)
The
MySqlDateTimeclass did not contain constructors. (Bug #15112)Called
MySqlCommandBuilder.DeriveParametersfor a stored procedure that has no paramers would cause an application crash. (Bug #15077)Incorrect field/data lengths could be returned for
VARCHARUTF8 columns. (Bug #14592)Using
ExecuteScalarwith a datetime field, where the value of the field is "0000-00-00 00:00:00", aMySqlConversionExceptionexception would be raised. (Bug #11991)An
MySql.Data.Types.MySqlConversionExceptionwould be raised when trying to update a row that contained a date field, where the date field contained a zero value (0000-00-00 00:00:00). (Bug #9619)When using
MySqlDataAdapter, connections to a MySQL server may remain open and active, even though the use of the connection has been completed and the data received. (Bug #8131)Executing multiple queries as part of a transaction returns
There is already an openDataReader associated with this Connection which must be closed first. (Bug #7248)
Bugs Fixed
Unsigned
tinyint(NET byte) would lead to and incorrectly determined parameter type from the parameter value. (Bug #18570)A
#42000Query was emptyexception occurred when executing a query built withMySqlCommandBuilder, if the query string ended with a semicolon. (Bug #14631)The parameter collection object's
Add()method added parameters to the list without first checking to see whether they already existed. Now it updates the value of the existing parameter object if it exists. (Bug #13927)Added support for the
cp932character set. (Bug #13806)Calling a stored procedure where a parameter contained special characters (such as
'@') would produce an exception. Note thatANSI_QUOTEShad to be enabled to make this possible. (Bug #13753)The
Ping()method did not update theStateproperty of theConnectionobject. (Bug #13658)Implemented the
MySqlCommandBuilder.DeriveParametersmethod that is used to discover the parameters for a stored procedure. (Bug #13632)A statement that contained multiple references to the same parameter could not be prepared. (Bug #13541)
Bugs Fixed
MySQL Connector/Net 1.0.5 could not connect on Mono. (Bug #13345)
Serializing a parameter failed if the first value passed in was
NULL. (Bug #13276)Field names that contained the following characters caused errors:
()%<>/(Bug #13036)The
nantbuild sequence had problems. (Bug #12978)The MySQL Connector/Net 1.0.5 installer would not install alongside MySQL Connector/Net 1.0.4. (Bug #12835)
Bugs Fixed
MySQL Connector/Net could not connect to MySQL 4.1.14. (Bug #12771)
With multiple hosts in the connection string, MySQL Connector/Net would not connect to the last host in the list. (Bug #12628)
The
ConnectionStringproperty could not be set when aMySqlConnectionobject was added with the designer. (Bug #12551, Bug #8724)The
cp1250character set was not supported. (Bug #11621)A call to a stored procedure caused an exception if the stored procedure had no parameters. (Bug #11542)
Certain malformed queries would trigger a
Connection must be valid and openerror message. (Bug #11490)Trying to use a stored procedure when
Connection.Databasewas not populated generated an exception. (Bug #11450)MySQL Connector/Net interpreted the new decimal data type as a byte array. (Bug #11294)
Added support to call a stored function from MySQL Connector/Net. (Bug #10644)
Connection could fail when .NET thread pool had no available worker threads. (Bug #10637)
Calling
MySqlConnection.clonewhen a connection string had not yet been set on the original connection would generate an error. (Bug #10281)Decimal parameters caused syntax errors. (Bug #10152, Bug #11550, Bug #10486)
Parameters were not recognized when they were separated by linefeeds. (Bug #9722)
The
MySqlCommandBuilderclass could not handle queries that referenced tables in a database other than the default database. (Bug #8382)Trying to read a
TIMESTAMPcolumn generated an exception. (Bug #7951)MySQL Connector/Net could not work properly with certain regional settings. (WL#8228)
Bugs Fixed
MySqlReader.GetInt32throws exception if column is unsigned. (Bug #7755)Quote character \222 not quoted in
EscapeString. (Bug #7724)GetBytes is working no more. (Bug #7704)
MySqlDataReader.GetString(index)returns non-Null value when field isNull. (Bug #7612)Clone method bug in
MySqlCommand. (Bug #7478)Problem with Multiple resultsets. (Bug #7436)
MySqlAdapter.Fillmethod throws error messageNon-negative number required. (Bug #7345)MySqlCommand.Connectionreturns an IDbConnection. (Bug #7258)Calling prepare causing exception. (Bug #7243)
Fixed problem with shared memory connections.
Added or filled out several more topics in the API reference documentation.
Fixed another small problem with prepared statements.
Fixed problem that causes named pipes to not work with some blob functionality.
Bugs Fixed
Invalid query string when using inout parameters (Bug #7133)
Inserting
DateTimecausesSystem.InvalidCastExceptionto be thrown. (Bug #7132)MySqlDateTimein Datatables sorting by Text, not Date. (Bug #7032)Exception stack trace lost when re-throwing exceptions. (Bug #6983)
Ошибки in parsing stored procedure parameters. (Bug #6902)
InvalidCast when using
DATE_ADD-function. (Bug #6879)Int64 Support in
MySqlCommandParameters. (Bug #6863)Test suite fails with MySQL 4.0 because of case sensitivity of table names. (Bug #6831)
MySqlDataReader.GetChar(int i)throwsIndexOutOfRangeexception. (Bug #6770)Integer "out" parameter from stored procedure returned as string. (Bug #6668)
An Open Connection has been Closed by the Host System. (Bug #6634)
Fixed Invalid character set index: 200. (Bug #6547)
Connections now do not have to give a database on the connection string.
Installer now includes options to install into GAC and create items.
Fixed major problem with detecting null values when using prepared statements.
Fixed problem where multiple resultsets having different numbers of columns would cause a problem.
Added
ServerThreadproperty toMySqlConnectionto expose server thread id.Added Ping method to
MySqlConnection.Changed the name of the test suite to
MySql.Data.Tests.dll.Now
SHOW COLLATIONis used upon connection to retrieve the full list of charset ids.Made MySQL the default named pipe name.
Bugs Fixed
Fixed Objects not being disposed (Bug #6649)
Fixed Charset-map for UCS-2 (Bug #6541)
Fixed Zero date "0000-00-00" is returned wrong when filling Dataset (Bug #6429)
Fixed double type handling in MySqlParameter(string parameterName, object value). (Bug #6428)
Fixed Installation directory ignored using custom installation (Bug #6329)
Fixed #HY000 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ (Bug #6322)
Added the TableEditor CS and VB sample
Added charset connection string option
Fixed problem with MySqlBinary where string values could not be used to update extended text columns
Provider is now using character set specified by server as default
Updated the installer to include the new samples
Fixed problem where setting command text leaves the command in a prepared state
Fixed Long inserts take very long time (Bu #5453)
Fixed problem where calling stored procedures might cause an "Illegal mix of collations" problem.
Bugs Fixed
Fixed IndexOutOfBounds when reading
BLOBwithDataReaderwithGetString(index). (Bug #6230)Fixed GetBoolean returns wrong values (Bug #6227)
Fixed Method TokenizeSql() uses only a limited set of valid characters for parameters (Bug #6217)
Fixed NET Connector source missing resx files (Bug #6216)
Fixed System.OverflowException when using
YEARdata type. (Bug #6036)Fixed MySqlDateTime sets IsZero property on all subseq.records after first zero found (Bug #6006)
Fixed serializing of floating point parameters (double, numeric, single, decimal) (Bug #5900)
Fixed missing Reference in DbType setter (Bug #5897)
Fixed Parsing the ';' char (Bug #5876)
Fixed DBNull Values causing problems with retrieving/updating queries. (Bug #5798)
IsNullable error (Bug #5796)
Fixed problem where MySqlParameterCollection.Add() would throw unclear exception when given a null value (Bug #5621)
Fixed constructor initialize problems in MySqlCommand() (Bug #5613)
Possible bug in MySqlParameter(string, object) constructor (Bug #5602)
Fixed Yet Another "object reference not set to an instance of an object" (Bug #5496)
Cannot run a stored procedure populating mysqlcommand.parameters (Bug #5474)
Setting
DbTypethrew aNullReferenceException. (Bug #5469)Calling
GetCharson aLONGTEXTcolumn threw an exception. (Bug #5458)MySqlCommandsaw instances of"?"as parameters in string literals. (Bug #5392)DataReaderreported all rows asNULLif one row wasNULL. (Bug #5388)Fixed Can't display Chinese correctly (Bug #5288)
Fixed MySqlDataReader and 'show tables from ...' behavior (Bug #5256)
Fixed problem in PacketReader where it could try to allocate the wrong buffer size in EnsureCapacity
Fixed problem where using old syntax while using the interfaces caused problems
Added test case for resetting the command text on a prepared command
Fixed problem where connection lifetime on the connect string was not being respected
Field buffers being reused to decrease memory allocations and increase speed
Added Aggregate function test (wasn't really a bug)
Using PacketWriter instead of Packet for writing to streams
Implemented SequentialAccess
Fixed problem with ConnectionInternal where a key might be added more than once
Fixed Russian character support as well
Fixed problem where connector was not issuing a CMD_QUIT before closing the socket
Fixed problem where Min Pool Size was not being respected
Refactored compression code into CompressedStream to clean up NativeDriver
CP1252 is now used for Latin1 only when the server is 4.1.2 and later
Virtualized driver subsystem so future releases could easily support client or embedded server support
Bugs Fixed
Thai encoding not correctly supported. (Bug #3889)
Bumped version number to 1.0.0 for beta 1 release.
Removed all of the XML comment warnings.
Added
COPYING.rtffile for use in installer.Updated many of the test cases.
Fixed problem with using compression.
Removed some last references to ByteFX.
Added test fixture for prepared statements.
All type classes now implement a
SerializeBinarymethod for sending their data to aPacketWriter.Added
PacketWriterclass that will enable future low-memory large object handling.Fixed many small bugs in running prepared statements and stored procedures.
Changed command so that an exception will not be thrown in executing a stored procedure with parameters in old syntax mode.
SingleRowbehavior now working right even with limit.GetBytesnow only works on binary columns.Logger now truncates long SQL commands so blob columns do not blow out our log.
Host and database now have a default value of "" unless otherwise set.
Connection Timeout seems to be ignored. (Bug #5214)
Added test case for bug# 5051: GetSchema not working correctly.
Fixed problem where
GetSchemawould return false forIsUniquewhen the column is key.MySqlDataReader GetXXXmethods now using the field levelMySqlValueobject and not performing conversions.DataReaderreturningNULLfor time column. (Bug #5097)Added test case for
LOAD DATA LOCAL INFILE.Added replacetext custom nant task.
Added
CommandBuilderTestfixture.Added Last One Wins feature to
CommandBuilder.Fixed persist security info case problem.
Fixed
GetBoolso that 1, true, "true", and "yes" all count as true.Make parameter mark configurable.
Added the "old syntax" connection string parameter to enable use of @ parameter marker.
MySqlCommandBuilder. (Bug #4658)ByteFX.MySqlClientcaches passwords ifPersist Security Infois false. (Bug #4864)Updated license banner in all source files to include FLOSS exception.
Added new .Types namespace and implementations for most current MySql types.
Added
MySqlField41as a subclass ofMySqlField.Changed many classes to now use the new .Types types.
Changed type
enum inttoInt32,shorttoInt16, andbiginttoInt64.Added dummy types
UInt16,UInt32, andUInt64to allow an unsigned parameter to be made.Connections are now reset when they are pulled from the connection pool.
Refactored auth code in driver so it can be used for both auth and reset.
Added
UserResettest inPoolingTests.cs.Connections are now reset using
COM_CHANGE_USERwhen pulled from the pool.Implemented
SingleResultSetbehavior.Implemented support of unicode.
Added char set mappings for utf-8 and ucs-2.
Time fields overflow using bytefx .net mysql driver (Bug #4520)
Modified time test in data type test fixture to check for time spans where hours > 24.
Wrong string with backslash escaping in
ByteFx.Data.MySqlClient.MySqlParameter. (Bug #4505)Added code to Parameter test case TestQuoting to test for backslashes.
MySqlCommandBuilderfails with multi-word column names. (Bug #4486)Fixed bug in
TokenizeSqlwhere underscore would terminate character capture in parameter name.Added test case for spaces in column names.
MySqlDataReader.GetBytesdo not work correctly. (Bug #4324)Added
GetBytes()test case toDataReadertest fixture.Now reading all server variables in
InternalConnection.ConfigureintoHashtable.Now using
string[]for index map inCharSetMap.Added CRInSQL test case for carriage returns in SQL.
Setting maxPacketSize to default value in
Driver.ctor.Setting
MySqlDbTypeon a parameter doesn't set generic type. (Bug #4442)Removed obsolete data types
LongandLongLong.Overflow exception thrown when using "use pipe" on connection string. (Bug #4071)
Changed "use pipe" keyword to "pipe name" or just "pipe".
Enable reading multiple resultsets from a single query.
Added flags attribute to
ServerStatusFlagsenum.Changed name of
ServerStatusenum toServerStatusFlags.Inserted data row doesn't update properly.
Error processing show create table. (Bug #4074)
Change
Packet.ReadLenIntegertoReadPackedLongand addedpacket.ReadPackedIntegerthat always reads integers packed with 2,3,4.Added
syntax.cstest fixture to test various SQL syntax bugs.Improper handling of time values. Now time value of 00:00:00 is not treated as null. (Bug #4149)
Moved all test suite files into
TestSuitefolder.Fixed bug where null column would move the result packet pointer backward.
Added new nant build script.
Clear tablename so it will be regen'ed properly during the next
GenerateSchema. (Bug #3917)GetValueswas always returning zero and was also always trying to copy all fields rather than respecting the size of the array passed in. (Bug #3915)Implemented shared memory access protocol.
Implemented prepared statements for MySQL 4.1.
Implemented stored procedures for MySQL 5.0.
Renamed
MySqlInternalConnectiontoInternalConnection.SQL is now parsed as chars, fixes problems with other languages.
Added logging and allow batch connection string options.
RowUpdatingevent not set when setting theDataAdapterproperty. (Bug #3888)Fixed bug in char set mapping.
Implemented 4.1 authentication.
Improved open/auth code in driver.
Improved how connection bits are set during connection.
Database name is now passed to server during initial handshake.
Changed namespace for client to
MySql.Data.MySqlClient.Changed assembly name of client to
MySql.Data.dll.Changed license text in all source files to GPL.
Added the
MySqlClient.buildNant file.Removed the mono batch files.
Moved some of the unused files into notused folder so nant build file can use wildcards.
Implemented shared memory access.
Major revamp in code structure.
Prepared statements now working for MySql 4.1.1 and later.
Finished implementing auth for 4.0, 4.1.0, and 4.1.1.
Changed namespace from
MySQL.Data.MySQLClientback toMySql.Data.MySqlClient.Fixed bug in
CharSetMappingwhere it was trying to use text names as ints.Changed namespace to
MySQL.Data.MySQLClient.Integrated auth changes from UC2004.
Fixed bug where calling any of the GetXXX methods on a datareader before or after reading data would not throw the appropriate exception (thanks Luca Morelli).
Added
TimeSpancode in parameter.cs to properly serialize a timespan object to mysql time format (thanks Gianluca Colombo).Added
TimeStampto parameter serialization code. PreventedDataAdapterupdates from working right (thanks Michael King).Fixed a misspelling in
MySqlHelper.cs(thanks Patrick Kristiansen).
Driver now using charset number given in handshake to create encoding.
Changed command editor to point to
MySqlClient.Design.Fixed bug in
Version.isAtLeast.Changed
DBConnectionStringto support changes done toMySqlConnectionString.Removed
SqlCommandEditorandDataAdapterPreviewDialog.Using new long return values in many places.
Integrated new
CompressedStreamclass.Changed
ConnectionStringand added attributes to permit it to be used inMySqlClient.Design.Changed
packet.csto support newer lengths inReadLenInteger.Changed other classes to use new properties and fields of
MySqlConnectionString.ConnectionInternalis now using PING to see whether the server is available.Moved toolbox bitmaps into resource folder.
Changed
field.csto permit values to come directly from row buffer.Changed to use the new driver.Send syntax.
Using a new packet queueing system.
Started work handling the "broken" compression packet handling.
Fixed bug in
StreamCreatorwhere failure to connect to a host would continue to loop infinitely (thanks Kevin Casella).Improved connectstring handling.
Moved designers into Pro product.
Removed some old commented out code from
command.cs.Fixed a problem with compression.
Fixed connection object where an exception throw prior to the connection opening would not leave the connection in the connecting state (thanks Chris Cline).
Added GUID support.
Fixed sequence out of order bug (thanks Mark Reay).
Enum values now supported as parameter values (thanks Philipp Sumi).
Year data type now supported.
Fixed compression.
Fixed bug where a parameter with a
TimeSpanas the value would not serialize properly.Fixed bug where default constructor would not set default connection string values.
Added some XML comments to some members.
Work to fix/improve compression handling.
Improved
ConnectionStringhandling so that it better matches the standard set bySqlClient.A
MySqlExceptionis now thrown if a user name is not included in the connection string.Localhost is now used as the default if not specified on the connection string.
An exception is now thrown if an attempt is made to set the connection string while the connection is open.
Small changes to
ConnectionStringdocs.Removed
MultiHostStreamandMySqlStream. Replaced it withCommon/StreamCreator.Added support for Use Pipe connection string value.
Added Platform class for easier access to platform utility functions.
Fixed small pooling bug where new connection was not getting created after
IsAlivefails.Added
Platform.csandStreamCreator.cs.Fixed
Field.csto properly handle 4.1 style timestamps.Changed
Common.VersiontoCommon.DBVersionto avoid name conflict.Fixed
field.csso that text columns return the right field type.Added
MySqlErrorclass to provide some reference for error codes (thanks Geert Veenstra).
Added Unix socket support (thanks Mohammad DAMT).
Only calling
Thread.Sleepwhen no data is available.Improved escaping of quote characters in parameter data.
Removed misleading comments from
parameter.cs.Fixed pooling bug.
Fixed
ConnectionStringeditor dialog (thanks marco p (pomarc)).UserIdnow supported in connection strings (thanks Jeff Neeley).Attempting to create a parameter that is not input throws an exception (thanks Ryan Gregg).
Added much documentation.
Checked in new
MultiHostStreamcapability. Big thanks to Dan Guisinger for this. he originally submitted the code and idea of supporting multiple machines on the connect string.Added a lot of documentation.
Fixed speed issue with 0.73.
Changed to Thread.Sleep(0) in MySqlDataStream to help optimize the case where it doesn't need to wait (thanks Todd German).
Prepopulating the idlepools to
MinPoolSize.Fixed
MySqlPooldeadlock condition as well as stupid bug where CreateNewPooledConnection was not ever adding new connections to the pool. Also fixedMySqlStream.ReadBytesandReadByteto not useTicksPerSecondwhich does not appear to always be right. (thanks Matthew J. Peddlesden)Fix for precision and scale (thanks Matthew J. Peddlesden).
Added
Thread.Sleep(1)to stream reading methods to be more cpu friendly (thanks Sean McGinnis).Fixed problem where
ExecuteReaderwould sometime return null (thanks Lloyd Dupont).Fixed major bug with null field handling (thanks Naucki).
Enclosed queries for
max_allowed_packetandcharactersetinside try catch (and set defaults).Fixed problem where socket was not getting closed properly (thanks Steve!).
Fixed problem where
ExecuteNonQuerywas not always returning the right value.Fixed
InternalConnectionto not use@@session.max_allowed_packetbut use@@max_allowed_packet. (Thanks Miguel)Added many new XML doc lines.
Fixed SQL parsing to not send empty queries (thanks Rory).
Fixed problem where the reader was not unpeeking the packet on close.
Fixed problem where user variables were not being handled (thanks Sami Vaaraniemi).
Fixed loop checking in the MySqlPool (thanks Steve M. Brown)
Fixed
ParameterCollection.Addmethod to matchSqlClient(thanks Joshua Mouch).Fixed
ConnectionStringparsing to handle no and yes for boolean and not lowercase values (thanks Naucki).Added
InternalConnectionclass, changes to pooling.Implemented Persist Security Info.
Added
security.csandversion.csto projectFixed
DateTimehandling inParameter.cs(thanks Burkhard Perkens-Golomb).Fixed parameter serialization where some types would throw a cast exception.
Fixed
DataReaderto convert all returned values to prevent casting errors (thanks Keith Murray).Added code to
Command.ExecuteReaderto return null if the initial SQL statement throws an exception (thanks Burkhard Perkens-Golomb).Fixed
ExecuteScalarbug introduced with restructure.Restructure to permit
LOCAL DATA INFILEand better sequencing of packets.Fixed several bugs related to restructure.
Early work done to support more secure passwords in MySQL 4.1. Old passwords in 4.1 not supported yet.
Parameters appearing after system parameters are now handled correctly (Adam M. (adammil)).
Strings can now be assigned directly to blob fields (Adam M.).
Fixed float parameters (thanks Pent).
Improved Parameter constructor and
ParameterCollection.Addmethods to better match SqlClient (thanks Joshua Mouch).Corrected
Connection.CreateCommandto return aMySqlCommandtype.Fixed connection string designer dialog box problem (thanks Abraham Guyt).
Fixed problem with sending commands not always reading the response packet (thanks Joshua Mouch).
Fixed parameter serialization where some blobs types were not being handled (thanks Sean McGinnis).
Removed spurious
MessageBox.showfromDataReadercode (thanks Joshua Mouch).Fixed a nasty bug in the split SQL code (thanks everyone!).
Fixed bug in
MySqlStreamwhere too much data could attempt to be read (thanks Peter Belbin)Implemented
HasRows(thanks Nash Pherson).Fixed bug where tables with more than 252 columns cause an exception (thanks Joshua Kessler).
Fixed bug where SQL statements ending in ; would cause a problem (thanks Shane Krueger).
Fixed bug in driver where error messages were getting truncated by 1 character (thanks Shane Krueger).
Made
MySqlExceptionserializable (thanks Mathias Hasselmann).
Updated some of the character code pages to be more accurate.
Fixed problem where readers could be opened on connections that had readers open.
Moved test to separate assembly
MySqlClientTests.Fixed stupid problem in driver with sequence out of order (Thanks Peter Belbin).
Added some pipe tests.
Increased default max pool size to 50.
Compiles with Mono 0-24.
Fixed connection and data reader dispose problems.
Added
Stringdata type handling to parameter serialization.Fixed sequence problem in driver that occurred after thrown exception (thanks Burkhard Perkens-Golomb).
Added support for
CommandBehavior.SingleRowtoDataReader.Fixed command SQL processing so quotation marks are better handled (thanks Theo Spears).
Fixed parsing of double, single, and decimal values to account for non-English separators. You still have to use the right syntax if you using hard coded SQL, but if you use parameters the code will convert floating point types to use '.' appropriately internal both into the server and out.
Added
MySqlStreamclass to simplify timeouts and driver coding.Fixed
DataReaderso that it is closed properly when the associated connection is closed. [thanks smishra]Made client more SqlClient compliant so that DataReaders have to be closed before the connection can be used to run another command.
Improved
DBNull.Valuehandling in the fields.Added several unit tests.
Fixed
MySqlExceptionbase class.Improved driver coding
Fixed bug where NextResult was returning false on the last resultset.
Added more tests for MySQL.
Improved casting problems by equating unsigned 32bit values to Int64 and unsigned 16bit values to Int32, and so forth.
Added new constructor for
MySqlParameterfor (name, type, size, srccol)Fixed bug in
MySqlDataReaderwhere it didn't check for null fieldlist before returning field count.Started adding
MySqlClientunit tests (addedMySqlClient/Testsfolder and some test cases).Fixed some things in Connection String handling.
Moved
INIT_DBtoMySqlPool. I may move it again, this is in preparation of the conference.Fixed bug inside
CommandBuilderthat prevented inserts from happening properly.Reworked some of the internals so that all three execute methods of Command worked properly.
Fixed many small bugs found during benchmarking.
The first cut of
CoonectionPoolingis working. "min pool size" and "max pool size" are respected.Work to enable multiple resultsets to be returned.
Character sets are handled much more intelligently now. The driver queries MySQL at startup for the default character set. That character set is then used for conversions if that code page can be loaded. If not, then the default code page for the current OS is used.
Added code to save the inferred type in the name,value constructor of
Parameter.Also, inferred type if value of null parameter is changed using
Valueproperty.Converted all files to use proper Camel case. MySQL is now MySql in all files. PgSQL is now PgSql.
Added attribute to PgSql code to prevent designer from trying to show.
Added
MySQLDbTypeproperty to Parameter object and added proper conversion code to convert fromDbTypetoMySQLDbType).Removed unused
ObjectToStringmethod fromMySQLParameter.cs.Fixed
Add(..)method inParameterCollectionso that it doesn't useAdd(name, value)instead.Fixed
IndexOfandContainsinParameterCollectionto be aware that parameter names are now stored without @.Fixed
Command.ConvertSQLToBytesso it only permits characters that can be in MySQL variable names.Fixed
DataReaderandFieldso that blob fields read their data fromField.csandGetBytesworks right.Added simple query builder editor to
CommandTextproperty ofMySQLCommand.Fixed
CommandBuilderandParameterserialization to account for Parameters not storing @ in their names.Removed
MySQLFieldTypeenum from Field.cs. Now usingMySQLDbTypeenum.Added
Designerattribute to several classes to prevent designer view when using VS.Net.Fixed Initial catalog typo in
ConnectionStringdesigner.Removed 3 parameter constructor for
MySQLParameterthat conflicted with (name, type, value).Changed
MySQLParametersoparamNameis now stored without leading @ (this fixed null inserts when using designer).Changed
TypeConverterforMySQLParameterto use the constructor with all properties.
Fixed sequence issue in driver.
Added
DbParametersEditorto make parameter editing more likeSqlClient.Fixed
Commandclass so that parameters can be edited using the designerUpdate connection string designer to support
Use Compressionflag.Fixed string encoding so that European characters will work correctly.
Creating base classes to aid in building new data providers.
Added support for UID key in connection string.
Field, parameter, command now using DBNull.Value instead of null.
CommandBuilderusingDBNull.Value.CommandBuildernow builds insert command correctly when an auto_insert field is not present.Field now uses typeof keyword to return
System.Types(performance).
MySQLCommandBuildernow implemented.Transaction support now implemented (not all table types support this).
GetSchemaTablefixed to not use xsd (for Mono).Driver is now Mono-compatible.
TIME data type now supported.
More work to improve Timestamp data type handling.
Changed signatures of all classes to match corresponding
SqlClientclasses.
Protocol compression using SharpZipLib (www.icsharpcode.net).
Named pipes on Windows now working properly.
Work done to improve
Timestampdata type handling.Implemented
IEnumerableonDataReadersoDataGridwould work.
As of Connector/Net 5.1.2 (14 June 2007), the Visual Studion Plugin is part of the main Connector/Net package. For the change history for the Visual Studio Plugin, see Section D.3, “MySQL Connector/Net Change History”.
Bugs Fixed
Running queries based on a stored procedure would cause the data set designer to terminate. (Bugs #26364)
DataSet wizard would show all tables instead of only the tables available within the selected database. (Bugs #26348)
Bugs Fixed
The Add Connection dialog of the Server Explorer would freeze when accessing databases with capitalized characters in their name. (Bug #24875)
Creating a connection through the Server Explorer when using the Visual Studio Plugin would fail. The installer for the Visual Studio Plugin has been updated to ensure that Connector/Net 5.0.2 must be installed. (Bug #23071)
This is a bug fix release to resolve an incompatibility issue with Connector/Net 5.0.1.
It is critical that this release only be used with Connector/Net
5.0.1. After installing Connector/Net 5.0.1, you will need to
make a small change in your machine.config file. This file
should be located at
%win%\Microsoft.Net\Framework\v2.0.50727\CONFIG\machine.config
(%win% should be the location of your Windows
folder). Near the bottom of the file you will see a line like
this:
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data"/>
It needs to be changed to be like this:
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.0.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
Version 1.0.1 has no changelog entries.
- D.5.1.1. Changes in MySQL Connector/J 5.1.18 (04 October 2011)
- D.5.1.2. Changes in MySQL Connector/J 5.1.17 (07 July 2011)
- D.5.1.3. Changes in MySQL Connector/J 5.1.16 (Not released)
- D.5.1.4. Changes in MySQL Connector/J 5.1.15 (09 February 2011)
- D.5.1.5. Changes in MySQL Connector/J 5.1.14 (6th December 2010)
- D.5.1.6. Changes in MySQL Connector/J 5.1.13 (24 June 2010)
- D.5.1.7. Changes in MySQL Connector/J 5.1.12 (18 February 2010)
- D.5.1.8. Changes in MySQL Connector/J 5.1.11 (21 January 2010)
- D.5.1.9. Changes in MySQL Connector/J 5.1.10 (23 September 2009)
- D.5.1.10. Changes in MySQL Connector/J 5.1.9 (21 September 2009)
- D.5.1.11. Changes in MySQL Connector/J 5.1.8 (16 July 2009)
- D.5.1.12. Changes in MySQL Connector/J 5.1.7 (21 October 2008)
- D.5.1.13. Changes in MySQL Connector/J 5.1.6 (07 March 2008)
- D.5.1.14. Changes in MySQL Connector/J 5.1.5 (09 October 2007)
- D.5.1.15. Changes in MySQL Connector/J 5.1.4 (Not Released)
- D.5.1.16. Changes in MySQL Connector/J 5.1.3 (10 September 2007)
- D.5.1.17. Changes in MySQL Connector/J 5.1.2 (29 June 2007)
- D.5.1.18. Changes in MySQL Connector/J 5.1.1 (22 June 2007)
- D.5.1.19. Changes in MySQL Connector/J 5.1.0 (11 April 2007)
Fixes bugs found since release 5.1.17.
Functionality Added or Changed
Added the function
MYSQL_INDEX_TO_MYSQL_CHARSETto retrieve the server charset name, using an index instead of parsing variables toCharsetMapping.java
Bugs Fixed
The
LRUCacheimplementation removed the eldest entry, rather than the least-recently accessed. (Bug #13036537)Changed
cacheCallableStatementstocacheCallableStmtsinmaxPerformance.properties, to allow proper caching. (Bug #13036309)Added a new
antflag,com.mysql.jdbc.junit.fork, which controls whetherJUnitwill fork new processes.The value
on: The default, and legacy behavior. Oroff): Required for Windows, as otherwiseprocess fork failureerrors will result while running the test suite viaanton Windows. (Bug #12784170)Not putting a space between
VALUES()andON DUPLICATE KEY UPDATEcauses connector/J to both (A) Rewrite the query, although it includes anON UPDATEstatment and (B) To generate the wrong query with multipleON DUPLICATE KEYstatements. (Bug #12565726)The
loadBalanceBlacklistTimeoutoption was not functioning properly. Working connections were not being removed from the blacklist. (Bug #63135)The "old" warnings were returned when
Statement.getWarnings()was called afterStatement.clearWarnings(). (Bug #61866, Bug #12791594)Connector/J now guards against the condition where a call to
KILL QUERYwill kill the next query issued by the server, if no query is in process. (Bug #61501)Calling
Statement.cancel()on a statement that isn't currently executing, will cause a later-executed query on the same connection to be unexpectedly canceled. The driver now guards against this condition, but it is an underlying server issue. The MySQL statementKILL QUERY(which is what the driver uses to implementStatement.cancel()) is rather non-deterministic, and thus the use ofStatement.cancel()should be avoided if possible. (Bug #61501)A connection could not be established when the URL contained both
sessionVariablesandcharacterEncoding. (Bug #61201, Bug #12649557)Reverting changes made to
ConnectionImpl.java, theprivate boolean characterSetNamesMatchesfunction.
Fixes bugs found since release 5.1.16.
Bugs Fixed
LIKEwas not optimized in then server when run againstINFORMATION_SCHEMAtables and no wildcards were used. Databases/tables with'_'or'%'in their names (escaped or not) are handled by this code path, although slower, since it is rare to find these characters in table names in SQL. If there is a'_'or'%'in the string,LIKEtakes care of that; otherwise,'='is now used instead. The only exception is theinformation_schemadatabase, which is handled separately. The patch covers bothgetTables()andgetColumns(). (Bug #61332)The first call to a stored procedure failed with “No Database Selected”. The workaround introduced in
DatabaseMetaData.getCallStmtParameterTypesto fix the server bug whereSHOW CREATE PROCEDUREwas not respecting lowercase table names was misbehaving when the connection was not attached to a database and on case-insensitive operating systems. (Bug #61150)There was a concurrency bottleneck in Java's character set encoding/decoding when converting bytes to/from
Stringvalues.ImportantNo longer use
String.getBytes(...), ornew String(byte[]...). Use theStringUtilsmethod instead.(Bug #61105)
Fixes bugs found since release 5.1.15.
Functionality Added or Changed
The
Connection.isServerLocal()method can now determine if a connection is against a server on the same host.
Bugs Fixed
When auto-reconnect was used with
cacheServerConfiguration, errors could occur when the host changed (in an HA setup, for example). (Bug #12325877)DBMD.getTablesandgetColumnsfail with table names that contain a dot (like "junk_[Sp:e,c/ C-h+a=.r]"). The workaround is to useuseInformationSchema=True. (Bug #11782297)ResultSetRow.getTimestampFastandgetTimehad invalid offsets. (Bug #60313)Fixed a timestamp offset bug in
com.mysql.jdbc.ResultSetRow.getTimestampFast(). (Bug #60313, Bug #11890729)wasNullwas not set for aDATEfield with the value of0000-00-00ingetDate(), althoughzeroDateTimeBehavioris defined asconvertToNull. (Bug #57808)A bypassing of the server protocol bug, where the DB should be null-terminated whether it exists or not. This affects
COM_CHANGE_USER. (Bug #54425)Fixed a bug where Connector/J would kill the matching
ConnectionID, but on the wrong server. (Bug #54135)
Fixes bugs found since release 5.1.14.
Bugs Fixed
Optional logging class
com.mysql.jdbc.log.Log4JLoggerwas not included in the source/binary package for 5.1.14.5.1.15 will ship with an SLF4J logger (which can then be plugged into Log4J). Unfortunately, it is not possible to ship a direct Log4J integration because the GPL is not compatible with Log4J's license. (Bug #59511, Bug #11766408)
The hard-coded list of reserved words in Connector/J was not updated to reflect the list of reserved words in MySQL Server 5.5. (Bug #59224)
MySqlProcedure accepted null arguments as parameters, however the JDBC meta data did not indicate that. (Bug #38367, Bug #11749186)
Using Connector/J to connect from a z/OS machine to a MySQL Server failed when the database name to connect to was included in the connection URL. This was because the name was sent in z/OS default platform encoding, but the MySQL Server expected Latin1.
It should be noted that when connecting from systems that do not use Latin1 as the default platform encoding, the following connection string options can be useful:
passwordCharacterEncoding=ASCIIandcharacterEncoding=ASCII. (Bug #18086, Bug #11745647)
Fixes bugs found since release 5.1.13.
Functionality Added or Changed
Connector/J's load-balancing functionality only allowed the following events to trigger failover:
Transaction commit/rollback
CommunicationExceptions
Matches to user-defined Exceptions using the loadBalanceSQLStateFailover, loadBalanceSQLExceptionSubclassFailover or loadBalanceExceptionChecker property.
This meant that connections where auto-commit was enabled were not balanced, except for Exceptions, and this was problematic in the case of distribution of read-only work across slaves in a replication deployment.
The ability to load-balance while auto-commit is enabled has now been added to Connector/J. This introduces two new properties:
loadBalanceAutoCommitStatementThreshold - defines the number of matching statements which will trigger the driver to (potentially) swap physical server connections. The default value (0) retains the previously-established behavior that connections with auto-commit enabled are never balanced.
loadBalanceAutoCommitStatementRegex - the regular expression against which statements must match. The default value (blank) matches all statements.
Load-balancing will be done after the statement is executed, before control is returned to the application. If rebalancing fails, the driver will silently swallow the resulting Exception (as the statement itself completed successfully). (Bug #55723)
Bugs Fixed
Connection failover left slave/secondary in read-only mode. Failover attempts between two read-write masters did not properly set
this.currentConn.setReadOnly(false). (Bug #58706)Connector/J mapped both 3-byte and 4-byte UTF8 encodings to the same Java UTF8 encoding.
To use 3-byte UTF8 with Connector/J set
characterEncoding=utf8and setuseUnicode=truein the connection string.To use 4-byte UTF8 with Connector/J configure the MySQL server with
character_set_server=utf8mb4. Connector/J will then use that setting as long ascharacterEncodinghas not been set in the connection string. This is equivalent to autodetection of the character set. (Bug #58232)The
CallableStatementRegressiontest suite failed with a Null Pointer Exception because theOUTparameter in theI__S.PARAMETERStable had no name, that isCOLUMN_NAMEhad the valueNULL. (Bug #58232)DatabaseMetaData.supportsMultipleResultSets()was hard-coded to returnfalse, even though Connector/J supports multiple result sets. (Bug #57380)Using the
useOldUTF8Behaviorparameter failed to set the connection character set tolatin1as required.In versions prior to 5.1.3, the handshake was done using
latin1, and while there was logic in place to explicitly set the character set after the handshake was complete, this was bypassed whenuseOldUTF8Behaviorwas true. This was not a problem until 5.1.3, when the handshake was modified to useutf8, but the logic continued to allow the character set configured during that handshake process to be retained for later use. As a result,useOldUTF8Behavioreffectively failed. (Bug #57262)Invoking a stored procedure containing output parameters by its full name, where the procedure was located in another database, generated the following exception:
Parameter index of 1 is out of range (1, 0)
(Bug #57022)
When a JDBC client disconnected from a remote server using
Connection.close(), the TCP connection remained in theTIME_WAITstate on the server side, rather than on the client side. (Bug #56979)Leaving Trust/ClientCertStoreType properties unset caused an exception to be thrown when connecting with
useSSL=true, as no default was used. (Bug #56955)When load-balanced connections swap servers, certain session state was copied from the previously active connection to the newly-selected connection. State synchronized included:
Auto-commit state
Transaction isolation state
Current schema/catalog
However, the read-only state was not synchronized, which caused problems if a write was attempted on a read-only connection. (Bug #56706)
When using Connector/J configured for failover (jdbc:mysql://host1,host2,... URLs), the non-primary servers re-balanced when the transactions on the master were committed or rolled-back. (Bug #56429)
An unhandled Null Pointer Exception (NPE) was generated in
DatabaseMetaData.javawhen calling an incorrectly cased function name where no permission to accessmysql.procwas available.In addition to catching potential NPEs, a guard against calling JDBC functions with
db_name.proc_namenotation was also added. (Bug #56305)Added diagnostic information to
SQLExceptionmessages that are caused by usage of a closed load-balanced connection, to help clarify the root cause of a connection closure. (Bug #56200)Attempting to use JDBC4 functions on
Connectionobjects resulted in errors being generated:Exception in thread "main" java.lang.AbstractMethodError: com.mysql.jdbc.LoadBalancedMySQLConnection.createBlob()Ljava/sql/Blob; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.mysql.jdbc.LoadBalancingConnectionProxy.invoke(LoadBalancingConnectionProxy.java:476) at $Proxy0.createBlob(Unknown Source)
(Bug #56099)
Fixes bugs found since release 5.1.12.
Functionality Added or Changed
Connector/J did not support
utf8mb4for servers 5.5.2 and newer.Connector/J now auto-detects servers configured with
character_set_server=utf8mb4or treats the Java encodingutf-8passed usingcharacterEncoding=...asutf8mb4in theSET NAMES=calls it makes when establishing the connection. (Bug #54175)
Bugs Fixed
The method
unSafeStatementInterceptors()contained an erroneous line of code, which resulted in the interceptor being called, but the result being thrown away. (Bug #53041)There was a performance regression of roughly 25% between r906 and r907, which appeared to be caused by pushing the Proxy down to the I/O layer. (Bug #52534)
Logic in implementations of
LoadBalancingConnectionProxyandLoadBalanceStrategybehaved differently as to whichSQLExceptions trigger failover to a new host. The former looked at the first two characters of the SQLState:if (sqlState.startsWith("08")) ...The latter used a different test:
if (sqlEx instanceof CommunicationsException || "08S01".equals(sqlEx.getSQLState())) { ...This meant it was possible for a new
Connectionobject to throw anExceptionwhen the first selected host was unavailable. This happened becauseMySqlIO.createNewIO()could throw anSQLExceptionwith aSQLStateof “08001”, which did not trigger the “try another host” logic in theLoadBalanceStrategyimplementations, so anExceptionwas thrown after having only attempted connecting to a single host. (Bug #52231)In the file
DatabaseMetadata.java, the functionprivate void getCallStmtParameterTypesfailed if the parameter was defined over more than one line by using the '\n' character. (Bug #52167)The catalog parameter,
PARAM_CAT, was not correctly processed when calling for metadata withgetMetaData()on stored procedures. This was becausePARAM_CATwas hardcoded in the code toNULL. In the case wherenullcatalogmeanscurrentwastrue, which is its default value, a crash did not occur, but the metadata returned was for the stored procedures from the catalog currently attached to. If, however,nullcatalogmeanscurrentwas set tofalsethen a crash resulted.Connector/J has been changed so that when
NULLis passed asPARAM_CATit will not crash whennullcatalogmeanscurrentisfalse, but rather iterate all catalogs in search of stored procedures. This means thatPARAM_CATis no longer hardcoded toNULL(see Bug #51904). (Bug #51912)A load balanced
Connectionobject with multiple open underlying physical connections rebalanced oncommit(),rollback(), or on a communication exception, without validating the existing connection. This caused a problem when there was no pinging of the physical connections, using queries starting with “/* ping */”, to ensure they remained active. This meant that calls toConnection.commit()could throw aSQLException. This did not occur when the transaction was actually committed; it occurred when the new connection was chosen and the driver attempted to set the auto-commit or transaction isolation state on the newly chosen physical connection. (Bug #51783)The
rollback()method could fail to rethrow aSQLExceptionif the server became unavailable during a rollback. The errant code only rethrew whenignoreNonTxTableswas true and the exception did not have the error code 1196,SQLError.ER_WARNING_NOT_COMPLETE_ROLLBACK. (Bug #51776)When the
allowMultiQueriesconnection string option was set totrue, a call toStatement.executeBatch()scanned the query for escape codes, even thoughsetEscapeProcessing(false)had been called previously. (Bug #51704)When a
StatementInterceptorwas used and an alternateResultSetwas returned frompreProcess(), the original statement was still executed. (Bug #51666)Objects created by
ConnectionImpl, such as prepared statements, hold a reference to theConnectionImplthat created them. However, when the load balancer picked a new connection, it did not update the reference contained in, for example, thePreparedStatement. This resulted in inserts and updates being directed to invalid connections, while commits were directed to the new connection. This resulted in silent data loss. (Bug #51643)jdbc:mysql:loadbalance://would connect to the same host, even thoughloadBalanceStrategywas set to a value ofrandom, and multiple hosts were specified. (Bug #51266)An unexpected exception when trying to register
OUTparameters inCallableStatement.Sometimes Connector/J was not able to register
OUTparameters forCallableStatements. (Bug #43576)
Fixes bugs found since release 5.1.11.
Bugs Fixed
The catalog parameter was ignored in the
DatabaseMetaData.getProcedure()method. It returned all procedures in all databases. (Bug #51022)A call to
DatabaseMetaData.getDriverVersion()returned the revision asmysql-connector-java-5.1.11 ( Revision: ${svn.Revision} ). The variable${svn.Revision}was not replaced by the SVN revision number. (Bug #50288)
Fixes bugs found since release 5.1.10.
Functionality Added or Changed
Replication connections, those with URLs that start with jdbc:mysql:replication, now use a jdbc:mysql:loadbalance connection for the slave pool. This means that it is possible to set load balancing properties such as
loadBalanceBlacklistTimeoutandloadBalanceStrategyto choose a mechanism for balancing the load, and failover or fault tolerance strategy for the slave pool. (Bug #49537)
Bugs Fixed
NullPointerExceptionsometimes occurred ininvalidateCurrentConnection()for load-balanced connections. (Bug #50288)The
deleteRowmethod caused a full table scan, when using an updatable cursor and a multibyte character set. (Bug #49745)For pooled connections, Connector/J did not process the session variable
time_zonewhen set using the URL, resulting in incorrect timestamp values being stored. (Bug #49700)The
ExceptionInterceptorclass did not provide aConnectioncontext. (Bug #49607)Ping left closed connections in the liveConnections map, causing subsequent Exceptions when that connection was used. (Bug #48605)
Using
MysqlConnectionPoolDataSourcewith a load-balanced URL generated exceptions of typeClassCastException:ClassCastException in MysqlConnectionPoolDataSource Caused by: java.lang.ClassCastException: $Proxy0 at com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource.getPooledConnection(MysqlConne ctionPoolDataSource.java:80)
java.lang.ClassCastException: $Proxy2 at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeQuery(StatementWrapper.java:744)
(Bug #48486)
The implementation for load-balanced
Connectionused a proxy, which delegated method calls, includingequals()andhashCode(), to underlyingConnectionobjects. This meant that successive calls tohashCode()on the same object potentially returned different values, if the proxy state had changed such that it was utilizing a different underlying connection. (Bug #48442)The batch rewrite functionality attempted to identify the start of the
VALUESlist by looking for “VALUES ” (with trailing space). However, valid MySQL syntax permitsVALUESto be followed by whitespace or an opening parenthesis:INSERT INTO tbl VALUES (1); INSERT INTO tbl VALUES(1);
Queries written with the above formats did not therefore gain the performance benefits of the batch rewrite. (Bug #48172)
A PermGen memory leaked was caused by the Connector/J statement cancellation timer (
java.util.Timer). When the application was unloaded the cancellation timer did not terminate, preventing the ClassLoader from being garbage collected. (Bug #36565)With the connection string option
noDatetimeStringSyncset totrue, and server-side prepared statements enabled, the following exception was generated if an attempt was made to obtain, usingResultSet.getString(), a datetime value containing all zero components:java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date
(Bug #32525)
Fixes bugs found since release 5.1.9.
Bugs Fixed
The
DriverManager.getConnection()method ignored a non-standard port if it was specified in the JDBC connection string. Connector/J always used the standard port 3306 for connection creation. For example, if the string wasjdbc:mysql://localhost:6777, Connector/J would attempt to connect to port 3306, rather than 6777. (Bug #47494)
Bugs Fixed
In the class
com.mysql.jdbc.jdbc2.optional.SuspendableXAConnection, which is used whenpinGlobalTxToPhysicalConnection=true, there is a static map (XIDS_TO_PHYSICAL_CONNECTIONS) that tracks the Xid with the XAConnection, however this map was not populated. The effect was that theSuspendableXAConnectionwas never pinned to the real XA connection. Instead it created new connections on calls tostart,end,resume, andprepare. (Bug #46925)When using the ON DUPLICATE KEY UPDATE functionality together with the rewriteBatchedStatements option set to true, an exception was generated when trying to execute the prepared statement:
INSERT INTO config_table (modified,id_) VALUES (?,?) ON DUPLICATE KEY UPDATE modified=?
The exception generated was:
java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2). at com.sag.etl.job.processors.JdbcInsertProcessor.flush(JdbcInsertProcessor.java:135) ...... Caused by: java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2). at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3657) at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3641) at com.mysql.jdbc.PreparedStatement.setBytesNoEscapeNoQuotes(PreparedStatement.java:3391) at com.mysql.jdbc.PreparedStatement.setOneBatchedParameterSet(PreparedStatement.java:4203) at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1759) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1441) at com.sag.etl.job.processors.JdbcInsertProcessor.flush(JdbcInsertProcessor.java:131) ... 16 more
(Bug #46788)
When Connector/J encountered an error condition that caused it to create a
CommunicationsException, it tried to build a friendly error message that helped diagnose what was wrong. However, if there had been no network packets received from the server, the error message contained the following incorrect text:The last packet successfully received from the server was 1,249,932,468,916 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
(Bug #46637)
The
getSuperTypesmethod returned a result set with incorrect names for the first two columns. The name of the first column in the result set was expected to beTYPE_CATand that of the second columnTYPE_SCHEM. The method however returned the names asTABLE_CATandTABLE_SCHEMfor first and second column respectively. (Bug #44508)SQLException for data truncation error gave the error code as 0 instead of 1265. (Bug #44324)
Calling
ResultSet.deleteRow()on a table with a primary key of typeBINARY(8)silently failed to delete the row, but only in some repeatable cases. The generatedDELETEstatement generated corrupted part of the primary key data. Specifically, one of the bytes was changed from 0x90 to 0x9D, although the corruption appeared to be different depending on whether the application was run on Windows or Linux. (Bug #43759)Accessing result set columns by name after the result set had been closed resulted in a NullPointerException instead of a SQLException. (Bug #41484)
QueryTimeoutdid not work for batch statements waiting on a locked table.When a batch statement was issued to the server and was forced to wait because of a locked table, Connector/J only terminated the first statement in the batch when the timeout was exceeded, leaving the rest hanging. (Bug #34555)
The
parseURLmethod in classcom.mysql.jdbc.Driverdid not work as expected. When given a URL such as “jdbc:mysql://www.mysql.com:12345/my_database” to parse, the propertyPORT_PROPERTY_KEYwas found to benulland theHOST_PROPERTY_KEYproperty was found to be “www.mysql.com:12345”.ЗамечаниеConnector/J has been fixed so that it will now always fill in the
PORTproperty (using 3306 if not specified), and theHOSTproperty (usinglocalhostif not specified) whenparseURL()is called. The driver also parses a list of hosts intoHOST.nandPORT.nproperties as well as adding a propertyNUM_HOSTSfor the number of hosts it has found. If a list of hosts is passed to the driver,HOSTandPORTwill be set to the values given byHOST.1andPORT.1respectively. This change has centralized and cleaned up a large section of code used to generate lists of hosts, both for load-balanced and fault tolerant connections and their tests.(Bug #32216)
Attempting to delete rows using
ResultSet.deleteRow()did not delete rows correctly. (Bug #27431)The
setDatemethod silently ignored the Calendar parameter. The code was implemented as follows:public void setDate(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException { setDate(parameterIndex, x); }From reviewing the code it was apparent that the Calendar parameter
calwas ignored. (Bug #23584)
Bugs Fixed
The reported milliseconds since the last server packets were received/sent was incorrect by a factor of 1000. For example, the following method call:
SQLError.createLinkFailureMessageBasedOnHeuristics( (ConnectionImpl) this.conn, System.currentTimeMillis() - 1000, System.currentTimeMillis() - 2000, e, false);
returned the following string:
The last packet successfully received from the server was 2 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago.
(Bug #45419)
Calling
Connection.serverPrepareStatement()variants that do not take result set type or concurrency arguments returned statements that produced result sets with incorrect defaults, namelyTYPE_SCROLL_SENSITIVE. (Bug #45171)The result set returned by
getIndexInfo()did not have the format defined in the JDBC API specifications. The fourth column,DATA_TYPE, of the result set should be of typeBOOLEAN. Connector/J however returnsCHAR. (Bug #44869)The result set returned by
getTypeInfo()did not have the format defined in the JDBC API specifications. The second column,DATA_TYPE, of the result set should be of typeINTEGER. Connector/J however returnsSMALLINT. (Bug #44868)The
DEFERRABILITYcolumn in database metadata result sets was expected to be of typeSHORT. However, Connector/J returned it asINTEGER.This affected the following methods:
getImportedKeys(),getExportedKeys(),getCrossReference(). (Bug #44867)The result set returned by
getColumns()did not have the format defined in the JDBC API specifications. The fifth column,DATA_TYPE, of the result set should be of typeINTEGER. Connector/J however returnsSMALLINT. (Bug #44865)The result set returned by
getVersionColumns()did not have the format defined in the JDBC API specifications. The third column,DATA_TYPE, of the result set should be of typeINTEGER. Connector/J however returnsSMALLINT. (Bug #44863)The result set returned by
getBestRowIdentifier()did not have the format defined in the JDBC API specifications. The third column,DATA_TYPE, of the result set should be of typeINTEGER. Connector/J however returnsSMALLINT. (Bug #44862)Connector/J contains logic to generate a message text specifically for streaming result sets when there are
CommunicationsExceptionexceptions generated. However, this code was never reached.In the
CommunicationsExceptioncode:private boolean streamingResultSetInPlay = false; public CommunicationsException(ConnectionImpl conn, long lastPacketSentTimeMs, long lastPacketReceivedTimeMs, Exception underlyingException) { this.exceptionMessage = SQLError.createLinkFailureMessageBasedOnHeuristics(conn, lastPacketSentTimeMs, lastPacketReceivedTimeMs, underlyingException, this.streamingResultSetInPlay);streamingResultSetInPlaywas always false, which in the following code inSQLError.createLinkFailureMessageBasedOnHeuristics()never being executed:if (streamingResultSetInPlay) { exceptionMessageBuf.append( Messages.getString("CommunicationsException.ClientWasStreaming")); //$NON-NLS-1$ } else { ...(Bug #44588)
The
SQLError.createLinkFailureMessageBasedOnHeuristics()method created a message text for communication link failures. When certain conditions were met, this message included both “last packet sent” and “last packet received” information, but when those conditions were not met, only “last packet sent” information was provided.Information about when the last packet was successfully received should be provided in all cases. (Bug #44587)
Statement.getGeneratedKeys()retained result set instances until the statement was closed. This caused memory leaks for long-lived statements, or statements used in tight loops. (Bug #44056)Using
useInformationSchemawithDatabaseMetaData.getExportedKeys()generated the following exception:com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'REFERENCED_TABLE_NAME' in where clause is ambiguous ... at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1772) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1923) at com.mysql.jdbc.DatabaseMetaDataUsingInfoSchema.executeMetadataQuery( DatabaseMetaDataUsingInfoSchema.java:50) at com.mysql.jdbc.DatabaseMetaDataUsingInfoSchema.getExportedKeys( DatabaseMetaDataUsingInfoSchema.java:603)
(Bug #43714)
LoadBalancingConnectionProxy.doPing()did not have blacklist awareness.LoadBalancingConnectionProxyimplementeddoPing()to ping all underlying connections, but it threw any exceptions it encountered during this process.With the global blacklist enabled, it catches these exceptions, adds the host to the global blacklist, and only throws an exception if all hosts are down. (Bug #43421)
The method
Statement.getGeneratedKeys()did not return values forUNSIGNED BIGINTSwith values greater thanLong.MAX_VALUE.Unfortunately, because the server does not tell clients what TYPE the auto increment value is, the driver cannot consistently return BigIntegers for the result set returned from
getGeneratedKeys(), it will only return them if the value is greater thanLong.MAX_VALUE. If your application needs this consistency, it will need to check the class of the return value from.getObject()on the ResultSet returned byStatement.getGeneratedKeys()and if it is not a BigInteger, create one based on thejava.lang.Longthat is returned. (Bug #43196)When the MySQL Server was upgraded from 4.0 to 5.0, the Connector/J application then failed to connect to the server. This was because authentication failed when the application ran from EBCDIC platforms such as z/OS. (Bug #43071)
When connecting with
traceProtocol=true, no trace data was generated for the server greeting or login request. (Bug #43070)Connector/J generated an unhandled
StringIndexOutOfBoundsException:java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1938) at com.mysql.jdbc.EscapeProcessor.processTimeToken(EscapeProcessor.java:353) at com.mysql.jdbc.EscapeProcessor.escapeSQL(EscapeProcessor.java:257) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1546) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1524)
(Bug #42253)
A
ConcurrentModificationExceptionwas generated inLoadBalancingConnectionProxy:java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$KeyIterator.next(Unknown Source) at com.mysql.jdbc.LoadBalancingConnectionProxy.getGlobalBlacklist(LoadBalancingConnectionProxy.java:520) at com.mysql.jdbc.RandomBalanceStrategy.pickConnection(RandomBalanceStrategy.java:55) at com.mysql.jdbc.LoadBalancingConnectionProxy.pickNewConnection(LoadBalancingConnectionProxy.java:414) at com.mysql.jdbc.LoadBalancingConnectionProxy.invoke(LoadBalancingConnectionProxy.java:390)
(Bug #42055)
SQL injection was possible when using a string containing U+00A5 in a client-side prepared statement, and the character set being used was SJIS/Windows-31J. (Bug #41730)
If there was an apostrophe in a comment in a statement that was being sent through Connector/J, the apostrophe was still recognized as a quote and put the state machine in
EscapeTokenizerinto theinQuotesstate. This led to further parse errors.For example, consider the following statement:
String sql = "-- Customer's zip code will be fixed\n" + "update address set zip_code = 99999\n" + "where not regexp '^[0-9]{5}([[.-.]])?([0-9]{4})?$'";When passed through Connector/J, the
EscapeTokenizerdid not recognize that the first apostrophe was in a comment and thus setinQuotesto true. When that happened, the quote count was incorrect and thus the regular expression did not appear to be in quotation marks. With the parser not detecting that the regular expression was in quotation marks, the curly braces were recognized as escape sequences and were removed from the regular expression, breaking it. The server thus received SQL such as:-- Customer's zip code will be fixed update address set zip_code = '99999' where not regexp '^[0-9]([[.-.]])?([0-9])?$'
(Bug #41566)
MySQL Connector/J 5.1.7 was slower than previous versions when the
rewriteBatchedStatementsoption was set totrue.ЗамечаниеThe performance regression in
indexOfIgnoreCaseRespectMarker()has been fixed. It has also been made possible for the driver to rewriteINSERTstatements withON DUPLICATE KEY UPDATEclauses in them, as long as theUPDATEclause contains no reference toLAST_INSERT_ID(), as that would cause the driver to return bogus values forgetGeneratedKeys()invocations. This has resulted in improved performance over version 5.1.7.(Bug #41532)
When accessing a result set column by name using
ResultSetImpl.findColumn()an exception was generated:java.lang.NullPointerException at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1103) at com.mysql.jdbc.ResultSetImpl.getShort(ResultSetImpl.java:5415) at org.apache.commons.dbcp.DelegatingResultSet.getShort(DelegatingResultSet.java:219) at com.zimbra.cs.db.DbVolume.constructVolume(DbVolume.java:297) at com.zimbra.cs.db.DbVolume.get(DbVolume.java:197) at com.zimbra.cs.db.DbVolume.create(DbVolume.java:95) at com.zimbra.cs.store.Volume.create(Volume.java:227) at com.zimbra.cs.store.Volume.create(Volume.java:189) at com.zimbra.cs.service.admin.CreateVolume.handle(CreateVolume.java:48) at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEngine.java:428) at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:285)
(Bug #41484)
The
RETURN_GENERATED_KEYSflag was being ignored. For example, in the following code theRETURN_GENERATED_KEYSflag was ignored:PreparedStatement ps = connection.prepareStatement("INSERT INTO table values(?,?)",PreparedStatement.RETURN_GENERATED_KEYS);(Bug #41448)
When using Connector/J 5.1.7 to connect to MySQL Server 4.1.18 the following error message was generated:
Thu Dec 11 17:38:21 PST 2008 WARN: Invalid value {1} for server variable named {0}, falling back to sane default of {2}This occurred with MySQL Server version that did not support
auto_increment_increment. The error message should not have been generated. (Bug #41416)When
DatabaseMetaData.getProcedureColumns()was called, the value forLENGTHwas always returned as 65535, regardless of the column type (fixed or variable) or the actual length of the column.However, if you obtained the
PRECISIONvalue, this was correct for both fixed and variable length columns. (Bug #41269)PreparedStatement.addBatch()did not check for all parameters being set, which led to inconsistent behavior inexecuteBatch(), especially when rewriting batched statements into multi-valueINSERTs. (Bug #41161)Error message strings contained variable values that were not expanded. For example:
Mon Nov 17 11:43:18 JST 2008 WARN: Invalid value {1} for server variable named {0}, falling back to sane default of {2}(Bug #40772)
When using
rewriteBatchedStatements=truewith:INSERT INTO table_name_values (...) VALUES (...)
Query rewriting failed because “values” at the end of the table name was mistaken for the reserved keyword. The error generated was as follows:
testBug40439(testsuite.simple.TestBug40439)java.sql.BatchUpdateException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'values (2,'toto',2),(id,data, ordr) values (3,'toto',3),(id,data, ordr) values (' at line 1 at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1495) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1097) at testsuite.simple.TestBug40439.testBug40439(TestBug40439.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at testsuite.simple.TestBug40439.main(TestBug40439.java:57)(Bug #40439)
A statement interceptor received the incorrect parameters when used with a batched statement. (Bug #39426)
Using Connector/J 5.1.6 the method
ResultSet.getObjectreturned aBYTE[]for following:SELECT TRIM(rowid) FROM tbl
Where
rowidhad a type ofINT(11) PRIMARY KEY AUTO_INCREMENT.The expected return type was one of
CHAR,VARCHAR,CLOB, however, aBYTE[]was returned.Further, adding
functionsNeverReturnBlobs=trueto the connection string did not have any effect on the return type. (Bug #38387)
Functionality Added or Changed
When statements include
ON DUPLICATE UPDATE, andrewriteBatchedStatementsis set to true, batched statements are not rewritten into the formINSERT INTO table VALUES (), (), (), instead the statements are executed sequentially.
Bugs Fixed
Statement.getGeneratedKeys()returned two keys when usingON DUPLICATE KEY UPDATEand the row was updated, not inserted. (Bug #42309)When using the replication driver with
autoReconnect=true, Connector/J checks inPreparedStatement.execute(also called byCallableStatement.execute) to determine if the first character of the statement is an “S”, in an attempt to block all statements that are not read-only-safe, for example non-SELECTstatements. However, this also blockedCALLs to stored procedures, even if the stored procedures were defined asSQL READ DATAorNO SQL. (Bug #40031)With large result sets
ResultSet.findColumnbecame a performance bottleneck. (Bug #39962)Connector/J ignored the value of the MySQL Server variable
auto_increment_increment. (Bug #39956)Connector/J failed to parse
TIMESTAMPstrings for nanos correctly. (Bug #39911)When the
LoadBalancingConnectionProxyhandles aSQLExceptionwith SQL state starting with “08”, it callsinvalidateCurrentConnection, which in turn removes thatConnectionfromliveConnectionsand theconnectionsToHostsMap, but it did not add the host to the new global blacklist, if the global blacklist was enabled.There was also the possibility of a
NullPointerExceptionwhen trying to update stats, whereconnectionsToHostsMap.get(this.currentConn)was called:int hostIndex = ((Integer) this.hostsToListIndexMap.get(this.connectionsToHostsMap.get(this.currentConn))).intValue();
This could happen if a client tried to issue a rollback after catching a
SQLExceptioncaused by a connection failure. (Bug #39784)When configuring the Java Replication Driver the last slave specified was never used. (Bug #39611)
When an
INSERT ON DUPLICATE KEY UPDATEwas performed, and the key already existed, theaffected-rowsvalue was returned as 1 instead of 0. (Bug #39352)When using the random load balancing strategy and starting with two servers that were both unavailable, an
IndexOutOfBoundsExceptionwas generated when removing a server from thewhiteList. (Bug #38782)Connector/J threw the following exception when using a read-only connection:
java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed.
(Bug #38747)
Connector/J was unable to connect when using a non-
latin1password. (Bug #37570)The
useOldAliasMetadataBehaviorconnection property was ignored. (Bug #35753)Incorrect result is returned from
isAfterLast()in streamingResultSetwhen usingsetFetchSize(Integer.MIN_VALUE). (Bug #35170)When
getGeneratedKeys()was called on a statement that had not been created withRETURN_GENERATED_KEYS, no exception was thrown, and batched executions then returned erroneous values. (Bug #34185)The
loadBalancebestResponseTimeblacklists did not have a global state. (Bug #33861)
Functionality Added or Changed
Multiple result sets were not supported when using streaming mode to return data. Both normal statements and the resul sets from stored procedures now return multiple results sets, with the exception of result sets using registered
OUTPUTparameters. (Bug #33678)XAConnections and datasources have been updated to the JDBC-4.0 standard.
The profiler event handling has been made extensible using the
profilerEventHandlerconnection property.Add the
verifyServerCertificateproperty. If set to "false" the driver will not verify the server's certificate whenuseSSLis set to "true"When using this feature, the keystore parameters should be specified by the
clientCertificateKeyStore*properties, rather than system properties, as the JSSE doesn't it straightforward to have a nonverifying trust store and the "default" key store.
Bugs Fixed
DatabaseMetaData.getColumns()returns incorrectCOLUMN_SIZEvalue forSETcolumn. (Bug #36830)When trying to read
Timevalues like “00:00:00” withResultSet.getTime(int)an exception is thrown. (Bug #36051)JDBC connection URL parameters is ignored when using
MysqlConnectionPoolDataSource. (Bug #35810)When
useServerPrepStmts=trueand slow query logging is enabled, the connector throws aNullPointerExceptionwhen it encounters a slow query. (Bug #35666)When using the keyword “loadbalance” in the connection string and trying to perform load balancing between two databases, the driver appears to hang. (Bug #35660)
JDBC data type getter method was changed to accept only column name, whereas previously it accepted column label. (Bug #35610)
Prepared statements from pooled connections caused a
NullPointerExceptionwhenclosed()under JDBC-4.0. (Bug #35489)In calling a stored function returning a
bigint, an exception is encountered beginning:java.sql.SQLException: java.lang.NumberFormatException: For input string:
followed by the text of the stored function starting after the argument list. (Bug #35199)
The JDBC driver uses a different method for evaluating column names in
resultsetmetadata.getColumnName()and when looking for a column inresultset.getObject(columnName). This causes Hibernate to fail in queries where the two methods yield different results, for example in queries that use alias names:SELECT column AS aliasName from table
(Bug #35150)
MysqlConnectionPoolDataSourcedoes not supportReplicationConnection. Notice that we implementedcom.mysql.jdbc.ConnectionforReplicationConnection, however, only accessors from ConnectionProperties are implemented (not the mutators), and they return values from the currently active connection. All other methods fromcom.mysql.jdbc.Connectionare implemented, and operate on the currently active connection, with the exception ofresetServerState()andchangeUser(). (Bug #34937)ResultSet.getTimestamp()returns incorrect values for month/day ofTIMESTAMPs when using server-side prepared statements (not enabled by default). (Bug #34913)RowDataStaticdoesn't always set the metadata inResultSetRow, which can lead to failures when unpackingDATE,TIME,DATETIMEandTIMESTAMPtypes when using absolute, relative, and previous result set navigation methods. (Bug #34762)When calling
isValid()on an active connection, if the timeout is nonzero then theConnectionis invalidated even if theConnectionis valid. (Bug #34703)It was not possible to truncate a
BLOBusingBlog.truncate()when using 0 as an argument. (Bug #34677)When using a cursor fetch for a statement, the internal prepared statement could cause a memory leak until the connection was closed. The internal prepared statement is now deleted when the corresponding result set is closed. (Bug #34518)
When retrieving the column type name of a geometry field, the driver would return
UNKNOWNinstead ofGEOMETRY. (Bug #34194)Statements with batched values do not return correct values for
getGeneratedKeys()whenrewriteBatchedStatementsis set totrue, and the statement has anON DUPLICATE KEY UPDATEclause. (Bug #34093)The internal class
ResultSetInternalMethodsreferenced the nonpublic classcom.mysql.jdbc.CachedResultSetMetaData. (Bug #33823)A
NullPointerExceptioncould be raised when using client-side prepared statements and enabled the prepared statement cache using thecachePrepStmts. (Bug #33734)Using server side cursors and cursor fetch, the table metadata information would return the data type name instead of the column name. (Bug #33594)
ResultSet.getTimestamp()would throw aNullPointerExceptioninstead of aSQLExceptionwhen called on an emptyResultSet. (Bug #33162)Load balancing connection using best response time would incorrectly "stick" to hosts that were down when the connection was first created.
We solve this problem with a black list that is used during the picking of new hosts. If the black list ends up including all configured hosts, the driver will retry for a configurable number of times (the
retriesAllDownconfiguration property, with a default of 120 times), sleeping 250ms between attempts to pick a new connection.We've also went ahead and made the balancing strategy extensible. To create a new strategy, implement the interface
com.mysql.jdbc.BalanceStrategy(which also includes our standard "extension" interface), and tell the driver to use it by passing in the class name using theloadBalanceStrategyconfiguration property. (Bug #32877)During a Daylight Savings Time (DST) switchover, there was no way to store two timestamp/datetime values , as the hours end up being the same when sent as the literal that MySQL requires.
Note that to get this scenario to work with MySQL (since it doesn't support per-value timezones), you need to configure your server (or session) to be in UTC, and tell the driver not to use the legacy date/time code by setting
useLegacyDatetimeCodeto "false". This will cause the driver to always convert to/from the server and client timezone consistently.This bug fix also fixes Bug #15604, by adding entirely new date/time handling code that can be switched on by
useLegacyDatetimeCodebeing set to "false" as a JDBC configuration property. For Connector/J 5.1.x, the default is "true", in trunk and beyond it will be "false" (that is, the old date/time handling code will be deprecated) (Bug #32577, Bug #15604)When unpacking rows directly, we don't hand off error message packets to the internal method which decodes them correctly, so no exception is raised, and the driver than hangs trying to read rows that aren't there. This tends to happen when calling stored procedures, as normal SELECTs won't have an error in this spot in the protocol unless an I/O error occurs. (Bug #32246)
When using a connection from
ConnectionPoolDataSource, someConnection.prepareStatement()methods would return null instead of the prepared statement. (Bug #32101)Using
CallableStatement.setNull()on a stored function would throw anArrayIndexOutOfBoundsexception when setting the last parameter to null. (Bug #31823)MysqlValidConnectionCheckerdoesn't properly handle connections created usingReplicationConnection. (Bug #31790)Retrieving the server version information for an active connection could return invalid information if the default character encoding on the host was not ASCII compatible. (Bug #31192)
Further fixes have been made to this bug in the event that a node is nonresponsive. Connector/J will now try a different random node instead of waiting for the node to recover before continuing. (Bug #31053)
ResultSetreturned byStatement.getGeneratedKeys()is not closed automatically when statement that created it is closed. (Bug #30508)DatabaseMetadata.getColumns()doesn't return the correct column names if the connection character isn't UTF-8. A bug in MySQL server compounded the issue, but was fixed within the MySQL 5.0 release cycle. The fix includes changes to all the sections of the code that access the server metadata. (Bug #20491)Fixed
ResultSetMetadata.getColumnName()for result sets returned fromStatement.getGeneratedKeys()- it was returning null instead of "GENERATED_KEY" as in 5.0.x.
New Features, Compared to the 5.0 Series of Connector/J
JDBC-4.0 support for setting per-connection client information (which can be viewed in the comments section of a query using
SHOW PROCESSLISTon a MySQL server, or can be extended to support custom persistence of the information using a public interface).Support for JDBC-4.0 XML processing using JAXP interfaces to DOM, SAX and StAX.
JDBC-4.0 standardized unwrapping to interfaces that include vendor extensions.
Functionality Added or Changed
Added
autoSlowLogconfiguration property, overridesslowQueryThreshold*properties, driver determines slow queries by those that are slower than 5 * stddev of the mean query time (outside the 96% percentile).
Bugs Fixed
When a connection is in read-only mode, queries that are wrapped in parentheses were incorrectly identified DML statements. (Bug #28256)
When calling
setTimestampon a prepared statement, the timezone information stored in the calendar object was ignored. This resulted in the incorrectDATETIMEinformation being stored. The following example illustrates this:Timestamp t = new Timestamp( cal.getTimeInMillis() ); ps.setTimestamp( N, t, cal );
(Bug #15604)
Only released internally.
Version 5.1.4 has no changelog entries.
New Features, Compared to the 5.0 Series of Connector/J
JDBC-4.0 support for setting per-connection client information (which can be viewed in the comments section of a query using
SHOW PROCESSLISTon a MySQL server, or can be extended to support custom persistence of the information using a public interface).Support for JDBC-4.0 XML processing using JAXP interfaces to DOM, SAX and StAX.
JDBC-4.0 standardized unwrapping to interfaces that include vendor extensions.
Functionality Added or Changed
Connector/J now connects using an initial character set of
utf-8solely for the purpose of authentication to permit user names or database names in any character set to be used in the JDBC connection URL. (Bug #29853)Added two configuration parameters:
blobsAreStrings: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server forGROUP BYclauses. Defaults to false.functionsNeverReturnBlobs: Should the driver always treat data from functions returningBLOBsas Strings. Added specifically to work around dubious metadata returned by the server forGROUP BYclauses. Defaults to false.
Setting
rewriteBatchedStatementstotruenow causes CallableStatements with batched arguments to be re-written in the form "CALL (...); CALL (...); ..." to send the batch in as few client/server round trips as possible.The driver now picks appropriate internal row representation (whole row in one buffer, or individual byte[]s for each column value) depending on heuristics, including whether or not the row has
BLOBorTEXTtypes and the overall row-size. The threshold for row size that will cause the driver to use a buffer rather than individual byte[]s is configured by the configuration propertylargeRowSizeThreshold, which has a default value of 2KB.The data (and how it is stored) for
ResultSetrows are now behind an interface which enables us (in some cases) to allocate less memory per row, in that for "streaming" result sets, we re-use the packet used to read rows, since only one row at a time is ever active.Added experimental support for statement "interceptors" through the
com.mysql.jdbc.StatementInterceptorinterface, examples are incom/mysql/jdbc/interceptors. Implement this interface to be placed "in between" query execution, so that it can be influenced (currently experimental).The driver will automatically adjust the server session variable
net_write_timeoutwhen it determines its been asked for a "streaming" result, and resets it to the previous value when the result set has been consumed. (The configuration property is namednetTimeoutForStreamingResults, with a unit of seconds, the value '0' means the driver will not try and adjust this value).JDBC-4.0 ease-of-development features including auto-registration with the
DriverManagerthrough the service provider mechanism, standardized Connection validity checks and categorizedSQLExceptionsbased on recoverability/retry-ability and class of the underlying error.Statement.setQueryTimeout()s now affect the entire batch for batched statements, rather than the individual statements that make up the batch.Ошибки encountered during
Statement/PreparedStatement/CallableStatement.executeBatch()whenrewriteBatchStatementshas been set totruenow returnBatchUpdateExceptionsaccording to the setting ofcontinueBatchOnError.If
continueBatchOnErroris set totrue, the update counts for the "chunk" that were sent as one unit will all be set toEXECUTE_FAILED, but the driver will attempt to process the remainder of the batch. You can determine which "chunk" failed by looking at the update counts returned in theBatchUpdateException.If
continueBatchOnErroris set to "false", the update counts returned will contain all updates up-to and including the failed "chunk", with all counts for the failed "chunk" set toEXECUTE_FAILED.Since MySQL doesn't return multiple error codes for multiple-statements, or for multi-value
INSERT/REPLACE, it is the application's responsibility to handle determining which item(s) in the "chunk" actually failed.New methods on com.mysql.jdbc.Statement:
setLocalInfileInputStream()andgetLocalInfileInputStream():setLocalInfileInputStream()sets anInputStreaminstance that will be used to send data to the MySQL server for aLOAD DATA LOCAL INFILEstatement rather than aFileInputStreamorURLInputStreamthat represents the path given as an argument to the statement.This stream will be read to completion upon execution of a
LOAD DATA LOCAL INFILEstatement, and will automatically be closed by the driver, so it needs to be reset before each call toexecute*()that would cause the MySQL server to request data to fulfill the request forLOAD DATA LOCAL INFILE.If this value is set to
NULL, the driver will revert to using aFileInputStreamorURLInputStreamas required.getLocalInfileInputStream()returns theInputStreaminstance that will be used to send data in response to aLOAD DATA LOCAL INFILEstatement.This method returns
NULLif no such stream has been set usingsetLocalInfileInputStream().
Setting
useBlobToStoreUTF8OutsideBMPtotruetells the driver to treat[MEDIUM/LONG]BLOBcolumns as[LONG]VARCHARcolumns holding text encoded in UTF-8 that has characters outside the BMP (4-byte encodings), which MySQL server can't handle natively.Set
utf8OutsideBmpExcludedColumnNamePatternto a regex so that column names matching the given regex will still be treated asBLOBsThe regex must follow the patterns used for thejava.util.regexpackage. The default is to exclude no columns, and include all columns.Set
utf8OutsideBmpIncludedColumnNamePatternto specify exclusion rules to utf8OutsideBmpExcludedColumnNamePattern". The regex must follow the patterns used for thejava.util.regexpackage.
Bugs Fixed
setObject(int, Object, int, int)delegate in PreparedStatementWrapper delegates to wrong method. (Bug #30892)NPE with null column values when
padCharsWithSpaceis set to true. (Bug #30851)Collation on
VARBINARYcolumn types would be misidentified. A fix has been added, but this fix only works for MySQL server versions 5.0.25 and newer, since earlier versions didn't consistently return correct metadata for functions, and thus results from subqueries and functions were indistinguishable from each other, leading to type-related bugs. (Bug #30664)An
ArithmeticExceptionorNullPointerExceptionwould be raised when the batch had zero members andrewriteBatchedStatements=truewhenaddBatch()was never called, orexecuteBatch()was called immediately afterclearBatch(). (Bug #30550)Closing a load-balanced connection would cause a
ClassCastException. (Bug #29852)Connection checker for JBoss didn't use same method parameters using reflection, causing connections to always seem "bad". (Bug #29106)
DatabaseMetaData.getTypeInfo()for the typesDECIMALandNUMERICwill return a precision of 254 for server versions older than 5.0.3, 64 for versions 5.0.3 to 5.0.5 and 65 for versions newer than 5.0.5. (Bug #28972)CallableStatement.executeBatch()doesn't work when connection propertynoAccessToProcedureBodieshas been set totrue.The fix involves changing the behavior of
noAccessToProcedureBodies,in that the driver will now report all paramters asINparamters but permit callers to call registerOutParameter() on them without throwing an exception. (Bug #28689)DatabaseMetaData.getColumns()doesn't containSCOPE_*orIS_AUTOINCREMENTcolumns. (Bug #27915)Schema objects with identifiers other than the connection character aren't retrieved correctly in
ResultSetMetadata. (Bug #27867)Connection.getServerCharacterEncoding()doesn't work for servers with version >= 4.1. (Bug #27182)The automated SVN revisions in
DBMD.getDriverVersion(). The SVN revision of the directory is now inserted into the version information during the build. (Bug #21116)Specifying a "validation query" in your connection pool that starts with "/* ping */" _exactly_ will cause the driver to instead send a ping to the server and return a fake result set (much lighter weight), and when using a ReplicationConnection or a LoadBalancedConnection, will send the ping across all active connections.
This is a new Beta development release, fixing recently discovered bugs.
Functionality Added or Changed
Setting the configuration property
rewriteBatchedStatementstotruewill now cause the driver to rewrite batched prepared statements with more than 3 parameter sets in a batch into multi-statements (separated by ";") if they are not plain (that is, withoutSELECTorON DUPLICATE KEY UPDATEclauses)INSERTorREPLACEstatements.
This is a new Alpha development release, adding new features and fixing recently discovered bugs.
Functionality Added or Changed
Incompatible Change: Pulled vendor-extension methods of
Connectionimplementation out into an interface to supportjava.sql.Wrapperfunctionality fromConnectionPoolDataSource. The vendor extensions are javadoc'd in thecom.mysql.jdbc.Connectioninterface.For those looking further into the driver implementation, it is not an API that is used for pluggability of implementations inside our driver (which is why there are still references to
ConnectionImplthroughout the code).We've also added server and client
prepareStatement()methods that cover all of the variants in the JDBC API.Connection.serverPrepare(String)has been re-named toConnection.serverPrepareStatement()for consistency withConnection.clientPrepareStatement().Row navigation now causes any streams/readers open on the result set to be closed, as in some cases we're reading directly from a shared network packet and it will be overwritten by the "next" row.
Made it possible to retrieve prepared statement parameter bindings (to be used in
StatementInterceptors, primarily).Externalized the descriptions of connection properties.
The data (and how it is stored) for
ResultSetrows are now behind an interface which enables us (in some cases) to allocate less memory per row, in that for "streaming" result sets, we re-use the packet used to read rows, since only one row at a time is ever active.Similar to
Connection, we pulled out vendor extensions toStatementinto an interface namedcom.mysql.Statement, and moved theStatementclass intocom.mysql.StatementImpl. The two methods (javadoc'd incom.mysql.StatementareenableStreamingResults(), which already existed, anddisableStreamingResults()which sets the statement instance back to the fetch size and result set type it had beforeenableStreamingResults()was called.Driver now picks appropriate internal row representation (whole row in one buffer, or individual byte[]s for each column value) depending on heuristics, including whether or not the row has
BLOBorTEXTtypes and the overall row-size. The threshold for row size that will cause the driver to use a buffer rather than individual byte[]s is configured by the configuration propertylargeRowSizeThreshold, which has a default value of 2KB.Added experimental support for statement "interceptors" through the
com.mysql.jdbc.StatementInterceptorinterface, examples are incom/mysql/jdbc/interceptors.Implement this interface to be placed "in between" query execution, so that you can influence it. (currently experimental).
StatementInterceptorsare "chainable" when configured by the user, the results returned by the "current" interceptor will be passed on to the next on in the chain, from left-to-right order, as specified by the user in the JDBC configuration propertystatementInterceptors.See the sources (fully javadoc'd) for
com.mysql.jdbc.StatementInterceptorfor more details until we iron out the API and get it documented in the manual.Setting
rewriteBatchedStatementstotruenow causesCallableStatementswith batched arguments to be re-written in the formCALL (...); CALL (...); ...to send the batch in as few client/server round trips as possible.
This is the first public alpha release of the current Connector/J 5.1 development branch, providing an insight to upcoming features. Although some of these are still under development, this release includes the following new features and changes (in comparison to the current Connector/J 5.0 production release):
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
useServerPrepStmts=true
The default value of this property is false
(that is, Connector/J does not use server-side prepared
statements).
The disabling of server-side prepared statements does not
affect the operation of the connector. However, if you use the
useTimezone=true connection option and use
client-side prepared statements (instead of server-side
prepared statements) you should also set
useSSPSCompatibleTimezoneShift=true.
Functionality Added or Changed
Refactored
CommunicationsExceptioninto a JDBC-3.0 version, and a JDBC-4.0 version (which extendsSQLRecoverableException, now that it exists).ЗамечаниеThis change means that if you were catching
com.mysql.jdbc.CommunicationsExceptionin your applications instead of looking at the SQLState class of08, and are moving to Java 6 (or newer), you need to change your imports to that exception to becom.mysql.jdbc.exceptions.jdbc4.CommunicationsException, as the old class will not be instantiated for communications link-related errors under Java 6.Added support for JDBC-4.0 categorized
SQLExceptions.Added support for JDBC-4.0's
NCLOB, andNCHAR/NVARCHARtypes.com.mysql.jdbc.java6.javac: Full path to your Java-6 javac executableAdded support for JDBC-4.0's SQLXML interfaces.
Re-worked Ant buildfile to build JDBC-4.0 classes separately, as well as support building under Eclipse (since Eclipse can't mix/match JDKs).
To build, you must set
JAVA_HOMEto J2SDK-1.4.2 or Java-5, and set the following properties on your Ant command line:com.mysql.jdbc.java6.javac: Full path to your Java-6 javac executablecom.mysql.jdbc.java6.rtjar: Full path to your Java-6rt.jarfile
New feature—driver will automatically adjust session variable
net_write_timeoutwhen it determines it has been asked for a "streaming" result, and resets it to the previous value when the result set has been consumed. (configuration property is namednetTimeoutForStreamingResultsvalue and has a unit of seconds, the value0means the driver will not try and adjust this value).Added support for JDBC-4.0's client information. The backend storage of information provided using
Connection.setClientInfo()and retrieved byConnection.getClientInfo()is pluggable by any class that implements thecom.mysql.jdbc.JDBC4ClientInfoProviderinterface and has a no-args constructor.The implementation used by the driver is configured using the
clientInfoProviderconfiguration property (with a default of value ofcom.mysql.jdbc.JDBC4CommentClientInfoProvider, an implementation which lists the client information as a comment prepended to every query sent to the server).This functionality is only available when using Java-6 or newer.
com.mysql.jdbc.java6.rtjar: Full path to your Java-6rt.jarfileAdded support for JDBC-4.0's
Wrapperinterface.
- D.5.2.1. Changes in MySQL Connector/J 5.0.8 (09 October 2007)
- D.5.2.2. Changes in MySQL Connector/J 5.0.7 (20 July 2007)
- D.5.2.3. Changes in MySQL Connector/J 5.0.6 (15 May 2007)
- D.5.2.4. Changes in MySQL Connector/J 5.0.5 (02 March 2007)
- D.5.2.5. Changes in MySQL Connector/J 5.0.4 (20 October 2006)
- D.5.2.6. Changes in MySQL Connector/J 5.0.3 (26 July 2006, beta)
- D.5.2.7. Changes in MySQL Connector/J 5.0.2 (11 July 2006)
- D.5.2.8. Changes in MySQL Connector/J 5.0.1 (Not Released)
- D.5.2.9. Changes in MySQL Connector/J 5.0.0 (22 December 2005)
Functionality Added or Changed
blobsAreStrings: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server forGROUP BYclauses. Defaults to false.Added two configuration parameters:
blobsAreStrings: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server forGROUP BYclauses. Defaults to false.functionsNeverReturnBlobs: Should the driver always treat data from functions returningBLOBsas Strings. Added specifically to work around dubious metadata returned by the server forGROUP BYclauses. Defaults to false.
functionsNeverReturnBlobs: Should the driver always treat data from functions returningBLOBsas Strings. Added specifically to work around dubious metadata returned by the server forGROUP BYclauses. Defaults to false.XAConnections now start in auto-commit mode (as per JDBC-4.0 specification clarification).
Driver will now fall back to sane defaults for
max_allowed_packetandnet_buffer_lengthif the server reports them incorrectly (and will log this situation atWARNlevel, since it is actually an error condition).
Bugs Fixed
Connections established using URLs of the form
jdbc:mysql:loadbalance://weren't doing failover if they tried to connect to a MySQL server that was down. The driver now attempts connections to the next "best" (depending on the load balance strategy in use) server, and continues to attempt connecting to the next "best" server every 250 milliseconds until one is found that is up and running or 5 minutes has passed.If the driver gives up, it will throw the last-received
SQLException. (Bug #31053)setObject(int, Object, int, int)delegate in PreparedStatementWrapper delegates to wrong method. (Bug #30892)NPE with null column values when
padCharsWithSpaceis set to true. (Bug #30851)Collation on
VARBINARYcolumn types would be misidentified. A fix has been added, but this fix only works for MySQL server versions 5.0.25 and newer, since earlier versions didn't consistently return correct metadata for functions, and thus results from subqueries and functions were indistinguishable from each other, leading to type-related bugs. (Bug #30664)An
ArithmeticExceptionorNullPointerExceptionwould be raised when the batch had zero members andrewriteBatchedStatements=truewhenaddBatch()was never called, orexecuteBatch()was called immediately afterclearBatch(). (Bug #30550)Closing a load-balanced connection would cause a
ClassCastException. (Bug #29852)Connection checker for JBoss didn't use same method parameters using reflection, causing connections to always seem "bad". (Bug #29106)
DatabaseMetaData.getTypeInfo()for the typesDECIMALandNUMERICwill return a precision of 254 for server versions older than 5.0.3, 64 for versions 5.0.3 to 5.0.5 and 65 for versions newer than 5.0.5. (Bug #28972)CallableStatement.executeBatch()doesn't work when connection propertynoAccessToProcedureBodieshas been set totrue.The fix involves changing the behavior of
noAccessToProcedureBodies,in that the driver will now report all paramters asINparamters but permit callers to call registerOutParameter() on them without throwing an exception. (Bug #28689)When a connection is in read-only mode, queries that are wrapped in parentheses were incorrectly identified DML statements. (Bug #28256)
UNSIGNEDtypes not reported usingDBMD.getTypeInfo(), and capitalization of type names is not consistent betweenDBMD.getColumns(),RSMD.getColumnTypeName()andDBMD.getTypeInfo().This fix also ensures that the precision of
UNSIGNED MEDIUMINTandUNSIGNED BIGINTis reported correctly usingDBMD.getColumns(). (Bug #27916)DatabaseMetaData.getColumns()doesn't containSCOPE_*orIS_AUTOINCREMENTcolumns. (Bug #27915)Schema objects with identifiers other than the connection character aren't retrieved correctly in
ResultSetMetadata. (Bug #27867)Cached metadata with
PreparedStatement.execute()throwsNullPointerException. (Bug #27412)Connection.getServerCharacterEncoding()doesn't work for servers with version >= 4.1. (Bug #27182)The automated SVN revisions in
DBMD.getDriverVersion(). The SVN revision of the directory is now inserted into the version information during the build. (Bug #21116)Specifying a "validation query" in your connection pool that starts with "/* ping */" _exactly_ will cause the driver to instead send a ping to the server and return a fake result set (much lighter weight), and when using a ReplicationConnection or a LoadBalancedConnection, will send the ping across all active connections.
Functionality Added or Changed
The driver will now automatically set
useServerPrepStmtstotruewhenuseCursorFetchhas been set totrue, since the feature requires server-side prepared statements to function.tcpKeepAlive- Should the driver set SO_KEEPALIVE (defaulttrue)?Give more information in EOFExceptions thrown out of MysqlIO (how many bytes the driver expected to read, how many it actually read, say that communications with the server were unexpectedly lost).
Driver detects when it is running in a ColdFusion MX server (tested with version 7), and uses the configuration bundle
coldFusion, which setsuseDynamicCharsetInfotofalse(see previous entry), and setsuseLocalSessionStateand autoReconnect totrue.tcpNoDelay- Should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm, defaulttrue)?Added configuration property
slowQueryThresholdNanos- ifuseNanosForElapsedTimeis set totrue, and this property is set to a nonzero value the driver will use this threshold (in nanosecond units) to determine if a query was slow, instead of using millisecond units.tcpRcvBuf- Should the driver set SO_RCV_BUF to the given value? The default value of '0', means use the platform default value for this property.Setting
useDynamicCharsetInfotofalsenow causes driver to use static lookups for collations as well (makes ResultSetMetadata.isCaseSensitive() much more efficient, which leads to performance increase for ColdFusion, which calls this method for every column on every table it sees, it appears).Added configuration properties to enable tuning of TCP/IP socket parameters:
tcpNoDelay- Should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm, defaulttrue)?tcpKeepAlive- Should the driver set SO_KEEPALIVE (defaulttrue)?tcpRcvBuf- Should the driver set SO_RCV_BUF to the given value? The default value of '0', means use the platform default value for this property.tcpSndBuf- Should the driver set SO_SND_BUF to the given value? The default value of '0', means use the platform default value for this property.tcpTrafficClass- Should the driver set traffic class or type-of-service fields? See the documentation for java.net.Socket.setTrafficClass() for more information.
Setting the configuration parameter
useCursorFetchtotruefor MySQL-5.0+ enables the use of cursors that enable Connector/J to save memory by fetching result set rows in chunks (where the chunk size is set by calling setFetchSize() on a Statement or ResultSet) by using fully-materialized cursors on the server.tcpSndBuf- Should the driver set SO_SND_BUF to the given value? The default value of '0', means use the platform default value for this property.tcpTrafficClass- Should the driver set traffic class or type-of-service fields? See the documentation for java.net.Socket.setTrafficClass() for more information.Added new debugging functionality - Setting configuration property
includeInnodbStatusInDeadlockExceptionstotruewill cause the driver to append the output ofSHOW ENGINE INNODB STATUSto deadlock-related exceptions, which will enumerate the current locks held inside InnoDB.Added configuration property
useNanosForElapsedTime- for profiling/debugging functionality that measures elapsed time, should the driver try to use nanoseconds resolution if available (requires JDK >= 1.5)?ЗамечаниеIf
useNanosForElapsedTimeis set totrue, and this property is set to "0" (or left default), then elapsed times will still be measured in nanoseconds (if possible), but the slow query threshold will be converted from milliseconds to nanoseconds, and thus have an upper bound of approximately 2000 milliseconds (as that threshold is represented as an integer, not a long).
Bugs Fixed
Don't send any file data in response to LOAD DATA LOCAL INFILE if the feature is disabled at the client side. This is to prevent a malicious server or man-in-the-middle from asking the client for data that the client is not expecting. Thanks to Jan Kneschke for discovering the exploit and Andrey "Poohie" Hristov, Konstantin Osipov and Sergei Golubchik for discussions about implications and possible fixes. (Bug #29605)
Parser in client-side prepared statements runs to end of statement, rather than end-of-line for '#' comments. Also added support for '--' single-line comments. (Bug #28956)
Parser in client-side prepared statements eats character following '/' if it is not a multi-line comment. (Bug #28851)
PreparedStatement.getMetaData() for statements containing leading one-line comments is not returned correctly.
As part of this fix, we also overhauled detection of DML for
executeQuery()andSELECTs forexecuteUpdate()in plain and prepared statements to be aware of the same types of comments. (Bug #28469)
Functionality Added or Changed
Added an experimental load-balanced connection designed for use with SQL nodes in a MySQL Cluster/NDB environment (This is not for master-slave replication. For that, we suggest you look at
ReplicationConnectionorlbpool).If the JDBC URL starts with
jdbc:mysql:loadbalance://host-1,host-2,...host-n, the driver will create an implementation ofjava.sql.Connectionthat load balances requests across a series of MySQL JDBC connections to the given hosts, where the balancing takes place after transaction commit.Therefore, for this to work (at all), you must use transactions, even if only reading data.
Physical connections to the given hosts will not be created until needed.
The driver will invalidate connections that it detects have had communication errors when processing a request. A new connection to the problematic host will be attempted the next time it is selected by the load balancing algorithm.
There are two choices for load balancing algorithms, which may be specified by the
loadBalanceStrategyJDBC URL configuration property:random: The driver will pick a random host for each request. This tends to work better than round-robin, as the randomness will somewhat account for spreading loads where requests vary in response time, while round-robin can sometimes lead to overloaded nodes if there are variations in response times across the workload.bestResponseTime: The driver will route the request to the host that had the best response time for the previous transaction.
bestResponseTime: The driver will route the request to the host that had the best response time for the previous transaction.Added configuration property
padCharsWithSpace(defaults tofalse). If set totrue, and a result set column has theCHARtype and the value does not fill the amount of characters specified in the DDL for the column, the driver will pad the remaining characters with space (for ANSI compliance).When
useLocalSessionStateis set totrueand connected to a MySQL-5.0 or later server, the JDBC driver will now determine whether an actualcommitorrollbackstatement needs to be sent to the database whenConnection.commit()orConnection.rollback()is called.This is especially helpful for high-load situations with connection pools that always call
Connection.rollback()on connection check-in/check-out because it avoids a round-trip to the server.Added configuration property
useDynamicCharsetInfo. If set tofalse(the default), the driver will use a per-connection cache of character set information queried from the server when necessary, or when set totrue, use a built-in static mapping that is more efficient, but isn't aware of custom character sets or character sets implemented after the release of the JDBC driver.ЗамечаниеThis only affects the
padCharsWithSpaceconfiguration property and theResultSetMetaData.getColumnDisplayWidth()method.New configuration property,
enableQueryTimeouts(defaulttrue).When enabled, query timeouts set with
Statement.setQueryTimeout()use a sharedjava.util.Timerinstance for scheduling. Even if the timeout doesn't expire before the query is processed, there will be memory used by theTimerTaskfor the given timeout which won't be reclaimed until the time the timeout would have expired if it hadn't been cancelled by the driver. High-load environments might want to consider disabling this functionality. (this configuration property is part of themaxPerformanceconfiguration bundle).Give better error message when "streaming" result sets, and the connection gets clobbered because of exceeding
net_write_timeouton the server.random: The driver will pick a random host for each request. This tends to work better than round-robin, as the randomness will somewhat account for spreading loads where requests vary in response time, while round-robin can sometimes lead to overloaded nodes if there are variations in response times across the workload.com.mysql.jdbc.[NonRegistering]Drivernow understands URLs of the formatjdbc:mysql:replication://andjdbc:mysql:loadbalance://which will create a ReplicationConnection (exactly like when using[NonRegistering]ReplicationDriver) and an experimental load-balanced connection designed for use with SQL nodes in a MySQL Cluster/NDB environment, respectively.In an effort to simplify things, we're working on deprecating multiple drivers, and instead specifying different core behavior based upon JDBC URL prefixes, so watch for
[NonRegistering]ReplicationDriverto eventually disappear, to be replaced withcom.mysql.jdbc[NonRegistering]Driverwith the new URL prefix.Fixed issue where a failed-over connection would let an application call
setReadOnly(false), when that call should be ignored until the connection is reconnected to a writable master unlessfailoverReadOnlyhad been set tofalse.Driver will now use
INSERT INTO ... VALUES (DEFAULT)form of statement for updatable result sets forResultSet.insertRow(), rather than pre-populating the insert row with values fromDatabaseMetaData.getColumns()(which results in aSHOW FULL COLUMNSon the server for every result set). If an application requires access to the default values beforeinsertRow()has been called, the JDBC URL should be configured withpopulateInsertRowWithDefaultValuesset totrue.This fix specifically targets performance issues with ColdFusion and the fact that it seems to ask for updatable result sets no matter what the application does with them.
More intelligent initial packet sizes for the "shared" packets are used (512 bytes, rather than 16K), and initial packets used during handshake are now sized appropriately as to not require reallocation.
Bugs Fixed
More useful error messages are generated when the driver thinks a result set is not updatable. (Thanks to Ashley Martens for the patch). (Bug #28085)
Connection.getTransactionIsolation()uses "SHOW VARIABLES LIKE" which is very inefficient on MySQL-5.0+ servers. (Bug #27655)Fixed issue where calling
getGeneratedKeys()on a prepared statement after callingexecute()didn't always return the generated keys (executeUpdate()worked fine however). (Bug #27655)CALL /* ... */doesn't work. As a side effect of this fix, you can now usesome_proc()/* */and#comments when preparing statements using client-side prepared statement emulation.If the comments happen to contain parameter markers (
?), they will be treated as belonging to the comment (that is, not recognized) rather than being a parameter of the statement.ЗамечаниеThe statement when sent to the server will contain the comments as-is, they're not stripped during the process of preparing the
PreparedStatementorCallableStatement.(Bug #27400)
ResultSet.get*()with a column index < 1 returns misleading error message. (Bug #27317)Using
ResultSet.get*()with a column index less than 1 returns a misleading error message. (Bug #27317)Comments in DDL of stored procedures/functions confuse procedure parser, and thus metadata about them can not be created, leading to inability to retrieve said metadata, or execute procedures that have certain comments in them. (Bug #26959)
Fast date/time parsing doesn't take into account
00:00:00as a legal value. (Bug #26789)PreparedStatementis not closed inBlobFromLocator.getBytes(). (Bug #26592)When the configuration property
useCursorFetchwas set totrue, sometimes server would return new, more exact metadata during the execution of the server-side prepared statement that enables this functionality, which the driver ignored (using the original metadata returned duringprepare()), causing corrupt reading of data due to type mismatch when the actual rows were returned. (Bug #26173)CallableStatementswithOUT/INOUTparameters that are "binary" (BLOB,BIT,(VAR)BINARY,JAVA_OBJECT) have extra 7 bytes. (Bug #25715)Whitespace surrounding storage/size specifiers in stored procedure parameters declaration causes
NumberFormatExceptionto be thrown when calling stored procedure on JDK-1.5 or newer, as the Number classes in JDK-1.5+ are whitespace intolerant. (Bug #25624)Client options not sent correctly when using SSL, leading to stored procedures not being able to return results. Thanks to Don Cohen for the bug report, testcase and patch. (Bug #25545)
Statement.setMaxRows()is not effective on result sets materialized from cursors. (Bug #25517)BIT(> 1)is returned asjava.lang.StringfromResultSet.getObject()rather thanbyte[]. (Bug #25328)
Functionality Added or Changed
Usage Advisor will now issue warnings for result sets with large numbers of rows. You can configure the trigger value by using the
resultSetSizeThresholdparameter, which has a default value of 100.The
rewriteBatchedStatementsfeature can now be used with server-side prepared statements.Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
useServerPrepStmts=true
The default value of this property is
false(that is, Connector/J does not use server-side prepared statements).Improved speed of
datetimeparsing for ResultSets that come from plain or nonserver-side prepared statements. You can enable old implementation withuseFastDateParsing=falseas a configuration parameter.Usage Advisor now detects empty results sets and does not report on columns not referenced in those empty sets.
Fixed logging of XA commands sent to server, it is now configurable using
logXaCommandsproperty (defaults tofalse).Added configuration property
localSocketAddress, which is the host name or IP address given to explicitly configure the interface that the driver will bind the client side of the TCP/IP connection to when connecting.We've added a new configuration option
treatUtilDateAsTimestamp, which isfalseby default, as (1) We already had specific behavior to treat java.util.Date as a java.sql.Timestamp because it is useful to many folks, and (2) that behavior will very likely be required for drivers JDBC-post-4.0.
Bugs Fixed
Connection property
socketFactorywasn't exposed using correctly named mutator/accessor, causing data source implementations that use JavaBean naming conventions to set properties to fail to set the property (and in the case of SJAS, fail silently when trying to set this parameter). (Bug #26326)A query execution which timed out did not always throw a
MySQLTimeoutException. (Bug #25836)Storing a
java.util.Dateobject in aBLOBcolumn would not be serialized correctly duringsetObject. (Bug #25787)Timer instance used for
Statement.setQueryTimeout()created per-connection, rather than per-VM, causing memory leak. (Bug #25514)EscapeProcessorgets confused by multiple backslashes. We now push the responsibility of syntax errors back on to the server for most escape sequences. (Bug #25399)INOUTparameters inCallableStatementsget doubly-escaped. (Bug #25379)When using the
rewriteBatchedStatementsconnection option withPreparedState.executeBatch()an internal memory leak would occur. (Bug #25073)Fixed issue where field-level for metadata from
DatabaseMetaDatawhen usingINFORMATION_SCHEMAdidn't have references to current connections, sometimes leading to Null Pointer Exceptions (NPEs) when introspecting them usingResultSetMetaData. (Bug #25073)StringUtils.indexOfIgnoreCaseRespectQuotes()isn't case-insensitive on the first character of the target. This bug also affectedrewriteBatchedStatementsfunctionality when prepared statements did not use uppercase for theVALUESclause. (Bug #25047)Client-side prepared statement parser gets confused by in-line comments
/*...*/and therefore cannot rewrite batch statements or reliably detect the type of statements when they are used. (Bug #25025)Results sets from
UPDATEstatements that are part of multi-statement queries would cause anSQLExceptionerror, "Result is from UPDATE". (Bug #25009)Specifying
US-ASCIIas the character set in a connection to a MySQL 4.1 or newer server does not map correctly. (Bug #24840)Using
DatabaseMetaData.getSQLKeywords()does not return a all of the of the reserved keywords for the current MySQL version. Current implementation returns the list of reserved words for MySQL 5.1, and does not distinguish between versions. (Bug #24794)Calling
Statement.cancel()could result in a Null Pointer Exception (NPE). (Bug #24721)Using
setFetchSize()breaks preparedSHOWand other commands. (Bug #24360)Calendars and timezones are now lazily instantiated when required. (Bug #24351)
Using
DATETIMEcolumns would result in time shifts whenuseServerPrepStmtswas true. This occurred due to different behavior when using client-side compared to server-side prepared statements and theuseJDBCCompliantTimezoneShiftoption. This is now fixed if moving from server-side prepared statements to client-side prepared statements by settinguseSSPSCompatibleTimezoneShifttotrue, as the driver can't tell if this is a new deployment that never used server-side prepared statements, or if it is an existing deployment that is switching to client-side prepared statements from server-side prepared statements. (Bug #24344)Connector/J now returns a better error message when server doesn't return enough information to determine stored procedure/function parameter types. (Bug #24065)
A connection error would occur when connecting to a MySQL server with certain character sets. Some collations/character sets reported as "unknown" (specifically
ciasvariants of existing character sets), and inability to override the detected server character set. (Bug #23645)Inconsistency between
getSchemasandINFORMATION_SCHEMA. (Bug #23304)DatabaseMetaData.getSchemas()doesn't return aTABLE_CATALOGcolumn. (Bug #23303)When using a JDBC connection URL that is malformed, the
NonRegisteringDriver.getPropertyInfomethod will throw a Null Pointer Exception (NPE). (Bug #22628)Some exceptions thrown out of
StandardSocketFactorywere needlessly wrapped, obscuring their true cause, especially when using socket timeouts. (Bug #21480)When using a server-side prepared statement the driver would send timestamps to the server using nanoseconds instead of milliseconds. (Bug #21438)
When using server-side prepared statements and timestamp columns, value would be incorrectly populated (with nanoseconds, not microseconds). (Bug #21438)
ParameterMetaDatathrowsNullPointerExceptionwhen prepared SQL has a syntax error. AddedgenerateSimpleParameterMetadataconfiguration property, which when set totruewill generate metadata reflectingVARCHARfor every parameter (the default isfalse, which will cause an exception to be thrown if no parameter metadata for the statement is actually available). (Bug #21267)Fixed an issue where
XADataSourcescouldn't be bound into JNDI, as theDataSourceFactorydidn't know how to create instances of them.
Other Changes
Avoid static synchronized code in JVM class libraries for dealing with default timezones.
Performance enhancement of initial character set configuration, driver will only send commands required to configure connection character set session variables if the current values on the server do not match what is required.
Re-worked stored procedure parameter parser to be more robust. Driver no longer requires
BEGINin stored procedure definition, but does have requirement that if a stored function begins with a label directly after the "returns" clause, that the label is not a quoted identifier.Throw exceptions encountered during timeout to thread calling
Statement.execute*(), rather thanRuntimeException.Changed cached result set metadata (when using
cacheResultSetMetadata=true) to be cached per-connection rather than per-statement as previously implemented.Reverted back to internal character conversion routines for single-byte character sets, as the ones internal to the JVM are using much more CPU time than our internal implementation.
When extracting foreign key information from
SHOW CREATE TABLEinDatabaseMetaData, ignore exceptions relating to tables being missing (which could happen for cross-reference or imported-key requests, as the list of tables is generated first, then iterated).Fixed some Null Pointer Exceptions (NPEs) when cached metadata was used with
UpdatableResultSets.Take
localSocketAddressproperty into account when creating instances ofCommunicationsExceptionwhen the underlying exception is ajava.net.BindException, so that a friendlier error message is given with a little internal diagnostics.Fixed cases where
ServerPreparedStatementsweren't using cached metadata whencacheResultSetMetadata=truewas used.Use a
java.util.TreeMapto map column names to ordinal indexes forResultSet.findColumn()instead of a HashMap. This enables us to have case-insensitive lookups (required by the JDBC specification) without resorting to the many transient object instances needed to support this requirement with a normalHashMapwith either case-adjusted keys, or case-insensitive keys. (In the worst case scenario for lookups of a 1000 column result set, TreeMaps are about half as fast wall-clock time as a HashMap, however in normal applications their use gives many orders of magnitude reduction in transient object instance creation which pays off later for CPU usage in garbage collection).When using cached metadata, skip field-level metadata packets coming from the server, rather than reading them and discarding them without creating
com.mysql.jdbc.Fieldinstances.
Bugs Fixed
DBMD.getColumns() does not return expected COLUMN_SIZE for the SET type, now returns length of largest possible set disregarding whitespace or the "," delimitters to be consistent with the ODBC driver. (Bug #22613)
Added new _ci collations to CharsetMapping - utf8_unicode_ci not working. (Bug #22456)
Driver was using milliseconds for Statement.setQueryTimeout() when specification says argument is to be in seconds. (Bug #22359)
Workaround for server crash when calling stored procedures using a server-side prepared statement (driver now detects prepare(stored procedure) and substitutes client-side prepared statement). (Bug #22297)
Driver issues truncation on write exception when it shouldn't (due to sending big decimal incorrectly to server with server-side prepared statement). (Bug #22290)
Newlines causing whitespace to span confuse procedure parser when getting parameter metadata for stored procedures. (Bug #22024)
When using information_schema for metadata, COLUMN_SIZE for getColumns() is not clamped to range of java.lang.Integer as is the case when not using information_schema, thus leading to a truncation exception that isn't present when not using information_schema. (Bug #21544)
Column names don't match metadata in cases where server doesn't return original column names (column functions) thus breaking compatibility with applications that expect 1-to-1 mappings between
findColumn()andrsmd.getColumnName(), usually manifests itself as "Can't find column ('')" exceptions. (Bug #21379)Driver now sends numeric 1 or 0 for client-prepared statement
setBoolean()calls instead of '1' or '0'.Fixed configuration property
jdbcCompliantTruncationwas not being used for reads of result set values.DatabaseMetaData correctly reports
trueforsupportsCatalog*()methods.Driver now supports
{call sp}(without "()" if procedure has no arguments).
Functionality Added or Changed
Added configuration option
noAccessToProcedureBodieswhich will cause the driver to create basic parameter metadata forCallableStatementswhen the user does not have access to procedure bodies usingSHOW CREATE PROCEDUREor selecting frommysql.procinstead of throwing an exception. The default value for this option isfalse
Bugs Fixed
Fixed
Statement.cancel()causesNullPointerExceptionif underlying connection has been closed due to server failure. (Bug #20650)If the connection to the server has been closed due to a server failure, then the cleanup process will call
Statement.cancel(), triggering aNullPointerException, even though there is no active connection. (Bug #20650)
Bugs Fixed
MysqlXaConnection.recover(int flags)now permits combinations ofXAResource.TMSTARTRSCANandTMENDRSCAN. To simulate the “scanning” nature of the interface, we return all prepared XIDs forTMSTARTRSCAN, and no new XIDs for calls withTMNOFLAGS, orTMENDRSCANwhen not in combination withTMSTARTRSCAN. This change was made for API compliance, as well as integration with IBM WebSphere's transaction manager. (Bug #20242)Fixed
MysqlValidConnectionCheckerfor JBoss doesn't work withMySQLXADataSources. (Bug #20242)Added connection/datasource property
pinGlobalTxToPhysicalConnection(defaults tofalse). When set totrue, when usingXAConnections, the driver ensures that operations on a given XID are always routed to the same physical connection. This enables theXAConnectionto supportXA START ... JOINafterXA ENDhas been called, and is also a workaround for transaction managers that don't maintain thread affinity for a global transaction (most either always maintain thread affinity, or have it as a configuration option). (Bug #20242)Better caching of character set converters (per-connection) to remove a bottleneck for multibyte character sets. (Bug #20242)
Fixed
ConnectionProperties(and thus some subclasses) are not serializable, even though some J2EE containers expect them to be. (Bug #19169)Fixed driver fails on non-ASCII platforms. The driver was assuming that the platform character set would be a superset of MySQL's
latin1when doing the handshake for authentication, and when reading error messages. We now use Cp1252 for all strings sent to the server during the handshake phase, and a hard-coded mapping of thelanguagesystem variable to the character set that is used for error messages. (Bug #18086)Fixed can't use
XAConnectionfor local transactions when no global transaction is in progress. (Bug #17401)
Not released due to a packaging error
Version 5.0.1 has no changelog entries.
Bugs Fixed
Added support for Connector/MXJ integration using url subprotocol
jdbc:mysql:mxj://.... (Bug #14729)Idle timeouts cause
XAConnectionsto whine about rolling themselves back. (Bug #14729)When fix for Bug #14562 was merged from 3.1.12, added functionality for
CallableStatement's parameter metadata to return correct information for.getParameterClassName(). (Bug #14729)Added service-provider entry to
META-INF/services/java.sql.Driverfor JDBC-4.0 support. (Bug #14729)Fuller synchronization of
Connectionto avoid deadlocks when using multithreaded frameworks that multithread a single connection (usually not recommended, but the JDBC spec permits it anyways), part of fix to Bug #14972). (Bug #14729)Moved all
SQLExceptionconstructor usage to a factory inSQLError(ground-work for JDBC-4.0SQLState-based exception classes). (Bug #14729)Removed Java5-specific calls to
BigDecimalconstructor (when result set value is'',(int)0was being used as an argument indirectly using method return value. This signature doesn't exist prior to Java5.) (Bug #14729)Implementation of
Statement.cancel()andStatement.setQueryTimeout(). Both require MySQL-5.0.0 or newer server, require a separate connection to issue theKILL QUERYstatement, and in the case ofsetQueryTimeout()creates an additional thread to handle the timeout functionality.Note: Failures to cancel the statement for
setQueryTimeout()may manifest themselves asRuntimeExceptionsrather than failing silently, as there is currently no way to unblock the thread that is executing the query being cancelled due to timeout expiration and have it throw the exception instead. (Bug #14729)Return "[VAR]BINARY" for
RSMD.getColumnTypeName()when that is actually the type, and it can be distinguished (MySQL-4.1 and newer). (Bug #14729)Attempt detection of the MySQL type
BINARY(it is an alias, so this isn't always reliable), and use thejava.sql.Types.BINARYtype mapping for it.Added unit tests for
XADatasource, as well as friendlier exceptions for XA failures compared to the "stock"XAException(which has no messages).If the connection
useTimezoneis set totrue, then also respect time zone conversions in escape-processed string literals (for example,"{ts ...}"and"{t ...}").Do not permit
.setAutoCommit(true), or.commit()or.rollback()on an XA-managed connection as per the JDBC specification.XADataSourceimplemented (ported from 3.2 branch which won't be released as a product). Usecom.mysql.jdbc.jdbc2.optional.MysqlXADataSourceas your datasource class name in your application server to utilize XA transactions in MySQL-5.0.10 and newer.Moved
-bin-g.jarfile into separatedebugsubdirectory to avoid confusion.Return original column name for
RSMD.getColumnName()if the column was aliased, alias name for.getColumnLabel()(if aliased), and original table name for.getTableName(). Note this only works for MySQL-4.1 and newer, as older servers don't make this information available to clients.Setting
useJDBCCompliantTimezoneShift=true(it is not the default) causes the driver to use GMT for allTIMESTAMP/DATETIMEtime zones, and the current VM time zone for any other type that refers to time zones. This feature can not be used whenuseTimezone=trueto convert between server and client time zones.PreparedStatement.setString()didn't work correctly whensql_modeon server containedNO_BACKSLASH_ESCAPESand no characters that needed escaping were present in the string.Add one level of indirection of internal representation of
CallableStatementparameter metadata to avoid class not found issues on JDK-1.3 forParameterMetadatainterface (which doesn't exist prior to JDBC-3.0).
- D.5.3.1. Changes in MySQL Connector/J 3.1.15 (Not yet released)
- D.5.3.2. Changes in MySQL Connector/J 3.1.14 (19 October 2006)
- D.5.3.3. Changes in MySQL Connector/J 3.1.13 (26 May 2006)
- D.5.3.4. Changes in MySQL Connector/J 3.1.12 (30 November 2005)
- D.5.3.5. Changes in MySQL Connector/J 3.1.11 (07 October 2005)
- D.5.3.6. Changes in MySQL Connector/J 3.1.10 (23 June 2005)
- D.5.3.7. Changes in MySQL Connector/J 3.1.9 (22 June 2005)
- D.5.3.8. Changes in MySQL Connector/J 3.1.8 (14 April 2005)
- D.5.3.9. Changes in MySQL Connector/J 3.1.7 (18 February 2005)
- D.5.3.10. Changes in MySQL Connector/J 3.1.6 (23 December 2004)
- D.5.3.11. Changes in MySQL Connector/J 3.1.5 (02 December 2004)
- D.5.3.12. Changes in MySQL Connector/J 3.1.4 (04 September 2004)
- D.5.3.13. Changes in MySQL Connector/J 3.1.3 (07 July 2004)
- D.5.3.14. Changes in MySQL Connector/J 3.1.2 (09 June 2004)
- D.5.3.15. Changes in MySQL Connector/J 3.1.1 (14 February 2004, alpha)
- D.5.3.16. Changes in MySQL Connector/J 3.1.0 (18 February 2003, alpha)
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
useServerPrepStmts=true
The default value of this property is false
(that is, Connector/J does not use server-side prepared
statements).
Bugs Fixed
Specifying
US-ASCIIas the character set in a connection to a MySQL 4.1 or newer server does not map correctly. (Bug #24840)
Bugs Fixed
Check and store value for continueBatchOnError property in constructor of Statements, rather than when executing batches, so that Connections closed out from underneath statements don't cause NullPointerExceptions when it is required to check this property. (Bug #22290)
Driver now sends numeric 1 or 0 for client-prepared statement setBoolean() calls instead of '1' or '0'. (Bug #22290)
Fixed bug where driver would not advance to next host if roundRobinLoadBalance=true and the last host in the list is down. (Bug #22290)
Driver issues truncation on write exception when it shouldn't (due to sending big decimal incorrectly to server with server-side prepared statement). (Bug #22290)
Fixed bug when calling stored functions, where parameters weren't numbered correctly (first parameter is now the return value, subsequent parameters if specified start at index "2"). (Bug #22290)
Removed logger autodetection altogether, must now specify logger explicitly if you want to use a logger other than one that logs to STDERR. (Bug #21207)
DDriver throws NPE when tracing prepared statements that have been closed (in asSQL()). (Bug #21207)
ResultSet.getSomeInteger() doesn't work for BIT(>1). (Bug #21062)
Escape of quotation marks in client-side prepared statements parsing not respected. Patch covers more than bug report, including NO_BACKSLASH_ESCAPES being set, and stacked quote characters forms of escaping (that is, '' or ""). (Bug #20888)
Fixed can't pool server-side prepared statements, exception raised when re-using them. (Bug #20687)
Fixed Updatable result set that contains a BIT column fails when server-side prepared statements are used. (Bug #20485)
Fixed updatable result set throws ClassCastException when there is row data and moveToInsertRow() is called. (Bug #20479)
Fixed ResultSet.getShort() for UNSIGNED TINYINT returns incorrect values when using server-side prepared statements. (Bug #20306)
ReplicationDriver does not always round-robin load balance depending on URL used for slaves list. (Bug #19993)
Fixed calling toString() on ResultSetMetaData for driver-generated (that is, from DatabaseMetaData method calls, or from getGeneratedKeys()) result sets would raise a NullPointerException. (Bug #19993)
Connection fails to localhost when using timeout and IPv6 is configured. (Bug #19726)
ResultSet.getFloatFromString() can't retrieve values near Float.MIN/MAX_VALUE. (Bug #18880)
DatabaseMetaData.getTables()orgetColumns()with a bad catalog parameter threw an exception rather than return an empty result set (as required by the specification). (Bug #18258)Fixed memory leak with profileSQL=true. (Bug #16987)
Fixed NullPointerException in MysqlDataSourceFactory due to Reference containing RefAddrs with null content. (Bug #16791)
Bugs Fixed
Fixed PreparedStatement.setObject(int, Object, int)doesn't respect scale of BigDecimals. (Bug #19615)Fixed
ResultSet.wasNull()returns incorrect value when extracting native string from server-side prepared statement generated result set. (Bug #19282)Fixed invalid classname returned for
ResultSetMetaData.getColumnClassName()forBIGINT type. (Bug #19282)Fixed case where driver wasn't reading server status correctly when fetching server-side prepared statement rows, which in some cases could cause warning counts to be off, or multiple result sets to not be read off the wire. (Bug #19282)
Fixed data truncation and
getWarnings()only returns last warning in set. (Bug #18740)Fixed aliased column names where length of name > 251 are corrupted. (Bug #18554)
Improved performance of retrieving
BigDecimal,Time,TimestampandDatevalues from server-side prepared statements by creating fewer short-lived instances ofStringswhen the native type is not an exact match for the requested type. (Bug #18496)Added performance feature, re-writing of batched executes for
Statement.executeBatch()(for all DML statements) andPreparedStatement.executeBatch()(for INSERTs with VALUE clauses only). Enable by using "rewriteBatchedStatements=true" in your JDBC URL. (Bug #18041)Fixed issue where server-side prepared statements don't cause truncation exceptions to be thrown when truncation happens. (Bug #18041)
Fixed
CallableStatement.registerOutParameter()not working when some parameters pre-populated. Still waiting for feedback from JDBC experts group to determine what correct parameter count fromgetMetaData()should be, however. (Bug #17898)Fixed calling
clearParameters()on a closed prepared statement causes NPE. (Bug #17587)Map "latin1" on MySQL server to CP1252 for MySQL > 4.1.0. (Bug #17587)
Added additional accessor and mutator methods on ConnectionProperties so that DataSource users can use same naming as regular URL properties. (Bug #17587)
Fixed
ResultSet.wasNull()not always reset correctly for booleans when done using conversion for server-side prepared statements. (Bug #17450)Fixed
Statement.getGeneratedKeys()throwsNullPointerExceptionwhen no query has been processed. (Bug #17099)Fixed updatable result set doesn't return
AUTO_INCREMENTvalues forinsertRow()when multiple column primary keys are used. (the driver was checking for the existence of single-column primary keys and an autoincrement value > 0 instead of a straightforwardisAutoIncrement()check). (Bug #16841)DBMD.getColumns()returns wrong type forBIT. (Bug #15854)lib-nodistdirectory missing from package breaks out-of-box build. (Bug #15676)Fixed issue with
ReplicationConnectionincorrectly copying state, doesn't transfer connection context correctly when transitioning between the same read-only states. (Bug #15570)No "dos" character set in MySQL > 4.1.0. (Bug #15544)
INOUTparameter does not storeINvalue. (Bug #15464)PreparedStatement.setObject()serializesBigIntegeras object, rather than sending as numeric value (and is thus not complementary to.getObject()on anUNSIGNED LONGtype). (Bug #15383)Fixed issue where driver was unable to initialize character set mapping tables. Removed reliance on
.propertiesfiles to hold this information, as it turns out to be too problematic to code around class loader hierarchies that change depending on how an application is deployed. Moved information back into theCharsetMappingclass. (Bug #14938)Exception thrown for new decimal type when using updatable result sets. (Bug #14609)
Driver now aware of fix for
BITtype metadata that went into MySQL-5.0.21 for server not reporting length consistently . (Bug #13601)Added support for Apache Commons logging, use "com.mysql.jdbc.log.CommonsLogger" as the value for the "logger" configuration property. (Bug #13469)
Fixed driver trying to call methods that don't exist on older and newer versions of Log4j. The fix is not trying to auto-detect presence of log4j, too many different incompatible versions out there in the wild to do this reliably.
If you relied on autodetection before, you will need to add "logger=com.mysql.jdbc.log.Log4JLogger" to your JDBC URL to enable Log4J usage, or alternatively use the new "CommonsLogger" class to take care of this. (Bug #13469)
LogFactory now prepends
com.mysql.jdbc.logto the log class name if it cannot be found as specified. This enables you to use “short names” for the built-in log factories, for example,logger=CommonsLoggerinstead oflogger=com.mysql.jdbc.log.CommonsLogger. (Bug #13469)ResultSet.getShort()forUNSIGNED TINYINTreturned wrong values. (Bug #11874)
Bugs Fixed
Process escape tokens in
Connection.prepareStatement(...). You can disable this behavior by setting the JDBC URL configuration propertyprocessEscapeCodesForPrepStmtstofalse. (Bug #15141)Usage advisor complains about unreferenced columns, even though they've been referenced. (Bug #15065)
Driver incorrectly closes streams passed as arguments to
PreparedStatements. Reverts to legacy behavior by setting the JDBC configuration propertyautoClosePStmtStreamstotrue(also included in the 3-0-Compat configuration “bundle”). (Bug #15024)Deadlock while closing server-side prepared statements from multiple threads sharing one connection. (Bug #14972)
Unable to initialize character set mapping tables (due to J2EE classloader differences). (Bug #14938)
Escape processor replaces quote character in quoted string with string delimiter. (Bug #14909)
DatabaseMetaData.getColumns()doesn't returnTABLE_NAMEcorrectly. (Bug #14815)storesMixedCaseIdentifiers()returnsfalse(Bug #14562)storesLowerCaseIdentifiers()returnstrue(Bug #14562)storesMixedCaseQuotedIdentifiers()returnsfalse(Bug #14562)storesMixedCaseQuotedIdentifiers()returnstrue(Bug #14562)If
lower_case_table_names=0(on server):storesLowerCaseIdentifiers()returnsfalsestoresLowerCaseQuotedIdentifiers()returnsfalsestoresMixedCaseIdentifiers()returnstruestoresMixedCaseQuotedIdentifiers()returnstruestoresUpperCaseIdentifiers()returnsfalsestoresUpperCaseQuotedIdentifiers()returnstrue
(Bug #14562)
storesUpperCaseIdentifiers()returnsfalse(Bug #14562)storesUpperCaseQuotedIdentifiers()returnstrue(Bug #14562)If
lower_case_table_names=1(on server):storesLowerCaseIdentifiers()returnstruestoresLowerCaseQuotedIdentifiers()returnstruestoresMixedCaseIdentifiers()returnsfalsestoresMixedCaseQuotedIdentifiers()returnsfalsestoresUpperCaseIdentifiers()returnsfalsestoresUpperCaseQuotedIdentifiers()returnstrue
(Bug #14562)
storesLowerCaseQuotedIdentifiers()returnstrue(Bug #14562)Fixed
DatabaseMetaData.stores*Identifiers():If
lower_case_table_names=0(on server):storesLowerCaseIdentifiers()returnsfalsestoresLowerCaseQuotedIdentifiers()returnsfalsestoresMixedCaseIdentifiers()returnstruestoresMixedCaseQuotedIdentifiers()returnstruestoresUpperCaseIdentifiers()returnsfalsestoresUpperCaseQuotedIdentifiers()returnstrue
If
lower_case_table_names=1(on server):storesLowerCaseIdentifiers()returnstruestoresLowerCaseQuotedIdentifiers()returnstruestoresMixedCaseIdentifiers()returnsfalsestoresMixedCaseQuotedIdentifiers()returnsfalsestoresUpperCaseIdentifiers()returnsfalsestoresUpperCaseQuotedIdentifiers()returnstrue
(Bug #14562)
storesMixedCaseIdentifiers()returnstrue(Bug #14562)storesLowerCaseQuotedIdentifiers()returnsfalse(Bug #14562)Java type conversion may be incorrect for
MEDIUMINT. (Bug #14562)storesLowerCaseIdentifiers()returnsfalse(Bug #14562)Added configuration property
useGmtMillisForDatetimeswhich when set totruecausesResultSet.getDate(),.getTimestamp()to return correct millis-since GMT when.getTime()is called on the return value (currently default isfalsefor legacy behavior). (Bug #14562)Extraneous sleep on
autoReconnect. (Bug #13775)Reconnect during middle of
executeBatch()should not occur ifautoReconnectis enabled. (Bug #13255)maxQuerySizeToLogis not respected. Added logging of bound values forexecute()phase of server-side prepared statements whenprofileSQL=trueas well. (Bug #13048)OpenOffice expects
DBMD.supportsIntegrityEnhancementFacility()to returntrueif foreign keys are supported by the datasource, even though this method also covers support for check constraints, which MySQL doesn't have. Setting the configuration propertyoverrideSupportsIntegrityEnhancementFacilitytotruecauses the driver to returntruefor this method. (Bug #12975)Added
com.mysql.jdbc.testsuite.url.defaultsystem property to set default JDBC url for testsuite (to speed up bug resolution when I'm working in Eclipse). (Bug #12975)logSlowQueriesshould give better info. (Bug #12230)Don't increase timeout for failover/reconnect. (Bug #6577)
Fixed client-side prepared statement bug with embedded
?characters inside quoted identifiers (it was recognized as a placeholder, when it was not).Do not permit
executeBatch()forCallableStatementswith registeredOUT/INOUTparameters (JDBC compliance).Fall back to platform-encoding for
URLDecoder.decode()when parsing driver URL properties if the platform doesn't have a two-argument version of this method.
Bugs Fixed
The configuration property
sessionVariablesnow permits you to specify variables that start with the “@” sign. (Bug #13453)URL configuration parameters do not permit “
&” or “=” in their values. The JDBC driver now parses configuration parameters as if they are encoded using the application/x-www-form-urlencoded format as specified byjava.net.URLDecoder(http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLDecoder.html).If the “
%” character is present in a configuration property, it must now be represented as%25, which is the encoded form of “%” when using application/x-www-form-urlencoded encoding. (Bug #13453)Workaround for Bug #13374:
ResultSet.getStatement()on closed result set returnsNULL(as per JDBC 4.0 spec, but not backward-compatible). Set the connection propertyretainStatementAfterResultSetClosetotrueto be able to retrieve aResultSet's statement after theResultSethas been closed using.getStatement()(the default isfalse, to be JDBC-compliant and to reduce the chance that code using JDBC leaksStatementinstances). (Bug #13277)ResultSetMetaDatafromStatement.getGeneratedKeys()caused aNullPointerExceptionto be thrown whenever a method that required a connection reference was called. (Bug #13277)Backport of
VAR[BINARY|CHAR] [BINARY]types detection from 5.0 branch. (Bug #13277)Fixed
NullPointerExceptionwhen convertingcatalogparameter in manyDatabaseMetaDataMethodstobyte[]s (for the result set) when the parameter isnull. (nullis not technically permitted by the JDBC specification, but we have historically permitted it). (Bug #13277)Backport of
Fieldclass,ResultSetMetaData.getColumnClassName(), andResultSet.getObject(int)changes from 5.0 branch to fix behavior surroundingVARCHAR BINARY/VARBINARYand related types. (Bug #13277)Read response in
MysqlIO.sendFileToServer(), even if the local file can't be opened, otherwise next query issued will fail, because it is reading the response to the emptyLOAD DATA INFILEpacket sent to the server. (Bug #13277)When
gatherPerfMetricsis enabled for servers older than 4.1.0, aNullPointerExceptionis thrown from the constructor ofResultSetif the query doesn't use any tables. (Bug #13043)java.sql.Types.OTHERreturned forBINARYandVARBINARYcolumns when usingDatabaseMetaData.getColumns(). (Bug #12970)ServerPreparedStatement.getBinding()now checks if the statement is closed before attempting to reference the list of parameter bindings, to avoid throwing aNullPointerException. (Bug #12970)Tokenizer for
=in URL properties was causingsessionVariables=....to be parameterized incorrectly. (Bug #12753)cp1251incorrectly mapped towin1251for servers newer than 4.0.x. (Bug #12752)getExportedKeys()(Bug #12541)Specifying a catalog works as stated in the API docs. (Bug #12541)
Specifying
NULLmeans that catalog will not be used to filter the results (thus all databases will be searched), unless you've setnullCatalogMeansCurrent=truein your JDBC URL properties. (Bug #12541)getIndexInfo()(Bug #12541)getProcedures()(and thus indirectlygetProcedureColumns()) (Bug #12541)getImportedKeys()(Bug #12541)Specifying
""means “current” catalog, even though this isn't quite JDBC spec compliant, it is there for legacy users. (Bug #12541)getCrossReference()(Bug #12541)Added
Connection.isMasterConnection()for clients to be able to determine if a multi-host master/slave connection is connected to the first host in the list. (Bug #12541)getColumns()(Bug #12541)Handling of catalog argument in
DatabaseMetaData.getIndexInfo(), which also means changes to the following methods inDatabaseMetaData:getBestRowIdentifier()getColumns()getCrossReference()getExportedKeys()getImportedKeys()getIndexInfo()getPrimaryKeys()getProcedures()(and thus indirectlygetProcedureColumns())getTables()
The
catalogargument in all of these methods now behaves in the following way:Specifying
NULLmeans that catalog will not be used to filter the results (thus all databases will be searched), unless you've setnullCatalogMeansCurrent=truein your JDBC URL properties.Specifying
""means “current” catalog, even though this isn't quite JDBC spec compliant, it is there for legacy users.Specifying a catalog works as stated in the API docs.
Made
Connection.clientPrepare()available from “wrapped” connections in thejdbc2.optionalpackage (connections built byConnectionPoolDataSourceinstances).
(Bug #12541)
getBestRowIdentifier()(Bug #12541)Made
Connection.clientPrepare()available from “wrapped” connections in thejdbc2.optionalpackage (connections built byConnectionPoolDataSourceinstances). (Bug #12541)getTables()(Bug #12541)getPrimaryKeys()(Bug #12541)Connection.prepareCall()is database name case-sensitive (on Windows systems). (Bug #12417)explainSlowQuerieshangs with server-side prepared statements. (Bug #12229)Properties shared between master and slave with replication connection. (Bug #12218)
Geometry types not handled with server-side prepared statements. (Bug #12104)
maxPerformance.propertiesmis-spells “elideSetAutoCommits”. (Bug #11976)ReplicationConnectionwon't switch to slave, throws “Catalog can't be null” exception. (Bug #11879)Pstmt.setObject(...., Types.BOOLEAN)throws exception. (Bug #11798)Escape tokenizer doesn't respect stacked single quotation marks for escapes. (Bug #11797)
GEOMETRYtype not recognized when using server-side prepared statements. (Bug #11797)Foreign key information that is quoted is parsed incorrectly when
DatabaseMetaDatamethods use that information. (Bug #11781)The
sendBlobChunkSizeproperty is now clamped tomax_allowed_packetwith consideration of stream buffer size and packet headers to avoidPacketTooBigExceptionswhenmax_allowed_packetis similar in size to the defaultsendBlobChunkSizewhich is 1M. (Bug #11781)CallableStatement.clearParameters()now clears resources associated withINOUT/OUTPUTparameters as well asINPUTparameters. (Bug #11781)Fixed regression caused by fix for Bug #11552 that caused driver to return incorrect values for unsigned integers when those integers where within the range of the positive signed type. (Bug #11663)
Moved source code to Subversion repository. (Bug #11663)
Incorrect generation of testcase scripts for server-side prepared statements. (Bug #11663)
Fixed statements generated for testcases missing
;for “plain” statements. (Bug #11629)Spurious
!on console when character encoding isutf8. (Bug #11629)StringUtils.getBytes()doesn't work when using multi-byte character encodings and a length in characters is specified. (Bug #11614)DBMD.storesLower/Mixed/UpperIdentifiers()reports incorrect values for servers deployed on Windows. (Bug #11575)Reworked
Fieldclass,*Buffer, andMysqlIOto be aware of field lengths >Integer.MAX_VALUE. (Bug #11498)Escape processor didn't honor strings demarcated with double quotation marks. (Bug #11498)
Updated
DBMD.supportsCorrelatedQueries()to returntruefor versions > 4.1,supportsGroupByUnrelated()to returntrueandgetResultSetHoldability()to returnHOLD_CURSORS_OVER_COMMIT. (Bug #11498)Lifted restriction of changing streaming parameters with server-side prepared statements. As long as
allstreaming parameters were set before execution,.clearParameters()does not have to be called. (due to limitation of client/server protocol, prepared statements can not reset individual stream data on the server side). (Bug #11498)ResultSet.moveToCurrentRow()fails to work when preceded by a call toResultSet.moveToInsertRow(). (Bug #11190)VARBINARYdata corrupted when using server-side prepared statements and.setBytes(). (Bug #11115)Statement.getWarnings()fails with NPE if statement has been closed. (Bug #10630)Only get
char[]from SQL inPreparedStatement.ParseInfo()when needed. (Bug #10630)
Bugs Fixed
Initial implemention of
ParameterMetadataforPreparedStatement.getParameterMetadata(). Only works fully forCallableStatements, as current server-side prepared statements return every parameter as aVARCHARtype.Fixed connecting without a database specified raised an exception in
MysqlIO.changeDatabaseTo().
Bugs Fixed
Production package doesn't include JBoss integration classes. (Bug #11411)
Removed nonsensical “costly type conversion” warnings when using usage advisor. (Bug #11411)
Fixed
PreparedStatement.setClob()not acceptingnullas a parameter. (Bug #11360)Connector/J dumping query into
SQLExceptiontwice. (Bug #11360)autoReconnectping causes exception on connection startup. (Bug #11259)Connection.setCatalog()is now aware of theuseLocalSessionStateconfiguration property, which when set totruewill prevent the driver from sendingUSE ...to the server if the requested catalog is the same as the current catalog. (Bug #11115)3-0-Compat: Compatibility with Connector/J 3.0.x functionality (Bug #11115)maxPerformance: Maximum performance without being reckless (Bug #11115)solarisMaxPerformance: Maximum performance for Solaris, avoids syscalls where it can (Bug #11115)Added
maintainTimeStatsconfiguration property (defaults totrue), which tells the driver whether or not to keep track of the last query time and the last successful packet sent to the server's time. If set tofalse, removes two syscalls per query. (Bug #11115)VARBINARYdata corrupted when using server-side prepared statements andResultSet.getBytes(). (Bug #11115)Added the following configuration bundles, use one or many using the
useConfigsconfiguration property:maxPerformance: Maximum performance without being recklesssolarisMaxPerformance: Maximum performance for Solaris, avoids syscalls where it can3-0-Compat: Compatibility with Connector/J 3.0.x functionality
(Bug #11115)
Try to handle
OutOfMemoryОшибкиmore gracefully. Although not much can be done, they will in most cases close the connection they happened on so that further operations don't run into a connection in some unknown state. When an OOM has happened, any further operations on the connection will fail with a “Connection closed” exception that will also list the OOM exception as the reason for the implicit connection close event. (Bug #10850)Setting
cachePrepStmts=truenow causes theConnectionto also cache the check the driver performs to determine if a prepared statement can be server-side or not, as well as caches server-side prepared statements for the lifetime of a connection. As before, theprepStmtCacheSizeparameter controls the size of these caches. (Bug #10850)Don't send
COM_RESET_STMTfor each execution of a server-side prepared statement if it isn't required. (Bug #10850)0-length streams not sent to server when using server-side prepared statements. (Bug #10850)
Driver detects if you're running MySQL-5.0.7 or later, and does not scan for
LIMIT ?[,?]in statements being prepared, as the server supports those types of queries now. (Bug #10850)Reorganized directory layout. Sources now are in
srcfolder. Don't pollute parent directory when building, now output goes to./build, distribution goes to./dist. (Bug #10496)Added support/bug hunting feature that generates
.sqltest scripts toSTDERRwhenautoGenerateTestcaseScriptis set totrue. (Bug #10496)SQLExceptionis thrown when using propertycharacterSetResultswithcp932oreucjpms. (Bug #10496)The data type returned for
TINYINT(1)columns whentinyInt1isBit=true(the default) can be switched betweenTypes.BOOLEANandTypes.BITusing the new configuration propertytransformedBitIsBoolean, which defaults tofalse. If set tofalse(the default),DatabaseMetaData.getColumns()andResultSetMetaData.getColumnType()will returnTypes.BOOLEANforTINYINT(1)columns. Iftrue,Types.BOOLEANwill be returned instead. Regardless of this configuration property, iftinyInt1isBitis enabled, columns with the typeTINYINT(1)will be returned asjava.lang.Booleaninstances fromResultSet.getObject(...), andResultSetMetaData.getColumnClassName()will returnjava.lang.Boolean. (Bug #10485)SQLExceptionthrown when retrievingYEAR(2)withResultSet.getString(). The driver will now always treatYEARtypes asjava.sql.Datesand return the correct values forgetString(). Alternatively, theyearIsDateTypeconnection property can be set tofalseand the values will be treated asSHORTs. (Bug #10485)Driver doesn't support
{?=CALL(...)}for calling stored functions. This involved adding support for function retrieval toDatabaseMetaData.getProcedures()andgetProcedureColumns()as well. (Bug #10310)Unsigned
SMALLINTtreated as signed forResultSet.getInt(), fixed all cases forUNSIGNEDinteger values and server-side prepared statements, as well asResultSet.getObject()forUNSIGNED TINYINT. (Bug #10156)Made
ServerPreparedStatement.asSql()work correctly so auto-explain functionality would work with server-side prepared statements. (Bug #10155)Double quotation marks not recognized when parsing client-side prepared statements. (Bug #10155)
Made JDBC2-compliant wrappers public to enable access to vendor extensions. (Bug #10155)
DatabaseMetaData.supportsMultipleOpenResults()now returnstrue. The driver has supported this for some time, DBMD just missed that fact. (Bug #10155)Cleaned up logging of profiler events, moved code to dump a profiler event as a string to
com.mysql.jdbc.log.LogUtilsso that third parties can use it. (Bug #10155)Made
enableStreamingResults()visible oncom.mysql.jdbc.jdbc2.optional.StatementWrapper. (Bug #10155)Actually write manifest file to correct place so it ends up in the binary jar file. (Bug #10144)
Added
createDatabaseIfNotExistproperty (default isfalse), which will cause the driver to ask the server to create the database specified in the URL if it doesn't exist. You must have the appropriate privileges for database creation for this to work. (Bug #10144)Memory leak in
ServerPreparedStatementifserverPrepare()fails. (Bug #10144)com.mysql.jdbc.PreparedStatement.ParseInfodoes unnecessary call totoCharArray(). (Bug #9064)Driver now correctly uses CP932 if available on the server for Windows-31J, CP932 and MS932 java encoding names, otherwise it resorts to SJIS, which is only a close approximation. Currently only MySQL-5.0.3 and newer (and MySQL-4.1.12 or .13, depending on when the character set gets backported) can reliably support any variant of CP932.
Overhaul of character set configuration, everything now lives in a properties file.
Bugs Fixed
Should accept
nullfor catalog (meaning use current) in DBMD methods, even though it is not JDBC-compliant for legacy's sake. Disable by setting connection propertynullCatalogMeansCurrenttofalse(which will be the default value in C/J 3.2.x). (Bug #9917)Fixed driver not returning
truefor-1whenResultSet.getBoolean()was called on result sets returned from server-side prepared statements. (Bug #9778)Added a
Manifest.MFfile with implementation information to the.jarfile. (Bug #9778)More tests in
Field.isOpaqueBinary()to distinguish opaque binary (that is, fields with typeCHAR(n)andCHARACTER SET BINARY) from output of various scalar and aggregate functions that return strings. (Bug #9778)DBMD.getTables()shouldn't return tables if views are asked for, even if the database version doesn't support views. (Bug #9778)Should accept
nullfor name patterns in DBMD (meaning “%”), even though it isn't JDBC compliant, for legacy's sake. Disable by setting connection propertynullNamePatternMatchesAlltofalse(which will be the default value in C/J 3.2.x). (Bug #9769)The performance metrics feature now gathers information about number of tables referenced in a SELECT. (Bug #9704)
The logging system is now automatically configured. If the value has been set by the user, using the URL property
loggeror the system propertycom.mysql.jdbc.logger, then use that, otherwise, autodetect it using the following steps:Log4j, if it is available,
Then JDK1.4 logging,
Then fallback to our
STDERRlogging.
(Bug #9704)
Statement.getMoreResults()could throw NPE when existing result set was.close()d. (Bug #9704)Stored procedures with
DECIMALparameters with storage specifications that contained “,” in them would fail. (Bug #9682)PreparedStatement.setObject(int, Object, int type, int scale)now uses scale value forBigDecimalinstances. (Bug #9682)Added support for the c3p0 connection pool's (http://c3p0.sf.net/) validation/connection checker interface which uses the lightweight
COM_PINGcall to the server if available. To use it, configure your c3p0 connection pool'sconnectionTesterClassNameproperty to usecom.mysql.jdbc.integration.c3p0.MysqlConnectionTester. (Bug #9320)PreparedStatement.getMetaData()inserts blank row in database under certain conditions when not using server-side prepared statements. (Bug #9320)Better detection of
LIMITinside/outside of quoted strings so that the driver can more correctly determine whether a prepared statement can be prepared on the server or not. (Bug #9320)Connection.canHandleAsPreparedStatement()now makes “best effort” to distinguishLIMITclauses with placeholders in them from ones without to have fewer false positives when generating work-arounds for statements the server cannot currently handle as server-side prepared statements. (Bug #9320)Fixed
build.xmlto not compilelog4jlogging iflog4jnot available. (Bug #9320)Added finalizers to
ResultSetandStatementimplementations to be JDBC spec-compliant, which requires that if not explicitly closed, these resources should be closed upon garbage collection. (Bug #9319)Stored procedures with same name in different databases confuse the driver when it tries to determine parameter counts/types. (Bug #9319)
A continuation of Bug #8868, where functions used in queries that should return nonstring types when resolved by temporary tables suddenly become opaque binary strings (work-around for server limitation). Also fixed fields with type of
CHAR(n) CHARACTER SET BINARYto return correct/matching classes forRSMD.getColumnClassName()andResultSet.getObject(). (Bug #9236)Cannot use
UTF-8for characterSetResults configuration property. (Bug #9206)PreparedStatement.addBatch()doesn't work with server-side prepared statements and streamingBINARYdata. (Bug #9040)ServerPreparedStatementsnow correctly “stream”BLOB/CLOBdata to the server. You can configure the threshold chunk size using the JDBC URL propertyblobSendChunkSize(the default is 1MB). (Bug #8868)DATE_FORMAT()queries returned asBLOBs fromgetObject(). (Bug #8868)Server-side session variables can be preset at connection time by passing them as a comma-delimited list for the connection property
sessionVariables. (Bug #8868)BlobFromLocatornow uses correct identifier quoting when generating prepared statements. (Bug #8868)Fixed regression in
ping()for users usingautoReconnect=true. (Bug #8868)Check for empty strings (
'') when convertingCHAR/VARCHARcolumn data to numbers, throw exception ifemptyStringsConvertToZeroconfiguration property is set tofalse(for backward-compatibility with 3.0, it is now set totrueby default, but will most likely default tofalsein 3.2). (Bug #8803)DATA_TYPEcolumn fromDBMD.getBestRowIdentifier()causesArrayIndexOutOfBoundsExceptionwhen accessed (and in fact, didn't return any value). (Bug #8803)DBMD.supportsMixedCase*Identifiers()returns wrong value on servers running on case-sensitive file systems. (Bug #8800)DBMD.supportsResultSetConcurrency()not returningtruefor forward-only/read-only result sets (we obviously support this). (Bug #8792)Fixed
ResultSet.getTime()on aNULLvalue for server-side prepared statements throws NPE.Made
Connection.ping()a public method.Added support for new precision-math
DECIMALtype in MySQL 5.0.3 and up.Fixed
DatabaseMetaData.getTables()returning views when they were not asked for as one of the requested table types.
Bugs Fixed
PreparedStatementsnot creating streaming result sets. (Bug #8487)Don't pass
NULLtoString.valueOf()inResultSet.getNativeConvertToString(), as it stringifies it (that is, returnsnull), which is not correct for the method in question. (Bug #8487)Fixed NPE in
ResultSet.realClose()when using usage advisor and result set was already closed. (Bug #8428)ResultSet.getString()doesn't maintain format stored on server, bug fix only enabled whennoDatetimeStringSyncproperty is set totrue(the default isfalse). (Bug #8428)Added support for
BITtype in MySQL-5.0.3. The driver will treatBIT(1-8)as the JDBC standardBITtype (which maps tojava.lang.Boolean), as the server does not currently send enough information to determine the size of a bitfield when < 9 bits are declared.BIT(>9)will be treated asVARBINARY, and will returnbyte[]whengetObject()is called. (Bug #8424)Added
useLocalSessionStateconfiguration property, when set totruethe JDBC driver trusts that the application is well-behaved and only sets autocommit and transaction isolation levels using the methods provided onjava.sql.Connection, and therefore can manipulate these values in many cases without incurring round-trips to the database server. (Bug #8424)Added
enableStreamingResults()toStatementfor connection pool implementations that checkStatement.setFetchSize()for specification-compliant values. CallStatement.setFetchSize(>=0)to disable the streaming results for that statement. (Bug #8424)ResultSet.getBigDecimal()throws exception when rounding would need to occur to set scale. The driver now chooses a rounding mode of “half up” if nonroundingBigDecimal.setScale()fails. (Bug #8424)Fixed synchronization issue with
ServerPreparedStatement.serverPrepare()that could cause deadlocks/crashes if connection was shared between threads. (Bug #8096)Emulated locators corrupt binary data when using server-side prepared statements. (Bug #8096)
Infinite recursion when “falling back” to master in failover configuration. (Bug #7952)
Disable multi-statements (if enabled) for MySQL-4.1 versions prior to version 4.1.10 if the query cache is enabled, as the server returns wrong results in this configuration. (Bug #7952)
Removed
dontUnpackBinaryResultsfunctionality, the driver now always stores results from server-side prepared statements as is from the server and unpacks them on demand. (Bug #7952)Fixed duplicated code in
configureClientCharset()that preventeduseOldUTF8Behavior=truefrom working properly. (Bug #7952)Added
holdResultsOpenOverStatementCloseproperty (default isfalse), that keeps result sets open over statement.close() or new execution on same statement (suggested by Kevin Burton). (Bug #7715)Detect new
sql_modevariable in string form (it used to be integer) and adjust quoting method for strings appropriately. (Bug #7715)Timestamps converted incorrectly to strings with server-side prepared statements and updatable result sets. (Bug #7715)
Timestamp key column data needed
_binarystripped forUpdatableResultSet.refreshRow(). (Bug #7686)Choose correct “direction” to apply time adjustments when both client and server are in GMT time zone when using
ResultSet.get(..., cal)andPreparedStatement.set(...., cal). (Bug #4718)Remove
_binaryintroducer from parameters used as in/out parameters inCallableStatement. (Bug #4718)Always return
byte[]s for output parameters registered as*BINARY. (Bug #4718)By default, the driver now scans SQL you are preparing using all variants of
Connection.prepareStatement()to determine if it is a supported type of statement to prepare on the server side, and if it is not supported by the server, it instead prepares it as a client-side emulated prepared statement. You can disable this by passingemulateUnsupportedPstmts=falsein your JDBC URL. (Bug #4718)Added
dontTrackOpenResourcesoption (default isfalse, to be JDBC compliant), which helps with memory use for nonwell-behaved apps (that is, applications that don't closeStatementobjects when they should). (Bug #4718)Send correct value for “boolean”
trueto server forPreparedStatement.setObject(n, "true", Types.BIT). (Bug #4718)Fixed bug with Connection not caching statements from
prepareStatement()when the statement wasn't a server-side prepared statement. (Bug #4718)
Bugs Fixed
DBMD.getProcedures()doesn't respect catalog parameter. (Bug #7026)Fixed hang on
SocketInputStream.read()withStatement.setMaxRows()and multiple result sets when driver has to truncate result set directly, rather than tacking aLIMITon the end of it.n
Bugs Fixed
Use 1MB packet for sending file for
LOAD DATA LOCAL INFILEif that is <max_allowed_packeton server. (Bug #6537)SUM()onDECIMALwith server-side prepared statement ignores scale if zero-padding is needed (this ends up being due to conversion toDOUBLEby server, which when converted to a string to parse intoBigDecimal, loses all “padding” zeros). (Bug #6537)Use
DatabaseMetaData.getIdentifierQuoteString()when building DBMD queries. (Bug #6537)Use our own implementation of buffered input streams to get around blocking behavior of
java.io.BufferedInputStream. Disable this withuseReadAheadInput=false. (Bug #6399)Make auto-deserialization of
java.lang.Objectsstored inBLOBcolumns configurable usingautoDeserializeproperty (defaults tofalse). (Bug #6399)ResultSetMetaData.getColumnDisplaySize()returns incorrect values for multi-byte charsets. (Bug #6399)Re-work
Field.isOpaqueBinary()to detectCHAR(to support fixed-length binary fields forn) CHARACTER SET BINARYResultSet.getObject(). (Bug #6399)Failing to connect to the server when one of the addresses for the given host name is IPV6 (which the server does not yet bind on). The driver now loops through all IP addresses for a given host, and stops on the first one that
accepts()asocket.connect(). (Bug #6348)Removed unwanted new
Throwable()inResultSetconstructor due to bad merge (caused a new object instance that was never used for every result set created). Found while profiling for Bug #6359. (Bug #6225)ServerSidePreparedStatementallocating short-lived objects unnecessarily. (Bug #6225)Use null-safe-equals for key comparisons in updatable result sets. (Bug #6225)
Fixed too-early creation of
StringBufferinEscapeProcessor.escapeSQL(), also returnStringwhen escaping not needed (to avoid unnecessary object allocations). Found while profiling for Bug #6359. (Bug #6225)UNSIGNED BIGINTunpacked incorrectly from server-side prepared statement result sets. (Bug #5729)Added experimental configuration property
dontUnpackBinaryResults, which delays unpacking binary result set values until they're asked for, and only creates object instances for nonnumeric values (it is set tofalseby default). For some usecase/jvm combinations, this is friendlier on the garbage collector. (Bug #5706)Don't throw exceptions for
Connection.releaseSavepoint(). (Bug #5706)Inefficient detection of pre-existing string instances in
ResultSet.getNativeString(). (Bug #5706)Use a per-session
Calendarinstance by default when decoding dates fromServerPreparedStatements(set to old, less performant behavior by setting propertydynamicCalendars=true). (Bug #5706)Fixed batched updates with server prepared statements weren't looking if the types had changed for a given batched set of parameters compared to the previous set, causing the server to return the error “Wrong arguments to mysql_stmt_execute()”. (Bug #5235)
Handle case when string representation of timestamp contains trailing “
.” with no numbers following it. (Bug #5235)Server-side prepared statements did not honor
zeroDateTimeBehaviorproperty, and would cause class-cast exceptions when usingResultSet.getObject(), as the all-zero string was always returned. (Bug #5235)Fix comparisons made between string constants and dynamic strings that are converted with either
toUpperCase()ortoLowerCase()to useLocale.ENGLISH, as some locales “override” case rules for English. Also useStringUtils.indexOfIgnoreCase()instead of.toUpperCase().indexOf(), avoids creating a very short-lived transientStringinstance.
Bugs Fixed
Fixed
ServerPreparedStatementto read prepared statement metadata off the wire, even though it is currently a placeholder instead of usingMysqlIO.clearInputStream()which didn't work at various times because data wasn't available to read from the server yet. This fixes sporadic errors users were having withServerPreparedStatementsthrowingArrayIndexOutOfBoundExceptions. (Bug #5032)Added three ways to deal with all-zero datetimes when reading them from a
ResultSet:exception(the default), which throws anSQLExceptionwith an SQLState ofS1009;convertToNull, which returnsNULLinstead of the date; andround, which rounds the date to the nearest closest value which is'0001-01-01'. (Bug #5032)The driver is more strict about truncation of numerics on
ResultSet.get*(), and will throw anSQLExceptionwhen truncation is detected. You can disable this by settingjdbcCompliantTruncationtofalse(it is enabled by default, as this functionality is required for JDBC compliance). (Bug #5032)You can now use URLs in
LOAD DATA LOCAL INFILEstatements, and the driver will use Java's built-in handlers for retrieving the data and sending it to the server. This feature is not enabled by default, you must set theallowUrlInLocalInfileconnection property totrue. (Bug #5032)ResultSet.getObject()doesn't return typeBooleanfor pseudo-bit types from prepared statements on 4.1.x (shortcut for avoiding extra type conversion when using binary-encoded result sets obscured test ingetObject()for “pseudo” bit type). (Bug #5032)Use
com.mysql.jdbc.Message's classloader when loading resource bundle, should fix sporadic issues when the caller's classloader can't locate the resource bundle. (Bug #5032)ServerPreparedStatementsdealing with return ofDECIMALtype don't work. (Bug #5012)Track packet sequence numbers if
enablePacketDebug=true, and throw an exception if packets received out-of-order. (Bug #4689)ResultSet.wasNull()does not work for primitives if a previousnullwas returned. (Bug #4689)Optimized integer number parsing, enable “old” slower integer parsing using JDK classes using
useFastIntParsing=falseproperty. (Bug #4642)Added
useOnlyServerErrorMessagesproperty, which causes message text in exceptions generated by the server to only contain the text sent by the server (as opposed to the SQLState's “standard” description, followed by the server's error message). This property is set totrueby default. (Bug #4642)ServerPreparedStatement.execute*()sometimes threwArrayIndexOutOfBoundsExceptionwhen unpacking field metadata. (Bug #4642)Connector/J 3.1.3 beta does not handle integers correctly (caused by changes to support unsigned reads in
Buffer.readInt()->Buffer.readShort()). (Bug #4510)Added support in
DatabaseMetaData.getTables()andgetTableTypes()for views, which are now available in MySQL server 5.0.x. (Bug #4510)ResultSet.getObject()returns wrong type for strings when using prepared statements. (Bug #4482)Calling
MysqlPooledConnection.close()twice (even though an application error), caused NPE. Fixed. (Bug #4482)
Bugs Fixed
Support new time zone variables in MySQL-4.1.3 when
useTimezone=true. (Bug #4311)Error in retrieval of
mediumintcolumn with prepared statements and binary protocol. (Bug #4311)Support for unsigned numerics as return types from prepared statements. This also causes a change in
ResultSet.getObject()for thebigint unsignedtype, which used to returnBigDecimalinstances, it now returns instances ofjava.lang.BigInteger. (Bug #4311)Externalized more messages (on-going effort). (Bug #4119)
Null bitmask sent for server-side prepared statements was incorrect. (Bug #4119)
Added constants for MySQL error numbers (publicly accessible, see
com.mysql.jdbc.MysqlErrorNumbers), and the ability to generate the mappings of vendor error codes to SQLStates that the driver uses (for documentation purposes). (Bug #4119)Added packet debugging code (see the
enablePacketDebugproperty documentation). (Bug #4119)Use SQL Standard SQL states by default, unless
useSqlStateCodesproperty is set tofalse. (Bug #4119)Mangle output parameter names for
CallableStatementsso they will not clash with user variable names.Added support for
INOUTparameters inCallableStatements.
Bugs Fixed
Don't enable server-side prepared statements for server version 5.0.0 or 5.0.1, as they aren't compatible with the '4.1.2+' style that the driver uses (the driver expects information to come back that isn't there, so it hangs). (Bug #3804)
getWarnings()returnsSQLWarninginstead ofDataTruncation. (Bug #3804)getProcedureColumns()doesn't work with wildcards for procedure name. (Bug #3540)getProcedures()does not return any procedures in result set. (Bug #3539)Fixed
DatabaseMetaData.getProcedures()when run on MySQL-5.0.0 (output ofSHOW PROCEDURE STATUSchanged between 5.0.0 and 5.0.1. (Bug #3520)Added
connectionCollationproperty to cause driver to issueset collation_connection=...query on connection init if default collation for given charset is not appropriate. (Bug #3520)DBMD.getSQLStateType()returns incorrect value. (Bug #3520)Correctly map output parameters to position given in
prepareCall()versus. order implied duringregisterOutParameter(). (Bug #3146)Cleaned up detection of server properties. (Bug #3146)
Correctly detect initial character set for servers >= 4.1.0. (Bug #3146)
Support placeholder for parameter metadata for server >= 4.1.2. (Bug #3146)
Added
gatherPerformanceMetricsproperty, along with properties to control when/where this info gets logged (see docs for more info).Fixed case when no parameters could cause a
NullPointerExceptioninCallableStatement.setOutputParameters().Enabled callable statement caching using
cacheCallableStmtsproperty.Fixed sending of split packets for large queries, enabled nio ability to send large packets as well.
Added
.toString()functionality toServerPreparedStatement, which should help if you're trying to debug a query that is a prepared statement (it shows SQL as the server would process).Added
logSlowQueriesproperty, along withslowQueriesThresholdMillisproperty to control when a query should be considered “slow.”Removed wrapping of exceptions in
MysqlIO.changeUser().Fixed stored procedure parameter parsing info when size was specified for a parameter (for example,
char(),varchar()).ServerPreparedStatementsweren't actually de-allocating server-side resources when.close()was called.Fixed case when no output parameters specified for a stored procedure caused a bogus query to be issued to retrieve out parameters, leading to a syntax error from the server.
Bugs Fixed
Use DocBook version of docs for shipped versions of drivers. (Bug #2671)
NULLfields were not being encoded correctly in all cases in server-side prepared statements. (Bug #2671)Fixed rare buffer underflow when writing numbers into buffers for sending prepared statement execution requests. (Bug #2671)
Fixed
ConnectionPropertiesthat weren't properly exposed through accessors, cleaned upConnectionPropertiescode. (Bug #2623)Class-cast exception when using scrolling result sets and server-side prepared statements. (Bug #2623)
Merged unbuffered input code from 3.0. (Bug #2623)
Enabled streaming of result sets from server-side prepared statements. (Bug #2606)
Server-side prepared statements were not returning data type
YEARcorrectly. (Bug #2606)Fixed charset conversion issue in
getTables(). (Bug #2502)Implemented multiple result sets returned from a statement or stored procedure. (Bug #2502)
Implemented
Connection.prepareCall(), andDatabaseMetaData.getProcedures()andgetProcedureColumns(). (Bug #2359)Merged prepared statement caching, and
.getMetaData()support from 3.0 branch. (Bug #2359)Fixed off-by-1900 error in some cases for years in
TimeUtil.fastDate/TimeCreate()when unpacking results from server-side prepared statements. (Bug #2359)Reset
long binaryparameters inServerPreparedStatementwhenclearParameters()is called, by sendingCOM_RESET_STMTto the server. (Bug #2359)NULLvalues for numeric types in binary encoded result sets causingNullPointerExceptions. (Bug #2359)Display where/why a connection was implicitly closed (to aid debugging). (Bug #1673)
DatabaseMetaData.getColumns()is not returning correct column ordinal info for non-'%'column name patterns. (Bug #1673)Fixed
NullPointerExceptioninServerPreparedStatement.setTimestamp(), as well as year and month discrepencies inServerPreparedStatement.setTimestamp(),setDate(). (Bug #1673)Added ability to have multiple database/JVM targets for compliance and regression/unit tests in
build.xml. (Bug #1673)Fixed sending of queries larger than 16M. (Bug #1673)
Merged fix of data type mapping from MySQL type
FLOATtojava.sql.Types.REALfrom 3.0 branch. (Bug #1673)Fixed NPE and year/month bad conversions when accessing some datetime functionality in
ServerPreparedStatementsand their resultant result sets. (Bug #1673)Added named and indexed input/output parameter support to
CallableStatement. MySQL-5.0.x or newer. (Bug #1673)CommunicationsExceptionimplemented, that tries to determine why communications was lost with a server, and displays possible reasons when.getMessage()is called. (Bug #1673)Detect collation of column for
RSMD.isCaseSensitive(). (Bug #1673)Optimized
Buffer.readLenByteArray()to return shared empty byte array when length is 0.Fix support for table aliases when checking for all primary keys in
UpdatableResultSet.Unpack “unknown” data types from server prepared statements as
Strings.Implemented
Statement.getWarnings()for MySQL-4.1 and newer (usingSHOW WARNINGS).Ensure that warnings are cleared before executing queries on prepared statements, as-per JDBC spec (now that we support warnings).
Correctly initialize datasource properties from JNDI Refs, including explicitly specified URLs.
Implemented long data (Blobs, Clobs, InputStreams, Readers) for server prepared statements.
Deal with 0-length tokens in
EscapeProcessor(caused by callable statement escape syntax).DatabaseMetaDatanow reportssupportsStoredProcedures()for MySQL versions >= 5.0.0Support for
mysql_change_user(). See thechangeUser()method incom.mysql.jdbc.Connection.Removed
useFastDatesconnection property.Support for NIO. Use
useNIO=trueon platforms that support NIO.Check for closed connection on delete/update/insert row operations in
UpdatableResultSet.Support for transaction savepoints (MySQL >= 4.0.14 or 4.1.1).
Support “old”
profileSqlcapitalization inConnectionProperties. This property is deprecated, you should useprofileSQLif possible.Fixed character encoding issues when converting bytes to ASCII when MySQL doesn't provide the character set, and the JVM is set to a multi-byte encoding (usually affecting retrieval of numeric values).
Centralized setting of result set type and concurrency.
Fixed bug with
UpdatableResultSetsnot using client-side prepared statements.Default result set type changed to
TYPE_FORWARD_ONLY(JDBC compliance).Fixed
IllegalAccessErrortoCalendar.getTimeInMillis()inDateTimeValue(for JDK < 1.4).Allow contents of
PreparedStatement.setBlob()to be retained between calls to.execute*().Fixed stack overflow in
Connection.prepareCall()(bad merge).Refactored how connection properties are set and exposed as
DriverPropertyInfoas well asConnectionandDataSourceproperties.Reduced number of methods called in average query to be more efficient.
Prepared
Statementswill be re-prepared on auto-reconnect. Any errors encountered are postponed until first attempt to re-execute the re-prepared statement.
Bugs Fixed
Added
useServerPrepStmtsproperty (defaultfalse). The driver will use server-side prepared statements when the server version supports them (4.1 and newer) when this property is set totrue. It is currently set tofalseby default until all bind/fetch functionality has been implemented. Currently only DML prepared statements are implemented for 4.1 server-side prepared statements.Added
requireSSLproperty.Track open
Statements, close all whenConnection.close()is called (JDBC compliance).
- D.5.4.1. Changes in MySQL Connector/J 3.0.17 (23 June 2005)
- D.5.4.2. Changes in MySQL Connector/J 3.0.16 (15 November 2004)
- D.5.4.3. Changes in MySQL Connector/J 3.0.15 (04 September 2004)
- D.5.4.4. Changes in MySQL Connector/J 3.0.14 (28 May 2004)
- D.5.4.5. Changes in MySQL Connector/J 3.0.13 (27 May 2004)
- D.5.4.6. Changes in MySQL Connector/J 3.0.12 (18 May 2004)
- D.5.4.7. Changes in MySQL Connector/J 3.0.11 (19 February 2004)
- D.5.4.8. Changes in MySQL Connector/J 3.0.10 (13 January 2004)
- D.5.4.9. Changes in MySQL Connector/J 3.0.9 (07 October 2003)
- D.5.4.10. Changes in MySQL Connector/J 3.0.8 (23 May 2003)
- D.5.4.11. Changes in MySQL Connector/J 3.0.7 (08 April 2003)
- D.5.4.12. Changes in MySQL Connector/J 3.0.6 (18 February 2003)
- D.5.4.13. Changes in MySQL Connector/J 3.0.5 (22 January 2003)
- D.5.4.14. Changes in MySQL Connector/J 3.0.4 (06 January 2003)
- D.5.4.15. Changes in MySQL Connector/J 3.0.3 (17 December 2002)
- D.5.4.16. Changes in MySQL Connector/J 3.0.2 (08 November 2002)
- D.5.4.17. Changes in MySQL Connector/J 3.0.1 (21 September 2002)
- D.5.4.18. Changes in MySQL Connector/J 3.0.0 (31 July 2002)
Bugs Fixed
Workaround for server Bug #9098: Default values of
CURRENT_*forDATE,TIME,DATETIME, andTIMESTAMPcolumns can't be distinguished fromstringvalues, soUpdatableResultSet.moveToInsertRow()generates bad SQL for inserting default values. (Bug #8812)NON_UNIQUEcolumn fromDBMD.getIndexInfo()returned inverted value. (Bug #8812)EUCKRcharset is sent asSET NAMES euc_krwhich MySQL-4.1 and newer doesn't understand. (Bug #8629)Added support for the
EUC_JP_Solarischaracter encoding, which maps to a MySQL encoding ofeucjpms(backported from 3.1 branch). This only works on servers that supporteucjpms, namely 5.0.3 or later. (Bug #8629)Use hex escapes for
PreparedStatement.setBytes()for double-byte charsets including “aliases”Windows-31J,CP934,MS932. (Bug #8629)DatabaseMetaData.supportsSelectForUpdate()returns correct value based on server version. (Bug #8629)Which requires hex escaping of binary data when using multi-byte charsets with prepared statements. (Bug #8064)
Fixed duplicated code in
configureClientCharset()that preventeduseOldUTF8Behavior=truefrom working properly. (Bug #7952)Backported SQLState codes mapping from Connector/J 3.1, enable with
useSqlStateCodes=trueas a connection property, it defaults tofalsein this release, so that we don't break legacy applications (it defaults totruestarting with Connector/J 3.1). (Bug #7686)Timestamp key column data needed
_binarystripped forUpdatableResultSet.refreshRow(). (Bug #7686)MS932,SHIFT_JIS, andWindows_31Jnot recognized as aliases forsjis. (Bug #7607)Handle streaming result sets with more than 2 billion rows properly by fixing wraparound of row number counter. (Bug #7601)
PreparedStatement.fixDecimalExponent()adding extra+, making number unparseable by MySQL server. (Bug #7601)Escape sequence {fn convert(..., type)} now supports ODBC-style types that are prepended by
SQL_. (Bug #7601)Statements created from a pooled connection were returning physical connection instead of logical connection when
getConnection()was called. (Bug #7316)Support new protocol type
MYSQL_TYPE_VARCHAR. (Bug #7081)Added
useOldUTF8Behavior' configuration property, which causes JDBC driver to act like it did with MySQL-4.0.x and earlier when the character encoding isutf-8when connected to MySQL-4.1 or newer. (Bug #7081)DatabaseMetaData.getIndexInfo()ignoreduniqueparameter. (Bug #7081)PreparedStatement.fixDecimalExponent()adding extra+, making number unparseable by MySQL server. (Bug #7061)PreparedStatementsdon't encode Big5 (and other multi-byte) character sets correctly in static SQL strings. (Bug #7033)Connections starting up failed-over (due to down master) never retry master. (Bug #6966)
Adding
CP943to aliases forsjis. (Bug #6549, Bug #7607)Timestamp/Timeconversion goes in the wrong “direction” whenuseTimeZone=trueand server time zone differs from client time zone. (Bug #5874)
Bugs Fixed
Made
TINYINT(1)->BIT/Booleanconversion configurable usingtinyInt1isBitproperty (defaulttrueto be JDBC compliant out of the box). (Bug #5664)Off-by-one bug in
Buffer.readString(. (Bug #5664)string)ResultSet.updateByte()when on insert row throwsArrayOutOfBoundsException. (Bug #5664)Fixed regression where
useUnbufferedInputwas defaulting tofalse. (Bug #5664)ResultSet.getTimestamp()on a column withTIMEin it fails. (Bug #5664)Fixed
DatabaseMetaData.getTypes()returning incorrect (this is, nonnegative) scale for theNUMERICtype. (Bug #5664)Only set
character_set_resultsduring connection establishment if server version >= 4.1.1. (Bug #5664)Fixed
ResultSetMetaData.isReadOnly()to detect nonwritable columns when connected to MySQL-4.1 or newer, based on existence of “original” table and column names.Re-issue character set configuration commands when re-using pooled connections or
Connection.changeUser()when connected to MySQL-4.1 or newer.
Bugs Fixed
ResultSet.getMetaData()should not return incorrectly initialized metadata if the result set has been closed, but should instead throw anSQLException. Also fixed forgetRow()andgetWarnings()and traversal methods by callingcheckClosed()before operating on instance-level fields that are nullified during.close(). (Bug #5069)Use
_binaryintroducer forPreparedStatement.setBytes()andset*Stream()when connected to MySQL-4.1.x or newer to avoid misinterpretation during character conversion. (Bug #5069)Parse new time zone variables from 4.1.x servers. (Bug #5069)
ResultSetshould releaseField[]instance in.close(). (Bug #5022)RSMD.getPrecision()returning 0 for nonnumeric types (should return max length in chars for nonbinary types, max length in bytes for binary types). This fix also fixes mapping ofRSMD.getColumnType()andRSMD.getColumnTypeName()for theBLOBtypes based on the length sent from the server (the server doesn't distinguish betweenTINYBLOB,BLOB,MEDIUMBLOBorLONGBLOBat the network protocol level). (Bug #4880)“Production” is now “GA” (General Availability) in naming scheme of distributions. (Bug #4860, Bug #4138)
DBMD.getColumns()returns incorrect JDBC type for unsigned columns. This affects type mappings for all numeric types in theRSMD.getColumnType()andRSMD.getColumnTypeNames()methods as well, to ensure that “like” types fromDBMD.getColumns()match up with whatRSMD.getColumnType()andgetColumnTypeNames()return. (Bug #4860, Bug #4138)Calling
.close()twice on aPooledConnectioncauses NPE. (Bug #4808)DOUBLEmapped twice inDBMD.getTypeInfo(). (Bug #4742)Added FLOSS license exemption. (Bug #4742)
Removed redundant calls to
checkRowPos()inResultSet. (Bug #4334)Failover for
autoReconnectnot using port numbers for any hosts, and not retrying all hosts.WarningThis required a change to the
SocketFactoryconnect()method signature, which is nowpublic Socket connect(String host, int portNumber, Properties props); therefore, any third-party socket factories will have to be changed to support this signature.(Bug #4334)
Logical connections created by
MysqlConnectionPoolDataSourcewill now issue arollback()when they are closed and sent back to the pool. If your application server/connection pool already does this for you, you can set therollbackOnPooledCloseproperty tofalseto avoid the overhead of an extrarollback(). (Bug #4334)StringUtils.escapeEasternUnicodeByteStreamwas still broken for GBK. (Bug #4010)
Bugs Fixed
No Database Selectedwhen usingMysqlConnectionPoolDataSource. (Bug #3920)PreparedStatement.getGeneratedKeys()method returns only 1 result for batched insertions. (Bug #3873)Using a
MySQLDatasourcewithout server name fails. (Bug #3848)
Bugs Fixed
Inconsistent reporting of data type. The server still doesn't return all types for *BLOBs *TEXT correctly, so the driver won't return those correctly. (Bug #3570)
UpdatableResultSetnot picking up default values formoveToInsertRow(). (Bug #3557)Not specifying database in URL caused
MalformedURLexception. (Bug #3554)Auto-convert MySQL encoding names to Java encoding names if used for
characterEncodingproperty. (Bug #3554)Use
junit.textui.TestRunnerfor all unit tests (to enable them to be run from the command line outside of Ant or Eclipse). (Bug #3554)Added encoding names that are recognized on some JVMs to fix case where they were reverse-mapped to MySQL encoding names incorrectly. (Bug #3554)
Made
StringRegressionTest4.1-unicode aware. (Bug #3520)Fixed regression in
PreparedStatement.setString()and eastern character encodings. (Bug #3520)DBMD.getSQLStateType()returns incorrect value. (Bug #3520)Renamed
StringUtils.escapeSJISByteStream()to more appropriateescapeEasternUnicodeByteStream(). (Bug #3511)StringUtils.escapeSJISByteStream()not covering all eastern double-byte charsets correctly. (Bug #3511)Return creating statement for
ResultSetscreated bygetGeneratedKeys(). (Bug #2957)Use
SET character_set_resultsduring initialization to enable any charset to be returned to the driver for result sets. (Bug #2670)Don't truncate
BLOBorCLOBvalues when usingsetBytes()andsetBinary/CharacterStream(). (Bug #2670)Dynamically configure character set mappings for field-level character sets on MySQL-4.1.0 and newer using
SHOW COLLATIONwhen connecting. (Bug #2670)Map
binarycharacter set toUS-ASCIIto supportDATETIMEcharset recognition for servers >= 4.1.2. (Bug #2670)Use
charsetnrreturned during connect to encode queries before issuingSET NAMESon MySQL >= 4.1.0. (Bug #2670)Add helper methods to
ResultSetMetaData(getColumnCharacterEncoding()andgetColumnCharacterSet()) to permit end users to see what charset the driver thinks it should be using for the column. (Bug #2670)Only set
character_set_resultsfor MySQL >= 4.1.0. (Bug #2670)Allow
urlparameter forMysqlDataSourceandMysqlConnectionPoolDataSourceso that passing of other properties is possible from inside appservers.Don't escape SJIS/GBK/BIG5 when using MySQL-4.1 or newer.
Backport documentation tooling from 3.1 branch.
Added
failOverReadOnlyproperty, to enable the user to configure the state of the connection (read-only/writable) when failed over.Add unsigned attribute to
DatabaseMetaData.getColumns()output in theTYPE_NAMEcolumn.Allow
java.util.Dateto be sent in as parameter toPreparedStatement.setObject(), converting it to aTimestampto maintain full precision. . (Bug #103)Map duplicate key and foreign key errors to SQLState of
23000.Backported “change user” and “reset server state” functionality from 3.1 branch, to enable clients of
MysqlConnectionPoolDataSourceto reset server state ongetConnection()on a pooled connection.
Bugs Fixed
Return
java.lang.DoubleforFLOATtype fromResultSetMetaData.getColumnClassName(). (Bug #2855)Return
[Binstead ofjava.lang.ObjectforBINARY,VARBINARYandLONGVARBINARYtypes fromResultSetMetaData.getColumnClassName()(JDBC compliance). (Bug #2855)Issue connection events on all instances created from a
ConnectionPoolDataSource. (Bug #2855)Return
java.lang.IntegerforTINYINTandSMALLINTtypes fromResultSetMetaData.getColumnClassName(). (Bug #2852)Added
useUnbufferedInputparameter, and now use it by default (due to JVM issue http://developer.java.sun.com/developer/bugParade/bugs/4401235.html) (Bug #2578)Fixed failover always going to last host in list. (Bug #2578)
Detect
on/offor1,2,3form oflower_case_table_namesvalue on server. (Bug #2578)AutoReconnecttime was growing faster than exponentially. (Bug #2447)Trigger a
SET NAMES utf8when encoding is forced toutf8orutf-8using thecharacterEncodingproperty. Previously, only the Java-style encoding name ofutf-8would trigger this.
Bugs Fixed
Enable caching of the parsing stage of prepared statements using the
cachePrepStmts,prepStmtCacheSize, andprepStmtCacheSqlLimitproperties (disabled by default). (Bug #2006)Fixed security exception when used in Applets (applets can't read the system property
file.encodingwhich is needed forLOAD DATA LOCAL INFILE). (Bug #2006)Speed up parsing of
PreparedStatements, try to use one-pass whenever possible. (Bug #2006)Fixed exception
Unknown character set 'danish'on connect with JDK-1.4.0 (Bug #2006)Fixed mappings in SQLError to report deadlocks with SQLStates of
41000. (Bug #2006)Removed static synchronization bottleneck from instance factory method of
SingleByteCharsetConverter. (Bug #2006)Removed static synchronization bottleneck from
PreparedStatement.setTimestamp(). (Bug #2006)ResultSet.findColumn()should use first matching column name when there are duplicate column names inSELECTquery (JDBC-compliance). (Bug #2006)maxRowsproperty would affect internal statements, so check it for all statement creation internal to the driver, and set to 0 when it is not. (Bug #2006)Use constants for SQLStates. (Bug #2006)
Map charset
ko18_rutoko18rwhen connected to MySQL-4.1.0 or newer. (Bug #2006)Ensure that
Buffer.writeString()saves room for the\0. (Bug #2006)ArrayIndexOutOfBoundswhen parameter number == number of parameters + 1. (Bug #1958)Connection property
maxRowsnot honored. (Bug #1933)Statements being created too many times in
DBMD.extractForeignKeyFromCreateTable(). (Bug #1925)Support escape sequence {fn convert ... }. (Bug #1914)
Implement
ResultSet.updateClob(). (Bug #1913)Autoreconnect code didn't set catalog upon reconnect if it had been changed. (Bug #1913)
ResultSet.getObject()onTINYINTandSMALLINTcolumns should return Java typeInteger. (Bug #1913)Added more descriptive error message
Server Configuration Denies Access to DataSource, as well as retrieval of message from server. (Bug #1913)ResultSetMetaData.isCaseSensitive()returned wrong value forCHAR/VARCHARcolumns. (Bug #1913)Added
alwaysClearStreamconnection property, which causes the driver to always empty any remaining data on the input stream before each query. (Bug #1913)DatabaseMetaData.getSystemFunction()returning bad functionVResultsSion. (Bug #1775)Foreign Keys column sequence is not consistent in
DatabaseMetaData.getImported/Exported/CrossReference(). (Bug #1731)Fix for
ArrayIndexOutOfBoundsexception when usingStatement.setMaxRows(). (Bug #1695)Subsequent call to
ResultSet.updateFoo()causes NPE if result set is not updatable. (Bug #1630)Fix for 4.1.1-style authentication with no password. (Bug #1630)
Cross-database updatable result sets are not checked for updatability correctly. (Bug #1592)
DatabaseMetaData.getColumns()should returnTypes.LONGVARCHARfor MySQLLONGTEXTtype. (Bug #1592)Fixed regression of
Statement.getGeneratedKeys()andREPLACEstatements. (Bug #1576)Barge blobs and split packets not being read correctly. (Bug #1576)
Backported fix for aliased tables and
UpdatableResultSetsincheckUpdatability()method from 3.1 branch. (Bug #1534)“Friendlier” exception message for
PacketTooLargeException. (Bug #1534)Don't count quoted IDs when inside a 'string' in
PreparedStatementparsing. (Bug #1511)
Bugs Fixed
ResultSet.get/setStringmashing char 127. (Bug #1247)Added property to “clobber” streaming results, by setting the
clobberStreamingResultsproperty totrue(the default isfalse). This will cause a “streaming”ResultSetto be automatically closed, and any outstanding data still streaming from the server to be discarded if another query is executed before all the data has been read from the server. (Bug #1247)Added
com.mysql.jdbc.util.BaseBugReportto help creation of testcases for bug reports. (Bug #1247)Backported authentication changes for 4.1.1 and newer from 3.1 branch. (Bug #1247)
Made
databaseName,portNumber, andserverNameoptional parameters forMysqlDataSourceFactory. (Bug #1246)Optimized
CLOB.setChracterStream(). (Bug #1131)Fixed
CLOB.truncate(). (Bug #1130)Fixed deadlock issue with
Statement.setMaxRows(). (Bug #1099)DatabaseMetaData.getColumns()getting confused about the keyword “set” in character columns. (Bug #1099)Clip +/- INF (to smallest and largest representative values for the type in MySQL) and NaN (to 0) for
setDouble/setFloat(), and issue a warning on the statement when the server does not support +/- INF or NaN. (Bug #884)Don't fire connection closed events when closing pooled connections, or on
PooledConnection.getConnection()with already open connections. (Bug #884)Double-escaping of
'\'when charset is SJIS or GBK and'\'appears in nonescaped input. (Bug #879)When emptying input stream of unused rows for “streaming” result sets, have the current thread
yield()every 100 rows to not monopolize CPU time. (Bug #879)Issue exception on
ResultSet.geton empty result set (wasn't caught in some cases). (Bug #848)XXX()Don't hide messages from exceptions thrown in I/O layers. (Bug #848)
Fixed regression in large split-packet handling. (Bug #848)
Better diagnostic error messages in exceptions for “streaming” result sets. (Bug #848)
Don't change timestamp TZ twice if
useTimezone==true. (Bug #774)Don't wrap
SQLExceptionsinRowDataDynamic. (Bug #688)Don't try and reset isolation level on reconnect if MySQL doesn't support them. (Bug #688)
The
insertRowin anUpdatableResultSetis now loaded with the default column values whenmoveToInsertRow()is called. (Bug #688)DatabaseMetaData.getColumns()wasn't returningNULLfor default values that are specified asNULL. (Bug #688)Change default statement type/concurrency to
TYPE_FORWARD_ONLYandCONCUR_READ_ONLY(spec compliance). (Bug #688)Fix
UpdatableResultSetto return values forgetwhen on insert row. (Bug #675)XXX()Support
InnoDBconstraint names when extracting foreign key information inDatabaseMetaData(implementing ideas from Parwinder Sekhon). (Bug #664, Bug #517)Backported 4.1 protocol changes from 3.1 branch (server-side SQL states, new field information, larger client capability flags, connect-with-database, and so forth). (Bug #664, Bug #517)
refreshRowdidn't work when primary key values contained values that needed to be escaped (they ended up being doubly escaped). (Bug #661)Fixed
ResultSet.previous()behavior to move current position to before result set when on first row of result set. (Bug #496)Fixed
StatementandPreparedStatementissuing bogus queries whensetMaxRows()had been used and aLIMITclause was present in the query. (Bug #496)Faster date handling code in
ResultSetandPreparedStatement(no longer usesDatemethods that synchronize on static calendars).Fixed test for end of buffer in
Buffer.readString().
Bugs Fixed
Fixed SJIS encoding bug, thanks to Naoto Sato. (Bug #378)
Fix problem detecting server character set in some cases. (Bug #378)
Allow multiple calls to
Statement.close(). (Bug #378)Return correct number of generated keys when using
REPLACEstatements. (Bug #378)Unicode character 0xFFFF in a string would cause the driver to throw an
ArrayOutOfBoundsException. . (Bug #378)Fix row data decoding error when using very large packets. (Bug #378)
Optimized row data decoding. (Bug #378)
Issue exception when operating on an already closed prepared statement. (Bug #378)
Optimized usage of
EscapeProcessor. (Bug #378)Use JVM charset with file names and
LOAD DATA [LOCAL] INFILE.Fix infinite loop with
Connection.cleanup().Changed Ant target
compile-coretocompile-driver, and made testsuite compilation a separate target.Fixed result set not getting set for
Statement.executeUpdate(), which affectedgetGeneratedKeys()andgetUpdateCount()in some cases.Return list of generated keys when using multi-value
INSERTSwithStatement.getGeneratedKeys().Allow bogus URLs in
Driver.getPropertyInfo().
Bugs Fixed
Fixed charset issues with database metadata (charset was not getting set correctly).
You can now toggle profiling on/off using
Connection.setProfileSql(boolean).4.1 Column Metadata fixes.
Fixed
MysqlPooledConnection.close()calling wrong event type.Fixed
StringIndexOutOfBoundsExceptioninPreparedStatement.setClob().IOExceptionsduring a transaction now cause theConnectionto be closed.Remove synchronization from
Driver.connect()andDriver.acceptsUrl().Fixed missing conversion for
YEARtype inResultSetMetaData.getColumnTypeName().Updatable
ResultSetscan now be created for aliased tables/columns when connected to MySQL-4.1 or newer.Fixed
LOAD DATA LOCAL INFILEbug when file >max_allowed_packet.Don't pick up indexes that start with
prias primary keys forDBMD.getPrimaryKeys().Ensure that packet size from
alignPacketSize()does not exceedmax_allowed_packet(JVM bug)Don't reset
Connection.isReadOnly()when autoReconnecting.Fixed escaping of 0x5c (
'\') character for GBK and Big5 charsets.Fixed
ResultSet.getTimestamp()when underlying field is of typeDATE.Throw
SQLExceptionswhen trying to do operations on a forcefully closedConnection(that is, when a communication link failure occurs).
Bugs Fixed
Backported 4.1 charset field info changes from Connector/J 3.1.
Fixed
Statement.setMaxRows()to stop sendingLIMITtype queries when not needed (performance).Fixed
DBMD.getTypeInfo()andDBMD.getColumns()returning different value for precision inTEXTandBLOBtypes.Fixed
SQLExceptionsgetting swallowed on initial connect.Fixed
ResultSetMetaDatato return""when catalog not known. FixesNullPointerExceptionswith Sun'sCachedRowSet.Allow ignoring of warning for “non transactional tables” during rollback (compliance/usability) by setting
ignoreNonTxTablesproperty totrue.Clean up
Statementquery/method mismatch tests (that is,INSERTnot permitted with.executeQuery()).Fixed
ResultSetMetaData.isWritable()to return correct value.More checks added in
ResultSettraversal method to catch when in closed state.Implemented
Blob.setBytes(). You still need to pass the resultantBlobback into an updatableResultSetorPreparedStatementto persist the changes, because MySQL does not support “locators”.Add “window” of different
NULLsorting behavior toDBMD.nullsAreSortedAtStart(4.0.2 to 4.0.10, true; otherwise, no).
Bugs Fixed
Fixed
ResultSet.isBeforeFirst()for empty result sets.Added missing
LONGTEXTtype toDBMD.getColumns().Implemented an empty
TypeMapforConnection.getTypeMap()so that some third-party apps work with MySQL (IBM WebSphere 5.0 Connection pool).Added update options for foreign key metadata.
Fixed
Buffer.fastSkipLenString()causingArrayIndexOutOfBoundsexceptions with some queries when unpacking fields.Quote table names in
DatabaseMetaData.getColumns(),getPrimaryKeys(),getIndexInfo(),getBestRowIdentifier().Retrieve
TX_ISOLATIONfrom database forConnection.getTransactionIsolation()when the MySQL version supports it, instead of an instance variable.Greatly reduce memory required for
setBinaryStream()inPreparedStatements.
Bugs Fixed
Streamlined character conversion and
byte[]handling inPreparedStatementsforsetByte().Fixed
PreparedStatement.executeBatch()parameter overwriting.Added quoted identifiers to database names for
Connection.setCatalog.Added support for 4.0.8-style large packets.
Reduce memory footprint of
PreparedStatementsby sharing outbound packet withMysqlIO.Added
strictUpdatesproperty to enable control of amount of checking for “correctness” of updatable result sets. Set this tofalseif you want faster updatable result sets and you know that you create them fromSELECTstatements on tables with primary keys and that you have selected all primary keys in your query.Added support for quoted identifiers in
PreparedStatementparser.
Bugs Fixed
Allow user to alter behavior of
Statement/PreparedStatement.executeBatch()usingcontinueBatchOnErrorproperty (defaults totrue).More robust escape tokenizer: Recognize
--comments, and permit nested escape sequences (seetestsuite.EscapeProcessingTest).Fixed
Buffer.isLastDataPacket()for 4.1 and newer servers.NamedPipeSocketFactorynow works (only intended for Windows), seeREADMEfor instructions.Changed
charsToByteinSingleByteCharConverterto be nonstatic.Use nonaliased table/column names and database names to fully qualify tables and columns in
UpdatableResultSet(requires MySQL-4.1 or newer).LOAD DATA LOCAL INFILE ...now works, if your server is configured to permit it. Can be turned off with theallowLoadLocalInfileproperty (see theREADME).Implemented
Connection.nativeSQL().Fixed
ResultSetMetaData.getColumnTypeName()returningBLOBforTEXTandTEXTforBLOBtypes.Fixed charset handling in
Fields.java.Because of above, implemented
ResultSetMetaData.isAutoIncrement()to useField.isAutoIncrement().Substitute
'?'for unknown character conversions in single-byte character sets instead of'\0'.Added
CLIENT_LONG_FLAGto be able to get more column flags (isAutoIncrement()being the most important).Honor
lower_case_table_nameswhen enabled in the server when doing table name comparisons inDatabaseMetaDatamethods.DBMD.getImported/ExportedKeys()now handles multiple foreign keys per table.More robust implementation of updatable result sets. Checks that all primary keys of the table have been selected.
Some MySQL-4.1 protocol support (extended field info from selects).
Check for connection closed in more
Connectionmethods (createStatement,prepareStatement,setTransactionIsolation,setAutoCommit).Fixed
ResultSetMetaData.getPrecision()returning incorrect values for some floating-point types.Changed
SingleByteCharConverterto use lazy initialization of each converter.
Bugs Fixed
Implemented
Clob.setString().Added
com.mysql.jdbc.MiniAdminclass, which enables you to sendshutdowncommand to MySQL server. This is intended to be used when “embedding” Java and MySQL server together in an end-user application.Added SSL support. See
READMEfor information on how to use it.All
DBMDresult set columns describing schemas now returnNULLto be more compliant with the behavior of other JDBC drivers for other database systems (MySQL does not support schemas).Use
SHOW CREATE TABLEwhen possible for determining foreign key information forDatabaseMetaData. Also enables cascade options forDELETEinformation to be returned.Implemented
Clob.setCharacterStream().Failover and
autoReconnectwork only when the connection is in anautoCommit(false)state, to stay transaction-safe.Fixed
DBMD.supportsResultSetConcurrency()so that it returnstrueforResultSet.TYPE_SCROLL_INSENSITIVEandResultSet.CONCUR_READ_ONLYorResultSet.CONCUR_UPDATABLE.Implemented
Clob.setAsciiStream().Removed duplicate code from
UpdatableResultSet(it can be inherited fromResultSet, the extra code for each method to handle updatability I thought might someday be necessary has not been needed).Fixed
UnsupportedEncodingExceptionthrown when “forcing” a character encoding using properties.Fixed incorrect conversion in
ResultSet.getLong().Implemented
ResultSet.updateBlob().Removed some not-needed temporary object creation by smarter use of
StringsinEscapeProcessor,ConnectionandDatabaseMetaDataclasses.Escape
0x5ccharacter in strings for the SJIS charset.PreparedStatementnow honors stream lengths in setBinary/Ascii/Character Stream() unless you set the connection propertyuseStreamLengthsInPrepStmtstofalse.Fixed issue with updatable result sets and
PreparedStatementsnot working.Fixed start position off-by-1 error in
Clob.getSubString().Added
connectTimeoutparameter that enables users of JDK-1.4 and newer to specify a maximum time to wait to establish a connection.Fixed various non-ASCII character encoding issues.
Fixed
ResultSet.isLast()for empty result sets (should returnfalse).Added driver property
useHostsInPrivileges. Defaults totrue. Affects whether or not@hostnamewill be used inDBMD.getColumn/TablePrivileges.Fixed
ResultSet.setFetchDirection(FETCH_UNKNOWN).Added
queriesBeforeRetryMasterproperty that specifies how many queries to issue when failed over before attempting to reconnect to the master (defaults to 50).Fixed issue when calling
Statement.setFetchSize()when using arbitrary values.Properly restore connection properties when autoReconnecting or failing-over, including
autoCommitstate, and isolation level.Implemented
Clob.truncate().
Bugs Fixed
Charsets now automatically detected. Optimized code for single-byte character set conversion.
Fixed
RowDataStatic.getAt()off-by-one bug.Fixed
ResultSet.getRow()off-by-one bug.Massive code clean-up to follow Java coding conventions (the time had come).
Implemented
ResultSet.getCharacterStream().Added limited
Clobfunctionality (ResultSet.getClob(),PreparedStatement.setClob(),PreparedStatement.setObject(Clob).Connection.isClosed()no longer “pings” the server.Connection.close()issuesrollback()whengetAutoCommit()isfalse.Added
socketTimeoutparameter to URL.Added
LOCAL TEMPORARYto table types inDatabaseMetaData.getTableTypes().Added
paranoidparameter, which sanitizes error messages by removing “sensitive” information from them (such as host names, ports, or user names), as well as clearing “sensitive” data structures when possible.
Bugs Fixed
General source-code cleanup.
The driver now only works with JDK-1.2 or newer.
Fix and sort primary key names in
DBMetaData(SF bugs 582086 and 582086).ResultSet.getTimestamp()now works forDATEtypes (SF bug 559134).Float types now reported as
java.sql.Types.FLOAT(SF bug 579573).Support for streaming (row-by-row) result sets (see
README) Thanks to Doron.Testsuite now uses Junit (which you can get from http://www.junit.org.
JDBC Compliance: Passes all tests besides stored procedure tests.
ResultSet.getDate/Time/Timestampnow recognizes all forms of invalid values that have been set to all zeros by MySQL (SF bug 586058).Added multi-host failover support (see
README).Repackaging: New driver name is
com.mysql.jdbc.Driver, old name still works, though (the driver is now provided by MySQL-AB).Support for large packets (new addition to MySQL-4.0 protocol), see
READMEfor more information.Better checking for closed connections in
StatementandPreparedStatement.Performance improvements in string handling and field metadata creation (lazily instantiated) contributed by Alex Twisleton-Wykeham-Fiennes.
JDBC-3.0 functionality including
Statement/PreparedStatement.getGeneratedKeys()andResultSet.getURL().Overall speed improvements using controlling transient object creation in
MysqlIOclass when reading packets.!!! LICENSE CHANGE !!! The driver is now GPL. If you need non-GPL licenses, please contact me
<mark@mysql.com>.Performance enhancements: Driver is now 50–100% faster in most situations, and creates fewer temporary objects.
- D.5.5.1. Changes in MySQL Connector/J 2.0.14 (16 May 2002)
- D.5.5.2. Changes in MySQL Connector/J 2.0.13 (24 April 2002)
- D.5.5.3. Changes in MySQL Connector/J 2.0.12 (07 April 2002)
- D.5.5.4. Changes in MySQL Connector/J 2.0.11 (27 January 2002)
- D.5.5.5. Changes in MySQL Connector/J 2.0.10 (24 January 2002)
- D.5.5.6. Changes in MySQL Connector/J 2.0.9 (13 January 2002)
- D.5.5.7. Changes in MySQL Connector/J 2.0.8 (25 November 2001)
- D.5.5.8. Changes in MySQL Connector/J 2.0.7 (24 October 2001)
- D.5.5.9. Changes in MySQL Connector/J 2.0.6 (16 June 2001)
- D.5.5.10. Changes in MySQL Connector/J 2.0.5 (13 June 2001)
- D.5.5.11. Changes in MySQL Connector/J 2.0.3 (03 December 2000)
- D.5.5.12. Changes in MySQL Connector/J 2.0.1 (06 April 2000)
- D.5.5.13. Changes in MySQL Connector/J 2.0.0pre5 (21 February 2000)
- D.5.5.14. Changes in MySQL Connector/J 2.0.0pre4 (10 January 2000)
- D.5.5.15. Changes in MySQL Connector/J 2.0.0pre (17 August 1999)
Bugs Fixed
ResultSet.getDouble()now uses code built into JDK to be more precise (but slower).Fixed typo for
relaxAutoCommitparameter.LogicalHandle.isClosed()calls through to physical connection.Added SQL profiling (to
STDERR). SetprofileSql=truein your JDBC URL. SeeREADMEfor more information.PreparedStatementnow releases resources on.close(). (SF bug 553268)More code cleanup.
Quoted identifiers not used if server version does not support them. Also, if server started with
--ansior--sql-mode=ANSI_QUOTES, “"” will be used as an identifier quote character, otherwise “'” will be used.
Bugs Fixed
Fixed unicode chars being read incorrectly. (SF bug 541088)
Faster blob escaping for
PrepStmt.Added
setURL()toMySQLXADataSource. (SF bug 546019)Added
set/getPortNumber()toDataSource(s). (SF bug 548167)PreparedStatement.toString()fixed. (SF bug 534026)More code cleanup.
Rudimentary version of
Statement.getGeneratedKeys()from JDBC-3.0 now implemented (you need to be using JDK-1.4 for this to work, I believe).DBMetaData.getIndexInfo()- bad PAGES fixed. (SF BUG 542201)ResultSetMetaData.getColumnClassName()now implemented.
Bugs Fixed
Fixed
testsuite.TraversalafterLast()bug, thanks to Igor Lastric.Added new types to
getTypeInfo(), fixed existing types thanks to Al Davis and Kid Kalanon.Fixed time zone off-by-1-hour bug in
PreparedStatement(538286, 528785).Added identifier quoting to all
DatabaseMetaDatamethods that need them (should fix 518108).Added support for
BITtypes (51870) toPreparedStatement.ResultSet.insertRow()should now detect auto_increment fields in most cases and use that value in the new row. This detection will not work in multi-valued keys, however, due to the fact that the MySQL protocol does not return this information.Relaxed synchronization in all classes, should fix 520615 and 520393.
DataSources- fixedsetUrlbug (511614, 525565), wrong datasource class name (532816, 528767).Added support for
YEARtype (533556).Fixes for
ResultSetupdatability inPreparedStatement.ResultSet: Fixed updatability (values being set tonullif not updated).Added
getTable/ColumnPrivileges()to DBMD (fixes 484502).Added
getIdleFor()method toConnectionandMysqlLogicalHandle.ResultSet.refreshRow()implemented.Fixed
getRow()bug (527165) inResultSet.General code cleanup.
Bugs Fixed
Full synchronization of
Statement.java.Fixed missing
DELETE_RULEvalue inDBMD.getImported/ExportedKeys()andgetCrossReference().More changes to fix
Unexpected end of input streamerrors when readingBLOBvalues. This should be the last fix.
Bugs Fixed
Fixed null-pointer-exceptions when using
MysqlConnectionPoolDataSourcewith Websphere 4 (bug 505839).Fixed spurious
Unexpected end of input streamerrors inMysqlIO(bug 507456).
Bugs Fixed
Fixed extra memory allocation in
MysqlIO.readPacket()(bug 488663).Added detection of network connection being closed when reading packets (thanks to Todd Lizambri).
Fixed casting bug in
PreparedStatement(bug 488663).DataSourceimplementations moved toorg.gjt.mm.mysql.jdbc2.optionalpackage, and (initial) implementations ofPooledConnectionDataSourceandXADataSourceare in place (thanks to Todd Wolff for the implementation and testing ofPooledConnectionDataSourcewith IBM WebSphere 4).Fixed quoting error with escape processor (bug 486265).
Removed concatenation support from driver (the
||operator), as older versions of VisualAge seem to be the only thing that use it, and it conflicts with the logical||operator. You will need to start mysqld with the--ansiflag to use the||operator as concatenation (bug 491680).Ant build was corrupting included
jarfiles, fixed (bug 487669).Report batch update support through
DatabaseMetaData(bug 495101).Implementation of
DatabaseMetaData.getExported/ImportedKeys()andgetCrossReference().Fixed off-by-one-hour error in
PreparedStatement.setTimestamp()(bug 491577).Full synchronization on methods modifying instance and class-shared references, driver should be entirely thread-safe now (please let me know if you have problems).
Bugs Fixed
XADataSource/ConnectionPoolDataSourcecode (experimental)DatabaseMetaData.getPrimaryKeys()andgetBestRowIdentifier()are now more robust in identifying primary keys (matches regardless of case or abbreviation/full spelling ofPrimary KeyinKey_typecolumn).Batch updates now supported (thanks to some inspiration from Daniel Rall).
PreparedStatement.setAnyNumericType()now handles positive exponents correctly (adds+so MySQL can understand it).
Bugs Fixed
Character sets read from database if
useUnicode=trueandcharacterEncodingis not set. (thanks to Dmitry Vereshchagin)Initial transaction isolation level read from database (if available). (thanks to Dmitry Vereshchagin)
Fixed
PreparedStatementgenerating SQL that would end up with syntax errors for some queries.PreparedStatement.setCharacterStream()now implementedCapitalize type names when
capitalizeTypeNames=trueis passed in URL or properties (for WebObjects. (thanks to Anjo Krank)ResultSet.getBlob()now returnsnullif column value wasnull.Fixed
ResultSetMetaData.getPrecision()returning one less than actual on newer versions of MySQL.Fixed dangling socket problem when in high availability (
autoReconnect=true) mode, and finalizer forConnectionwill close any dangling sockets on GC.Fixed time zone issue in
PreparedStatement.setTimestamp(). (thanks to Erik Olofsson)PreparedStatement.setDouble() now uses full-precision doubles (reverting a fix made earlier to truncate them).
Fixed
DatabaseMetaData.supportsTransactions(), andsupportsTransactionIsolationLevel()andgetTypeInfo()SQL_DATETIME_SUBandSQL_DATA_TYPEfields not being readable.Updatable result sets now correctly handle
NULLvalues in fields.PreparedStatement.setBoolean() will use 1/0 for values if your MySQL version is 3.21.23 or higher.
Fixed
ResultSet.isAfterLast()always returningfalse.
Bugs Fixed
Fixed
PreparedStatementparameter checking.Fixed case-sensitive column names in
ResultSet.java.
Bugs Fixed
ResultSet.insertRow()works now, even if not all columns are set (they will be set toNULL).Added
BytetoPreparedStatement.setObject().Fixed data parsing of
TIMESTAMPvalues with 2-digit years.Added
ISOLATIONlevel support toConnection.setIsolationLevel()DataBaseMetaData.getCrossReference()no longerArrayIndexOOB.ResultSet.getBoolean()now recognizes-1astrue.ResultSethas +/-Inf/inf support.getObject()onResultSetcorrectly doesTINYINT->ByteandSMALLINT->Short.Fixed
ArrayIndexOutOfBoundswhen sending largeBLOBqueries. (Max size packet was not being set)Fixed NPE on
PreparedStatement.executeUpdate()when all columns have not been set.Fixed
ResultSet.getBlob()ArrayIndexout-of-bounds.
Bugs Fixed
Fixed composite key problem with updatable result sets.
Faster ASCII string operations.
Fixed off-by-one error in
java.sql.Blobimplementation code.Fixed incorrect detection of
MAX_ALLOWED_PACKET, so sending large blobs should work now.Added detection of -/+INF for doubles.
Added
ultraDevHackURL parameter, set totrueto enable (broken) Macromedia UltraDev to use the driver.Implemented
getBigDecimal()without scale component for JDBC2.
Bugs Fixed
Columns that are of type
TEXTnow return asStringswhen you usegetObject().Cleaned up exception handling when driver connects.
Fixed
RSMD.isWritable()returning wrong value. Thanks to Moritz Maass.DatabaseMetaData.getPrimaryKeys()now works correctly with respect tokey_seq. Thanks to Brian Slesinsky.Fixed many JDBC-2.0 traversal, positioning bugs, especially with respect to empty result sets. Thanks to Ron Smits, Nick Brook, Cessar Garcia and Carlos Martinez.
No escape processing is done on
PreparedStatementsanymore per JDBC spec.Fixed some issues with updatability support in
ResultSetwhen using multiple primary keys.
Fixes to ResultSet for insertRow() - Thanks to Cesar Garcia
Fix to Driver to recognize JDBC-2.0 by loading a JDBC-2.0 class, instead of relying on JDK version numbers. Thanks to John Baker.
Fixed ResultSet to return correct row numbers
Statement.getUpdateCount() now returns rows matched, instead of rows actually updated, which is more SQL-92 like.
10-29-99
Statement/PreparedStatement.getMoreResults() bug fixed. Thanks to Noel J. Bergman.
Added Short as a type to PreparedStatement.setObject(). Thanks to Jeff Crowder
Driver now automagically configures maximum/preferred packet sizes by querying server.
Autoreconnect code uses fast ping command if server supports it.
Fixed various bugs with respect to packet sizing when reading from the server and when alloc'ing to write to the server.
Now compiles under JDK-1.2. The driver supports both JDK-1.1 and JDK-1.2 at the same time through a core set of classes. The driver will load the appropriate interface classes at runtime by figuring out which JVM version you are using.
Fixes for result sets with all nulls in the first row. (Pointed out by Tim Endres)
Fixes to column numbers in SQLExceptions in ResultSet (Thanks to Blas Rodriguez Somoza)
The database no longer needs to specified to connect. (Thanks to Christian Motschke)
- D.5.6.1. Changes in MySQL Connector/J 1.2b (04 July 1999)
- D.5.6.2. Changes in MySQL Connector/J 1.2a (14 April 1999)
- D.5.6.3. Changes in MySQL Connector/J 1.1i (24 March 1999)
- D.5.6.4. Changes in MySQL Connector/J 1.1h (08 March 1999)
- D.5.6.5. Changes in MySQL Connector/J 1.1g (19 February 1999)
- D.5.6.6. Changes in MySQL Connector/J 1.1f (31 December 1998)
- D.5.6.7. Changes in MySQL Connector/J 1.1b (03 November 1998)
- D.5.6.8. Changes in MySQL Connector/J 1.1 (02 September 1998)
- D.5.6.9. Changes in MySQL Connector/J 1.0 (24 August 1998)
- D.5.6.10. Changes in MySQL Connector/J 0.9d (04 August 1998)
- D.5.6.11. Changes in MySQL Connector/J 0.9 (28 July 1998)
- D.5.6.12. Changes in MySQL Connector/J 0.8 (06 July 1998)
- D.5.6.13. Changes in MySQL Connector/J 0.7 (01 July 1998)
- D.5.6.14. Changes in MySQL Connector/J 0.6 (21 May 1998)
Better Documentation (in progress), in doc/mm.doc/book1.html
DBMD now permits null for a column name pattern (not in spec), which it changes to '%'.
DBMD now has correct types/lengths for getXXX().
ResultSet.getDate(), getTime(), and getTimestamp() fixes. (contributed by Alan Wilken)
EscapeProcessor now handles \{ \} and { or } inside quotation marks correctly. (thanks to Alik for some ideas on how to fix it)
Fixes to properties handling in Connection. (contributed by Juho Tikkala)
ResultSet.getObject() now returns null for NULL columns in the table, rather than bombing out. (thanks to Ben Grosman)
ResultSet.getObject() now returns Strings for types from MySQL that it doesn't know about. (Suggested by Chris Perdue)
Removed DataInput/Output streams, not needed, 1/2 number of method calls per IO operation.
Use default character encoding if one is not specified. This is a work-around for broken JVMs, because according to spec, EVERY JVM must support "ISO8859_1", but they do not.
Fixed Connection to use the platform character encoding instead of "ISO8859_1" if one isn't explicitly set. This fixes problems people were having loading the character- converter classes that didn't always exist (JVM bug). (thanks to Fritz Elfert for pointing out this problem)
Changed MysqlIO to re-use packets where possible to reduce memory usage.
Fixed escape-processor bugs pertaining to {} inside quotation marks.
Fixed character-set support for non-Javasoft JVMs (thanks to many people for pointing it out)
Fixed ResultSet.getBoolean() to recognize 'y' & 'n' as well as '1' & '0' as boolean flags. (thanks to Tim Pizey)
Fixed ResultSet.getTimestamp() to give better performance. (thanks to Richard Swift)
Fixed getByte() for numeric types. (thanks to Ray Bellis)
Fixed DatabaseMetaData.getTypeInfo() for DATE type. (thanks to Paul Johnston)
Fixed EscapeProcessor for "fn" calls. (thanks to Piyush Shah at locomotive.org)
Fixed EscapeProcessor to not do extraneous work if there are no escape codes. (thanks to Ryan Gustafson)
Fixed Driver to parse URLs of the form "jdbc:mysql://host:port" (thanks to Richard Lobb)
Fixed Timestamps for PreparedStatements
Fixed null pointer exceptions in RSMD and RS
Re-compiled with jikes for valid class files (thanks ms!)
Fixed escape processor to deal with unmatched { and } (thanks to Craig Coles)
Fixed escape processor to create more portable (between DATETIME and TIMESTAMP types) representations so that it will work with BETWEEN clauses. (thanks to Craig Longman)
MysqlIO.quit() now closes the socket connection. Before, after many failed connections some OS's would run out of file descriptors. (thanks to Michael Brinkman)
Fixed NullPointerException in Driver.getPropertyInfo. (thanks to Dave Potts)
Fixes to MysqlDefs to allow all *text fields to be retrieved as Strings. (thanks to Chris at Leverage)
Fixed setDouble in PreparedStatement for large numbers to avoid sending scientific notation to the database. (thanks to J.S. Ferguson)
Fixed getScale() and getPrecision() in RSMD. (contrib'd by James Klicman)
Fixed getObject() when field was DECIMAL or NUMERIC (thanks to Bert Hobbs)
DBMD.getTables() bombed when passed a null table-name pattern. Fixed. (thanks to Richard Lobb)
Added check for "client not authorized" errors during connect. (thanks to Hannes Wallnoefer)
Result set rows are now byte arrays. Blobs and Unicode work bidirectonally now. The useUnicode and encoding options are implemented now.
Fixes to PreparedStatement to send binary set by setXXXStream to be sent untouched to the MySQL server.
Fixes to getDriverPropertyInfo().
Changed all ResultSet fields to Strings, this should allow Unicode to work, but your JVM must be able to convert between the character sets. This should also make reading data from the server be a bit quicker, because there is now no conversion from StringBuffer to String.
Changed PreparedStatement.streamToString() to be more efficient (code from Uwe Schaefer).
URL parsing is more robust (throws SQL exceptions on errors rather than NullPointerExceptions)
PreparedStatement now can convert Strings to Time/Date values using setObject() (code from Robert Currey).
IO no longer hangs in Buffer.readInt(), that bug was introduced in 1.1d when changing to all byte-arrays for result sets. (Pointed out by Samo Login)
Fixes to DatabaseMetaData to allow both IBM VA and J-Builder to work. Let me know how it goes. (thanks to Jac Kersing)
Fix to ResultSet.getBoolean() for NULL strings (thanks to Barry Lagerweij)
Beginning of code cleanup, and formatting. Getting ready to branch this off to a parallel JDBC-2.0 source tree.
Added "final" modifier to critical sections in MysqlIO and Buffer to allow compiler to inline methods for speed.
9-29-98
If object references passed to setXXX() in PreparedStatement are null, setNull() is automatically called for you. (Thanks for the suggestion goes to Erik Ostrom)
setObject() in PreparedStatement will now attempt to write a serialized representation of the object to the database for objects of Types.OTHER and objects of unknown type.
Util now has a static method readObject() which given a ResultSet and a column index will re-instantiate an object serialized in the above manner.
Got rid of "ugly hack" in MysqlIO.nextRow(). Rather than catch an exception, Buffer.isLastDataPacket() was fixed.
Connection.getCatalog() and Connection.setCatalog() should work now.
Statement.setMaxRows() works, as well as setting by property maxRows. Statement.setMaxRows() overrides maxRows set using properties or url parameters.
Automatic re-connection is available. Because it has to "ping" the database before each query, it is turned off by default. To use it, pass in "autoReconnect=true" in the connection URL. You may also change the number of reconnect tries, and the initial timeout value using "maxReconnects=n" (default 3) and "initialTimeout=n" (seconds, default 2) parameters. The timeout is an exponential backoff type of timeout; for example, if you have initial timeout of 2 seconds, and maxReconnects of 3, then the driver will timeout 2 seconds, 4 seconds, then 16 seconds between each re-connection attempt.
Fixed handling of blob data in Buffer.java
Fixed bug with authentication packet being sized too small.
The JDBC Driver is now under the LGPL
8-14-98
Fixed Buffer.readLenString() to correctly read data for BLOBS.
Fixed PreparedStatement.stringToStream to correctly read data for BLOBS.
Fixed PreparedStatement.setDate() to not add a day. (above fixes thanks to Vincent Partington)
Added URL parameter parsing (?user=... and so forth).
Big news! New package name. Tim Endres from ICE Engineering is starting a new source tree for GNU GPL'd Java software. He's graciously given me the org.gjt.mm package directory to use, so now the driver is in the org.gjt.mm.mysql package scheme. I'm "legal" now. Look for more information on Tim's project soon.
Now using dynamically sized packets to reduce memory usage when sending commands to the DB.
Small fixes to getTypeInfo() for parameters, and so forth.
DatabaseMetaData is now fully implemented. Let me know if these drivers work with the various IDEs out there. I've heard that they're working with JBuilder right now.
Added JavaDoc documentation to the package.
Package now available in .zip or .tar.gz.
Implemented getTypeInfo(). Connection.rollback() now throws an SQLException per the JDBC spec.
Added PreparedStatement that supports all JDBC API methods for PreparedStatement including InputStreams. Please check this out and let me know if anything is broken.
Fixed a bug in ResultSet that would break some queries that only returned 1 row.
Fixed bugs in DatabaseMetaData.getTables(), DatabaseMetaData.getColumns() and DatabaseMetaData.getCatalogs().
Added functionality to Statement that enables executeUpdate() to store values for IDs that are automatically generated for AUTO_INCREMENT fields. Basically, after an executeUpdate(), look at the SQLWarnings for warnings like "LAST_INSERTED_ID = 'some number', COMMAND = 'your SQL query'". If you are using AUTO_INCREMENT fields in your tables and are executing a lot of executeUpdate()s on one Statement, be sure to clearWarnings() every so often to save memory.
Split MysqlIO and Buffer to separate classes. Some ClassLoaders gave an IllegalAccess error for some fields in those two classes. Now mm.mysql works in applets and all classloaders. Thanks to Joe Ennis <jce@mail.boone.com> for pointing out the problem and working on a fix with me.
Fixed DatabaseMetadata problems in getColumns() and bug in switch statement in the Field constructor. Thanks to Costin Manolache <costin@tdiinc.com> for pointing these out.
Incorporated efficiency changes from Richard Swift <Richard.Swift@kanatek.ca> in
MysqlIO.javaandResultSet.java:We're now 15% faster than gwe's driver.
Started working on
DatabaseMetaData.The following methods are implemented:
getTables()getTableTypes()getColumns()getCatalogs()
- D.6.1. Changes in MySQL Connector/MXJ 5.0.12 (07 July 2011)
- D.6.2. Changes in MySQL Connector/MXJ 5.0.11 (24 November 2009)
- D.6.3. Changes in MySQL Connector/MXJ 5.0.10 (Not released)
- D.6.4. Changes in MySQL Connector/MXJ 5.0.9 (19 August 2008)
- D.6.5. Changes in MySQL Connector/MXJ 5.0.8 (06 August 2007)
- D.6.6. Changes in MySQL Connector/MXJ 5.0.7 (27 May 2007)
- D.6.7. Changes in MySQL Connector/MXJ 5.0.6 (04 May 2007)
- D.6.8. Changes in MySQL Connector/MXJ 5.0.5 (14 March 2007)
- D.6.9. Changes in MySQL Connector/MXJ 5.0.4 (28 January 2007)
- D.6.10. Changes in MySQL Connector/MXJ 5.0.3 (24 June 2006)
- D.6.11. Changes in MySQL Connector/MXJ 5.0.2 (15 June 2006)
- D.6.12. Changes in MySQL Connector/MXJ 5.0.1 (Not released)
- D.6.13. Changes in MySQL Connector/MXJ 5.0.0 (09 December 2005)
Functionality Added or Changed
Incompatible Change: Connector/MXJ now contains MySQL 5.5.9, not MySQL 5.1.
These platform mappings were added:
Windows_Vista-amd64=Win-x86
Windows_2003-amd64=Win-x86
Windows_2000-amd64=Win-x86
FreeBSD-i386=FreeBSD-x86
Functionality Added or Changed
The embedded MySQL binaries have been updated to MySQL 5.1.40 for GPL releases and MySQL 5.1.40 for Commercial releases.
The contents of the directory used for bootstrapping the MySQL databases is now configurable by using the
windows-share-dir-jarproperty. You should supply the name of a jar containing the files you want to use.The embedded Aspect/J class has been removed.
The default timeout for the kill delay within the embedded test suite has been increased from 10 to 30 seconds.
Bugs Fixed
On startup Connector/MXJ generated an exception on Windows 7:
Exception in thread “Thread-3” java.util.MissingResourceException?: Resource ‘5-0-51a/Windows_7-x86/mysqld-nt.exe’ not found at com.mysql.management.util.Streams.getResourceAsStream(Streams.java:133) at com.mysql.management.util.Streams.getResourceAsStream(Streams.java:107) at com.mysql.management.util.Streams$1.inner(Streams.java:149) at com.mysql.management.util.Exceptions$VoidBlock?.exec(Exceptions.java:128) at com.mysql.management.util.Streams.createFileFromResource(Streams.java:162) at com.mysql.management.MysqldResource?.makeMysqld(MysqldResource?.java:533) at com.mysql.management.MysqldResource?.deployFiles(MysqldResource?.java:518) at com.mysql.management.MysqldResource?.exec(MysqldResource?.java:495) at com.mysql.management.MysqldResource?.start(MysqldResource?.java:216) at com.mysql.management.MysqldResource?.start(MysqldResource?.java:166)
The default
platform-map.propertiesfile, which maps platforms to the supplied binary bundles, has been updated with additional platforms, including Windows 7, Windows Server 2008,amd64andsparcv9for Solaris, and Mac OS X 64-bit. (Bug #48298)
This was an internal only release.
Functionality Added or Changed
The embedded MySQL has been updated to the MySQL 5.1 series. The embedded MySQL binaries have been updated to MySQL 5.1.33 for GPL releases and MySQL 5.1.34 for Commercial releases.
The MySQL binary for Windows targets has been updated to be configurable through the
windows-mysqld-commandproperty. This is to handle the move in MySQL 5.1.33 from mysqld-nt.exe to mysqld.exe. The default value is mysqld.exe.
Functionality Added or Changed
The port used in the
ConnectorMXJUrlTestПримерandConnectorMXJObjectTestПримерport is no longer hard coded. Instead, the code uses thex-mxj_test_portproperty a default value of3336The utility used to kill MySQL on Windows (
kill.exe) has been configured to be loaded from thekill.exeproperty, instead of being hard-coded. The corresponding timeout,KILL_DELAYhas also been moved to the properties file and defaults to 5 minutes.The embedded MySQL binaries have been updated to MySQL 5.0.51a for GPL releases and MySQL 5.0.54 for Commercial releases.
The timeout for kill operations in the embedded test suite has been set to a default of 10 seconds.
Functionality Added or Changed
The embedded documentation has been updated so that it now points to the main MySQL documentation pages in the MySQL reference manual.
The embedded MySQL binaries have been updated to MySQL 5.0.45 for GPL releases and MySQL 5.0.46 for Commercial releases.
Functionality Added or Changed
Updated the jar file name to be consistent with the Connector/J jar file name. Files are now formatted as
mysql-connector-mxj-.mxj-versionThe
ConnectorMXJUrlTestПримерandConnectorMXJObjectTestExammplehave been updated to include an example of initializing the user/password and creating an initial database. TheInitializePasswordПримерexample class has now been removed.The
PatchedStandardSocketFactoryclass has been removed, because it fixed an issue in Connector/J that was corrected in Connector/J 5.0.6.The embedded MySQL binaries have been updated to MySQL 5.0.41 for GPL releases and MySQL 5.0.42 for Commercial releases.
Bugs Fixed
Added a null-check to deal with class loaders where
getClassLoader()returns null.
Functionality Added or Changed
Updated internal jar file names to include version information and be more consistent with Connector/J jar naming. For example,
connector-mxj.jaris nowmysql-connector-mxj-${mxj-version}.jar.Updated commercial license files.
Added copyright notices to some classes which were missing them.
Added
InitializeUserandQueryUtilclasses to support new feature.Added new tests for initial-user & expanded some existing tests.
ConnectorMXJUrlTestПримерandConnectorMXJObjectTestПримерnow demonstrate the initialization of user/password and creating the initial database (rather than using "test").Added new connection property
initialize-userwhich, if set totruewill remove the default, un-passworded anonymous and root users, and create the user/password from the connection url.Removed obsolete field
SimpleMysqldDynamicMBean.lastInvocation.Clarified code in
DefaultsMap.entrySet().Removed obsolete
PatchedStandardSocketFactoryjava file.Added
main(String[])tocom/mysql/management/AllTestsSuite.java.Ошибки reading
portFileare now reported usingstacktrace(err), previouslySystem.errwas used.portFilenow contains a new-line to be consistent withpidFile.Fixed where
versionString.trim()was ignored.Removed references to
File.deleteOnExit, a warning is printed instead.
Bugs Fixed
Changed tests to shutdown mysqld prior to deleting files.
Fixed port file to always be written to datadir.
Added os.name-os.arch to resource directory mapping properties file.
Swapped out commercial binaries for v5.0.40.
Delete
portFileon shutdown.Moved
platform-map.propertiesintodb-files.jar.Clarified the startup max wait numbers.
Updated
build.xmlin preperation for next beta build.Removed
use-default-architectureproperty replaced.Added null-check to deal with C/MXJ being loaded by the bootstrap classloaders with JVMs for which
getClassLoader()returns null.Added robustness around reading portfile.
Removed
PatchedStandardSocketFactory(fixed in Connector/J 5.0.6).Refactored duplication from tests and examples to
QueryUtil.Removed obsolete
InitializePasswordПример
Bugs Fixed
Moved
MysqldFactoryto main package.Reformatting: Added newlines some files which did not end in them.
Swapped out commercial binaries for v5.0.36.
Found and removed dynamic linking in mysql_kill; updated solution.
Changed protected constructor of
SimpleMysqldDynamicMBeanfrom taking aMysqldResourceto taking aMysqldFactory, to lay groundwork for addressing BUG discovered by Andrew Rubinger. See: MySQL Forums (Actual testing with JBoss, and filing a bug, is still required.)build.xml:usagenow slightly more verbose; some reformatting.Now incorporates Reggie Bernett's
SafeTerminateProcessand only calls the unsafe TerminateProcess as a final last resort.New windows
kill.exefixes a bug where mysqld was being force terminated. Issue reported by bruno haleblian and others, see: MySQL Forums.Replaced
Boolean.parseBooleanwith JDK 1.4 compliantvalueOf.Changed
connector-mxj.propertiesdefault mysql version to 5.0.37.In testing so far mysqld reliably shuts down cleanly much faster.
Added testcase to
com.mysql.management.jmx.AcceptanceTestwhich demonstrates thatdataDiris a mutable MBean property.Updated
build.xmlin prep for next release.Changed
SimpleMysqldDynamicMBeanto createMysqldResourceon demand to enable setting ofdatadir. (Rubinger bug groundwork).Clarified the synchronization of
MysqldResourcemethods.SIGHUPis replaced withMySQLShutdown<PID>event.Clarified the immutability of
baseDir,dataDir,pidFile,portFile.Added 5.1.15 binaries to the repository.
Removed 5.1.14 binaries from the repository.
Added
getDataDir()to interfaceMysqldResourceI.Added 5.1.14 binaries to repository.
Replaced windows kill.exe resource with re-written version specific to mysqld.
Added Patched
StandardSocketFactoryfrom Connector/J 5-0 HEAD.Ensured 5.1.14 compatibility.
Swapped out gpl binaries for v5.0.37.
Removed 5.0.22 binaries from the repository.
Bugs Fixed
Allow multiple calls to start server from URL connection on non-3306 port. (Bug #24004)
Updated
build.xmlto build to handle with different gpl and commercial mysqld version numbers.Only populate the options map from the help text if specifically requested or in the MBean case.
Introduced property for Linux & WinXX to default to 32bit versions.
Swapped out gpl binaries for v5.0.27.
Swapped out commercial binaries for v5.0.32.
Moved mysqld binary resourced into separate jar file NOTICE:
CLASSPATHwill now need toconnector-mxj-db-files.jar.Minor test robustness improvements.
Moved default version string out of java class into a text editable properties file (
connector-mxj.properties) in the resources directory.Fixed test to be tolerant of
/tmpbeing a symlink to/foo/tmp.
Bugs Fixed
Removed unused imports, formatted code, made minor edits to tests.
Removed "TeeOutputStream" - no longer needed.
Swapped out the mysqld binaries for MySQL v5.0.22.
Bugs Fixed
Replaced string parsing with JDBC connection attempt for determining if a mysqld is "ready for connections"
CLASSPATHwill now need to include Connector/J jar."platform" directories replace spaces with underscores
extracted array and list printing to ListToString utility class
Swapped out the mysqld binaries for MySQL v5.0.21
Added trace level logging with Aspect/J.
CLASSPATHwill now need to includelib/aspectjrt.jarreformatted code
altered to be "basedir" rather than "port" oriented.
help parsing test reflects current help options
insulated users from problems with "." in basedir
swapped out the mysqld binaries for MySQL v5.0.18
Made tests more robust be deleting the /tmp/test-c.mxj directory before running tests.
ServerLauncherSocketFactory.shutdown API change: now takes File parameter (basedir) instead of port.
socket is now "mysql.sock" in datadir
added ability to specify "mysql-version" as an url parameter
Extended timeout for help string parsing, to avoid cases where the help text was getting prematurely flushed, and thus truncated.
swapped out the mysqld binaries for MySQL v5.0.19
MysqldResource now tied to dataDir as well as basedir (API CHANGE)
moved PID file into datadir
ServerLauncherSocketFactory.shutdown now works across JVMs.
extracted splitLines(String) to Str utility class
ServerLauncherSocketFactory.shutdown(port) no longer throws, only reports to System.err
ServerLauncherSocketFactory now treats URL parameters in the form of
&server.foo=nullasserverOptionMap.put("foo", null)ServerLauncherSocketFactory.shutdown API change: now takes 2 File parameters (basedir, datadir)
This was an internal only release.
Version 5.0.1 has no changelog entries.
Bugs Fixed
Removed HelpOptionsParser's need to reference a MysqldResource.
Reorganized utils into a single "Utils" collaborator.
Minor test tweaks
Altered examples and tests to use new Connector/J 5.0 URL syntax for launching Connector/MXJ ("jdbc:mysql:mxj://")
Swapped out the mysqld binaries for MySQL v5.0.16.
Ditched "ClassUtil" (merged with Str).
Minor refactorings for type casting and exception handling.
This fixes bugs since the first GA release 1.0.5 and introduces new features.
Functionality Added or Changed
Incompatible Change: API incompatible change:
ConnectPropertyValis no longer astructby a typedef that usesboost::variant. Code such as:sql::ConnectPropertyVal tmp; tmp.str.val=passwd.c_str(); tmp.str.len=passwd.length(); connection_properties["password"] = tmp;
Should be changed to:
connection_properties["password"] = sql::ConnectPropertyVal(passwd);
Instances of
std::auto_ptrhave been changed toboost::scoped_ptr. Scoped array instances now use boost::scoped_array. Further,boost::shared_ptrandboost::weak_ptrare now used for guarding access around result sets.LDFLAGS,CXXFLAGSandCPPFLAGSare now checked from the environment for every binary generated.Connection map property
OPT_RECONNECTwas changed to be of typebooleanfromlonglong.get_driver_instance()is now only available in dynamic library builds - static builds do not have this symbol. This was done to accommodate loading the DLL withLoadLibraryordlopen. If you do not use CMake for building the source code you will need to definemysqlcppconn_EXPORTSif you are loading dynamically and want to use theget_driver_instance()entry point.Connection::getClientOption(const sql::SQLString & optionName, void * optionValue)now accepts theoptionNamevaluesmetadataUseInfoSchema,defaultStatementResultType,defaultPreparedStatementResultType, andcharacterSetResults. In the previous version onlymetadataUseInfoSchemawas permitted. The same options are available forConnection::setClientOption().
Bugs Fixed
Certain header files were incorrectly present in the source distribution. The fix excludes dynamically generated and platform specific header files from source packages generated using CPack. (Bug #45846)
CMake generated an error if configuring an out of source build, that is, when CMake was not called from the source root directory. (Bug #45843)
Using Prepared Statements caused corruption of the heap. (Bug #45048)
Missing includes when using GCC 4.4. Note that GCC 4.4 is not yet in use for any official MySQL Connector/C++ builds. (Bug #44931)
A bug was fixed in Prepared Statements. The bug occurred when a stored procedure was prepared without any parameters. This led to an exception. (Bug #44931)
Fixed a Prepared Statements performance issue. Reading large result sets was slow.
Fixed bug in
ResultSetMetaDatafor statements and prepared statements,getScaleandgetPrecisionreturned incorrect results.
- D.7.2.1. Changes in MySQL Connector/CPP 1.0.5 (21 April 2009)
- D.7.2.2. Changes in MySQL Connector/CPP 1.0.4 (31 March 2009, beta)
- D.7.2.3. Changes in MySQL Connector/CPP 1.0.3 (02 March 2009, alpha)
- D.7.2.4. Changes in MySQL Connector/CPP 1.0.2 (19 December 2008, alpha)
- D.7.2.5. Changes in MySQL Connector/CPP 1.0.1 (01 December 2008, alpha)
This is the first Generally Available (GA) release.
Functionality Added or Changed
The interface of
sql::ConnectionMetaData,sql::ResultSetMetaDataandsql::ParameterMetaDatawas modified to have a protected destructor. As a result the client code has no need to destruct the metadata objects returned by the connector. MySQL Connector/C++ handles the required destruction. This enables statements such as:connection->getMetaData->getSchema();
This avoids potential memory leaks that could occur as a result of losing the pointer returned by
getMetaData().Improved memory management. Potential memory leak situations are handled more robustly.
Changed the interface of
sql::Driverandsql::Connectionso they accept the options map by alias instead of by value.Changed the return type of
sql::SQLException::getSQLState()fromstd::stringtoconst char *to be consistent withstd::exception::what().Implemented
getResultSetType()andsetResultSetType()forStatement. UsesTYPE_FORWARD_ONLY, which means unbuffered result set andTYPE_SCROLL_INSENSITIVE, which means buffered result set.Implemented
getResultSetType()forPreparedStatement. The setter is not implemented because currentlyPreparedStatementcannot do refetching. Storing the result means the bind buffers will be correct.Added the option
defaultStatementResultTypetoMySQL_Connection::setClientOption(). Also, the method now returnssql::Connection *.Added
Result::getType(). Implemented for the three result set classes.Enabled tracing functionality when building with Microsoft Visual C++ 8 and later, which corresponds to Microsoft Visual Studio 2005 and later.
Added better support for named pipes, on Windows. Use
pipe://and add the path to the pipe. Shared memory connections are currently not supported.
Bugs Fixed
A bug was fixed in
MySQL_Connection::setSessionVariable(), which had been causing exceptions to be thrown.
Functionality Added or Changed
An installer was added for the Windows operating system.
Minimum CMake version required was changed from 2.4.2 to 2.6.2. The latest version is required for building on Windows.
metadataUseInfoSchemawas added to the connection property map, which enables control of theINFORMATION_SCHEMAfor metadata.Implemented
MySQL_ConnectionMetaData::supportsConvert(from, to).Added support for MySQL Connector/C.
Introduced
ResultSetMetaData::isZerofill(), which is not in the JDBC specification.
Bugs Fixed
A bug was fixed in all implementations of
ResultSet::relative()which was giving a wrong return value although positioning was working correctly.A leak was fixed in
MySQL_PreparedResultSet, which occurred when the result contained aBLOBcolumn.
Functionality Added or Changed
Added new tests in
test/unit/classes. Those tests are mostly about code coverage. Most of the actual functionality of the driver is tested by the tests found intest/CJUnitPort.New data types added to the list returned by
DatabaseMetaData::getTypeInfo()areFLOAT UNSIGNED,DECIMAL UNSIGNED,DOUBLE UNSIGNED. Those tests may not be in the JDBC specification. However, due to the change you should be able to look up every type and type name returned by, for example,ResultSetMetaData::getColumnTypeName().MySQL_Driver::getPatchVersionintroduced.Major performance improvements due to new buffered
ResultSetimplementation.Addition of
test/unit/READMEwith instructions for writing bug and regression tests.Experimental support for STLPort. This feature may be removed again at any time later without prior warning! Type cmake
-Lfor configuration instructions.Added properties enabled methods for connecting, which add many connect options. This uses a dictionary (map) of key value pairs. Methods added are
Driver::connect(map), andConnection::Connection(map).New
BLOBimplementation.sql::Blobwas removed in favor ofstd::istream. C++'sIOStreamlibrary is very powerful, similar to PHP's streams. It makes no sense to reinvent the wheel. For example, you can pass astd::istringstreamobject tosetBlob()if the data is in memory, or just open a filestd::fstreamand let it stream to the DB, or write its own stream. This is also true forgetBlob()where you can just copy data (if a buffered result set), or stream data (if implemented).Implemented
ResultSet::getBlob()which returnsstd::stream.Fixed
MySQL_DatabaseMetaData::getTablePrivileges(). Test cases were added in the first unit testing framework.Implemented
MySQL_Connection::setSessionVariable()for setting variables likesql_mode.Implemented
MySQL_DatabaseMetaData::getColumnPrivileges().cppconn/datatype.hhas changed and is now used again. Reimplemented the type subsystem to be more usable - more types for binary and nonbinary strings.Implementation for
MySQL_DatabaseMetaData::getImportedKeys()for MySQL versions before 5.1.16 usingSHOW, and above usingINFORMATION_SCHEMA.Implemented
MySQL_ConnectionMetaData::getProcedureColumns().make package_source now packs with bzip2.
Re-added
getTypeInfo()with information about all types supported by MySQL and thesql::DataType.Changed the implementation of
MySQL_ConstructedResultSetto use the more efficient O(1) access method. This should improve the speed with which the metadata result sets are used. Also, there is less copying during the construction of the result set, which means that all result sets returned from the metadata functions will be faster.Introduced, internally,
sql::mysql::MyValwhich has implicit constructors. Used inmysql_metadata.cppto create result sets with native data instead of always string (varchar).Renamed
ResultSet::getLong()toResultSet::getInt64().resultset.hincludes typdefs for Windows to be able to useint64_t.Introduced
ResultSet::getUInt()andResultSet::getUInt64().Improved the implementation for
ResultSetMetaData::isReadOnly(). Values generated from views are read only. These generated values don't havedbinMYSQL_FIELDset, while all normal columns do have.Implemented
MySQL_DatabaseMetaData::getExportedKeys().Implemented
MySQL_DatabaseMetaData::getCrossReference().
Bugs Fixed
Bug fixed in
MySQL_PreparedResultSet::getString(). Returned string that had real data but the length was random. Now, the string is initialized with the correct length and thus is binary safe.Corrected handling of unsigned server types. Now returning correct values.
Fixed handling of numeric columns in
ResultSetMetaData::isCaseSensitiveto returnfalse.
Functionality Added or Changed
Implemented
getScale(),getPrecision()andgetColumnDisplaySize()forMySQL_ResultSetMetaDataandMySQL_Prepared_ResultSetMetaData.Changed
ResultSetMetaDatamethodsgetColumnDisplaySize(),getPrecision(),getScale()to returnunsigned intinstead ofsigned int.DATE,DATETIMEandTIMEare now being handled when calling theMySQL_PreparedResultSetmethodsgetString(),getDouble(),getInt(),getLong(),getBoolean().Reverted implementation of
MySQL_DatabaseMetaData::getTypeInfo(). Now unimplemented. In addition, removedcppconn/datatype.hfor now, until a more robust implementation of the types can be developed.Implemented
MySQL_PreparedStatement::setNull().Implemented
MySQL_PreparedStatement::clearParameters().Added PHP script
examples/cpp_trace_analyzer.phpto filter the output of the debug trace. Please see the inline comments for documentation. This script is unsupported.Implemented
MySQL_ResultSetMetaData::getPrecision()andMySQL_Prepared_ResultSetMetaData::getPrecision(), updating example.Added new unit test framework for JDBC compliance and regression testing.
Added
test/unitas a basis for general unit tests using the new test framework, seetest/unit/examplefor basic usage examples.
Bugs Fixed
Fixed
MySQL_PreparedStatementResultSet::getDouble()to return the correct value when the underlying type isMYSQL_TYPE_FLOAT.Fixed bug in
MySQL_ConnectionMetaData::getIndexInfo(). The method did not work because the schema name wasn't included in the query sent to the server.Fixed a bug in
MySQL_ConnectionMetaData::getColumns()which was performing a cartesian product of the columns in the table times the columns matchingcolumnNamePattern. The exampleexample/connection_meta_schemaobj.cppwas extended to cover the function.Fixed bugs in
MySQL_DatabaseMetaData. AllsupportsCatalogXXXXXmethods were incorrectly returningtrueand allsupportsSchemaXXXXmethods were incorrectly returningfalse. NowsupportsCatalogXXXXXreturnsfalseandsupportsSchemaXXXXXreturnstrue.Fixed bugs in the
MySQL_PreparedStatementsmethodssetBigInt()andsetDatetime(). They decremented the internal column index before forwarding the request. This resulted in a double-decrement and therefore the wrong internal column index. The error message generated was:setString() ... invalid "parameterIndex"
Fixed a bug in
getString().getString()is now binary safe. A new example was also added.Fixed bug in
FLOAThandling.Fixed
MySQL_PreparedStatement::setBlob(). In the tests there is a simple example of a class implementingsql::Blob.
Functionality Added or Changed
sql::mysql::MySQL_SQLExceptionwas removed. The distinction between server and client (connector) errors, based on the type of the exception, has been removed. However, the error code can still be checked to evaluate the error type.Support for (n)make install was added. You can change the default installation path. Carefully read the messages displayed after executing cmake. The following are installed:
Static and the dynamic version of the library,
libmysqlcppconn.Generic interface,
cppconn.Two MySQL specific headers:
mysql_driver.h, use this if you want to get your connections from the driver instead of instantiating aMySQL_Connectionobject. This makes your code portable when using the common interface.mysql_connection.h, use this if you intend to link directly to theMySQL_Connectionclass and use its specifics not found insql::Connection.However, you can make your application fully abstract by using the generic interface rather than these two headers.
Driver Manager was removed.
Added
ConnectionMetaData::getSchemas()andConnection::setSchema().ConnectionMetaData::getCatalogTerm()returns not applicable, there is no counterpart to catalog in MySQL Connector/C++.Added experimental GCov support, cmake
-DMYSQLCPPCONN_GCOV_ENABLE:BOOL=1All examples can be given optional connection parameters on the command line, for example:
examples/connect tcp://host:port user pass database
or
examples/connect unix:///path/to/mysql.sock user pass database
Renamed
ConnectionMetaData::getTables: TABLE_COMMENTtoREMARKS.Renamed
ConnectionMetaData::getProcedures: PROCEDURE_SCHEMAtoPROCEDURE_SCHEM.Renamed
ConnectionMetaData::getPrimaryKeys(): COLUMNtoCOLUMN_NAME,SEQUENCEtoKEY_SEQ, andINDEX_NAMEtoPK_NAME.Renamed
ConnectionMetaData::getImportedKeys(): PKTABLE_CATALOGtoPKTABLE_CAT,PKTABLE_SCHEMAtoPKTABLE_SCHEM,FKTABLE_CATALOGtoFKTABLE_CAT,FKTABLE_SCHEMAtoFKTABLE_SCHEM.Changed metadata column name
TABLE_CATALOGtoTABLE_CATandTABLE_SCHEMAtoTABLE_SCHEMto ensure JDBC compliance.Introduced experimental CPack support, see make help.
All tests changed to create TAP compliant output.
Renamed
sql::DbcMethodNotImplementedtosql::MethodNotImplementedExceptionRenamed
sql::DbcInvalidArgumenttosql::InvalidArgumentExceptionChanged
sql::DbcExceptionto implement the interface of JDBC'sSQLException. Renamed tosql::SQLException.Converted Connector/J tests added.
MySQL Workbench 5.1 changed to use MySQL Connector/C++ for its database connectivity.
New directory layout.
- D.8.1. Changes in MySQL Proxy 0.8.2 (18 August 2011)
- D.8.2. Changes in MySQL Proxy 0.8.1 (13 September 2010)
- D.8.3. Changes in MySQL Proxy 0.8.0 (21 January 2010)
- D.8.4. Changes in MySQL Proxy 0.7.2 (30 June 2009)
- D.8.5. Changes in MySQL Proxy 0.7.1 (15 May 2009)
- D.8.6. Changes in MySQL Proxy 0.7.0 (Not Released)
- D.8.7. Changes in MySQL Proxy 0.6.1 (06 February 2008)
- D.8.8. Changes in MySQL Proxy 0.6.0 (11 September 2007)
- D.8.9. Changes in MySQL Proxy 0.5.1 (30 June 2007)
- D.8.10. Changes in MySQL Proxy 0.5.0 (19 June 2007)
MySQL Proxy 0.8.2 is a maintenance release and focuses on these areas:
Adding the protocol changes of MySQL 5.5 and later
Removing the “admin” plugin from the list of default plugins, as it requires configuration since 0.8.1
Note to Windows Users
The Microsoft Visual C++ runtime libraries are now a requirement for running MySQL Proxy. Users that do not have these libraries must download and install the Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update. For the current Proxy version, use the following link to obtain the package:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26368
(Bug #12836100)
Functionality Added or Changed
Removed the “admin” plugin from the list of default plugins, as it requires configuration since 0.8.1.
Added support for
OUTparameters in prepared statements in stored procedures with MySQL 5.5.Added support for decoding all data types of the row-based replication protocol.
Added support for binary log checksums.
Bugs Fixed
Fixed handling of stored procedures with cursors with MySQL 5.5. (Bug #61998)
A crash occurred if the file named with the
--defaults-fileoption did not exist. (Bug #59790)The first characters of log messages were stripped. (Bug #59790)
A memory leak occurred if connection pooling was used. (Bug #56620)
A bogus timestamp log was produced if state tracking was not compiled in.
A crash could occur if run under Valgrind.
Fixed handling of “used columns” with row-based replication.
Functionality Added or Changed
Allow interception of
LOAD DATA INFILEandSHOW ERRORSstatements.The unused
network_mysqld_com_query_result_track_state()function has been deprecated.chassis_set_fdlimit()has been deprecated in favor ofchassis_fdlimit_set().Shutdown hooks were added to free the global memory of third-party libraries such as
openssl.con->in_load_data_localhas been removed.
Bugs Fixed
The admin plugin had an undocumented default value for
--admin-password. (Bug #53429)Use of
LOAD DATA LOCAL INFILEcaused the connection between the client and MySQL Proxy to abort. (Bug #51864)If the backend MySQL server went down, and then the clock on the MySQL Proxy host went backward (for example, during daylight saving time adjustments), Proxy stopped forwarding queries to the backend. (Bug #50806)
network_address_set_address()->network_address_set_address_ip()calledgethostbyname()which was not reentrant. This meant that a MySQL Proxy plugin needed to guard all calls tonetwork_address_set_address()with a mutex.network_address_set_address()has been modified to be thread safe. (Bug #49099)The hard limit was fixed for the case where the fdlimit was set. (Bug #48120)
MySQL Proxy returned an error message with a nonstandard SQL State when all backends were down:
"#07000(proxy) all backends are down"
This caused issues for clients with “retry” logic, as they could not handle these “custom” SQL States. (Bug #45417)
If MySQL Proxy used a UNIX socket, it did not remove the socket file at termination time. (Bug #38415)
The
--proxy-read-only-backend-addressesoption did not work. (Bug #38341, Bug #11749171)When running configure to build, the error message relating to the
lualibraries could be misleading. The wording and build advice have been updated.
Functionality Added or Changed
Bugs Fixed
A memory leak occurred in MySQL Proxy if clients older than MySQL 4.1 connected to it. (Bug #50993)
A segmentation fault occurred in MySQL Proxy if clients older than MySQL 4.1 connected to it. (Bug #48641)
MySQL Proxy would load a configuration file with unsafe permissions, which could permit password information to be exposed through the file. MySQL Proxy now refuses to load a configuration file with unsafe permissions. (Bug #47589)
Several supplied scripts were updated to account for flag and structure changes:
active-transactions.luawas updated to use theresultset_is_neededflag.ro-balance.luawas updated to use theresultset_is_neededflag and updatedproxy.connection.dst.namestructure.rw-splitting.luawas updated to use theresultset_is_neededflag and updatedproxy.connectionsstructure.
(Bug #47349, Bug #45408, Bug #47345, Bug #43424, Bug #42841, Bug #46141)
The line numbers provided in stack traces were off by one. (Bug #47348)
MySQL Proxy accepted more than one address in the value of the
--proxy-backend-addressesoption. You should specify one--proxy-backend-addressesoption for each backend address. (Bug #47273)MySQL Proxy returned the wrong version string internally from the
proxy.PROXY_VERSIONconstant. (Bug #45996)MySQL Proxy could stop accepting network packets if it received a large number of packets. The listen queue has been extended to permit a larger backlog. (Bug #45878, Bug #43278)
Due to a memory leak, memory usage for each new connection to the proxy increased, leading to very high consumption. (Bug #45272)
MySQL Proxy failed to work with certain versions of MySQL, including MySQL 5.1.15, where a change in the MySQL protocol existed. Now Proxy denies
COM_CHANGE_USERcommands when it is connected to MySQL 5.1.14 to 5.1.17 servers by sending back an error:COM_CHANGE_USER is broken on 5.1.14-.17, please upgrade the MySQL Server. (Bug #45167)References: See also Bug #25371.
Logging to
syslogwith the--log-use-syslogoption did not work. (Bug #36431)MySQL Proxy could incorrectly insert
NULLvalues into the returned result set, even though non-NULLvalues were returned in the original query. (Bug #35729)MySQL Proxy raised an error when processing query packets larger than 16MB. (Bug #35202)
Bugs Fixed
On Windows, MySQL Proxy might not find the required modules during initialization. The core code has been updated to find the components correctly, and the Lua-based C modules are prefixed with
lua-and Lua plugins withplugin-. (Bug #45833)
Bugs Fixed
Due to a memory leak, memory usage for each new connection to the proxy increased, leading to very high consumption. (Bug #45272)
The port number was reported incorrectly in
proxy.connection.client.address. (Bug #43313)Result sets with more than 250 fields could cause MySQL Proxy to crash. (Bug #43078)
MySQL Proxy was unable to increase its own maximum number of open files according to the limit specified by the
--max-open-filesoption, if the limit was less than 8192. When set to debug level, Proxy now reports the open files limit and when the limit has been updated. (Bug #42783)MySQL Proxy crashed when connecting to a MySQL 4.0 server. Now it generates an error message instead. (Bug #38601)
When using the
rw-splitting.luascript, you could get an error when talking to the backend server:2008-07-28 18:00:30: (critical) (read_query) [string "/usr/local/share/mysql-proxy/rw-splitting.l..."]:218: bad argument #1 to 'ipairs' (table expected, got userdata)
This led to Proxy closing the connection to the configured MySQL backend. (Bug #38419)
When using MySQL Proxy with multiple backends, failure of one backend caused Proxy to disconnect all backends and stop routing requests. (Bug #34793)
Functionality Added or Changed
Support for using a configuration file, in addition to the command-line options, has been added. To specify such a file, use the
--defaults-file=command-line option. See Section 14.7.3, “MySQL Proxy Command Options”. (Bug #30206)file_nameA number of the internal structures developed for use with Lua scripts that work with MySQL Proxy have been updated and harmonized to make their meaning and contents easier to use and consistent across multiple locations.
The address information has been updated. Instead of a combined
ip:portstructure that you had to parse to extract the individual information, you can now access that information directly. For example, instead of structures providing a single.addressitem, you now have these items:name(the combinedip:port),address(the IP address), andport(port number). In addition, all addresses now supply both thesrc(source) anddst(destination) socket information for both ends of connections.Some familiar structures have been updated to accommodate this information:
proxy.connection.client.addressisproxy.connection.client.src.nameproxy.connection.server.addressisproxy.connection.server.dst.name
proxy.backendsis now inproxy.global.backendsThe.addressfield of each backend is an address-object as described earlier. For example,proxy.backends[1].addressisproxy.global.backends[1].dst.name.The
read_auth()andread_handshake()functions no longer receive anauthparameter. Instead, all the data is available in the connection tables.In
read_handshake(), you access the information through the globalproxy.connectiontable:0.6 0.7 auth.thread_idproxy.connection.server.thread_idauth.mysqld_versionproxy.connection.server.mysqld_versionauth.server_addrproxy.connection.server.dst.nameauth.client_addrproxy.connection.client.src.nameauth.scrambleproxy.connection.server.scramble_bufferIn
read_auth(), you can use the following:0.6 0.7 auth.usernameproxy.connection.client.usernameauth.passwordproxy.connection.client.scrambled_passwordauth.default_dbproxy.connection.client.default_dbauth.server_addrproxy.connection.server.dst.nameauth.client_addrproxy.connection.client.src.nameIn the
proxy.queries:append()function, a third parameter is an (optional) table with options specific to the this packet. Specifically, if you want to have access to the result set in theread_query_result()hook, you must set theresultset_is_neededflag:proxy.queries:append( 1, ..., { resultset_is_needed = true } )For more information, see proxy.queries.
proxy.backendsis now inproxy.global.backends.
Bugs Fixed
Security Enhancement: Accessing MySQL Proxy using a client or backend from earlier than MySQL 4.1 resulted in Proxy aborting with an assertion. This is because Proxy supports only MySQL 4.1 or higher. Proxy now reports a fault. (Bug #31419)
MySQL Proxy was configured with the
LUA_PATHandLUA_CPATHdirectory locations according to the build host rather than the execution host. In addition, during installation, certain Lua source files could be installed into the incorrect locations. (Bug #44877, Bug #44497)Using MySQL Proxy with very large return data sets from queries could cause a crash, with or without manipulation of the data set within the Lua engine. (Bug #39332)
MySQL Proxy terminated if a submitted packet was smaller than expected by the protocol. (Bug #36743)
When using MySQL Proxy in a master-master replication scenario, Proxy failed to identify failure in one of the replication masters and did not redirect connections to the other master. (Bug #35295)
Functionality Added or Changed
Fixed assertions on write errors.
Fixed sending fake server-greetings in
connect_server().Fixed error handling for socket functions on Windows.
Added new features to
run-tests.lua.
Functionality Added or Changed
When using read/write splitting and the
rw-splitting.luaexample script, connecting a second user to the proxy returns an error message. (Bug #30867)Added support in
read_query_result()to overwrite the result set.By default, MySQL Proxy now starts in daemon mode. Use the new
--no-daemonoption to override this. Added the--pid-fileoption for writing the process ID to a file after becoming a daemon.Added hooks for
read_auth(),read_handshake()andread_auth_result().Added handling of
proxy.connection.backend_ndxinconnect_server()andread_query()to support read/write splitting.Added support for
proxy.response.packets.Added test cases.
Added
--no-proxyto disable the proxy.Added support for listening UNIX sockets.
Added a global Lua-scope
proxy.global.*.Added connection pooling.
Bugs Fixed
Fixed an assertion on
COM_BINLOG_DUMP. (Bug #29764)Fixed an assertion on result-packets like
[field-len | fields | EOF | ERR]. (Bug #29732)Fixed an assertion that MySQL Proxy raised at login time if a client specified no password and no default database. (Bug #29719)
Fixed an assertion at
COM_SHUTDOWN. (Bug #29719)Fixed a crash if
proxy.connectionis used inconnect_server().Fixed the
glib2check to require at leastglib22.6.0.Fixed an assertion at connect time when all backends are down.
Fixed connection stalling if
read_query_result()raised an assertion.Fixed length encoding on
proxy.resultsets.Fixed compilation on win32.
Fixed an assertion when connecting to MySQL 6.0.1.
Fixed decoding of length-encoded ints for 3-byte notation.
Fixed
inj.resultset.affected_rowsonSELECTqueries.Fixed handling of (SQL)
NULLin result sets.Fixed a memory leak when
proxy.response.*is used.
Functionality Added or Changed
Added
resultset.affected_rowsandresultset.insert_id.Changed
--proxy.profilingto--proxy-skip-profiling.Added missing dependency to
libmysqlclient-devto theINSTALLfile.Added
inj.query_timeandinj.response_timeinto the Lua scripts.Added support for pre-4.1 passwords in a 4.1 connection.
Added script examples for rewriting and injection.
Added
proxy.VERSION.Added support for UNIX sockets.
Added protection against duplicate result sets from a script.
Bugs Fixed
Fixed mysql check in configure to die when
mysql.hisn't detected.Fixed handling of duplicate ERR on
COM_CHANGE_USERin MySQL 5.1.18+.Fixed a compile error with MySQL 4.1.x on missing
COM_STMT_*.Fixed a crash on fields longer than 250 bytes when the result set is inspected.
Fixed a warning if
connect_server()is not provided.Fixed an assertion when an error occurs at initial script exec time.
Fixed an assertion when
read_query_result()is not provided whenPROXY_SEND_QUERYis used.