Appendix D. MySQL Release Notes

Table of Contents

D.1. Changes in MySQL 5.6 (Development)
D.1.1. Changes in MySQL 5.6.10 (Not yet released)
D.1.2. Changes in MySQL 5.6.9 (Not yet released)
D.1.3. Changes in MySQL 5.6.8 (2012-11-07)
D.1.4. Changes in MySQL 5.6.7 (2012-09-29, Release Candidate)
D.1.5. Changes in MySQL 5.6.6 (2012-08-07, Milestone 9)
D.1.6. Changes in MySQL 5.6.5 (2012-04-10, Milestone 8)
D.1.7. Changes in MySQL 5.6.4 (2011-12-20, Milestone 7)
D.1.8. Changes in MySQL 5.6.3 (2011-10-03, Milestone 6)
D.1.9. Changes in MySQL 5.6.2 (2011-04-11)
D.1.10. Changes in MySQL 5.6.1 (Not released, Milestone 5)
D.1.11. Changes in MySQL 5.6.0 (Not released, Milestone 4)
D.2. MySQL Connector/ODBC (MyODBC) Change History
D.2.1. Changes in MySQL Connector/ODBC Version 5.2
D.2.2. Changes in MySQL Connector/ODBC Version 5.1
D.2.3. Changes in MySQL Connector/ODBC Version 5.0
D.2.4. Changes in MySQL Connector/ODBC Version 3.51
D.3. MySQL Connector/Net Change History
D.3.1. Changes in MySQL Connector/Net Version 6.6
D.3.2. Changes in MySQL Connector/Net Version 6.5
D.3.3. Changes in MySQL Connector/Net Version 6.4
D.3.4. Changes in MySQL Connector/Net Version 6.3
D.3.5. Changes in MySQL Connector/Net Version 6.2
D.3.6. Changes in MySQL Connector/Net Version 6.1
D.3.7. Changes in MySQL Connector/Net Version 6.0
D.3.8. Changes in MySQL Connector/Net Version 5.3
D.3.9. Changes in MySQL Connector/Net Version 5.2
D.3.10. Changes in MySQL Connector/Net Version 5.1
D.3.11. Changes in MySQL Connector/Net Version 5.0
D.3.12. Changes in MySQL Connector/Net Version 1.0
D.3.13. Changes in MySQL Connector/Net Version 0.9.0 (30 August 2004)
D.3.14. Changes in MySQL Connector/Net Version 0.76
D.3.15. Changes in MySQL Connector/Net Version 0.75
D.3.16. Changes in MySQL Connector/Net Version 0.74
D.3.17. Changes in MySQL Connector/Net Version 0.71
D.3.18. Changes in MySQL Connector/Net Version 0.70
D.3.19. Changes in MySQL Connector/Net Version 0.68
D.3.20. Changes in MySQL Connector/Net Version 0.65
D.3.21. Changes in MySQL Connector/Net Version 0.60
D.3.22. Changes in MySQL Connector/Net Version 0.50
D.4. MySQL Visual Studio Plugin Change History
D.4.1. Changes in MySQL Visual Studio Plugin 1.0.3 (Not yet released)
D.4.2. Changes in MySQL Visual Studio Plugin 1.0.2 (Not yet released)
D.4.3. Changes in MySQL Visual Studio Plugin 1.0.1 (2006-10-04)
D.4.4. Changes in MySQL Visual Studio Plugin 1.0.0 (2006-10-04)
D.5. MySQL Connector/J Change History
D.5.1. Changes in MySQL Connector/J 5.1
D.5.2. Changes in MySQL Connector/J 5.0
D.5.3. Changes in MySQL Connector/J 3.1
D.5.4. Changes in MySQL Connector/J 3.0
D.5.5. Changes in MySQL Connector/J 2.0
D.5.6. Changes in MySQL Connector/J 1.2 and lower
D.6. MySQL Connector/C++ Change History
D.6.1. Changes in MySQL Connector/C++ 1.1
D.6.2. Changes in MySQL Connector/C++ 1.0
D.7. MySQL Proxy Change History
D.7.1. Changes in MySQL Proxy 0.8.3 (2012-08-20)
D.7.2. Changes in MySQL Proxy 0.8.2 (2011-08-18)
D.7.3. Changes in MySQL Proxy 0.8.1 (2010-09-13)
D.7.4. Changes in MySQL Proxy 0.8.0 (2010-01-21)
D.7.5. Changes in MySQL Proxy 0.7.2 (2009-06-30)
D.7.6. Changes in MySQL Proxy 0.7.1 (2009-05-15)
D.7.7. Changes in MySQL Proxy 0.7.0 (Not Released)
D.7.8. Changes in MySQL Proxy 0.6.1 (2008-02-06)
D.7.9. Changes in MySQL Proxy 0.6.0 (2007-09-11)
D.7.10. Changes in MySQL Proxy 0.5.1 (2007-06-30)
D.7.11. Changes in MySQL Proxy 0.5.0 (2007-06-19)
D.8. MySQL for Excel Change History
D.9. MySQL Installer Change History
D.9.1. Changes in MySQL Installer 1.1.5 (2012-09-30)
D.9.2. Changes in MySQL Installer 1.1.4 (2012-08-08)
D.9.3. Changes in MySQL Installer 1.1.0 (2012-07-25)

This appendix lists the changes from version to version in MySQL through the latest version of MySQL 5.6, which is currently MySQL 5.6.10. 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 these notes as we add new features in the 5.6 series, so that everybody can follow the development process.

We tend to update these notes at the same time we make changes to MySQL. If you find a recent version of MySQL listed here that you cannot 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.

D.1. Changes in MySQL 5.6 (Development)

The following sections describe the changes made in each release of MySQL 5.6.

For an overview of features added in MySQL 5.6, see Section 1.4, “What Is New in MySQL 5.6”.

D.1.1. Changes in MySQL 5.6.10 (Not yet released)

Bugs Fixed

  • Important Change: Replication: The lettercasing used for displaying UUIDs in global transaction identifiers was inconsistent. Now, all GTID values use lowercase, including those shown in the Retrieved_Gtid_Set and Executed_Gtid_Set columns from the output of SHOW SLAVE STATUS. (Bug #15869441)

  • Replication: When GTIDs were enabled, the automatic dropping of a temporary table when a client disconnected did not always generate a GTID. Now each logged DROP TABLE statement, including any generated by the server, is guaranteed to have its own GTID. (Bug #15907504)

  • Replication: When a binary log is replayed on a server (for example, by executing a command like mysqlbinlog binlog.000001 | mysql), it sets a pseudo-slave mode on the client connection used, so that the server can read binlog and apply binary log events correctly. However, the pseudo-slave mode was not disabled after the binary log dump was read, which caused unexpected filtering rules to be applied to SQL statements subsequently executed on the same connection. (Bug #15891524)

  • Replication: Issuing START SLAVE concurrently with setting sql_slave_skip_counter or slave_net_timeout could cause a deadlock. (Bug #14236151)

  • Replication: When using statement-based replication, and where the master and the slave used table schemas having different AUTO_INCREMENT columns, inserts generating AUTO_INCREMENT values logged for a given table on the master could be applied to the wrong table on the slave. (Bug #12669186)

  • AES_DECRYPT() and AES_ENCRYPT() had memory leaks when MySQL was compiled using OpenSSL. (Bug #15909183)

  • Several OpenSSL-related Valgrind warnings were corrected. (Bug #15908967)

  • If the server shut down unexpectedly, the presence of an InnoDB table with 1018 columns (very close to the upper limit of 1020 columns) could cause an assertion error during server restart:

    InnoDB: Failing assertion: table->n_def == table->n_cols - 3

    (Bug #15834685)

  • MySQL could encounter an error during shutdown on Windows XP or earlier systems. This issue did not affect systems running Windows Vista or higher, which use atomic condition variables to represent Windows Events. (Bug #14822849)

  • Queries that used grouping failed when executed using a cursor if the optimizer processed the grouping using a temporary table. (Bug #14740889)

  • Autosizing of Performance Schema parameters could result in settings that caused excessive CPU use. (Bug #67736, Bug #15927744)

D.1.2. Changes in MySQL 5.6.9 (Not yet released)

Installation Notes

  • The --random-passwords option for mysql_install_db is now supported for MySQL install operations (not upgrades) using Solaris PKG packages.

Functionality Added or Changed

Bugs Fixed

  • Performance: InnoDB: The timing values for low-level InnoDB read operations were adjusted for better performance with fast storage devices, such as SSD. This enhancement primarily affects read operations for BLOB columns in compressed tables. (Bug #13702112, Bug #64258)

  • Incompatible Change: The THREAD_ID column in Performance Schema tables was widened from INT to BIGINT to accommodate 64-bit values.

    If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change to the performance_schema database. (Bug #14664453)

  • Incompatible Change: Connection ID (thread ID) values greater than 32 bits can occur on some systems (such as busy or long-running 64-bit systems), causing these problems:

    • Connection IDs written to the general query log and slow query log were incorrect. This was true for logging to both files and tables.

    • The CONNECTION_ID() function could return a value with a data type too small for values larger than 32 bits.

    • The mysql_thread_id() and mysql_kill() C API functions did not handle ID values larger than 32 bits. This could result in killing the wrong thread; for example, if you invoked mysql_kill(mysql_thread_id()).

    Connection IDs now are permitted to be 64-bit values when the server supports them (when built with 64-bit data types), which has these effects:

    • Connection IDs are logged correctly to the general query log and slow query log.

      Note

      This change involves a modification to the log tables, so after upgrading to this release, you must run mysql_upgrade and restart the server.

    • CONNECTION_ID() returns a data type appropriate for values larger than 32 bits.

    • mysql_thread_id() is unchanged; the client/server protocal has only 4 bytes for the ID value. This function returns an incorrect (truncated) value for connection IDs larger than 32 bits and should be avoided.

      mysql_kill() still cannot handle values larger than 32 bits, but to guard against killing the wrong thread now returns an error in these cases:

      • If given an ID larger than 32 bits, mysql_kill() returns a CR_INVALID_CONN_HANDLE error.

      • After the server's internal thread ID counter reaches a value larger than 32 bits, it returns an ER_DATA_OUT_OF_RANGE error for any mysql_kill() invocation and mysql_kill() fails.

      To avoid problems with mysql_thread_id() and mysql_kill(), do not use them. To get the connection ID, execute a SELECT CONNECTION_ID() query and retrieve the result. To kill a thread, execute a KILL statement.

    (Bug #19806, Bug #11745768, Bug #65715, Bug #14236124, Bug #44728, Bug #11753308)

  • Important Change: InnoDB: A DML statement using the index merge access method could lock many rows from the table, even when those rows were not part of the final result set. This fix reduces the excessive locking by releasing the locks of unmatched rows. This optimization affects only transactions with isolation level equal to or less strict than READ COMMITTED; it does not apply to transactions using REPEATABLE READ or SERIALIZABLE isolation level. (Bug #14226171)

  • Important Change: Replication: Because running the server with GTIDs enabled prevented changes to nontransactional tables, programs such as mysql_upgrade and mysql_install_db were unable to operate on system tables that used the MyISAM storage engine and therefore could not function correctly. Now, when running with --enforce-gtid-consistency (required whenever --gtid-mode=ON), the server allows single statements on nontransactional tables. (Bug #14722659)

  • Important Change: Replication: Formerly, the value of the Seconds_Behind_Master column in the output of SHOW SLAVE STATUS was always set to NULL whenever the SQL thread or the I/O thread was stopped. Now, this column is set to NULL only if the SQL thread is not running, or if the I/O thread is not running following a check to determine whether or not the SQL thread has processed all of the relay log. (If the SQL thread has finished processing and the I/O thread is running, Seconds_Behind_Master is 0.) (Bug #12946333)

  • Partitioning: InnoDB: Previously, when attempting to optimize one or more partitions of a partitioned table that used a storage engine that does not support partition-level OPTIMIZE, such as InnoDB, MySQL reported Table does not support optimize, doing recreate + analyze instead, then re-created the entire table, but did not actually analyze it. Now in such cases, the warning message is, Table does not support optimize on partitions. All partitions will be rebuilt and analyzed. In addition, the entire table is analyzed after first being rebuilt. (Bug #11751825)

  • InnoDB: An online DDL operation for an InnoDB table incorrectly reported an empty value ('') instead of the correct key value when it reported a duplicate key error for a unique index using an index prefix. (Bug #14729221)

  • InnoDB: InnoDB tables with FULLTEXT indexes could allocate memory for thread handles that was never released, possibly leading to resource issues on Windows systems. (Bug #14759163)

  • InnoDB: During an online DDL operation that copies the table, the secondary index of the table could become corrupted. (Bug #14753701)

  • InnoDB: If an ALTER TABLE statement failed while attempting to create a FULLTEXT index for an InnoDB table, the server could halt with an assertion error while dropping the incomplete index. (Bug #14504174)

  • Replication: If a table to be replicated had a FULLTEXT index, this index was not ruled out when selecting the type of scan to be used in finding the next row, even though it cannot be used to find the correct one. The row applier subsequently tried unsuccessfully to employ an index scan, causing replication to fail. Now in such cases, indexes which do not provide for sequential access (such as FULLTEXT) are not considered when determining whether to use a table, index, or hash scan for this purpose. (Bug #14843764)

  • Replication: When using the GTID-aware master-slave protocol, the slave I/O thread used the wrong position. When using GTIDs, the position is not normally used, but as a special case, the position was used in addition to the GTID when the slave reconnected to the same master (even though this was not necessary). This problem is fixed by making the GTID-aware master-slave protocol not use positions at all any longer. (Bug #14828028)

  • Replication: Given a stored routine R in which the GTID_SUBTRACT() function was invoked: Once GTID_SUBTRACT() returned NULL when called inside R, it continued to return NULL every time it was called within R, for the remainder of the client session. (Bug #14838575)

  • Replication: MySQL Enterprise Backup, mysqldump, and mysqlhotcopy could not be used with a GTID-enabled MySQL Server, because they were unable to restore the server's GTID state and so could not restore from any point in the binary log other than the very beginning.

    As part of the fix for this problem, the gtid_purged system variable (formerly named gtid_lost) is no longer read-only; now it is possible to add GTIDs to it when gtid_executed (formerly gtid_done) is empty. (Bug #14787808)

  • Replication: Restarting replication after the first binary log file was purged resulted in the error Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.' This led GTID-based replication to fail. (Bug #14756691)

  • Creating an InnoDB table with a FULLTEXT index could encounter a serious error if the table name contained non-alphanumeric characters. (Bug #14835178)

  • Invalid memory reads could occur for queries that selected from a zero-length table name. (Bug #14780820)

  • With LOCK TABLES in effect, CREATE TABLE IF NOT EXISTS ... LIKE could raise an assertion. (Bug #14788976)

  • An assertion was raised if ALTER TABLE was used to rename a column to same name as an existing column while also reordering the renamed column using AFTER or FIRST. (Bug #14756089)

  • An assertion could be raised if semi-join materialization was used to evaluate a NOT IN subquery. (Bug #14751858)

  • For some continuation handler nestings, continuation could occur at the wrong location. (Bug #14724836)

  • SHOW PROCESSLIST output was not sorted in Id order. (Bug #14771006)

  • For UPDATE statements, EXPLAIN showed the total key length in the key_len column rather than the length of the used key parts. (Bug #14682438)

  • Starting the server with --bind-address and then setting host_cache_size to 0 could result in the server stopping for certain kinds of client connections. (Bug #14689561)

  • With index condition pushdown enabled, the optimizer could produce incorrect results for derived tables. (Bug #14640176)

  • The optimizer could incorrectly use a nonspatial index to optimize spatial operations, causing an assertion to be raised. (Bug #14600994)

  • CHECK TABLE and REPAIR TABLE could crash if a MyISAM table had a corrupt key (.MYI) file. Now the server produces an error. (Bug #13556441)

  • CHECK TABLE and REPAIR TABLE could crash if a MyISAM table had a corrupt key (.MYI) file. Now the server produces an error. (Bug #13556107, Bug #13556000)

  • For dumps of the mysql database, mysqldump skipped the event table unless the --events option was given. To skip this table if that is desired, use the --ignore-table option instead (Bug #55587, Bug #11762933)

  • mysqld_safe ignored the value of the UMASK environment variable, leading to behavior different from mysqld with respect to the access mode of created files. Now mysqld_safe (and mysqld_multi) attempt to approximate the same behavior as mysqld. (Bug #57406, Bug #11764559)

  • LAST_INSERT_ID(expr) did not work for expr values greater than the largest signed BIGINT value. (Bug #20964, Bug #11745891)

D.1.3. Changes in MySQL 5.6.8 (2012-11-07)

Configuration Notes

  • This release continues the process begun in MySQL 5.6.6 of making changes to the default values of server parameters. The motivation for these changes is to provide better out-of-box performance and to reduce the need for database administrators to change settings manually. These changes are subject to revision in future releases as we gain feedback.

    In some cases, a parameter has a different fixed default value. In other cases, the server autosizes a parameter at startup using a formula based on other related parameters or server host configuration, rather than using a fixed value. For example, the setting for host_cache_size is its previous default of 128, adjusted up by an amount proportional to the value of max_connections. The idea behind autosizing is that when the server has information available to make a decision about a parameter setting likely to be better than a fixed default, it will.

    The following table summarizes changes to defaults. For variables that are autosized, the main variable description provides additional detail about the sizing algorithm. See Section 5.1.4, “Server System Variables”, and Section 14.2.7, “InnoDB Startup Options and System Variables”. Any of these default settings can be overridden by specifying an explicit value at server startup.

    ParameterOld DefaultNew Default
    host_cache_size 128Autosized using max_connections
    open_files_limit 0Autosized using max_connections
    query_cache_size 01M
    query_cache_type ON OFF
    table_definition_cache 400Autosized using table_open_cache
    table_open_cache 4002000
    thread_cache_size 0Autosized using max_connections

Installation Notes

  • On Unix platforms, mysql_install_db supports a new option, --random-passwords, that provides for more secure MySQL installation. Invoking mysql_install_db with --random-passwords causes it to perform the following actions in addition to its normal operation:

    • Create a random password, assign it to the initial MySQL root accounts, and set the password expired flag for those accounts.

    • Write the initial password file to the .mysql.secret file in the directory named by the HOME environment variable. Depending on operating system, using a command such as sudo may cause the value of HOME to refer to the home directory of the root system user.

      If .mysql.secret already exists, the new password information is appended to it. Each password entry includes a timestamp so that in the event of multiple install operations it is possible to determine the password associated with each one.

      .mysql.secret is created with mode 600 to be accessible only to the system user for whom it is created.

    • Remove the anonymous-user MySQL accounts.

    As a result of these actions, it is necessary after installation to start the server, connect as root using the password written to the .mysql.secret file, and assign a new root password. Until this is done, root cannot do anything else. This must be done for each root account you intend to use. To change the password, you can use the SET PASSWORD statement (for example, with the mysql client). You can also use mysqladmin or mysql_secure_installation.

    New RPM install operations (not upgrades) invoke mysql_install_db with the --random-passwords option. As a consequence, RPM installs from this version onward will have their root accounts secured, and will have no anonymous-user accounts. (Install operations using RPMs for Unbreakable Linux Network are unaffected because they do not use mysql_install_db.)

    For install operations using a binary .tar.gz distribution or a source distribution, you can invoke mysql_install_db with the --random-passwords option manually to make your MySQL installation more secure. This is recommended, particularly for sites with sensitive data.

  • On Unix platforms, mysql_install_db now creates a default option file named my.cnf in the base installation directory. This file is created from a template included in the distribution package named my-default.cnf. You can find the template in or under the base installation directory. When started using mysqld_safe, the server uses my.cnf file by default. If my.cnf already exists, mysql_install_db assumes it to be in use and writes a new file named my-new.cnf instead.

    With one exception, the settings in the default option file are commented and have no effect. The exception is that the file changes the sql_mode system variable from its default of NO_ENGINE_SUBSTITUTION to also include STRICT_TRANS_TABLES. This setting produces a server configuration that results in errors rather than warnings for bad data in operations that modify transactional tables. See Section 5.1.7, “Server SQL Modes”.

    The my-default.cnf template replaces the older sample option files (my-small.cnf, my-medium.cnf, and so forth), which are no longer distributed.

  • mysql_install_db is now a Perl script and can be used on any system with Perl installed. Previously, it was a shell script and available only on Unix platforms.

    In addition, mysql_install_db is more strict about the --datadir option value. Only the last component of the path name is created if it does not exist; the parent directory must already exist or an error occurs. Previously, it created any nonexistent directories in the path name.

Functionality Added or Changed

  • InnoDB: The InnoDB transportable tablespace feature was enhanced to allow ALTER TABLE ... IMPORT TABLESPACE to succeed in some cases where the corresponding .cfg file was not available. This enhancement allows recovery of data even in some cases where the system tablespace is corrupted or deleted. (Bug #14589582, Bug #66715)

  • The number of atomic operations performed by the Performance Schema was reduced. (Bug #14658739)

  • ALTER USER now can be used as a prepared statement. (Bug #66874, Bug #14646014)

  • On Unix systems, the mysql client logs executed statements to a history file when run in interactive mode (see Section 4.5.1.3, “mysql History File”). mysql now ignores for logging purposes statements that match any pattern in the ignore list. By default, the pattern list is "*IDENTIFIED*:*PASSWORD*", to ignore statements that refer to passwords. Pattern matching is not case sensitive. Within patterns, two characters are special:

    • ? matches any single character.

    • * matches any sequence of zero or more characters

    To specify additional patterns, use the --histignore command option or set the MYSQL_HISTIGNORE environment variable. (If both are specified, the option value takes precedence.) The value should be a colon-separated list of one or more patterns, which are appended to the default pattern list.

    Patterns specified on the command line might need to be quoted or escaped to prevent your command interpreter from treating them specially. For example, to suppress logging for UPDATE and DELETE statements in addition to statements that refer to passwords, invoke mysql like this:

    shell> mysql --histignore="*UPDATE*:*:DELETE*"
    

    (Bug #48287, Bug #11756377)

  • On Windows, many MySQL executables depend on the libeay32.dll and ssleay32.dll SSL libraries at runtime. To ensure that the proper versions of these libraries are found, the install process copies them into the same directory as the executables.

  • The SHOW AUTHORS and SHOW CONTRIBUTORS statements have been removed.

Bugs Fixed

  • Important Change: Replication: When running the slave with the --slave-skip-errors option, successive skipped events (errors logged as warnings) were found to contain information from previous warnings, which caused an excessive amount of redundant information to be written to the error log. This problem could occur when using row-based or mixed-format binary logging.

    The fix for this issue is to clear these warnings prior to processing the next skipped event. In addition, the skipped events are now handled in the same way regardless of the value of binlog_format, and a skipped error always causes a warning to be written to the error log, as long as the value of the log_warnings system variable is greater than 1. (Bug #12776842)

  • Important Change: The server system variables profiling, have_profiling, and profiling_history_size are now deprecated, and are subject to removal in a future release of the MySQL Server. (Bug #14658683)

  • InnoDB: When a CREATE INDEX operation failed for an InnoDB FULLTEXT index due to a duplicate key error, some allocated memory was not freed. (Bug #14759111)

  • InnoDB: An online DDL operation to create a unique index could fail to detect duplicate index values, when the duplicate values were caused by DML operations while the index was being created. (Bug #14733674)

  • InnoDB: When using the transportable tablespace feature, the ALTER TABLE ... IMPORT TABLESPACE statement could crash if the InnoDB table being flushed contained a FULLTEXT index. With this fix, the table data can be imported, although you must drop and re-create the FULLTEXT index after the import operation. (Bug #14712962, Bug #67081)

  • InnoDB: During a brief time window while creating an InnoDB unique index, MySQL could print a spurious warning message:

    WARNING: CANNOT FIND INDEX ?index_name IN INNODB INDEX TRANSLATION TABLE
    

    The cause was that MySQL started enforcing the uniqueness constraint before the existence of the index was fully registered. The fix suppresses the incorrect message during this final stage of index creation. (Bug #14735988)

  • InnoDB: An assertion failure occurred when a bogus duplicate key error was flagged during online ALTER TABLE. This issue only occurred for a table that lacked a primary key and any secondary indexes. This patch fixes the assertion failure, but not the bogus duplicate key error, which is reported as Bug#14723456. (Bug #14712710)

  • InnoDB: The InnoDB memcached plugin can now work with tables where the underlying character set is multi-byte. (Bug #14711015, Bug #67076)

  • InnoDB: An ALTER TABLE operation on an InnoDB table containing a FULLTEXT index could cause make the server halt with an assertion error. The fix causes all ALTER TABLE operations for such tables to use the table-copying behavior of the ALGORITHM=COPY clause. (Bug #14681198)

  • InnoDB: If an InnoDB table containing a FULLTEXT index was being modified by a TRUNCATE TABLE statement and on online DDL operation simultaneously, the server could end up with inconsistent internal locks or could crash. (Bug #14676329)

  • InnoDB: If the server crashed while executing TRUNCATE TABLE for an InnoDB table containing a FULLTEXT index, further errors could occur during crash recovery, preventing the server from restarting. (Bug #14676345)

  • InnoDB: If the MySQL server crashed while XA transactions were in PREPARED state, inconsistent data could be produced during crash recovery if the query cache was enabled. The fix allows MySQL to disable the query cache during crash recovery if required. (Bug #14658648)

  • InnoDB: With the innodb_file_per_table setting enabled, a DROP TABLE operation could cause a crash, due to a race condition that depended on the timing of pending I/O requests. (Bug #14594600, Bug #66718)

  • InnoDB: If an online DDL operation failed due to a duplicate key error, caused by DML changes being made concurrently to the table, the server could crash with an assertion error. (Bug #14591797)

  • InnoDB: If a FULLTEXT index was dropped from an InnoDB table, and the server crashed later for an unrelated reason, an additional error could occur while attempting to access nonexistent FULLTEXT data structures. (Bug #14586855)

  • InnoDB: MySQL could crash while creating an InnoDB table if the disk became full at a specific moment: after the .frm file was created but before the corresponding .ibd file was created. (Bug #14645935)

  • InnoDB: If the server crashed at the specific point when a change buffer entry was being merged into a buffer pool page, the transaction log and the change buffer were left in an inconsistent state. After a restart, MySQL could crash after reading the corresponding secondary index page. The problem was more likely to occur in MySQL 5.5 or later, where the original insert buffering mechanism was generalized to cover other operations. (Bug #14636528, Bug #66819, Bug #58571, Bug #61104, Bug #65443)

  • InnoDB: If a crash occurred during a CREATE TABLE operation, the InnoDB data dictionary could be left in an inconsistent state, causing a crash if the partially created table was accessed later. (Bug #14601290)

  • InnoDB: On startup, MySQL would not start if there was a mismatch between the value of the innodb_log_file_size configuration option and the actual size of the ib_logfile* files that make up the redo log. This behavior required manually removing the redo log files after changing the value of innodb_log_file_size. The fix causes MySQL to write all dirty pages to disk and re-create the redo log files during startup if it detects a size mismatch. (Bug #14596550)

  • InnoDB: A query against an InnoDB table with a FULLTEXT index could crash, if the AGAINST clause contained a character sequence that was encoded incorrectly for the character set of the table. (Bug #14588091)

  • InnoDB: The server could crash with a confusing message if it ran out of space for temporary files during index creation.

    InnoDB: Assertion failure in thread thread_num in file mtr0mtr.cc line 306 
    InnoDB: Failing assertion: mtr->state == 12231
    

    (Bug #14586256)

  • InnoDB: An ALTER TABLE on an InnoDB table that dropped the primary key and then re-created it with columns in a different order could cause an error. The issue affected tables where the swapped columns referenced each other in a single-table foreign key relationship. The data dictionary could be left in an inconsistent state, where the table was listed in SHOW TABLES output but could not be queried or dropped. For example, if the table was declared with primary key columns (c1,c2) and a foreign key with c1 REFERENCES c2:

    ALTER TABLE t2 DROP PRIMARY KEY, ADD PRIMARY KEY (c2, c1); 
    ERROR 1030 (HY000): Got error 38 from storage engine 

    (Bug #14548753)

  • InnoDB: Table names containing non-ASCII characters were displayed incorrectly when the MYSQL.INNODB_TABLE_STATS.TABLE_NAME column was queried. (Bug #14404879)

  • InnoDB: A race condition could cause a crash during an online CREATE INDEX statement for an InnoDB table. This bug only affected very small tables. It required a DML operation to be in progress for the table, affecting the primary key columns, at the same time the CREATE INDEX statement was issued. (Bug #14117641)

  • InnoDB: If a transaction was started with a consistent snapshot, then new indexes were added to the table while the transaction was in progress, a subsequent UPDATE statement could incorrectly encounter the error:

    HA_ERR_TABLE_DEF_CHANGED: insufficient history for index

    This issue could cause an assertion error in debug builds. (Bug #14036214)

  • InnoDB: The server could crash with an assertion error during operations on tables with ROW_FORMAT=COMPRESSED. (Bug #14001972)

  • InnoDB: In rare circumstances, during operations on an InnoDB table containing foreign keys, pages in the buffer pool could be evicted but not written to disk, leading to data inconsistency. (Bug #13688491)

  • InnoDB: In rare circumstances, MySQL could apply InnoDB undo records out of order during a ROLLBACK of an operation that modified a BLOB column. This issue could cause an assertion error in debug builds:

    !bpage->file_page_was_freed 

    (Bug #13249921)

  • Partitioning: The server now skips pruning of tables (see Section 17.4, “Partition Pruning”) that use a storage engine which handles its own partitioning internally. The server now also explicitly rejects attempts to use explicit partitioning for such tables. (Bug #14672885)

  • Partitioning: When used with a table having multiple columns in its primary key, but partitioned by KEY using a column that was not part of the primary key as the partitioning column, a query using an aggregate function and DISTINCT such as SELECT SUM(DISTINCT pk_column_1) FROM table WHERE pk_column_2 = constant was not handled correctly. (Bug #14495351)

  • Replication: When using a multithreaded slave, if all worker threads were kept busy, it was possible for cleanup of an internal MTS circular buffer to fail, resulting in a full buffer and failure of the slave. (Bug #14710881)

  • Replication: When invoked while while gtid_mode was set to OFF, the SQL_THREAD_WAIT_AFTER_GTIDS() function waited indefinitely, unless a timeout was specified. In the latter case, the function could return incorrect values. Now, when gtid_mode is OFF, SQL_THREAD_WAIT_AFTER_GTIDS() always returns NULL, as expected. (Bug #14640065)

  • Replication: Partially-failed GRANT and REVOKE statements were not always handled the same way on the master and the slave. We now log an incident event whenever an error occurs, even if it is only a partial error, with a message stating that manual reconciliation is required. (Bug #14598585)

  • Replication: Executing FLUSH LOGS in parallel with COMMIT could cause the server to hang. (Bug #14640486)

  • Replication: Backtick (`) characters were not always handled correctly in internally generated SQL statements, which could sometimes lead to errors on the slave. (Bug #14548159)

  • Replication: There existed a gap in time between the appending of the current GTID to the server's list of logged GTIDs and the commit of the transaction by the storage engine. On slow platforms, or when using profiling, this could cause SELECT SQL_THREAD_WAIT_AFTER_GTIDS(gtid) to return before the data actually reached the database.

    Now the current GTID is appended to the logged GTIDs following the commit, which removes this gap and so eliminates a possible source of inconsistency. (Bug #14116526)

  • Replication: The error shown when a relay log file was missing from the relay log index file informed the user only that the log file was not found, but did not specify the exact reason. Now in such cases, the error message returned is Could not find target log file mentioned in relay log info in the index file 'index_file_name' during relay log initialization. (Bug #11758505)

  • Replication: Following an insert into a nontransactional table that failed due to insufficient disk space, the server did not properly clean up all pending events, leading to an assert or possibly to other errors. (Bug #11750014)

  • A DELETE statement for an InnoDB table could write incorrect transaction metadata into a record, causing the server to halt with an error. To work around this issue, reduce the specified length of the primary key to less than 1K bytes. (Bug #14731482)

  • For an in-place ALTER TABLE operation on an InnoDB table that produced a duplicate-key error for NULL values, the error message displayed the column default value rather than NULL. (Bug #14723364)

  • mysql_secure_installation could not change the password for an account that had password_expired='Y' in the mysql.user table row for that account. (Bug #14726722)

  • In debug builds, the server could crash because db_suicide() failed to handle SIGABRT signals. (Bug #14649493)

  • With the optimizer tracing enabled, the INFORMATION_SCHEMA.OPTIMIZER_TRACE table can be queried to find tracing information about the last statements. However, for queries for which the results were retrieved from the query cache, this information was not available. (Bug #14665052)

  • Patches for materialized semi-joins caused failures of the query plan interface used by NDBCLUSTER. (Bug #14704659)

  • Queries that used a nested join with a subquery in the FROM clause and an ORDER BY ... DESC clause could return too few rows. (Bug #14678404)

  • EXPLAIN DELETE ... WHERE impossible_condition could function incorrectly when it was used in a stored routine. (Bug #14601802)

    References: This bug was introduced by Bug #11752097.

  • An incomplete result could be stored in the query cache when a query failed with an error (providing that the query cache was enabled, and was set to a nonzero size). This fix ensures that it is no longer possible for queries that finish with an error to be cached. (Bug #14621700)

    References: This bug was introduced by Bug #40264.

  • USE dbname could fail with Unknown database when dbname contained multiple backtick (`) characters. (Bug #14645196)

  • The configure.pl script that converts GNU configure options to CMake equivalents generated erroneous output for the --with-client-ldflags and --with-mysqld-ldflags options. It now ignores those options. (Bug #14593123)

  • Attempts to insert, update, delete from, or lock unknown Performance Schema tables failed with an ER_TABLEACCESS_DENIED_ERROR error rather than ER_NO_SUCH_TABLE. (Bug #14633008)

  • Outer joins could execute inefficiently and return incorrect results if joins were pushed down to the storage engine. (Bug #14644936)

  • Index condition pushdown in conjunction with descending index range scan could return incorrect results if there were multiple ranges in the range scan. (Bug #14604223)

  • The server could crash when registering tables in the query cache for queries that selected from views. (Bug #14619935)

  • Small values of max_sort_length could produce incorrect results for integer, decimal, floating-point, or temporal data types. Now max_sort_length is ignored for those data types. (Bug #14596888)

  • With semi-join and materialization optimizations enabled, a query that materialized a const table returned incorrect results when STRAIGHT_JOIN was added. (Bug #14609394)

  • A prepared statement that referenced views in an IN subquery could return different results for different executions. (Bug #14641759)

    References: See also Bug #13773979.

  • In-source builds modified the source file sql/share/dictionary.txt. (Bug #14562699)

  • The server printed excessive Got error 159 when reading table messages to the error log when one transaction attempted to access a table that had been modified by another. (Bug #14579877)

  • Materialization of a subquery in the FROM clause could return the wrong number of rows if the subquery included a LIMIT clause. (Bug #14576727)

  • The optimizer could choose an incorrect execution plan for updates to InnoDB tables based on indexes that use column prefixes. (Bug #14578060)

  • A query with a subquery and ORDER BY and LIMIT clauses returned fewer rows than expected when executed using semi-join materialization. (Bug #14580874)

  • On Windows, mysql_plugin could not find my_print_defaults. (Bug #14471052)

  • A query with a subquery in the JOIN ... ON clause with an outer reference to a field that was out of scope could cause the server to crash. (Bug #14498914)

  • When used in GRANT statements, quoted user name or host name values containing leading or trailing spaces caused privileges to be assigned incorrectly until a FLUSH PRIVILEGES statement was issued.

    Now, as a result of this fix, quoted name and host identifiers used in a GRANT statement are automatically trimmed of any leading and trailing spaces, before privileges are assigned. (Bug #14328259)

  • CREATE USER and DROP USER could fail to flush the privileges, requiring FLUSH PRIVILEGES to be used explicitly. (Bug #13864642)

  • On Mac OS X, the version_compile_machine system variable did not include the value 64 for server binaries compiled on a 64-bit system. (Bug #13859866)

  • Access to INFORMATION_SCHEMA tables through a view could leak memory. (Bug #13734987)

  • On Microsoft Windows with CMake 2.6, the build process would not stop if the create_initial_db step failed. (Bug #13713525)

  • The test in mysqld_safe for the presence of the --plugin_dir option and assignment of a default value to it were performed before the actual argument parsing took place. (Bug #13548161)

  • The number of connection errors from a given host as counted by the server was periodically reset, with the result that max_connect_errors was never reached and invalid hosts were never blocked from trying to connect. (Bug #11753779)

    References: See also Bug #38247, Bug #43006, Bug #45584, Bug #45606.

  • The Range checked for each record optimization is now used for conditions with outer query references. (Bug #11750963)

  • A cached query result was not empty at the end of statement execution as expected. This could occur when executing queries (with the query cache enabled and set to a nonzero size) where the result was not sent to the client such as those executed by the Event Scheduler, or when executing stored routines containing queries while the server was running in bootstrap mode. (Bug #11755580, Bug #14609893)

  • Metadata locking resulted in excessive contention in read-only workloads involving InnoDB tables and a low number of connections.

    Now the set of metadata locks can be partitioned into separate hashes to permit connections accessing different objects to use different locking hashes and reduce contention. The new metadata_locks_hash_instances system variable can be used to specify the number of hashes. (Bug #66473, Bug #14569140)

  • ST_Contains() and ST_Within() incorrectly reported that a polygon did not contain itself. ST_Equals() incorrectly returned 0 for polygons that differed only in shifted vertices. (Bug #64653, Bug #13864679)

  • ST_Difference() could incorrectly produce empty polygons in the result. (Bug #64649, Bug #13865773)

  • For some queries involving ORDER BY, the optimizer chose the wrong index for accessing the table. (Bug #45969, Bug #11754370, Bug #14338686)

  • On Windows, the Perl version of mysql_install_db created system tables in the mysql database that were not populated properly. (Bug #65584, Bug #14181049)

  • Random number generation during client authentication consumed excessive CPU. (Bug #66567, Bug #14555434)

  • In debug builds, vio_read() printed errno rather than socket_error to the debug trace. (Bug #28775, Bug #11746795)

D.1.4. Changes in MySQL 5.6.7 (2012-09-29, Release Candidate)

Functionality Added or Changed

  • Important Change: Partitioning: The maximum number of partitions for a user-partitioned table is increased from 1024 to 8192. (Bug #11755685)

  • InnoDB: The --innodb-read-only option lets you run a MySQL server in read-only mode. You can access InnoDB tables on read-only media such as a DVD or CD, or set up a data warehouse with multiple instances all sharing the same data directory. See Section 14.2.6.1, “Support for Read-Only Media” for usage details. (Bug #14143600)

  • InnoDB: You can now select the compression level for InnoDB compressed tables, from the familiar range of 0-9 used by zlib. The compression level is controlled by the innodb_compression_level configuration option, with a default value of 6:

    • Increasing the compression level increases CPU overhead, possibly reducing the amount of storage needed for any particular row, reducing the possibility of a compression failure and subsequent page split.

    • Decreasing the compression level reduces CPU overhead, possibly increasing the amount of storage needed for any particular row, increasing the possibility of a compression failure and subsequent page split.

    You can also control whether compressed pages in the buffer pool are stored in the redo log when an update operation causes pages to be compressed again. This behavior is controlled by the innodb_log_compressed_pages configuration option. Turning off logging for compressed pages reduces the amount of redo data that is generated, possibly improving throughput. If the compressed page is required during crash recovery, it is compressed again at that time.

  • InnoDB: Each data block in an InnoDB compressed table contains a certain amount of empty space (padding) to allow DML operations to modify the row data without re-compressing the new values. Too much padding can increase the chance of a compression failure, requiring a page split, when the data does need to be re-compressed after extensive changes. The amount of padding can now be adjusted dynamically, so that DBAs can reduce the rate of compression failures without re-creating the entire table with new parameters, or re-creating the entire instance with a different page size. The associated new configuration options are innodb_compression_failure_threshold_pct, innodb_compression_pad_pct_max

  • InnoDB: New information_schema tables, innodb_cmp_per_index and innodb_cmp_per_index_reset, provide statistics on InnoDB tables that use compression. The statistics at the index level let DBAs measure whether the proportion of successful or failed compression operations is acceptable for a particular combination of table, index, page size, and workload. Typically, the compression failure rate should be less than 10%, particularly when using a compressed table to handle an OLTP-style workload with frequent INSERT, UPDATE, or DELETE operations.

    Because gathering those statistics could be very time consuming and would hurt performance negatively, the new tables are enabled only when the new configuration option innodb_cmp_per_index_enabled is set to ON. (It is OFF by default.)

  • When MySQL is configured with -DWITH_SSL=system to build with OpenSSL, CMake now produces an error if OpenSSL is older than version 1.0.1 (Bug #14167227)

  • The default has changed from false to true for the --secure-auth option for mysql and the MYSQL_SECURE_AUTH option for the mysql_options() C API function. (Bug #13789417)

  • The server now issues a Note diagnostic if an index is created that duplicates an existing index. (Bug #37520, Bug #11748842)

  • The WITH_SSL option for CMake now accepts a path_name value that indicates the path name to the OpenSSL installation to use. This can be useful instead of a value of system when the CMake code detects an older or incorrect installed OpenSSL version. (Another permitted way to do the same thing is to set the CMAKE_PREFIX_PATH option to path_name.) (Bug #61619, Bug #12762891)

  • The mysql_clear_password cleartext client-side authentication plugin is intended for authentication schemes that require the server to receive the password as entered on the client side, without hashing. Because the password is sent in the clear, this plugin should be used within the context of a secure connection, such as an SSL connection, to avoid exposing the password over the network. To make inadvertent use of this plugin less likely, it is now required that clients explicitly enable it. This can be done several ways:

    • Set the LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN environment variable to a value that begins with 1, Y, or y. This enables the plugin for all client connections.

    • The mysql, mysqladmin, and mysqlslap client programs support an --enable-cleartext-plugin option that enables the plugin on a per-invocation basis.

    • The mysql_options() C API function supports a MYSQL_ENABLE_CLEARTEXT_PLUGIN option that enables the plugin on a per-connection basis. Also, any program that uses libmysqlclient and reads option files can enable the plugin by including an enable-cleartext-plugin option in an option group read by the client library.

  • The unused multi_range_count system variable is now deprecated, and will be removed in a future release.

  • The following items are deprecated and will be removed in a future MySQL release. Where alternatives are shown, applications should be updated to use them.

Bugs Fixed

  • Performance: InnoDB: The OPTIMIZE TABLE statement now updates the InnoDB persistent statistics for that table when appropriate. (Bug #14238097)

  • Performance: InnoDB: This fix removes redundant checksum validation on InnoDB pages. The checksum was being verified both when a compressed page was read from disk and when it was uncompressed. Now the verification is only performed when the page is read from disk. (Bug #14212892, Bug #64170)

  • Performance: Replication: On Solaris systems, enabling slave_parallel_workers could lead to a slowdown in event executions on the slave. (Bug #14641110)

    References: See also Bug #13897025.

  • Performance: Replication: When slave_parallel_workers was enabled, an internal multiplier representing the number of events above a certain overrun level in the worker queue was never reset to zero, even when the excess had been taken care of; this caused the multiplier to grow without interruption over time, leading to a slowdown in event executions on the slave. (Bug #13897025)

  • Performance: View definitions (in .frm files) were not cached and thus every access to a view involved a file read. Definitions now are cached for better performance. (Bug #13819275)

  • Performance: Certain instances of subquery materialization could lead to poor performance. Subquery materialization now is chosen only if it is less costly than the EXISTS transformation. (See Section 8.13.15.2, “Optimizing Subqueries with Subquery Materialization”, and Section 8.13.15.4, “Optimizing Subqueries with EXISTS Strategy”.) (Bug #13111584)

  • Important Change: Replication: When issued during an ongoing transaction, any of the following statements that are used to control MySQL Replication now cause the transaction to be committed:

    For more information, see Section 13.3.3, “Statements That Cause an Implicit Commit”. (Bug #13858841)

    References: See also Bug #14298750, Bug #13627921.

  • Important Change: Formerly, the ExtractValue() and UpdateXML() functions supported a maximum length of 127 characters for XPath expressions supplied to them as arguments. This limitation has now been removed. (Bug #13007062, Bug #62429)

  • Partitioning: InnoDB: A SELECT from a partitioned InnoDB table having no primary key sometimes failed to return any rows where a nonempty result was expected. In such cases the server also returned the error Can't find record in table_name or Incorrect key file for table table_name. (Bug #13947868)

  • InnoDB: Inserting data of varying record lengths into an InnoDB table that used compression could cause the server to halt with an error. (Bug #14554000, Bug #13523839, Bug #63815, Bug #12845774, Bug #61456, Bug #12595091, Bug #61208)

  • InnoDB: On Windows systems, a file access error due to an incorrect value for MYSQL_DATADIR could cause an InnoDB assertion error. The error could persist after restarting MySQL. (Bug #14558324)

  • InnoDB: The default for the innodb_checksum_algorithm, which was briefly changed to crc32 during the MySQL 5.6 development cycle, was switched back to innodb for improved compatibility of InnoDB data files during a downgrade to an earlier MySQL version. (Bug #14525151)

  • InnoDB: In an ALTER TABLE that rebuilds a table, and in particular, ADD COLUMN, DROP COLUMN, there were some assertion failures related to FULLTEXT indexes, particularly for tables containing more than one FULLTEXT index. The fix makes the ALTER TABLE correctly use or not use online DDL depending on the presence of FULLTEXT indexes. If a table had a FULLTEXT index that was dropped, any restrictions on online DDL for that table remain, due to the hidden FTS_DOC_ID column. (Bug #14488218)

  • InnoDB: The default value for the innodb_io_capacity_max configuration option has been updated to use a formula given by the expression:

    innodb_io_capacity_max = max(2000, innodb_io_capacity * 2)

    This default takes effect at server startup, and only applies if you do not set any value for innodb_io_capacity at server startup. (Bug #14469086)

  • InnoDB: The syntax ALTER TABLE ... DROP FOREIGN KEY ... ALGORITHM=COPY incorrectly considered the names of foreign keys to be case-sensitive. (Bug #14394071)

  • InnoDB: Under heavy load of concurrent DML and queries, an InnoDB table with a unique index could return non-existent duplicate rows to a query. (Bug #14399148, Bug #66134)

  • InnoDB: When an error (such as a duplicate key error) was detected during an online DDL operation, while applying changes made to the table while an index was being built, MySQL could encounter an assertion error if the same ALTER TABLE statement also contained any DROP INDEX clauses. (Bug #14392805)

  • InnoDB: A heavy query workload against an InnoDB table with a FULLTEXT index could cause a crash. The issue only occurred with some number of queries per second and some number of concurrent connections. (Bug #14347352)

  • InnoDB: When an InnoDB table had a system-chosen primary key, based on a unique index on non-nullable columns, an error was issued if one of the primary key columns was altered to be nullable. The message was:

    Warning	1082	InnoDB: Table table_name has a primary key in InnoDB data 
    dictionary, but not in MySQL!
    

    This issue only affected ALTER TABLE statements using the online DDL mechanism, that is, with the ALGORITHM=INPLACE clause specified or implied. (Bug #14353985)

  • InnoDB: If an online CREATE INDEX operation failed, there was a brief period of time when concurrent DML operations could fail because the table was considered to be in an error state. (Bug #14341099)

  • InnoDB: The mysql_install_db command could crash with an assertion error:

    InnoDB: Assertion failure in thread thread_num in file trx0rseg.cc line 326 
    

    The size of the InnoDB system tablespace was being capped at 10MB, but during the 5.6 development cycle, the minimum size of a system tablespace became slightly larger than 10MB. (Bug #14315223)

  • InnoDB: The server could crash if a read-only transaction was killed in a session that contained an InnoDB temporary table. (Bug #14213784)

  • InnoDB: When more than one InnoDB temporary table was created and accessed within the same transaction, queries on those temporary tables could fail with an ER_TABLE_DEF_CHANGED error. (Bug #14234581)

  • InnoDB: This fix addresses several issues regarding AUTO_INCREMENT columns when adding a column using online DDL (that is, with ALGORITHM=INPLACE). Now the AUTO_INCREMENT_OFFSET value is used properly, the calculation for the next value is corrected, FLOAT, DOUBLE, and unsigned INTEGER auto-increment values are handled correctly, and overflow conditions are detected. (Bug #14219624)

  • InnoDB: A SHOW ENGINE...STATUS command could crash if an XA transaction was created using the statement START TRANSACTION READ ONLY. (Bug #14218867)

  • InnoDB: This fix prevents online DDL operations from conflicting with foreign key operations happening simultaneously on the same table. Updates or deletes based on CASCADE or SET NULL clauses in the foreign key definition are blocked while the online DDL is in progress, because the information needed in case of a ROLLBACK would not be available after the ALTER TABLE statement completes. (Bug #14219233)

  • InnoDB: A race condition could cause assertion errors during a DROP TABLE statement for an InnoDB table. Some internal InnoDB functions did not correctly determine if a tablespace was missing; other functions did not handle the error code correctly if a tablespace was missing. (Bug #14251529)

  • InnoDB: With the MySQL 5.6 online DDL feature, an ALTER TABLE statement to add a primary key to an InnoDB table could succeed, even though the primary key columns contained duplicate values. (Bug #14219515)

  • InnoDB: The server could crash with a combination of a transaction with SERIALIZABLE isolation level, FLUSH TABLES ... WITH READ LOCK, and a subsequent query. The error message was:

    InnoDB: Failing assertion: prebuilt->stored_select_lock_type != LOCK_NONE_UNSET 

    (Bug #14222066)

  • InnoDB: An online DDL operations to add a foreign key could incorrectly leave some memory allocated if the DDL encountered an error. (Bug #14156259)

  • InnoDB: An INSERT into a table after a failed online DDL operation could cause an erroneous assertion error:

    InnoDB: Failing assertion: prebuilt->trx_id == 0 || prebuilt->trx_id <= 
    last_index->trx_id 
    

    (Bug #14176821)

  • InnoDB: The server could hang at startup, during crash recovery, if the rollback of previously active transactions conflicted with the dropping of temporary tables. With this fix, persistent statistics do not apply to InnoDB temporary tables. (Bug #14175080)

  • InnoDB: The configuration option innodb_max_io_capacity was renamed to innodb_io_capacity_max, to emphasize its relationship to the existing innodb_io_capacity option. (Bug #14175020)

  • InnoDB: The server could crash with a signal 8 (division by zero error) due to a race condition while computing index statistics. (Bug #14150372)

  • InnoDB: Deleting from an InnoDB table containing a prefix index, and subsequently dropping the index, could cause a crash with an assertion error. (Bug #13807811)

  • InnoDB: The value of the NUMBER_PAGES_CREATED and NUMBER_PAGES_WRITTEN columns of the INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS table were set to incorrect values, and the NUMBER_PAGES_GET column was not being set at all. (Bug #13639187)

  • InnoDB: The server could crash when updating very large BLOB values, typically 16MB or more. (Bug #13450566)

  • InnoDB: When a SELECT ... FOR UPDATE, UPDATE, or other SQL statement scanned rows in an InnoDB table using a < or <= operator in a WHERE clause, the next row after the affected range could also be locked. This issue could cause a lock wait timeout for a row that was not expected to be locked. The issue occurred under various isolation levels, such as READ COMMITTED and REPEATABLE READ. (Bug #11765218)

  • InnoDB: Various inconsistent behaviors, including tables becoming inaccessible, were cleaned up for ALTER TABLE statements involving InnoDB tables involved in foreign key relationships. (Bug #11744929, Bug #5670)

  • Partitioning: For tables using PARTITION BY HASH or PARTITION BY KEY, when the partition pruning mechanism encountered a multi-range list or inequality using a column from the partitioning key, it continued with the next partitioning column and tried to use it for pruning, even if the previous column could not be used. This caused partitions which possibly matched one or more of the previous partitioning columns to be pruned away, leaving partitions that matched only the last column of the partitioning key.

    This issue was triggered when both of the following conditions were met:

    1. The columns making up the table's partitioning key were used in the same order as in the partitioning key definition by a SELECT statement's WHERE clause as in the column definitions;

    2. The WHERE condition used with the last column of the partitioning key was satisfied only by a single value, while the condition testing some previous column from the partitioning key was satisfied by a range of values.

    An example of a statement creating a partitioned table and a query against this for which the issue described above occurred is shown here:

    CREATE TABLE t1 (
      c1 INT,
      c2 INT,
      PRIMARY KEY(c2, c1)
    ) PARTITION BY KEY()  # Use primary key as partitioning key 
      PARTITIONS 2;
    
    SELECT * FROM t1 WHERE c2 = 2 AND c1 <> 2;

    This issue is resolved by ensuring that partition pruning skips any remaining partitioning key columns once a partition key column that cannot be used in pruning is encountered. (Bug #14342883)

  • Partitioning: The buffer for the row currently read from each partition used for sorted reads was allocated on open and freed only when the partitioning handler was closed or destroyed. For SELECT statements on tables with many partitions and large rows, this could cause the server to use excessive amounts of memory.

    This issue has been addressed by allocating buffers for reads from partitioned tables only when they are needed and freeing them immediately once they are no longer needed. As part of this fix, memory is now allocated for reading from rows only in partitions that have not been pruned (see Section 17.4, “Partition Pruning”). (Bug #13025132)

    References: See also Bug #11764622, Bug #14537277.

  • Replication: Updates writing user variables whose values were never set on a slave while using --replicate-ignore-table could cause the slave to fail. (Bug #14597605)

    References: This bug was introduced by Bug #14275000.

  • Replication: When the number of multithreaded slave workers (as determined by setting the slave_parallel_workers server system variable) was changed when using relay_log_info_repository=TABLE, the mysql.slave_worker_info table did not reflect the change. (Bug #14550905)

    References: See also Bug #13804728, Bug #14550945, Bug #14578740.

  • Replication: With relay_log_info_repository=FILE and slave_parallel_workers greater than 0, changing the relay log info repository type to TABLE and restarting the slave mysqld caused a subsequent START SLAVE statement to crash the slave. (Bug #14550945)

    References: See also Bug #13804728, Bug #14550905, Bug #14578740.

  • Replication: A manually created file named slave_worker_info in the MySQL Server's data directory could be mistaken for the actual relay log info file. In addition, when the number of workers (slave_parallel_workers server system variable) was decreased, the corresponding info files were not removed as expected. (Bug #14578740)

    References: See also Bug #13804728, Bug #14550905, Bug #14550945.

  • Replication: Executing the SQL_THREAD_WAIT_AFTER_GTIDS() function without binary logging enabled could cause the server to crash. (Bug #14457883)

  • Replication: Using COM_BINLOG_DUMP_GTID with incorrect data could cause the server to crash. (Bug #14509140)

  • Replication: An internal routine in the MySQL Replication code removed elements from a hash used to store a mapping between databases and worker threads at the same time that the hash was being iterated over. This could cause an unintended reordering of the has elements and thus possibly to incorrect results from routines using this hash. (Bug #14381701)

    References: See also Bug #13864642.

  • Replication: The names of the binary log and relay log Performance Schema mutexes were mistakenly changed to names that differed from the MySQL 5.5 names. The names have been reverted to those used in MySQL 5.5. (Bug #14366314)

  • Replication: When setting up replication between a master and a slave which was using --master-info-repository=TABLE, the mysql.slave_master_info table was not updated the first time that START SLAVE was issued. (Bug #14298750)

    References: See also Bug #13858841.

  • Replication: The --disable-gtid-unsafe-statements option caused any nontransactional DML statement involving temporary tables to be rejected with an error even with binlog_format set explicitly to ROW, in spite of the fact that they are not written to the binary log in this case. Now, such statements are allowed when using row-based logging, as long as any nontransactional tables affected by the statements are also temporary tables. (Bug #14272627)

  • Replication: When using multithreaded slaves, --replicate-rewrite-db rules were not honored while assigning databases to slave worker threads, which could cause statements to be executed out of order when this option was used. This could result in a slave that was inconsistent with the master. (Bug #14232958)

  • Replication: mysql_upgrade failed when the server was running with gtid_mode=ON and --disable-gtid-unsafe-statements because the MySQL system tables are stored using MyISAM. This problem is fixed by changing the default logging behavior for mysql_upgrade; logging is now disabled by default. (Actions taken by mysql_upgrade depend on the server version, and thus should not be replicated to slaves.) To enable logging, you can execute mysql_upgrade using the --write-binlog option. (Bug #14221043, Bug #13833710)

  • Replication: The initialization and usage of a number of internal programming objects relating to GTIDs did not work properly with PERFORMANCE_SCHEMA. (Bug #14152637)

  • Replication: The scheduler for multi-threaded slaves did not take into account databases implicitly involved in operations through foreign key dependencies, which could lead to a temporary loss of consistency on the slave. To avoid this problem, replication events on the master that invoke foreign key relationships between table is different databases are now marked in such a way that they can be scheduled sequentially to avoid race conditions and thereby inconsistency. However, this can adversely affect performance. (Bug #14092635)

  • Replication: On 64-bit Windows platforms, values greater than 4G for the max_binlog_cache_size and max_binlog_stmt_cache_size system variables were truncated to 4G. This caused LOAD DATA INFILE to fail when trying to load a file larger than 4G in size, even when max_binlog_cache_size was set to a value greater than this. (Bug #13961678)

  • Replication: When using a multithreaded slave, the repository type employed for the relay log info log was not always used automatically for worker repositories as expected. (Bug #13804728)

    References: See also Bug #14550905, Bug #14550945, Bug #14578740.

  • Replication: It was possible for the multithreaded slave coordinator to leak memory when the slave was stopped while waiting for the next successful job to be added to the worker queue. (Bug #13635612)

  • Replication: The Master_id column of the mysql.slave_master_info and mysql.slave_relay_log_info tables showed the slave's server ID instead of the master's server ID. (Bug #12344346)

  • Replication: Statements such as UPDATE ... WHERE primary_key_column = constant LIMIT 1 are flagged as unsafe for statement-based logging, despite the fact that such statements are actually safe. In cases where a great many such statements were run, this could lead to disk space becoming exhausted do to the number of such false warnings being logged. To prevent this from happening, a warning suppression mechanism is introduced. This warning suppression acts as follows: Whenever the 50 most recent ER_BINLOG_UNSAFE_STATEMENT warnings have been generated more than 50 times in any 50-second period, warning suppression is enabled. When activated, this causes such warnings not to be written to the error log; instead, for each 50 warnings of this type, a note is written to the error log stating The last warning was repeated N times in last S seconds. This continues as long as the 50 most recent such warnings were issued in 50 seconds or less; once the number of warnings has decreased below this threshold, the warnings are once again logged normally.

    The fix for this issue does not affect how these warnings are reported to MySQL clients; a warning is still sent to the client for each statement that generates the warning. This fix also does not make any changes in how the safety of any statement for statement-based logging is determined. (Bug #11759333, Bug #51638)

    References: See also Bug #11751521, Bug #42415.

  • In-place ALTER TABLE operations for InnoDB tables could raise an assertion attempting to acquire a lock. (Bug #14516798)

  • ALTER TABLE ... DROP FOREIGN KEY that did not name the foreign key to be dropped caused a server crash. Now the foreign key name is required. (Bug #14530380)

  • In mysql_com.h, the CLIENT_CONNECT_ATTRS and CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA symbols incorrectly were defined as the same value. (Bug #14482472)

  • With a password policy of STRONG and a password of 100 characters or more, VALIDATE_PASSWORD_STRENGTH() could cause a server crash. (Bug #14458293)

  • PASSWORD(NULL) and OLD_PASSWORD(NULL) could cause a server crash. (Bug #14458217)

  • Polygons with holes could cause a server crash for spatial operations. (Bug #14497827)

  • The Threads_running status variable was not updated properly. (Bug #14471011)

  • mysql_secure_installation did not work if old_passwords was set to 2 (use the sha256_password authentication plugin). (Bug #14506073)

  • GROUP_CONCAT() with DISTINCT or ORDER BY on GEOMETRY values caused a server crash. (Bug #14468106)

  • For complex conditions, the optimizer could produce an incorrect range construction and return incorrect query results. (Bug #14497598)

  • Item_cache_str::save_in_field() dereferenced a null pointer if the cached value was NULL. (Bug #14501403)

  • The optimizer could raise an assertion when grouping and sorting in descending order on an indexed column. (Bug #14498999)

  • A query with GROUP BY ... WITH ROLLUP comparing a grouping column using the IN operator caused an assertion to be raised. (Bug #14500792)

  • In debug builds, with semi-join enabled, GROUP BY ... WITH ROLLUP that did not use a temporary table could cause a server crash. (Bug #14499409)

  • An assertion was raised when using the join cache for a query that contained an IN subquery query with a subquery that is expected to return a single row but returned more than one. (Bug #14499331)

  • Index condition pushdown in conjunction with descending index range scan caused a performance regression. (Bug #14503142)

  • The explicit_defaults_for_timestamp system variable was not visible (for example, with SHOW VARIABLES), so it was not possible to make runtime decisions based on its value. (Bug #14409088)

  • An ALTER TABLE for an InnoDB table that attempted to add an index and also change the nullability of a column participating in that index raised an assertion. (Bug #14404635)

  • The --server-public-key option for mysql and mysqltest has been renamed to --server-public-key-path to reflect that it refers to a file and for consistency with related server-side variable naming. Also, this option now is available only if MySQL was built with OpenSSL (not yaSSL) because yaSSL does not support the necessary RSA encryption. (Bug #14348721)

  • The result set could contain extra rows for queries on MyISAM tables that used the SQL_BUFFER_RESULT modifier and a subquery. (Bug #14348858)

  • For debug builds, if one session used a DDL statement to alter an InnoDB table, another session could raise an assertion failure if it had a pre-alter consistent snapshot of the table. (Bug #14365043)

  • The Performance Schema used listed the nanosecond timer by default for stages and statements in the setup_timers table. But if this timer was not available on a given platform (such as Windows), timing for stages and statements failed to work. Now the idle, stage, and statement timers used the preferred timers if they are available, but alternate timers if not. (Bug #14298586)

  • The Performance Schema generated different digests for a statement before and after selecting a database. (Bug #14256311)

  • The RPM spec file now also runs the test suite on the new binaries, before packaging them. (Bug #14318456)

  • Inside a stored program, references to stored program variables in XML functions such as ExtractValue() failed after the first execution of the stored program. (Bug #14317442)

  • A LooseScan semi-join could return duplicate rows from the outer table. (Bug #14271594)

  • Some queries for which the optimizer used index condition pushdown in conjunction with ref access could be very slow if the index was read in descending order. (Bug #14287654, Bug #14503142)

  • Queries executed using MaterializeScan semi-join strategy and a materialized subquery could return too many rows. (Bug #14272788)

  • ALTER SERVER, CREATE SERVER, and DROP SERVER with an empty server name caused a server crash. (Bug #14220942)

  • The server did not build with gcc 4.7. (Bug #14238406)

  • If a call to socket() failed, the Performance Schema created instrumentation for it anyway. (Bug #14209598)

  • REQUIRE ISSUER clauses for GRANT statements were not rewritten properly for logging and caused a server crash. (Bug #14211069)

  • For queries that used range access, the optimizer could read uninitialized data, resulting in Valgrind warnings. (Bug #14200538)

  • The Performance Schema digest-generation code could fail with a race condition. (Bug #14250296)

  • With semi-join optimization enabled, subqueries in the WITH CHECK OPTION clause of view definitions were evaluated incorrectly. (Bug #14230177)

  • WEIGHT_STRING() could crash if given a bad flags argument. (Bug #14211236)

  • An optimizer trace could crash attempting to print freed subquery items. (Bug #14238404)

  • mysql_upgrade did not set the STATS_PERSISTENT=0 table option for InnoDB tables in the mysql database. (Bug #14195056)

  • ALTER TABLE with DISCARD TABLESPACE or IMPORT TABLESPACE did not acquire a sufficiently strong metadata lock to prevent a concurrent ALTER TABLE statement with ADD or DROP from modifying the tablespace. This could result in warnings or raise an assertion. (Bug #14213236)

  • Some queries with a HAVING clause with a function that referred to a function in the WHERE list with a subquery as parameter caused an assertion to be raised. (Bug #14209318)

  • String allocation could cause Valgrind warnings. (Bug #14201818)

  • For JSON-format EXPLAIN statements, derived tables were not handled properly and caused a server crash. (Bug #14167499)

  • Incorrect internal conversion of string-format dates could cause a server crash. (Bug #14167911)

  • In debug builds, comparisons for strings that had the ucs2_unicode_520_ci collation could raise an assertion. (Bug #14161973)

  • Join processing could attempt to clean up a temporary table that had not been instantiated, causing a server crash. (Bug #14168270)

  • In debug builds, the optimizer raised an unnecessary (too strict) assertion about MyISAM key lengths. (Bug #14179461)

  • In-place ALTER TABLE did not work for a table with a GEOMETRY column, even if the alteration did not involve that column. (Bug #14140927)

  • Negative values could be erroneously reported for some columns in the buffer_pool_pages_in_flush row in the information_schema.innodb_metrics table. (Bug #14090287)

  • Improper error handling for CREATE SERVER, DROP SERVER, and ALTER SERVER could raise an assertion. (Bug #14061851)

  • RELEASE SAVEPOINT did not have sufficient checks for the XA transaction state to prevent a savepoint from being released while the transaction was in a prepared state. (Bug #14062726)

  • The libmysqlclient_r client library exported symbols from yaSSL that conflict with OpenSSL. If a program linked against that library and libcurl, it could crash with a segmentation fault. (Bug #14068244)

  • The FirstMatch strategy for semi-joins produced incorrect results for some queries with multiple inner tables. (Bug #14081638)

  • With materialization and semi-joins enabled, some queries with an OR condition could produce incorrect results. (Bug #14075016)

  • In-place ALTER TABLE did not handle autopartitioning storage engines such as NDB. (Bug #14063233)

  • JSON-format EXPLAIN statements could raise an assertion or cause the server to hang for statements with an impossible-WHERE clause and subqueries in ORDER BY or GROUP BY clauses. (Bug #14084642)

  • For nonexistent files, the Performance Schema file I/O instrumentation sometimes did extra work or was subject to instrumentation leaks. (Bug #14113704)

  • Within a trigger, references to a temporary table used during the query execution process could end up pointing to nonexisting fields on subsequent executions, causing a server crash. (Bug #14105951)

  • Small sort_buffer_size values could result in a server crash. (Bug #14111180)

  • Improper initialization by spatial functions could cause a server crash the first time they were invoked following server startup. (Bug #14015762)

  • Polygon sorting by spatial functions could be done incorrectly and cause a server crash. (Bug #13938850)

  • For JSON-format EXPLAIN statements, improper handling of subqueries could cause an assertion to be raised. (Bug #13956275)

  • SELECT on a partitioned table that used a join buffer could cause a server crash. (Bug #13949549)

  • The argument for LIMIT must be an integer, but if the argument was given by a placeholder in a prepared statement, the server did not reject noninteger values such as '5'. (Bug #13868860)

  • For DELETE statements, WHERE clause row retrieval that should access only the index tree could raise an assertion. (Bug #13919180)

  • Some arguments could cause ST_Buffer() to crash. (Bug #13832749, Bug #13833019)

  • Queries that used the ST_Contains and Within() functions yielded incorrect results when argument columns had a spatial index. (Bug #13813064)

  • CHECK TABLE and REPAIR TABLE could crash if a key definition differed in the .frm and .MYI files of a MyISAM table. Now the server produces an error. (Bug #13555854)

  • The optimizer used a full index scan for cases for which a loose index scan was preferable. (Bug #13464493)

    References: This bug is a regression of Bug #12540545.

  • COUNT(DISTINCT(SELECT 1)) could be evaluated incorrectly if the optimizer used a loose index scan. (Bug #13444084)

  • A query for a FEDERATED table could return incorrect results when the underlying table had a compound index on two columns and the query included an AND condition on the columns. (Bug #12876932)

  • mysqlhotcopy failed for databases containing views. (Bug #62472, Bug #13006947, Bug #12992993)

  • Illegal mix of collation errors were returned for some operations between strings that should have been legal. (Bug #64555, Bug #13812875)

  • mysqldump could dump views and the tables on which they depend in such an order that errors occurred when the dump file was reloaded. (Bug #44939, Bug #11753490)

  • The ST_Contains() and Within() functions yielded an incorrect result when used on a column with a SPATIAL index. (Bug #65348, Bug #14096685)

  • Adding a LIMIT clause to a query containing GROUP BY and ORDER BY could cause the optimizer to choose an incorrect index for processing the query, and return more rows than required. (Bug #54599, Bug #11762052)

  • If the server was started with secure_auth disabled, it did not produce a warning that this is a deprecated setting. (Bug #65462, Bug #14136937)

  • The GeomFromWKB() function did not return NULL if the SRID argument was NULL, and non-NULL SRID values were not included in the converted result. (Bug #65094, Bug #13998446)

  • With statement-based binary logging, stored routines that accessed but did not modify tables took too strong a lock for the tables, unnecessarily blocking other statements that also accessed those tables. (Bug #62540, Bug #13036505)

  • ALTER TABLE operations that changed a column definition could cause a loss of referential integrity for columns in a foreign key. (Bug #46599, Bug #11754911)

  • For some queries, the optimizer used index_merge access method when this was more work than ref access. (Bug #65274, Bug #14120360)

  • In prepared statements, MYSQL_TYPE_DATE parameters when converted to an integer were handled as MYSQL_TYPE_DATETIME values and the conversion produced incorrect results. (Bug #64667, Bug #13904869)

  • mysqlbinlog did not accept input on the standard input when the standard input was a pipe. (Bug #49336, Bug #11757312)

  • The argument to the --ssl-key option was not verified to exist and be a valid key. The resulting connection used SSL, but the key was not used. (Bug #62743, Bug #13115401)

  • In-place ALTER TABLE incorrectly handled indexes using key prefixes by using a copy algorithm. (Bug #65865, Bug #14304973)

  • Starting the server with --bind-address=* is supposed to cause the the server to accept TCP/IP connections on all server host IPv6 and IPv4 interfaces if the server host supports IPv6, or TCP/IP connections on all IPv4 addresses otherwise. But the server sometimes did not correctly detect when IPv6 was not supported, and failed to start. (Bug #66303, Bug #14483430)

  • Internal temporary MyISAM tables were unnecessarily registered in an open-table list protected by a global mutex, causing excessive mutex contention. (Bug #65077, Bug #14000697)

  • Queries with ALL over a UNION could return an incorrect result if the UNION result contained NULL. (Bug #65902, Bug #14329235)

  • There was a performance regression for queries that used GROUP BY and COUNT(DISTINCT). (Bug #49111, Bug #11757108)

  • In debug builds, an InnoDB assertion was overly aggressive about prohibiting an open range. (Bug #66513, Bug #14547952)

  • The ALTER USER statement cleared the user password in the mysql.user table. It no longer does this.

D.1.5. Changes in MySQL 5.6.6 (2012-08-07, Milestone 9)

Note

This is a milestone release, for use at your own risk. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward.

Binary Logging

  • Performance: The server now implements group commit for the binary log: Multiple commits are grouped in memory, then written and flushed to disk as a group rather than individually. This reduces the number of writes and flushes, improving performance of binary logging. Group commit works for all storage engines. InnoDB implements some optimizations to take advantage of group commit capability.

    These system variables were added in conjunction with group commit:

Configuration Notes

Performance Schema Notes

  • The Performance Schema is now enabled by default (the performance_schema system variable is enabled by default). To disable it, set performance_schema=off at server startup.

    In addition, the Performance Schema now automatically sizes the values of several of its parameters at server startup if they are not set explicitly. For example, it sizes the parameters that control the sizes of the events waits tables this way. To see which parameters are sized under this policy, use mysqld --verbose --help and look for those with a default value of –1, or see Section 20.11, “Performance Schema System Variables”.

    For each autosized parameter that is not set at server startup (or is set to –1), the Performance Schema determines how to set its value based on the value of the following system values, which are considered as hints about how you have configured your MySQL server:

    max_connections
    open_files_limit
    table_definition_cache
    table_open_cache

    To override autosizing for a given parameter, set it a value other than –1 at startup. In this case, the Performance Schema assigns it the specified value.

    At runtime, SHOW VARIABLES displays the actual values that autosized parameters were set to.

    If the Performance Schema is disabled, its autosized parameters remain set to –1 and SHOW VARIABLES displays –1.

Security Improvements

  • These security improvements were implemented:

    • MySQL now provides a method for storing authentication credentials encrypted in an option file named .mylogin.cnf. To create the file, use the mysql_config_editor utility. The file can be read later by MySQL client programs to obtain authentication credentials for connecting to a MySQL server. mysql_config_editor writes the .mylogin.cnf file using encryption so the credentials are not stored as clear text, and its contents when decrypted by client programs are used only in memory. In this way, passwords can be stored in a file in non-cleartext format and used later without ever needing to be exposed on the command line or in an environment variable. For more information, see Section 4.6.6, “mysql_config_editor — MySQL Configuration Utility”.

      The .mylogin.cnf file can contain multiple sets of options, known as login paths. This makes it easy to set up multiple personalities for connecting to different MySQL servers. Any of these can be selected by name later using the --login-path option when you invoke a client program. See Section 4.2.3.4, “Command-Line Options that Affect Option-File Handling”.

    • MySQL now supports stronger encryption for user account passwords, available through an authentication plugin named sha256_password that implements SHA-256 password hashing. This plugin is built in, so it is always available and need not be loaded explicitly. For more information, including instructions for creating accounts that use SHA-256 passwords, see Section 6.3.6.2, “The SHA-256 Authentication Plugin”.

      Other changes associated with the introduction of the sha256_password plugin:

      • The old_passwords system variable previously permitted values of 1 or 0 to control whether old or new MySQL native password hashing was used by the CREATE USER and GRANT statements and the PASSWORD() function. Now old_passwords permits a value of 2 to select use of SHA-256 password hashing.

        Note

        Previously, old_passwords permitted values of OFF or ON as synonyms for 0 or 1. That is no longer true.

      • SHA-256 password hashing (old_passwords=2) uses a random salt value, which makes the result from PASSWORD() nondeterministic. Consequently, statements that use this function are no longer safe for statement-based replication and cannot be stored in the query cache.

      • The server has a --default-authentication-plugin option to specify the default plugin to associate with new accounts for which no plugin is named explicitly. This option also changes the initial old_passwords value to be consistent with the password hashing method required by the default plugin, if necessary.

      • If MySQL is built with OpenSSL, RSA encryption can be used to transmit passwords during the client connection process. The sha256_password_private_key_path and sha256_password_public_key_path system variables permit the private and public key files to be named on the server side. The Rsa_public_key status variable displays the public key value. The mysql and mysqltest clients support a --server-public-key option permitting the public key file to be specified explicitly when connecting to the server. (This option is implemented through a new MYSQL_SERVER_PUBLIC_KEY option to the mysql_options() C API function.)

      MySQL Connector support: Connectors that use the C client library should work with sha256_password with no changes. Connectors that implement the authentication process for themselves must be updated to account for changes in the client/server protocol.

    • The mysql.user table now has a password_expired column. Its default value is 'N', but can be set to 'Y' with the new ALTER USER statement (which also sets the Password column to the empty string). After an account's password has been expired, all operations performed in subsequent connections to the server using the account result in an error until the user issues a SET PASSWORD statement to establish a new account password. For more information, see Section 13.7.1.1, “ALTER USER Syntax”. Update: ALTER USER also set the Password column to the empty string, so do not use this statement in 5.6.6. This problem has been fixed in MySQL 5.6.7.

      If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change into the mysql database.

    • MySQL now has provision for checking password security:

      • In statements that assign a password supplied as a cleartext value, the value is checked against the current password policy and rejected if it is weak (the statement returns an ER_NOT_VALID_PASSWORD error). This affects the CREATE USER, GRANT, and SET PASSWORD statements. Passwords given as arguments to the PASSWORD() and OLD_PASSWORD() functions are checked as well.

      • The strength of potential passwords can be assessed using the new VALIDATE_PASSWORD_STRENGTH() SQL function, which takes a password argument and returns an integer from 0 (weak) to 100 (strong).

      Both capabilities are implemented by the validate_password plugin. If the plugin is not installed, the affected statements and PASSWORD() and OLD_PASSWORD() work as before (no password checking), and VALIDATE_PASSWORD_STRENGTH() always returns 0.

      The validate_password plugin also implements a set of system variables corresponding to the parameters that control password checking. If the plugin is installed, you can modify these variables to configure the password policy.

      The validate_password plugin is written using the MySQL plugin API, which has been extended to support writing password-validation plugins.

      For more information, see Section 6.1.2.6, “The Password Validation Plugin”. For information about writing password-checking plugins, see Section 22.2.4.10, “Writing Password-Validation Plugins”.

    • mysql_upgrade now produces a warning if it finds user accounts with passwords hashed with the older pre-4.1 hashing method. Such accounts should be updated to use more secure password hashing. See Section 6.1.2.4, “Password Hashing in MySQL”

    (Bug #65461, Bug #14136939)

Functionality Added or Changed

  • Performance: InnoDB: Many DDL operations on InnoDB tables can now be performed online, without making the tables unavailable for queries. Some operations, such as creating or dropping indexes, even allow DML statements (INSERT, UPDATE, DELETE) on the table while the operation is in progress. A single online DDL operation can also take the place of a sequence of statements, such as several DROP INDEX statements, ALTER TABLE ... ADD COLUMN, and then several CREATE INDEX statements. See Section 14.2.2.6, “Online DDL for InnoDB Tables” for full details. (Bug #58368, Bug #11765404, Bug #11872643, Bug #12325508, Bug #11765266, Bug #60689)

  • Performance: InnoDB: The MySQL server now includes the widely used memcached in-memory caching system, and a plugin that allows fast NoSQL-style access to InnoDB tables through the memcached protocol. This access method avoids the overhead of SQL parsing and constructing a query optimization plan. You can store the underlying data in a single InnoDB table, or spread it across multiple tables. You can read and write data through both memcached and SQL. For example, you can do fast single-key lookups through memcached get calls, and do statistical reports across all the data through SQL.

    Several configuration options let you fine-tune this system, in particular to balance raw performance against durability and consistency of data. The main new configuration options are daemon_memcached_option, daemon_memcached_r_batch_size, daemon_memcached_w_batch_size, innodb_api_trx_level, innodb_api_enable_mdl, and innodb_api_enable_binlog.

    See Section 14.2.10, “InnoDB Integration with memcached for full details.

  • Performance: InnoDB: The persistent statistics feature for InnoDB tables is now enabled by default, and can be controlled at the level of individual tables. This feature involves the configuration options innodb_stats_persistent, innodb_stats_auto_recalc, and innodb_stats_persistent_sample_pages, and the clauses STATS_PERSISTENT, STATS_AUTO_RECALC, and STATS_SAMPLE_PAGES of the CREATE TABLE and ALTER TABLE statements. See Section 14.2.5.2.9, “Persistent Optimizer Statistics for InnoDB Tables” for usage details.

  • Incompatible Change: The --safe-mode server option has been removed.

  • Incompatible Change: It is now explicitly disallowed to assign the value DEFAULT to stored procedure or function parameters or stored program local variables (for example with a SET var_name = DEFAULT statement). This was not previously supported, or documented as permitted, but is flagged as an incompatible change in case existing code inadvertantly used this construct. It remains permissible to assign DEFAULT to system variables, as before, but assigning DEFAULT to parameters or local variables now results in a syntax error.

    After an upgrade to MySQL 5.6.6 or later, existing stored programs that use this construct produce a syntax error when invoked. If a mysqldump file from 5.6.5 or earlier is loaded into 5.6.6 or later, the load operation fails and affected stored program definitions must be changed.

  • Important Change: Partitioning: MySQL nows supports partition lock pruning, which allows for many DDL and DML statements against partitioned tables using MyISAM (or another storage engine that employs table-level locking) to lock only those partitions directly affected by the statement. These statements include (but are not limited to) many SELECT, SELECT ... PARTITION, UPDATE, REPLACE, INSERT, and other statements. This enhancement improves especially the performance of many such statements when used with tables having many (32 or more) partitions. For a complete list of affected statements with particulars, and other information, see Section 17.6.4, “Partitioning and Locking”. (Bug #37252, Bug #11748732)

  • Important Change: Replication: It is now possible, in the event that a multi-threaded slave fails while running with the --relay-log-recovery option, to switch it safely to single-threaded mode despite the presence of any gaps with unprocessed transactions in the relay log. To accomplish this, you can now use START SLAVE [SQL_THREAD] UNTIL SQL_AFTER_MTS_GAPS to cause the slave SQL threads to run until no more such gaps are found in the relay log. Once this statement has completed, you can change the slave_parallel_workers system variable, and (if necessary) issue a CHANGE MASTER TO statement before restarting the slave. (Bug #13893363)

    References: See also Bug #13893310.

  • Important Change: Replication: INSERT ON DUPLICATE KEY UPDATE is now marked as unsafe for statement-based replication if the target table has more than one primary or unique key. For more information, see Section 16.1.2.3, “Determination of Safe and Unsafe Statements in Binary Logging”. (Bug #58637, Bug #11765650, Bug #13038678)

  • Important Change: Replication: The SHOW BINARY LOGS statement (and its equivalent SHOW MASTER LOGS) may now be executed by a user with the REPLICATION CLIENT privilege. (Formerly, the SUPER privilege was necessary to use either form of this statement.)

  • Important Change: INSERT DELAYED is now deprecated, and will be removed in a future release. Use INSERT (without DELAYED) instead. (Bug #13985071)

  • Important Change: In MySQL, the TIMESTAMP data type differs in nonstandard ways from other data types:

    • TIMESTAMP columns not explicitly declared with the NULL attribute are assigned the NOT NULL attribute. (Columns of other data types, if not explicitly declared as NOT NULL, permit NULL values.) Setting such a column to NULL sets it to the current timestamp.

    • The first TIMESTAMP column in a table, if not declared with the NULL attribute or an explicit DEFAULT or ON UPDATE clause, is automatically assigned the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP attributes.

    • TIMESTAMP columns following the first one, if not declared with the NULL attribute or an explicit DEFAULT clause, are automatically assigned DEFAULT '0000-00-00 00:00:00' (the zero timestamp). For inserted rows that specify no explicit value for such a column, the column is assigned '0000-00-00 00:00:00' and no warning occurs.

    Those nonstandard behaviors remain the default for TIMESTAMP but now are deprecated and this warning appears at startup:

    [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
    Please use --explicit_defaults_for_timestamp server option (see
    documentation for more details).

    As indicated by the warning, to turn off the nonstandard behaviors, enable the new explicit_defaults_for_timestamp system variable at server startup. With this variable enabled, the server handles TIMESTAMP as follows instead:

    • TIMESTAMP columns not explicitly declared as NOT NULL permit NULL values. Setting such a column to NULL sets it to NULL, not the current timestamp.

    • No TIMESTAMP column is assigned the DEFAULT CURRENT_TIMESTAMP or ON UPDATE CURRENT_TIMESTAMP attributes automatically. Those attributes must be explicitly specified.

    • TIMESTAMP columns declared as NOT NULL and without an explicit DEFAULT clause are treated as having no default value. For inserted rows that specify no explicit value for such a column, the result depends on the SQL mode. If strict SQL mode is enabled, an error occurs. If strict SQL mode is not enabled, the column is assigned the implicit default of '0000-00-00 00:00:00' and a warning occurs. This is similar to how MySQL treats other temporal types such as DATETIME.

    To upgrade servers used for replication, upgrade the slaves first, then the master. Replication between the master and its slaves should work provided that all use the same value of explicit_defaults_for_timestamp:

    1. Bring down the slaves, upgrade them, configure them with the desired value of explicit_defaults_for_timestamp, and bring them back up.

      The slaves will recognize from the format of the binary logs received from the master that the master is older (predates the introduction of explicit_defaults_for_timestamp) and that operations on TIMESTAMP columns coming from the master use the old TIMESTAMP behavior.

    2. Bring down the master, upgrade it, and configure it with the same explicit_defaults_for_timestamp value used on the slaves, and bring it back up.

    (Bug #63034, Bug #13344629, Bug #55131, Bug #11762529)

  • Important Change: The YEAR(2) data type is now deprecated because it is problematic. YEAR(2) columns in existing tables are treated as before, but YEAR(2) in new or altered tables are converted to YEAR(4). Support for YEAR(2) will be removed entirely in a future release of MySQL. For more information, see Section 11.3.4, “YEAR(2) Limitations and Migrating to YEAR(4).

  • InnoDB: InnoDB tables now support the notion of transportable tablespaces, allowing .ibd files to be exported from a running MySQL instance and imported into another running instance. The FOR EXPORT clause of the FLUSH TABLE command writes any unsaved changes from InnoDB memory buffers to the .ibd file. After copying the .ibd file and a separate metadata file to the other server, you can use the DISCARD TABLESPACE and IMPORT TABLESPACE clauses of the ALTER TABLE statement to bring the table data into a different MySQL instance.

    For more information, see Section 13.7.6.3, “FLUSH Syntax”.

  • InnoDB: For systems with constant heavy workloads, or workloads that fluctuate widely, several new configuration options let you fine-tune the flushing behavior for InnoDB tables: innodb_adaptive_flushing_lwm, innodb_max_dirty_pages_pct_lwm, innodb_max_io_capacity (changed in subsequent point releases to innodb_io_capacity_max), and innodb_flushing_avg_loops. These options feed into an improved formula used by the innodb_adaptive_flushing option. For full details about improvements to flushing algorithms and options, see Section 14.2.5.2.8, “Improvements to Buffer Pool Flushing”.

  • Replication: The STOP SLAVE option SQL_BEFORE_GTIDS did not function correctly, and the SQL_AFTER_GTIDS option for the same statement did not function at all. (Bug #13810456)

  • Replication: Added the --slave-rows-search-algorithms option for mysqld, which determines the search algorithms used for finding matches for slave updates when slave_allow_batching is enabled, including whether or not table or index hashing is used with searches employing a primary or unique key, some other key, or no key.

  • The Performance Schema has a new system variable, performance_schema_session_connect_attrs_size, and new status variable, Performance_schema_session_connect_attrs_lost. The system variable is the amount of preallocated memory per thread used to hold connection attribute strings. If the connection attribute strings are larger than the reserved storage, the status variable is incremented. (Bug #14076427)

  • yaSSL was upgraded from version 1.7.2 to 2.1.4.

  • The generic procedure API has been removed from the server. This was formerly present as a means of writing server procedures, but went unused except for PROCEDURE ANALYSE(). Removing the interface simplifies aspects of the internal procedure representation that were related to code no longer in the server but had a negative effect on its operation, in the sense that these aspects hindered the ability of the optimizer to perform better on more common query types. In addition, this code hindered future optimizer development and its removal will have benefit that development.

    PROCEDURE ANALYSE() remains available, but is no longer implemented using a public interface. (For information, see Section 8.4.2.4, “Using PROCEDURE ANALYSE.) One consequence of removing the procedure interface is that EXPLAIN SELECT ... PROCEDURE ANALYSE() now works where previously it produced an error.

  • To improve scalability by reducing contention among sessions for the global lock on the open tables cache, the cache now can be partitioned into several smaller cache instances. A session now need lock only one instance to access it for DML statements. This segments cache access among instances, permitting higher performance for operations that need to use the cache when many there are many sessions accessing tables. (DDL statements still require a lock on the entire cache, but such statements are much less frequent than DML statements.)

    A new system variable, table_open_cache_instances, permits control over the number of cache instances. Each instance has a size of table_open_cache / table_open_cache_instances. By default, the number of instances is 1.

    Three new status variables provide information about the operation of the open tables cache. Table_open_cache_hits and Table_open_cache_misses indicate the number of hits and misses or lookups in the cache. Table_open_cache_overflows indicates how many times, after a table is opened or closed, an instance has an unused entry and the size of the instance is larger than table_open_cache / table_open_cache_instances.

  • Previously, for semi-join processing the outer query specification was limited to simple table scans or inner joins using comma syntax, and view references were not possible. Now outer join and inner join syntax is permitted in the outer query specification, and the restriction that table references must be base tables has been lifted.

  • It is now possible for client programs to pass connection attributes to the server in the form of key/value pairs. Attributes are manipulated using the MYSQL_OPT_CONNECT_ATTR_RESET and MYSQL_OPT_CONNECT_ATTR_DELETE options for the mysql_options() C API function, and the MYSQL_OPT_CONNECT_ATTR_ADD option for the new mysql_options4() function. Connection attributes are exposed through the session_connect_attrs and session_account_connect_attrs Performance Schema tables.

    If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the performance_schema database.

    For more information, see Section 21.9.3, “C API Function Descriptions”, and Chapter 20, MySQL Performance Schema.

  • Previously, the default value for the --bind-address option was 0.0.0.0, which causes the server to accept TCP/IP connections on all server host IPv4 interfaces. To make it easier to use IPv6 connections without special configuration, the default --bind-address value now is *. This is similar to 0.0.0.0, but causes the server to also accept TCP/IP connections on all IPv6 interfaces if the server host supports IPv6. (Another way to to accept IPv4 and IPv6 connections is by using --bind-address=::, but in this case an error occurs if the server host does not support IPv6.)

  • The optimizer's cost model for disk-sweep Multi-Read Range (DS-MRR) has been improved. The improved cost model makes it more likely that DSMRR will be used for queries that read much data from disk.

  • For the WITH_SSL CMake option, no is no longer a permitted value or the default value. The default is now bundled. Consequently, MySQL now is always built with SSL support.

Bugs Fixed

  • Performance: Partitioning: InnoDB: The statistics used by the optimizer for queries against partitioned InnoDB tables were based only on the first partition of each such table, leading to use of the wrong execution plan. (Bug #13694811)

    References: This bug was introduced by Bug #11756867.

  • Performance: InnoDB: Improved the efficiency of the system calls to get the system time to record the start time for a transaction. This fix reduces potential cache coherency issues that affected performance. (Bug #13993661)

  • Performance: InnoDB: Improved the algorithm related to adaptive flushing. This fix increases the rate of flushing in cases where compression is used and the data set is larger than the buffer pool, leading to eviction. (Bug #13990648, Bug #65061)

  • Performance: InnoDB: The order in which flushes are performed when the innodb_flush_neighbors configuration option is enabled was improved. The algorithm makes the neighbor-flushing technique faster on HDD storage, while reducing the performance overhead on SSD storage. (innodb_flush_neighbors typically is not needed for SSD hardware.) (Bug #13798956)

  • Performance: InnoDB: This fix improves the speed of DROP TABLE for InnoDB tables by removing a scan of the buffer pool to remove entries for the adaptive hash index. This improvement is most noticeable on systems with very large buffer pools and the innodb_adaptive_hash_index option enabled. (Bug #13704145, Bug #64284)

  • Performance: Replication: All changes made as part of a given transaction are cached; when the transaction is committed, the contents of this cache are written to the binary log. When using global transaction identifiers, the GTID identifying this transaction must be the first event among all events in the cache belonging to the transaction.

    Previously, a portion of the cache was preallocated as a buffer when the transaction began; upon commit it was completed with a valid GTID. However, because it was not possible to perform a seek in the cache, it was necessary to flush it to a temporary file, and then seek within this file. When the cache buffer is not big enough to accommodate all changes comprising a given transaction, it swapped the data to disk, then reinitialized the cache to have the buffer properly filled with the correct data again. The buffer was actually flushed and the cache reinitialized every time a GTID event was written, even in those cases in which all events making up a given transaction fit within the cache buffer, which could negatively impact the performance of binary logging (and thus replication) when using GTIDs.

    Now the cache is reinitialized only when it is actually necessary—in other words, only when the cache is in fact swapped to disk.

    In addition, the fix for this issue addresses a missing unlock operation when the server failed to write an empty transaction group and reduces the amount of code needed for prepending the GTID to the contents of the cache before flushing the cache to disk. (Bug #13877432)

    References: See also Bug #13738296.

  • Performance: Within stored programs, the overhead of making statements log friendly was incurred even when the corresponding log was not enabled. (Bug #12884336)

  • Performance: The MD5() and SHA1() functions had excessive overhead for short strings. (Bug #49491, Bug #11757443, Bug #60227, Bug #14134662)

  • Incompatible Change: Metadata was handled incorrectly for objects such as tables or views that were used in a stored program. Metadata for each such object was gathered at the beginning of program execution, but not updated if DDL statements modified the object during program execution (or modified it between executions of the program if the program remained in the stored program cache). This resulted in mismatches between the actual object structure and the structure the stored program believed the object to have during execution, and caused problems such as data errors or server crashes.

    Now metadata changes to objects used in a stored program are detected during execution and affected statements within the program are reparsed so that they use the updated metadata.

    Example: Suppose that a stored program executes this statement in a loop and that the columns in the table t1 are altered during loop execution:

    SELECT * FROM t1;

    Previously, errors occurred because program execution did not detect that SELECT * evaluates to a different set of columns after the change. Now the table change is detected and the SELECT is reparsed to determine the new set of columns.

    Reparsing occurs for other cases as well, such as t1 being changed from a base table to a view or a TEMPORARY table. For more information, see Section 8.9.4, “Caching of Prepared Statements and Stored Programs”.

    There is a possible incompatibility regarding the new behavior: Application code that assumed the previous behavior and implemented a workaround may need to be changed.

    Other instances of corrected problems:

    • SELECT * within a stored program could fail for TEMPORARY tables created within the program using prepared statements.

    • Unknown column errors or bad data could result from changing the set of columns in a table used within a stored program between executions of the program or while the table was used within a program loop. Errors could also occur under similar circumstances for a view if the view definition was changed, for a TEMPORARY table if the table was dropped.

    • Failure of triggers to notice metadata changes in objects accessed within the program could cause trigger malfunction.

    • Failure of a stored program to notice metadata changes in objects accessed within the program could cause replication to fail.

    (Bug #61434, Bug #12652835, Bug #55678, Bug #11763018, Bug #64574, Bug #13840615, Bug #33843, Bug #11747732, Bug #33289, Bug #11747626, Bug #33255, Bug #11747619, Bug #33000, Bug #11747566, Bug #27011, Bug #11746530, Bug #33083, Bug #11747581, Bug #32868, Bug #11747537, Bug #12257, Bug #11745236)

  • Important Change: MySQL Cluster: mysqld_safe now traps Signal 13 (SIGPIPE) so that this signal no longer kills the MySQL server process. (Bug #33984)

  • InnoDB: Replication: When binary log statements were replayed on the slave, the Com_insert, Com_update, and Com_delete counters were incremented by BEGIN statements initiating transactions affecting InnoDB tables but not by COMMIT statements ending such transactions. This affected these statements whether they were replicated or they were run using mysqlbinlog. (Bug #12662190)

  • InnoDB: If MySQL crashed during an ALTER TABLE t DISCARD TABLESPACE operation, it could leave InnoDB in a state where it crashes at the next startup. The error message was:

    InnoDB: Error: a record lock wait happens in a dictionary operation! 

    (Bug #14146981)

  • InnoDB: When importing an InnoDB tablespace representing a compressed table, unnecessary checksum calculations were being performed. (Bug #14161424)

  • InnoDB: Dropping an InnoDB temporary table could leave behind the .ibd file if the table was created with the innodb_file_per_table setting enabled. On Windows systems, this could cause an additional problem: repeated attempts to drop the file for 2000 seconds. In addition to resolving the incorrect path name used to drop the file, this fix also limits the retry loop to 10 seconds, for example if the file cannot be removed because it is locked by a backup process. (Bug #14169459)

  • InnoDB: A race condition could cause a crash during an online CREATE INDEX statement for an InnoDB table. This bug only affected very small tables. It required a DML operation to be in progress for the table, affecting the primary key columns, at the same time the CREATE INDEX statement was issued. (Bug #14117641)

  • InnoDB: If a row was deleted from an InnoDB table, then another row was re-inserted with the same primary key value, an attempt by a concurrent transaction to lock the row could succeed when it should have waited. This issue occurred if the locking select used a WHERE clause that performed an index scan using a secondary index. (Bug #14100254, Bug #65389)

  • InnoDB: An assertion error could occur if an XA transaction was created within a session designated as read-only. (Bug #14108709)

  • InnoDB: This fix improves the accuracy of the data in the information_schema table innodb_metrics for systems with innodb_buffer_pool_instances set to greater than 1. The improved information applies to the number of pages flushed from the buffer pool, specifically these entries in the table:

    buffer_flush_batch_total_pages
    buffer_flush_neighbor_total_pages
    buffer_flush_adaptive_total_pages
    buffer_flush_sync_total_pages
    buffer_flush_background_total_pages
    buffer_LRU_batch_total_pages

    (Bug #14037167)

  • InnoDB: In a transaction using the REPEATABLE READ isolation level, an UPDATE or DELETE statement for an InnoDB table could sometimes overlook rows recently committed by other transactions. As explained in Section 14.2.4.3, “Consistent Nonlocking Reads”, DML statements within a REPEATABLE READ transaction apply to rows committed by other transactions, even if a query could not see those rows. (Bug #14007649, Bug #65111)

  • InnoDB: During an ANALYZE TABLE statement for an InnoDB table, the server could hang (in non-debug builds), or an assertion error could occur, indicating recursive acquisition of a lock (in debug builds). (Bug #14007109)

  • InnoDB: Using the KILL statement to terminate a query could cause an unnecessary message in the error log:

    [ERROR] Got error -1 when reading table table_name
    

    (Bug #13933132)

  • InnoDB: Querying the INFORMATION_SCHEMA.INNODB_TRX or related tables while the server was running a heavy InnoDB workload could cause a crash, with messages in the error log referring to the function fetch_data_into_cache_low. This issue arose during new feature work and only affected MySQL 5.6. (Bug #13966453)

  • InnoDB: Fixes a recently introduced issue with InnoDB persistent statistics, that could cause a crash (non-debug builds) or assertion error (debug builds). (Bug #13946118)

  • InnoDB: Including a % character in a query using an InnoDB FULLTEXT index could cause a crash. (FULLTEXT indexes for InnoDB tables are a new feature, still under development.) (Bug #13940669, Bug #64901)

  • InnoDB: An assertion could be raised if an InnoDB table was moved to a different database using ALTER TABLE ... RENAME while the database was being dropped by DROP DATABASE. (Bug #13982017)

  • InnoDB: If the server crashed while dropping an InnoDB temporary table or an index on a temporary table, further errors could occur during crash recovery, preventing the server from restarting. (Bug #13913670)

  • InnoDB: A FULLTEXT query for an InnoDB table could filter the search terms incorrectly if a term using the minus operator was followed by another term using the plus operator. (Bug #13907075)

  • InnoDB: When a table was renamed, the InnoDB persistent statistics were not associated with the new table name. (Bug #13920437)

  • InnoDB: With the innodb_force_recovery configuration option set to 2 or greater, a shutdown could hang after the message:

    InnoDB: Waiting for purge thread to be suspended 

    This issue was introduced during recent changes within the MySQL 5.6 development cycle. (Bug #13830371)

  • InnoDB: Deleting a huge amount of data from InnoDB tables within a short time could cause the purge operation that removes delete-marked records to stall. This issue could result in unnecessary disk space use, but does not cause any problems with data integrity. If this issue causes a disk space shortage, restart the server to work around it. This issue is only likely to occur on 32-bit platforms. (Bug #13847885)

  • InnoDB: The server could crash when using the SAVEPOINT statement in conjunction with InnoDB tables containing FULLTEXT indexes. (Bug #13831840)

  • InnoDB: Running concurrent bulk inserts on a server with auto_increment_offset=1, auto_increment_increment greater than 1, and innodb_autoinc_lock_mode=1 could result in intermittent errors like the following, even with the primary key set to auto_increment and omitted from the INSERT statement:

    Duplicate entry 'value' for key 'PRIMARY' 
    

    The workaround was to set auto_increment_offset=1 or innodb_autoinc_lock_mode=0 (traditional). (Bug #13817703, Bug #61209)

  • InnoDB: During an ALTER TABLE statement to create a primary key for an InnoDB table, some column characteristics could be set incorrectly, leading to errors during subsequent queries. The incorrect data could be the maximum length for a column prefix, or the state of the NOT NULL flag.

    In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #13641275)

  • InnoDB: The server could halt with an assertion error when DDL and DML operations were run on the same InnoDB table simultaneously:

    InnoDB: Error: a record lock wait happens in a dictionary operation! 

    This fix stems from the online DDL feature in MySQL 5.6. (Bug #13641926)

  • InnoDB: An ALTER TABLE statement for an InnoDB table that dropped one index and create another could fail with an error code 1280, and displaying the wrong index name in the message. (Bug #13029445, Bug #62544)

  • InnoDB: The error handling and message was improved for attempting to create a foreign key with a column referencing itself. The message suggested a potential problem with the data dictionary, when no such problem existed. (Bug #12902967)

  • InnoDB: For an InnoDB table with a trigger, under the setting innodb_autoinc_lock_mode=1, sometimes auto-increment values could be interleaved when inserting into the table from two sessions concurrently. The sequence of auto-increment values could vary depending on timing, leading to data inconsistency in systems using replication. (Bug #12752572, Bug #61579)

  • InnoDB: When data was removed from an InnoDB table, newly inserted data might not reuse the freed disk blocks, leading to an unexpected size increase for the system tablespace or .ibd file (depending on the setting of innodb_file_per_table. The OPTIMIZE TABLE could compact a .ibd file in some cases but not others. The freed disk blocks would eventually be reused as additional data was inserted. (Bug #11766634, Bug #59783)

  • InnoDB: The CHECK TABLE statement could fail for a large InnoDB table due to a timeout value of 2 hours. For typical storage devices, the issue could occur for tables that exceeded approximately 200 or 350 GB, depending on I/O speed. The fix relaxes the locking performed on the table being checked, which makes the timeout less likely. It also makes InnoDB recognize the syntax CHECK TABLE QUICK, which avoids the possibility of the timeout entirely. (Bug #11758510, Bug #50723)

  • InnoDB: Full-text search in InnoDB tried to follow foreign key references without keeping track of which ones it had already seen. With circular and other complex setups, this could loop forever or a very long time, leading to the appearance of the query thread hanging. (Bug #64274, Bug #13701973)

  • Partitioning: If a partitioned table t1 was created using the ROW_FORMAT option, attempting to perform ALTER TABLE t1 EXCHANGE PARTITION ... WITH TABLE t2 failed with the error Tables have different definitions even if the definition for table t2 was identical to that for t1. This occurred because a check was made for an explicit ROW_FORMAT setting in the table definition, and if this was set, the operation was rejected.

    Now in such cases the row format actually used for each table is checked explicitly and the EXCHANGE PARTITION operation is permitted to execute if both row formats are the same. (Bug #11894100)

  • Partitioning: The PARTITION_COMMENT column of the INFORMATION_SCHEMA.PARTITIONS table truncated partition comments, displaying only the first 80 characters.

    As part of the fix for this issue, the maximum length for a partition comment is now set at 1024 characters, and this width is honored by INFORMATION_SCHEMA.PARTITIONS.PARTITION_COMMENT. (Bug #11748924, Bug #37728)

  • Replication: It was possible in some cases when using semisynchronous replication for log rotation to take place before an ongoing transaction was committed or rolled back. (Bug #14123372)

  • Replication: When a complete global transaction spanned relay logs such that only its GTID appeared in a given relay log while the body of the transaction (including BEGIN and COMMIT statements) appeared in the next relay log, the GTID was interpreted incorrectly as belonging to an empty group. (Bug #14136654)

  • Replication: If the relay logs were removed after the server was stopped, without stopping replication first, the server could not be started correctly. (Bug #14029212, Bug #65152)

    References: See also Bug #13971348.

  • Replication: The --bootstrap option for mysqld is used by mysql_install_db when it initializes the system tables. Now, whenever this option is used, GTIDs (see Section 16.1.3, “Replication with Global Transaction Identifiers”) and replication are automatically disabled. (Bug #13992602)

  • Replication: It was theoretically possible for concurrent execution of more than one instance of SHOW BINLOG EVENTS to crash the MySQL Server. (Bug #13979418)

  • Replication: The text for the error ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON referred to AUTO_POSITION = 1 although this should be MASTER_AUTO_POSITION = 1. The text has been corrected. (Bug #13868465)

  • Replication: If errors were encountered while trying to initialize the mysql.slave_master_info or mysql.slave_relay_log_info tables, the server refused to start. Now in such cases, the warning message Error while checking replication metadata. This might also happen when doing a live upgrade from a version that did not make use of the replication metadata tables is issued to advise the user that this has happened, but the server is permitted to continue starting. (Bug #13893363)

  • Replication: Queries that were more than 255 characters in length were truncated when viewed in the output of SHOW BINLOG EVENTS or mysqlbinlog. This was due to the length of the query being stored in Rows_query_log_events using a single byte. (Bug #13799489)

  • Replication: A CHANGE MASTER TO statement could alter the effective value of relay_log_purge. In addition, the relay_log_recovery system variable is now read-only, and can be changed only by starting the server with --relay-log-recovery. (Bug #13840948)

  • Replication: When binlog_rows_query_log_events = 1 and a statement is written to the binary log using the row-based logging format, the server generates a an additional log event containing the text of the original statement. If mysqlbinlog is executed on this log using the --verbose --verbose, the original statement is printed. To prevent the statement from being executed in addition to the row event (which would in effect cause the statement to be excuted twice), it is commented out with a leading # character.

    This was implemented with the assumption that such a statement would consist of a single line, which meant that a statement covering multiple lines was handled incorrectly, in that only the first line of the statement actually commented out. Now in such cases, every line of the statement is commented out with a leading #. (Bug #13799555)

  • Replication: Replication locks and some of the protocols controlling the use of these locks were not well implemented or enforced. In particular, this fix improves lock handling for statements such as CHANGE MASTER TO, SHOW SLAVE STATUS, and FLUSH LOGS. (Bug #13779291)

  • Replication: When logging transactions that affected both transactional and nontransactional tables, the following statements could sometimes be written into the binary log in the wrong order or on the wrong side of a transaction boundary:

    (Bug #13627921)

  • Replication: To provide a crash-safe slave, it was previously necessary to change the storage engine for the slave_master_info, slave_relay_log_info, and slave_worker_info tables from MyISAM to InnoDB manually, by issuing ALTER TABLE. To simplify the setup of replication using these slave log tables, they are now created using the InnoDB storage engine. (Bug #13538891)

  • Replication: Setting binlog_checksum on the master to a value that was unknown on the slave caused replication to fail. Now in such cases, replication checksums are disabled on the slave and replication stops with an appropriate error message. (Bug #13553750, Bug #61096)

  • Replication: When the slave had been set using CHANGE MASTER TO with the MASTER_DELAY option equal to any permitted value greater than zero, then stopped using STOP SLAVE, pointed at the current relay log position (as shown by SHOW SLAVE STATUS), and started again, START SLAVE failed with the error Could not initialize master info structure. (Bug #12995174)

  • Replication: The --relay-log-space-limit option was sometimes ignored.

    More specifically, when the SQL thread went to sleep, it allowed the I/O thread to queue additional events in such a way that the relay log space limit was bypassed, and the number of events in the queue could grow well past the point where the relay logs needed to be rotated. Now in such cases, the SQL thread checks to see whether the I/O thread should rotate and provide the SQL thread a chance to purge the logs (thus freeing space).

    Note that, when the SQL thread is in the middle of a transaction, it cannot purge the logs; it can only ask for more events until the transaction is complete. Once the transaction is finished, the SQL thread can immediately instruct the I/O thread to rotate. (Bug #12400313, Bug #64503)

    References: See also Bug #13806492.

  • Replication: An event whose length exceeded the size of the master dump thread's max_allowed_packet caused replication to fail. This could occur when updating many large rows and using row-based replication.

    As part of this fix, a new server option --slave-max-allowed-packet is added, which permits max_allowed_packet to be exceeded by the slave SQL and I/O threads. Now the size of a packet transmitted from the master to the slave is checked only against this value (available as the value of the slave_max_allowed_packet server system variable), and not against the value of max_allowed_packet. (Bug #12400221, Bug #60926)

  • Replication: Statements using AUTO_INCREMENT, LAST_INSERT_ID(), RAND(), or user variables could be applied in the wrong context on the slave when using statement-based replication and replication filtering server options (see Section 16.2.3, “How Servers Evaluate Replication Filtering Rules”). (Bug #11761686, Bug #54201)

    References: See also Bug #11754117, Bug #45670, Bug #11746146, Bug #23894.

  • Replication: An INSERT into a table that has a composite primary key that includes an AUTO_INCREMENT column that is not the first column of this composite key is not safe for statement-based binary logging or replication. Such statements are now marked as unsafe and fail with an error when using the STATEMENT binary logging format. For more information, see Section 16.1.2.3, “Determination of Safe and Unsafe Statements in Binary Logging”, as well as Section 16.4.1.1, “Replication and AUTO_INCREMENT.

    Note

    Tables using the InnoDB storage engine are not affected by this issue, since InnoDB does not allow the creation of a composite key that includes an AUTO_INCREMENT column, where this column is not the first column in the key.

    (Bug #11754117, Bug #45670)

    References: See also Bug #11761686, Bug #54201, Bug #11746146, Bug #23894.

  • Replication: After upgrading a replication slave to MySQL 5.6.2 or later, enabling the query cache eventually caused the slave to fail. (Bug #64624, Bug #14005409)

  • After running ALTER TABLE tbl DISCARD TABLESPACE for an InnoDB table, certain other ALTER TABLE operations such as renaming the table or rebuilding the primary key could cause a crash. (Bug #14213568)

  • For conditions of the form WHERE p1 AND (p2 OR p3), the optimizer now uses the index merge access method on (p2,p3) if it is more efficient than a range scan on p1. Previously, index merge was not considered when a range scan was possible. (Bug #14208922)

  • With logging of the general query log to a table, logging was disabled within a read-only transaction because write lock acquisition on the log table was blocked. (Bug #14136866)

  • Error messages that should have said "YEAR(2)" said "YEAR(0)" instead. (Bug #14167585)

  • For debug builds, INSERT IGNORE INTO ... SELECT that selected more than max_join_size rows could raise an assertion. (Bug #14145442)

  • If a nonexistent page was requested to be loaded into the InnoDB buffer pool by the innodb_buffer_pool_load_at_startup configuration option, a subsequent shutdown operation could hang. (Bug #14106082)

  • The Performance Schema did not generate consistent digest values for CALL statements. (Bug #14069132)

  • The ARCHIVE storage engine could not be built unless the Performance Schema was also built. (Bug #14116252)

  • In debug builds, warnings occurring during creation of an InnoDB table with ROW_FORMAT=DYNAMIC and innodb_file_per_table disabled could raise an assertion. (Bug #14101563)

  • Derived tables and tables created with CREATE TABLE ... SELECT using the output from single-row queries with NULL in the first column could change the value to 0. (Bug #14069831)

  • Incorrect assessment of column nullability for a subquery result within a trigger could cause column cannot be null errors. (Bug #14069810, Bug #14005353)

  • In debug builds, the server failed to check for error status from the storage engine and raised an assertion. (Bug #14101852)

  • When the index enforcing a foreign key constraint was dropped while foreign_key_checks=0, further operations involving the foreign key column could cause a serious error after the foreign_key_checks option was re-enabled. (Bug #14025221)

  • For debug builds compiled with gcov, tests that used DBUG_SUICIDE lost gcov data. (Bug #14028421)

  • The LooseScan semi-join strategy could fail to remove duplicates from the result set. (Bug #14053325)

  • Certain arguments to RPAD() could lead to uninitialized variable warnings. (Bug #14039955)

  • Mishandling of failed internal commits in administrative statements such as ANALYZE TABLE could cause an assertion to be raised. (Bug #14001091)

  • Queries containing references to user variables were not written to the general query log with some rewriting, not as received. (Bug #13958454)

  • For debug builds, conversion of a double-precision value to the lldiv_t type could raise an assertion. (Bug #13976233)

  • Some arguments to MAKETIME() could cause a buffer overflow. (Bug #13982125)

  • Selecting MIN() or MAX() from a left or right join involving an INFORMATION_SCHEMA table could cause a server crash. (Bug #13966514)

  • For debug builds, the optimizer could change the query plan when checking sort order and return incorrect results. (Bug #13949068)

  • Improper calculation of decimals for TIME values given as arguments to IF() or IFNULL() could cause a server crash. (Bug #13988413, Bug #14042545)

  • Mishandling of failure during multiple-table UPDATE IGNORE statements could cause an assertion to be raised. (Bug #13974815)

  • Queries that grouped by an outer BLOB column in a subquery caused a server crash. (Bug #13966809)

  • Overhead for Performance Schema table aggregation operations was excessive. (Bug #13862186)

  • An infinite thread loop could develop within Performance Schema, causing the server to become unresponsive. (Bug #13898343)

  • When the InnoDB persistent statistics feature was turned on, an ALTER TABLE statement on an InnoDB table with delete-marked records could cause a crash (non-debug builds) or assertion error (debug builds). (Bug #13838962, Bug #13867915)

  • viosslfactories did not compile on Oracle Linux 6.0 with CMake options -DWITH_SSL=system and -DWITH_DEBUG=1. (Bug #13799126)

  • If KILL QUERY interrupted an INSERT or UPDATE that had the IGNORE modifier, OK was incorrectly returned to the client rather than an error code. Now an error (Query execution was interrupted) is returned instead. (Bug #13822652)

  • If KILL QUERY interrupted a statement during derived table materialization, the server crashed later trying to read the nonexistent materialized table. (Bug #13820776)

  • For comparison of a temporal value to and indexed character column, the optimizer could apply the range access method and thus perform an indexed search that found only literal matches. This is incorrect because MySQL permits a variety of delimiters in temporal values represented as strings. (Bug #13803810)

  • Some errors in MySQL 5.6 had different numbers than in MySQL 5.5. (Bug #13833438)

  • Incorrect stored program caching could cause statements within a stored program that included a GROUP BY clause to return different results across multiple program invocations. (Bug #13805127)

  • With subquery materialization enabled, some queries with a subquery in the HAVING clause caused a server crash. (Bug #13848789)

  • Several clarifications were made to optimizer trace output. (Bug #13799348)

  • The version_compile_machine system variable sometimes did not include the value 64 for server binaries compiled on a 64-bit system. (Bug #13859866)

  • The Performance Schema stored identifiers in digest tables as utf8 without converting them from the original character set first. (Bug #13809293)

  • In bootstrap mode, the server signal handler thread did not shut down if the server aborted early. (Bug #13837221)

  • Incorrect cost calculations for two-table joins could lead to incorrect join order. (Bug #13810048)

    References: This bug is a regression of Bug #26106.

  • In debug builds, a race condition in a signal handler during shutdown caused a server crash. (Bug #13793813)

  • For open ranges that effectively resulted in a full index scan, the optimizer did not discard the range predicate as unneeded. (Bug #13731380)

  • A prepared statement that referenced views and were executed using semi-join transformation could return different results for different executions. (Bug #13773979)

    References: See also Bug #14641759.

  • (a,b) IN (SELECT c,d FROM t1 WHERE ...) could produce incorrect results if t1 had an index on (c, d) and c or d contained NULL values. (Bug #13731417)

  • Outer join queries with ALL could return incorrect results because the optimizer incorrectly rewrote them to use inner join. (Bug #13735712)

  • The range optimizer sometimes did not treat equivalent expressions the same, depending on the order of the operands. For example, it could treat a <= b and b >= a differently. (Bug #13701206)

  • With semi-join optimization enabled, an assertion was raised for queries for which the number of tables was greater than the search depth. (Bug #13685026)

  • A query executed with literal values in the WHERE clause could return results different from the same query written to select the same literal values from a separate table using a SELECT statement in the WHERE clause. (Bug #13468414)

  • Truncating a table partition did not invalidate queries in the query cache that used the table. (Bug #13485448)

  • Setting max_sort_length to small values could cause a server crash. (Bug #13485416)

  • Condition handler code could assume that after handler execution, control would pass up a single level to the parent, sometimes leading to a server crash. (Bug #13431226)

  • If a GROUP_CONCAT() result was calculated using intermediate results (for example, if ORDER BY or DISTINCT was present), individual intermediate results were each truncated to a maximum of 64K, even if the group_concat_max_len system variable was set to a larger value. Now the length of any intermediate result and the final result are controlled by the group_concat_max_len value. (Bug #13387020)

  • Queries with ALL subquery predicates could return incorrect results due to a faulty query transformation. (Bug #13330886)

  • Switching between index scans and random scans using the HANDLER interface could result in failure of the interface to properly reinitialize scans. (Bug #13008220)

  • The presence of a file named .empty in the test database prevented that database from being dropped. (Bug #12845091)

  • For queries with ORDER BY COUNT(*) and LIMIT, the optimizer could choose an execution plan that produced incorrect results. (Bug #12713907)

  • IPv6 functions such as IS_IPV6() produced Valgrind warnings with arguments that used a multi-byte character set. (Bug #12635232, Bug #14040277)

  • For some subqueries that should be executed using a range scan on a non-primary index and required use of filesort, only the first execution of the subquery was done as a range scan. All following executions were done as full table scans, resulting in poor performance. In addition, if index condition pushdown was used, incorrect results could be returned. (Bug #12667154)

  • Queries that used STRAIGHT_JOIN and were executed using Multi-Range Read optimization could result in a memory leak. (Bug #12365385)

  • Overhead for the Performance Schema was reduced. (Bug #12346211)

  • IN subqueries that used a variance or standard deviation aggregate function could return a different result depending on whether the optimizer_switch materialization flag was enabled.

    Note

    Those aggregate functions may now return a result with a different number of decimals from previously.

    (Bug #11766758)

  • On Windows, initial database creation failed during bootstrapping. (Bug #11766342)

  • SAVEPOINT statements were incorrectly disallowed within XA transactions. (Bug #64374, Bug #13737343)

    References: See also Bug #11766752.

  • If the --bind-address option was given a host name value and the host name resolved to more than one IP address, the server failed to start. For example, with --bind-address=localhost, if localhost resolved to both 127.0.0.1 and ::1, startup failed. Now the server prefers the IPv4 address in such cases. (Bug #61713, Bug #12762885)

  • Under some conditions, the effect of RENAME USER was not recognized until FLUSH PRIVILEGES was used (which should not be necessary). (Bug #61865, Bug #12766319)

  • The Performance Schema incorrectly displayed some backslashes in Windows file names (by doubling them). (Bug #63339, Bug #13417446)

  • SHOW statements treated stored procedure, stored function, and event names as case sensitive. (Bug #56224, Bug #11763507)

  • With lower_case_table_names=2 on systems with case-insensitive file systems such as Windows or Mac OS X, CREATE TABLE ... LIKE did not preserve lettercase of the destination table name as given in the statement. (Bug #64211, Bug #13702397)

  • MySQL was overly agressive in enforcing the NO_ZERO_DATE and NO_ZERO_IN_DATE SQL modes for default values in column definitions for CREATE TABLE and ALTER TABLE statements. Previously, default dates that were invalid with those SQL modes enabled produced an error, even when strict mode was not enabled. Now with NO_ZERO_DATE or NO_ZERO_IN_DATE enabled, invalid default dates produce a warning if strict SQL mode is not enabled, and an error if strict mode is enabled. (Bug #34280, Bug #11747847)

  • mysql_store_result() and mysql_use_result() are not for use with prepared statements and are not intended to be called following mysql_stmt_execute(), but failed to return an error when invoked that way in libmysqld. (Bug #62136, Bug #13738989)

    References: See also Bug #47485.

  • For ALTER TABLE with the IGNORE keyword, IGNORE is now part of the information provided to the storage engine. It is up to the storage engine whether to use this when choosing between the in-place or copy algorithm for altering the table. For InnoDB index operations, IGNORE is not used if the index is unique, so the copy algorithm is used. (Bug #40344, Bug #11750045)

  • Some Czech error messages contained invalid characters. (Bug #64310, Bug #13726075)

  • A multiple-table UPDATE with the IGNORE keyword resulted in an inappropriate and not meaningful Got error 0 from storage engine message. (Bug #49539, Bug #11757486)

  • SHOW TABLES was very slow unless the required information was already in the disk cache. (Bug #60961, Bug #12427262)

  • File access by the ARCHIVE storage engine was not instrumented and thus not shown in Performance Schema tables. (Bug #63340, Bug #13417440)

  • An inappropriate mutex was used to protect random number generation, causing contention during connect operations. (Bug #62282, Bug #12951609)

  • mysqlbinlog exited with no error code if file write errors occurred. (Bug #55289, Bug #11762667)

  • On Windows, the mysql client crashed when invoked using its full path name. (Bug #60858, Bug #12402882)

  • Due to a race condition, it was possible for two threads to end up with the same query ID for different queries. (Bug #58785, Bug #11765785)

  • The server crashed at shutdown if the slow query log file was a named pipe. (Bug #64345, Bug #13733221)

  • Using CONCAT() to construct a pattern for a LIKE pattern match could result in memory corrupting and match failure. (Bug #59140, Bug #11766101)

  • For debug builds, errors occurring during processing of INSERT DELAYED statements could crash the server. (Bug #60114, Bug #11827404)

  • When an ALTER TABLE operation was performed with an invalid foreign key constraint, the error reported was ER_CANT_CREATE_TABLE rather than ER_CANNOT_ADD_FOREIGN. (Bug #64617, Bug #13840553)

  • yaSSL rejected valid SSL certificates that OpenSSL accepts. (Bug #54348, Bug #11761822)

  • A regression bug in the optimizer could cause excessive disk usage for UPDATE statements on InnoDB tables. For tables created with innodb_file_per_table enabled, OPTIMIZE TABLE can be used to recover excessive space used. For tables created in the InnoDB system tablespace,it is necessary to perform a dump and restore into a new instance of the system tablespace. (Bug #65745, Bug #14248833)

  • Sessions could end up deadlocked when executing a combination of SELECT, DROP TABLE, KILL, and SHOW ENGINE INNODB STATUS. (Bug #60682, Bug #12636001)

  • For queries with range predicates, the optimizer could miscalculate the number of key parts used, possibly leading to a server crash. (Bug #58731, Bug #11765737)

  • Parse errors that occurred while loading UCA or LDML collation descriptions were not written to the error log. (Bug #65593, Bug #14197426)

  • The optimizer could chose a worse execution plan for a condition that used a quoted number compared to the unquoted number. (Bug #43319, Bug #11752201)

  • When a query was killed, the error code was not always properly propagated up through the server code. (Bug #43353, Bug #11752226)

  • LEFT JOIN on derived tables was very slow. This is now addressed through the use of subquery materialization. (Bug #34364, Bug #11747876)

  • Queries that used WHERE (col1, col2) IN ((const, const)) were optimized for SELECT, but not for DELETE or UPDATE. (Bug #43187, Bug #11752097)

  • If an account had a nonzero MAX_USER_CONNECTIONS value, that value was not always respected. (Bug #65104, Bug #14003080)

  • If the server held a global mutex while doing network I/O, client disconnections could be slow. (Bug #53096, Bug #11760669)

  • On Windows, mysqlslap crashed for attempts to connect using shared memory. (Bug #31173, Bug #11747181, Bug #59107, Bug #11766072)

  • During the startup process, mysqld could incorrectly remove the PID file of an already running mysqld. (Bug #23790, Bug #11746142)

  • For Microsoft Windows, the deprecated MySQL Configuration Wizard is no longer distributed, and instead the newer MySQL Installer is available and preferred.

  • Using ALTER TABLE to add a TIMESTAMP column containing DEFAULT CURRENT_TIMESTAMP in the definition resulted in a column containing '0000-00-00 00:00:00', not the current timestamp. (Bug #17392, Bug #11745578)

  • For table or database names that are longer than 64 characters, the error Incorrect table name was returned rather than Identifier too long. (Bug #25168, Bug #11746295)

  • Redundant Specified key was too long messages could be produced by index-creation operations. (Bug #31149, Bug #11747177)

  • Code for the storage engine API did not check the return value from the ha_rnd_init(), ha_index_init(), and index_init() functions. (Bug #26040, Bug #11746399, Bug #54166, Bug #11761652)

D.1.6. Changes in MySQL 5.6.5 (2012-04-10, Milestone 8)

Note

This is a milestone release, for use at your own risk. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward.

Beginning with MySQL 5.6.5, Oracle no longer provides binaries for Mac OS X 10.5. This aligns with Apple no longer providing updates or support for this platform.

Data Type Notes

Replication with GTIDs

  • Important Change: Replication: This release introduces global transaction identifiers (GTIDs) for MySQL Replication. A GTID is a unique identifier that is assigned to each transaction as it is committed; this identifier is unique on the MySQL Server where the transaction originated, as well as across all MySQL Servers in a given replication setup. Because GTID-based replication depends on tracking transactions, it cannot be employed with tables that employ a nontransactional storage engine such as MyISAM; thus, it is currently supported only with InnoDB tables.

    Because each transaction is uniquely identified, it is not necessary when using GTIDs to specify positions in the master's binary log when starting a new slave or failing over to a new master. This is reflected in the addition of a new MASTER_AUTO_POSITION option for the CHANGE MASTER TO statement which takes the place of the MASTER_LOG_FILE and MASTER_LOG_POS options when when executing this statement to prepare a MySQL Server to act as a replication slave.

    To enable GTIDs on a MySQL Server, the server must be started with the options --gtid-mode=ON --disable-gtid-unsafe-statements --log-bin --log-slave-updates. These options are needed whether the server acts as a replication master or as a replication slave; the --gtid-mode and --disable-gtid-unsafe-statements options are new in this release. Once the master and slave have each been started with these options, it is necessary only to issue a CHANGE MASTER TO ... MASTER_AUTO_POSITION=1 followed by START SLAVE on the slave to start replication.

    A number of new server system variables have also been added for monitoring GTID usage. For more information about these options and variables, see Section 16.1.4.5, “Global Transaction ID Options and Variables”.

    As part of these changes, three new mysqlbinlog options—--include-gtids, --exclude-gtids, and --skip-gtids—have been added for reading binary logs produced when the server participates in replication with GTIDs.

    Important

    Due to an issue discovered just prior to release, you cannot import a dump made using mysqldump from a MySQL 5.5 server to a MySQL 5.6.5 server and then use mysqlupgrade on the MySQL 5.6.5 server while GTIDs are enabled; doing so makes it impossible to connect to the server normally following the upgrade. Instead, you should import the dump and run mysqlupgrade while the MySQL 5.6.5 server is running with --gtid-mode=OFF, then restart it with --gtid-mode=ON. (Bug #13833710) (mysqlupgrade can be executed when the server is running with --gtid-mode set either to OFF, or to ON.)

    For additional information about GTIDs and setting up GTID-based replication, see Section 16.1.3, “Replication with Global Transaction Identifiers”.

Host Cache Notes

  • MySQL now provides more information about the causes of errors that occur when clients connect to the server, as well as improved access to the host cache, which contains client IP address and host name information and is used to avoid DNS lookups. These changes have been implemented:

    • New Connection_errors_xxx status variables provide information about connection errors that do not apply to specific client IP addresses.

    • The host cache has additional counters to track errors that do apply to specific IP addresses.

    • A new host_cache Performance Schema table exposes the contents of the host cache so that it can be examined using SELECT statements. Access to host cache contents makes it possible to answer questions such as how many hosts are cached, what kinds of connection errors are occurring for which hosts, or how close host error counts are to reaching the max_connect_errors system variable limit. The Performance Schema must be enabled or this table is empty.

      If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change into the performance_schema database.

    • The host cache size now is configurable using the host_cache_size system variable. Setting the size to 0 disables the host cache.This is similar to disabling the cache by starting the server with --skip-host-cache, but using host_cache_size is more flexible because it can also be used to resize, enable, or disable the host cache at runtime, not just at server startup. If you start the server with --skip-host-cache, the host cache cannot be re-enabled at runtime.

    For more information, see Section 8.11.5.2, “DNS Lookup Optimization and the Host Cache”, and Section 20.9.9.1, “The host_cache Table”. (Bug #22821, Bug #24906, Bug #45817, Bug #59404, Bug #11746048, Bug #11746269, Bug #11754244, Bug #11766316)

Optimizer Features

  • These query optimizer improvements were implemented:

    • The EXPLAIN statement now can produce output in JSON format. To select this, use EXPLAIN FORMAT = JSON explainable_stmt syntax. With FORMAT = JSON, the output includes regular EXPLAIN information, as well as extended and partition information.

      Traditional EXPLAIN output has also changed so that empty columns contain NULL rather the empty string. In addition, UNION RESULT rows have Using filesort in the Extra column because a temporary table is used to buffer UNION results.

      To work for both Optimizer Trace and JSON-format EXPLAIN output, the end_marker parameter for the optimizer_trace system variable has been moved to a separate end_markers_in_json system variable. This is an incompatible change to the optimizer_trace variable. For more information, see MySQL Internals: Tracing the Optimizer.

    • The optimizer tries to find the best query execution plan by beginning with the most promising table and recursively adding to the plan the most promising of the remaining tables. Partial execution plans with a higher cost than an already found plan are pruned. The optimizer now attempts to improve the order in which it adds tables to the plan, resulting in a reduction of the number of partial plans considered.

      Queries that are likely to have improved performance are joins of many tables, where most tables use eq_ref or ref join types (as indicated by EXPLAIN output).

      A new status variable, Last_query_partial_plans, counts the number of iterations the optimizer makes in execution plan construction for the previous query.

    • The optimizer uses semi-join and materialization strategies to optimize subquery execution. See Section 8.13.15.1, “Optimizing Subqueries with Semi-Join Transformations”, and Section 8.13.15.2, “Optimizing Subqueries with Subquery Materialization”. In addition, the Batched Key Access (BKA) Join and Block Nested-Loop (BNL) Join algorithms used for inner join and outer join operations have been extended to support semi-join operations. For more information, see Section 8.13.11, “Block Nested-Loop and Batched Key Access Joins”.

      Several flags have been added to the optimizer_switch system variable to enable control over semi-join and subquery materialization strategies. The semijoin flag controls whether semi-joins are used. If it is set to on, the firstmatch and loosescan flags enable finer control over the permitted semi-join strategies. The materialization flag controls whether subquery materialization is used. If semijoin and materialization are both on, semi-joins also use materialization where applicable. These flags are on by default. See Section 8.8.5.2, “Controlling Switchable Optimizations”.

    • For expressions such as col_name IN(values) that compare a column to a list of values, the optimizer previously made row estimates using index dives for each value in the list. This becomes inefficient as the number of values becomes large. The optimizer now can make row estimates for such expressions using index statistics instead, which is less accurate but quicker for a large number of values. The point at which the optimizer switches from index dives to index statistics is configurable using the new eq_range_index_dive_limit system variable. For more information, see Section 8.13.1.3, “Equality Range Optimization of Many-Valued Comparisons”.

Performance Schema Notes

  • The Performance Schema has these additions:

    • The Performance Schema now has a host_cache table that exposes the contents of the host cache so that it can be examined using SELECT statements. See Host Cache Notes elsewhere in this changelog.

    • The Performance Schema now maintains statement digest information. This normalizes and groups statements with the same signature and permits questions to be answered about the types of statements the server is executing and how often they occur.

    If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the performance_schema database.

    For more information, see Chapter 20, MySQL Performance Schema.

Functionality Added or Changed

  • Security Fix: Passwords stored in the older format used before MySQL 4.1 are now deprecated, and the secure_auth system variable is enabled by default to prevent connections using accounts that have passwords stored in the old format. To permit such connections, start the server with --skip-secure-auth. (Bug #13586336)

  • Security Fix: MySQL client programs now issue a warning if a password is given on the command line that this can be insecure.

  • Incompatible Change: The obsolete OPTION modifier for the SET statement has been removed.

  • InnoDB: --ignore-builtin-innodb is now ignored if used. (Bug #13586262)

  • The MySQL-shared-compat RPM package enables users of Red Hat-provided mysql-*-5.1 RPM packages to migrate to Oracle-provided MySQL-*-5.5 packages. MySQL-shared-compat now replaces the Red Hat mysql-libs package by replacing libmysqlclient.so files of the latter package, thus satisfying dependencies of other packages on mysql-libs. This change affects only users of Red Hat (or Red Hat-compatible) RPM packages. Nothing is different for users of Oracle RPM packages. (Bug #13867506)

  • Temporary tables for INFORMATION_SCHEMA queries now use dynamic MyISAM row format if they contain sufficiently large VARCHAR columns, resulting in space savings. (Bug #13627632)

  • 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)

  • As of MySQL 5.5.3, the LOW_PRIORITY modifier for LOCK TABLES ... LOW_PRIORITY WRITE has no effect. This modifier is now deprecated. Its use should be avoided and now produces a warning. Use LOCK TABLES ... WRITE instead. (Bug #13586314)

  • If the log_queries_not_using_indexes system variable is enabled, slow queries that do not use indexes are written to the slow query log. In this case, it is now possible to put a logging rate limit on these queries by setting the new log_throttle_queries_not_using_indexes system variable, so that the slow query log does not grow too quickly. By default, this variable is 0, which means there is no limit. Positive values impose a per-minute limit on logging of queries that do not use indexes. The first such query opens a 60-second window within which the server logs queries up to the given limit, then suppresses additional queries. If there are suppressed queries when the window ends, the server logs a summary that indicates how many there were and the aggregate time spent in them. The next 60-second window begins when the server logs the next query that does not use indexes. (Bug #55323, Bug #11762697)

  • 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)

  • The mysql client now supports an --init-command=str option. The option value is an SQL statement to execute after connecting to the server. If auto-reconnect is enabled, the statement is executed again after reconnection occurs. (Bug #45634, Bug #11754087)

  • Several subquery performance issues were resolved through the implementation of semi-join subquery optimization strategies. See Section 8.13.15.1, “Optimizing Subqueries with Semi-Join Transformations”. (Bug #47914, Bug #11756048, Bug #58660, Bug #11765671, Bug #10815, Bug #11745162, Bug #9021, Bug #13519134, Bug #48763, Bug #11756798, Bug #25130, Bug #11746289)

  • New utf8_general_mysql500_ci and ucs2_general_mysql500_ci collations have been added that preserve the behavior of utf8_general_ci and ucs2_general_ci from versions of MySQL previous to 5.1.24. Bug #27877 corrected an error in the original collations but introduced an incompatibility for columns that contain German 'ß' LATIN SMALL LETTER SHARP S. (As a result of the fix, that character compares equal to characters with which it previously compared different.) A symptom of the problem after upgrading to MySQL 5.1.24 or newer from a version older than 5.1.24 is that CHECK TABLE produces this error:

    Table upgrade required.
    Please do "REPAIR TABLE `t`" or dump/reload to fix it!

    Unfortunately, REPAIR TABLE could not fix the problem. The new collations permit older tables created before MySQL 5.1.24 to be upgraded to current versions of MySQL.

    To convert an affected table after a binary upgrade that leaves the table files in place, alter the table to use the new collation. Suppose that the table t1 contains one or more problematic utf8 columns. To convert the table at the table level, use a statement like this:

    ALTER TABLE t1
    CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci;

    To apply the change on a column-specific basis, use a statement like this (be sure to repeat the column definition as originally specified except for the COLLATE clause):

    ALTER TABLE t1
    MODIFY c1 CHAR(N) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci;

    To upgrade the table using a dump and reload procedure, dump the table using mysqldump, modify the CREATE TABLE statement in the dump file to use the new collation, and reload the table.

    After making the appropriate changes, CHECK TABLE should report no error.

    For more information, see Section 2.11.3, “Checking Whether Tables or Indexes Must Be Rebuilt”, and Section 2.11.4, “Rebuilding or Repairing Tables or Indexes”. (Bug #43593, Bug #11752408)

  • MySQL distributions no longer include the GPL readline input-editing library. This results in simpler maintenance and support, and simplifies licensing considerations.

  • The SET TRANSACTION and START TRANSACTION statements now support READ WRITE and READ ONLY modifiers to set the transaction access mode for tables used in transactions. The default mode is read/write, which is the same mode as previously. Read/write mode now may be specified explicitly with the READ WRITE modifier. Using READ ONLY prohibits table changes and may enable storage engines to make performance improvements that are possible when changes are not permitted.

    In addition, the new --transaction-read-only option and tx_read_only system variable permit the default transaction access mode to be set at server startup and runtime.

    For more information, see Section 13.3.6, “SET TRANSACTION Syntax”, and Section 13.3.1, “START TRANSACTION, COMMIT, and ROLLBACK Syntax”.

Bugs Fixed

  • Performance: InnoDB: The optimizer now takes into account InnoDB page sizes other than 16KB, which can be configured with the innodb_page_size option when creating a MySQL instance. This change improves the estimates of I/O costs for queries on systems with non-default InnoDB page sizes. (Bug #13623078)

  • Performance: InnoDB: Memory allocation for InnoDB tables was reorganized to reduce the memory overhead for large numbers of tables or partitions, avoiding situations where the resident set size could grow regardless of FLUSH TABLES statements. 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: Replication: CHANGE MASTER TO statements were written into the error log using quoted numeric values, although the syntax for this statement does not allow such option values to be quoted. This meant that such statements could not be copied from the error log and re-run verbatim. Now CHANGE MASTER TO statements are written to the error log without the extraneous quotation marks, and so are syntactically correct as logged.

  • Incompatible Change: A change in MySQL 5.6.3 caused LAST_DAY() to be more strict and reject incomplete dates with a day part of zero. For this function, a nonzero day part is not necessary, so the change has been reverted. (Bug #13458237)

  • Important Change: InnoDB: When a row grew in size due to an UPDATE operation, other (non-updated) columns could be moved to off-page storage so that information about the row still fit within the constraints of the InnoDB page size. The pointer to the new allocated off-page data was not set up until the pages were allocated and written, potentially leading to lost data if the system crashed while the column was being moved out of the page. The problem was more common with tables using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED along with the Barracuda file format, particularly with the innodb_file_per_table setting enabled, because page allocation operations are more common as the .ibd tablespace files are extended. Still, the problem could occur with any combination of InnoDB version, file format, and row format.

    A related issue was that during such an UPDATE operation, or an INSERT operation that reused a delete-marked record, other transactions could see invalid data for the affected column, regardless of isolation level.

    The fix corrects the order of operations for moving the column data off the original page and replacing it with a pointer. Now if a crash occurs at the precise moment when the column data is being transferred, the transfer will not be re-run during crash recovery.

    In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #13721257, Bug #12612184, Bug #12704861)

  • Important Change: Partitioning: The query cache did not always function correctly with partitioned tables in a transactional context. For this reason, the query cache is now disabled for any queries using partitioned tables, and such queries can no longer be cached. For more information, see Section 17.6, “Restrictions and Limitations on Partitioning”. (Bug #11761296, Bug #53775)

  • Important Change: Replication: The CHANGE MASTER TO statement was not checked for invalid characters in values for options such as MASTER_HOST and MASTER_USER. In addition, when the server was restarted, a value containing certain characters was trimmed, causing the loss of its original value. Now such values are validated, and in cases where the value contains invalid characters, including linefeed (\n or 0x0A) characters, the statement fails with an error (ER_MASTER_INFO). (Bug #11758581, Bug #50801)

  • 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-bin or --relay-log values).

    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-bin or --relay-log option. 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: If InnoDB was started with innodb_force_recovery set to a value of 3 or 4, and there are transactions to roll back, normal shutdown would hang waiting for those transactions to complete. Now the shutdown happens immediately, without rolling back any transactions, because non-zero values for innodb_force_recovery are only appropriate for troubleshooting and diagnostic purposes. (Bug #13628420)

  • InnoDB: The MySQL server could hang in some cases if the configuration option innodb_use_native_aio was turned off. (Bug #13619598)

  • InnoDB: 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: A DDL operation such as ALTER TABLE ... ADD COLUMN could stall, eventually timing out with an Error 1005: Can't create table message referring to fil_rename_tablespace. (Bug #13636122, Bug #62100, Bug #63553)

  • InnoDB: The configuration option innodb_sort_buf_size was renamed to innodb_sort_buffer_size for consistency. This work area is used while creating an InnoDB index. (Bug #13610358)

  • InnoDB: A Valgrind error was fixed in the function os_aio_init(). (Bug #13612811)

  • InnoDB: The server could crash when creating an InnoDB temporary table under Linux, if the $TMPDIR setting points to a tmpfs filesystem and innodb_use_native_aio is 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_aio setting or use a different temporary directory. The fix causes InnoDB to turn off the innodb_use_native_aio setting automatically if it detects that the temporary file directory does not support asynchronous I/O. (Bug #13593888, Bug #11765450, Bug #58421)

  • InnoDB: During startup, the status variable Innodb_buffer_pool_dump_status could be empty for a brief time before being initialized to the correct value not started. (Bug #13513676)

  • InnoDB: Valgrind errors when referencing the internal function buf_LRU_scan_and_free_block() were fixed. (Bug #13491704)

  • InnoDB: 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 InnoDB change buffer. The workaround was to set the configuration option innodb_change_buffering=inserts. (Bug #13413535, Bug #61104)

  • InnoDB: The MySQL error log could contain messages like:

    InnoDB: Ignoring strange row from mysql.innodb_index_stats WHERE ...

    The fix makes the contents of the innodb_index_stats and innodb_table_stats tables case-sensitive, to properly distinguish the statistics for tables whose names differ only in letter case. Other cases were fixed where the wrong name could be selected for an index while retrieving persistent statistics. (Bug #13432465)

  • InnoDB: References to C preprocessor symbols and macros HAVE_purify, UNIV_INIT_MEM_TO_ZERO, and UNIV_SET_MEM_TO_ZERO were removed from the InnoDB source code. They were only used in debug builds instrumented for Valgrind. They are replaced by calls to the UNIV_MEM_INVALID() macro. (Bug #13418934)

  • InnoDB: Certain CREATE TABLE statements could fail for InnoDB child tables containing foreign key definitions. This problem affected Windows systems only, with the setting lower_case_table_names=0. It was a regression from MySQL bug #55222. (Bug #13083023, Bug #60229)

  • InnoDB: When doing a live downgrade from MySQL 5.6.4 or later, with innodb_page_size set 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: If the server crashed during a TRUNCATE TABLE or CREATE INDEX statement for an InnoDB table, or a DROP DATABASE statement for a database containing InnoDB tables, an index could be corrupted, causing an error message when accessing the table after restart:

    InnoDB: Error: trying to load index index_name for table table_name
    InnoDB: but the index tree has been freed!
    

    In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #12861864, Bug #11766019)

  • InnoDB: A DDL operation for an InnoDB table 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 InnoDB undo slots increased the number of simultaneous transactions (corresponding to the number of undo slots) from 1K to 128K. (Bug #12739098, Bug #62401)

  • InnoDB: InnoDB persistent statistics gave less accurate estimates for date columns than for columns of other data types. The fix changes the way cardinality is estimated for nonunique keys, and avoids situations where identical values could be counted twice if they occurred on different index pages. (Bug #12429443)

  • InnoDB: With 1024 concurrent InnoDB transactions running concurrently and the innodb_file_per_table setting enabled, a CREATE TABLE operation for an InnoDB table could fail. The .ibd file from the failed CREATE TABLE was left behind, preventing the table from being created later, after the load had dropped.

    The fix adds error handling to delete the erroneous .ibd file. This error was less likely to occur in MySQL 5.5 and 5.6, because raising the number of InnoDB undo slots increased the number of simultaneous transactions needed to trigger the bug, from 1K to 128K. (Bug #12400341)

  • InnoDB: Improved the accuracy of persistent InnoDB statistics for large tables. The estimate of distinct records could be inaccurate if the index tree was more than 3 levels deep. (Bug #12316365)

  • InnoDB: Shutdown could hang with messages like this in the log:

    Waiting for purge thread  to be suspended 

    After 1 hour, the shutdown times out and mysqld quits. This problem is most likely to occur with a high value for innodb_purge_threads. (Bug #11765863, Bug #58868, Bug #60939)

  • InnoDB: When DROP TABLE failed due to all undo slots being in use, the error returned was Unknown table '...' rather than the expected Too many active concurrent transactions. (Bug #11764724, Bug #57586)

    References: See also Bug #11764668, Bug #57529.

  • InnoDB: Server startup could produce an error for temporary tables using the InnoDB storage engine, if the path in the $TMPDIR variable 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 .frm file to tmpdir under the name mentioned in the error message (for example, #sql123.frm) and restart mysqld with tmpdir set to its normal value without a trailing slash, for example /var/tmp. On startup, MySQL would see the .frm file and issue DROP TABLE for the orphaned temporary table. (Bug #11754376, Bug #45976)

  • Partitioning: When creating a view from a SELECT statement that used explicit partition selection, the partition selection portion of the query was ignored. (Bug #13559657)

  • Partitioning: Adding a partition to an already existing LIST-partitioned table did not work correctly if the number of items in the new partition was greater than 16. This could happen when trying to add a partition using an ALTER TABLE ... ADD PARTITION statement, or an ALTER TABLE ... REORGANIZE PARTITION statement.

    This 16-item limit was not apparent when using either CREATE TABLE ... PARTITION BY LIST or ALTER TABLE ... PARTITION BY LIST. (Bug #13029508, Bug #62505)

  • Partitioning: A function internal to the code for finding matching subpartitions represented an unsigned number as signed, with the result that matching subpartitions were sometimes missed in results of queries. (Bug #12725206, Bug #61765)

    References: See also Bug #20257.

  • Partitioning: An ALTER TABLE ... ADD PARTITION statement subsequent to ALTER TABLE ... REORGANIZE PARTITION failed on a table partitioned by HASH or KEY. (Bug #11764110, Bug #56909)

  • Replication: Executing mysqlbinlog with the --start-position=N option, where N was 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: When starting the server, replication repositories were checked even when the --server-id was equal to 0 (the default), in spite of the fact that a valid nonzero value for --server-id must be supplied for a server that acts as either a master or a slave in MySQL replication.

    This could cause problems when trying to perform a live upgrade from MySQL 5.5, although it was possible to work around the issue by starting the server with --skip-slave-start (in addition to any other required options).

    To avoid this problem, replication repositories are now checked only when the server is started with --server-id using a nonzero value. (Bug #13427444, Bug #13504821)

  • Replication: Formerly, the default value shown for the Port column in the output of SHOW SLAVE HOSTS was 3306 whether the port had been set incorrectly or not set at all. Now, when the slave port is not set, the actual port used by the slave is shown. This change also affects the default shown for the --report-port server option. (Bug #13333431)

  • Replication: A race condition could occur when running multiple instances of mysqld on a single machine, when more than slave thread was started at the same time, and each such thread tried to use the same temporary file concurrently. (Bug #12844302, Bug #62055)

  • Replication: mysqlbinlog --database=dbname included all SET INSERT_ID=n assignments from the binary log in its output, even if database dbname was never referenced in the binary log. This was due to the fact that COMMIT statements were not associated with any database in the binary log. Now in such cases, the current database is tracked so that only those SET INSERT_ID assignments that are made in the context of changes to tables in database dbname are actually printed in the mysqlbinlog output. (Bug #11746146, Bug #23894)

    References: See also Bug #23890, Bug #46998, Bug #11761686, Bug #54201, Bug #11754117, Bug #45670.

  • Replication: Statements that wrote to tables with AUTO_INCREMENT columns based on an unordered SELECT from 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 any INSERT ... SELECT, REPLACE ... SELECT, or CREATE TABLE ... SELECT statement. 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 is MIXED. (Bug #11758263, Bug #50440)

  • Replication: On Windows replication slave hosts, STOP SLAVE took an excessive length of time to complete when the master was down. (Bug #11752315, Bug #43460)

  • The optimizer did not perform constant propagation for views, so a query containing views resulted in a less efficient execution plan than the corresponding query using only base tables. (Bug #13783777)

  • After using an ALTER TABLE statement to change the KEY_BLOCK_SIZE property for an InnoDB table, for example when switching from an uncompressed to a compressed table, subsequent server restarts could fail with a message like:

    InnoDB: Error: data file path/ibdata2 uses page size 1024, 
    InnoDB: but the only supported page size in this release is=16384
    

    This issue is a regression introduced in MySQL 5.5.20. (Bug #13698765, Bug #64160)

  • _mi_print_key() iterated one time too many when there was a NULL bit, resulting in Valgrind warnings. (Bug #13686970)

  • In debug builds, a Debug Sync timeout warning was treated as an error, causing an assertion to be raised. (Bug #13688248)

  • A memory leak could occur for queries containing a subquery that used GROUP BY on an outer column. (Bug #13724099)

  • If during server startup a signal such as SIGHUP was caught prior to full server initialization, the server could crash. This was due to a race condition between the signal handler thread and the main thread performing server initialization. To prevent this from happening, signal processing is now suspended until full initialization of all server components has been completed successfully. (Bug #13608371, Bug #62311)

  • A SELECT from a subquery that returned an empty result could itself fail to return an empty result as expected. (Bug #13651009, Bug #13650418)

  • An aggregated expression of type MIN() or MAX() should return NULL but could instead return the empty set if the query was implicitly grouped and there was no HAVING clause that evaluates to FALSE. (Bug #13599013)

  • The shared version of libmysqlclient did not export these functions for linking by client programs: get_tty_password(), handle_options(), my_print_help(). (Bug #13604121)

  • For debug builds, negative values with a zero integer part and nonzero fractional part (such as -0.1111) were not detected, so the negative fractional part was later cast to a large unsigned number and raised an assertion. (Bug #13616434)

  • Pushing down to InnoDB an index condition that called a stored function resulted in a server crash. This kind of condition is no longer pushed down. (Bug #13655397)

  • Date-handling code could raise an assertion attempting to calculate the number of seconds since the epoch. (Bug #13545236)

  • Left join queries could be incorrectly converted to inner joins and return erroneous result sets. (Bug #13595212)

  • Converting a string ending with a decimal point (such as '1.') to a floating-point number raised a data truncation warning. (Bug #13500371)

  • The Performance Schema instrumentation for stages did not fully honor the ENABLED column in the schema.setup_instruments table. (Bug #13509513)

  • SELECT statements failed for the EXAMPLE storage engine. (Bug #13511529)

    References: This bug was introduced by Bug #11746275.

  • For queries that used a join type of ref_or_null, the optimizer could skip the filesort operation and sort the results incorrectly. (Bug #13531865)

  • For some queries, a filesort operation was done even when the result contained only a single row and needed no sorting. (Bug #13529048)

  • The optimizer could return an incorrect select limit in some cases when a query included no explicit LIMIT clause. (Bug #13528826)

  • In some cases, the optimizer failed to use a covering index when that was possible and read data rows instead. (Bug #13514959)

  • Use of an uninitialized TABLE_SHARE member could cause a server crash. (Bug #13489996)

  • A query that used an index on a CHAR column referenced in a BETWEEN clause could return invalid results. (Bug #13463488, Bug #63437)

  • Expressions that compared a BIGINT column 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, or BETWEEN yielding false positive or negative results. (Bug #13463415, Bug #11758543, Bug #63502, Bug #50756)

  • Enabling index condition pushdown could cause performance degradation. (Bug #13430436)

  • For debug builds, enabling optimizer_trace could cause an assertion to be raised. (Bug #13430443)

  • When the optimizer performed conversion of DECIMAL values while evaluating range conditions, it could produce incorrect results. (Bug #13453382)

  • On Windows, rebuilds in a source distribution failed to create the initial database due to insufficient cleanup from the previous run or failure to find the proper server executable. (Bug #13431251)

  • An application linked against libmysqld could crash in debug mode with a stack smashing detected error if it tried to connect without specifying the user name. (Bug #13460909)

  • Implicitly grouped queries with a const table and no matching rows could return incorrect results. (Bug #13430588)

  • Some outer joins that used views as inner tables did not evaluate conditions correctly. (Bug #13464334)

  • Instantiating a derived table for a query with an empty result caused a server crash. (Bug #13457552)

  • Temporary MyISAM tables (unlike normal MyISAM tables) did not use the dynamic row format when they contained VARCHAR columns, resulting in larger temporary files (and more file I/O) than necessary. (Bug #13350136)

  • When a fixed-width row was inserted into a MyISAM temporary table, the entire content of the record buffer was written to the table, including any trailing space contained in VARCHAR columns, the issue being that this trailing space could be uninitialized. This problem has been resolved by insuring that only the bytes actually used to store the VARCHAR (and none extra) are copied and inserted in such cases. (Bug #13389854)

  • When merging ranges that effectively resulted in a full index scan, the optimizer did not discard the range predicate as unneeded. (Bug #13354910)

  • Fractional seconds parts were lost for certain UNION ALL queries. (Bug #13375823)

  • When executing EXPLAIN, it was assumed that only the default multi-range read implementation could produce an ordered result; this meant that when a query on a table that used a storage engine providing its own sorted MRR, it was ignored, so that EXPLAIN failed to report Using MRR even when a multi-range read was used. (Bug #13330645)

  • Performance Schema idle event timings were not normalized to the same units as wait timings. (Bug #13018537)

  • In MySQL 5.6.3, a number of status variables were changed to longlong types so that they would roll over much later. However, the format string used by mysqladmin status to print Queries per second values did not reflect this, causing such values to be misreported. (Bug #12990746)

    References: See also Bug #42698. This bug was introduced by Bug #11751727.

  • For debug builds, two assertions could be raised erroneously for UPDATE statements. (Bug #12912171)

  • When the result of a stored function returning a non-integer type was evaluated for NULL, an incorrect type warning (Warning 1292 Truncated incorrect INTEGER value) is generated, although such a test for NULL should work with any type. This could cause stored routines not handling the warning correctly to fail.

    The issue could be worked around by wrapping the result in an expression, using a function such as CONCAT(). (Bug #12872824, Bug #62125)

  • A query that used an aggregate function such as MAX() or MIN() of an index with NOT BETWEEN in the WHERE clause could fail to match rows, thus returning an invalid result. (Bug #12773464, Bug #61925)

  • When running mysqldump with both the --single-transaction and --flush-logs options, the flushing of the log performed an implicit COMMIT (see Section 13.3.3, “Statements That Cause an Implicit Commit”), causing more than one transaction to be used and thus breaking consistency. (Bug #12809202, Bug #61854)

  • With ONLY_FULL_GROUP_BY SQL mode enabled, columns that were not aggregated in the the select list or named in a GROUP BY were incorrectly permitted in ORDER BY. (Bug #12626418)

  • Mishandling of NO_BACKSLASH_ESCAPES SQL mode within stored procedures on slave servers could cause replication failures. (Bug #12601974)

  • With ONLY_FULL_GROUP_BY SQL mode enabled, a query that uses GROUP BY on a column derived from a subquery in the FROM clause failed with a column isn't in GROUP BY error, if the query was in a view. (Bug #11923239)

  • Attempting to execute ALTER TABLE on a temporary MERGE table having an underlying temporary table rendered the MERGE table unusable, unless the ALTER TABLE specified a new list of underlying tables. (Bug #11764786, Bug #57657)

  • It was possible on replication slaves where FEDERATED tables were in use to get timeouts on long-running operations, such as Error 1160 Got an error writing communication packets. The FEDERATED tables did not need to be replicated for the issue to occur. (Bug #11758931, Bug #51196)

    References: See also Bug #12896628, Bug #61790.

  • When used with the --xml option, mysqldump --routines failed to dump any stored routines, triggers, or events. (Bug #11760384, Bug #52792)

  • A HAVING clause in a query using MIN() or MAX() was sometimes ignored. (Bug #11760517, Bug #52935)

    References: See also Bug #11758970, Bug #51242, Bug #11759718, Bug #52051.

  • Previously, .OLD files were not included among the files deleted by DROP DATABASE. Files with this extension are now also deleted by the statement. (Bug #11751736, Bug #42708)

  • A prepared statement using a view whose definition changed between preparation and execution continued to use the old definition, which could cause the prepared statement to return incorrect results. (Bug #11748352, Bug #36002)

  • 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)

  • 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)

  • The embedded server crashed when argc = 0. (Bug #57931, Bug #12561297)

  • Enabling myisam_use_mmap could cause the server to crash. (Bug #48726, Bug #11756764)

  • The handle_segfault() signal-handler code in mysqld could itself crash due to calling unsafe functions. (Bug #54082, Bug #11761576)

  • Stored functions could produce an error message that referred to ORDER BY even though the offending statement within the function had no such clause. (Bug #35410, Bug #11748187)

  • UPDATE IGNORE returned an incorrect count for number of rows updated when there were duplicate-key conflicts in a multiple-table update. (Bug #59715, Bug #11766576)

  • Locale information for FORMAT() function instances was lost in view definitions. (Bug #63020, Bug #13344643)

  • 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.

    The fix for this issue also introduces a new global server system variable stored_program_cache which can be used for controlling the size of the stored routine cache. (Bug #44585, Bug #11753187)

  • On Windows, the server incorrectly constructed the full path name of the plugin binary for INSTALL PLUGIN and CREATE FUNCTION ... SONAME. (Bug #45549, Bug #11754014)

  • 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)

  • myisam_sort_buffer_size could not be set larger than 4GB on 64-bit systems. (Bug #45702, Bug #11754145)

  • The optimizer mishandled STRAIGHT_JOIN used with nested joins; for example, by not evaluating tables in the specified order. (Bug #59487, Bug #11766384, Bug #43368, Bug #11752239, Bug #60080, Bug #11766858)

  • A subquery involved in a comparison requiring a character set conversion caused an error that resulted in a server crash. (Bug #59185, Bug #11766143)

  • mysqlhotcopy failed for databases containing views. (Bug #62472, Bug #13006947, Bug #12992993)

  • Assigning the result of a subquery to a user variable raised an assertion when the outer query included DISTINCT and GROUP BY. (Bug #57196, Bug #11764371)

  • On Windows, pasting multiple-line input including a CRLF terminator on the last line into the mysql client resulted in the first character of the last line being changed, resulting in erroneous statements. (Bug #60901, Bug #12589167)

  • Invalid memory reads could occur when cmp_item_sort_string::store_value() tried to refer to a temporary value that could be changed or deleted by other functions. (Bug #57510, Bug #11764651)

  • Due to improper locking, concurrent inserts into an ARCHIVE table at the same time as repair and check operations on the table resulted in table corruption. (Bug #37280, Bug #11748748)

  • For MEMORY tables, a scan of a HASH index on a VARCHAR column could fail to find some rows if the index was on a prefix of the column. (Bug #47704, Bug #11755870)

  • If tables were locked by LOCK TABLES ... READ in another session, SET GLOBAL read_only = 1 failed to complete. (Bug #57612, Bug #11764747)

  • The VIO description string was initialized even for connections where it was unneeded. (Bug #62285, Bug #12951586)

  • The contents of the shared and shared-compat RPM packages had been changed in versions 5.5.6 and 5.6.1 to avoid the overlap which they traditionally had (and still have in MySQL 5.0 and 5.1). However, the RPM meta information had not been changed in accordance, and so RPM still assumed a conflict between shared and shared-compat RPM packages. This has been fixed. (Bug #60855, Bug #12368215)

    References: See also Bug #56150.

  • The result of SUBSTRING_INDEX() could be missing characters when used as an argument to conversion functions such as LOWER(). (Bug #60166, Bug #11829861)

  • Some debugging information was written to the buffer after a flush, resulting in the information not appearing until the next flush. (Bug #64048, Bug #13608112)

  • A confusing CREATE TABLE error message was improved. (Bug #54963, Bug #11762377)

  • Under some circumstances, the result of SUBSTRING_INDEX() incorrectly depended on the contents of the previous row. (Bug #42404, Bug #11751514)

  • Setting an event to DISABLED status and with the ON COMPLETION NOT PRESERVE attribute caused it to be dropped at the next server restart. (Bug #37666, Bug #11748899)

  • For comparisons containing out-of-range constants, the optimizer permitted warnings to leak through to the client, even though it accounted for the range issue internally. (Bug #56962, Bug #11764155)

  • The decision about how to sort a result set could be reported incorrectly by EXPLAIN for some statements, causing Using filesort or Using temporary to be reported when they should not have been or vice versa. This could occur for statements that included index hints, that had the form SELECT SQL_BIG_RESULT ... GROUP BY, that used SQL_CALC_FOUND_ROWS with LIMIT, or that used GROUP BY, ORDER BY, and LIMIT.

D.1.7. Changes in MySQL 5.6.4 (2011-12-20, Milestone 7)

Note

This is a milestone release, for use at your own risk. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward.

Condition Handler Changes

  • Incompatible Change: MySQL now supports the GET DIAGNOSTICS statement. GET DIAGNOSTICS provides applications a standardized way to obtain information from the diagnostics area, such as whether the previous SQL statement produced an exception and what it was. For more information, see Section 13.6.7.3, “GET DIAGNOSTICS Syntax”.

    In addition several deficiencies in condition handler processing rules were corrected so that MySQL behavior is more like standard SQL:

    • Block scope is used in determining which handler to select. Previously, a stored program was treated as having a single scope for handler selection.

    • Condition precedence is more accurately resolved.

    • Diagnostics area clearing has changed. Bug #55843 caused handled conditions to be cleared from the diagnostics area before activating the handler. This made condition information unavailable within the handler. Now condition information is available to the handler, which can inspect it with the GET DIAGNOSTICS statement. The condition information is cleared when the handler exits, if it has not already been cleared during handler execution.

    • Previously, handlers were activated as soon as a condition occurred. Now they are not activated until the statement in which the condition occurred finishes execution, at which point the most appropriate handler is chosen. This can make a difference for statements that raise multiple conditions, if a condition raised later during statement execution has higher precedence than an earlier condition and there are handlers in the same scope for both conditions. Previously, the handler for the first condition raised would be chosen, even if it had a lower precedence than other handlers. Now the handler for the condition with highest precedence is chosen, even if it is not the first condition raised by the statement.

    • Issues that caused server crashes resulting from incorrect handler call stack processing were fixed.

    The work just described involved several condition-handler bug fixes:

    • The RETURN statement did not clear the diagnostics area as it should have. Now the diagnostics area is cleared before executing RETURN. This prevents a condition in a nested function call from incorrectly propagating to an outer scope. It also means there is no way to return an SQL warning from a stored function. This change is not backward compatible, but the resulting behavior is more like standard SQL.

    • When an SQL HANDLER was activated, the handled condition was immediately removed from the diagnostics area. Consequently, any SQL diagnostic statement executed in the handler was unable to examine the condition that triggered the handler.

    • If multiple handlers existed at the same level within a stored program, the wrong one could be chosen.

    • If an error occurred in a context where different handlers were present at different levels of nesting, an outer handler could be chosen rather than the innermost one.

    For more information, see Section 13.6.7.6, “Scope Rules for Handlers”. (Bug #12951117, Bug #38806, Bug #11749343, Bug #55852, Bug #11763171, Bug #61392, Bug #12652873, Bug #11660, Bug #11745196)

Fractional Seconds Handling

  • Incompatible Change: MySQL now permits fractional seconds for TIME, DATETIME, and TIMESTAMP values, with up to microseconds (6 digits) precision. To define a column that includes a fractional seconds part, use the syntax type_name(fsp), where type_name is TIME, DATETIME, or TIMESTAMP, and fsp is the fractional seconds precision. For example:

    CREATE TABLE t1 (t TIME(3), dt DATETIME(6));

    The fsp value, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part. If omitted, the default precision is 0. (This differs from the standard SQL default of 6, for compatibility with previous MySQL versions.)

    The following items summarize the implications of this change. See also Section 11.3.6, “Fractional Seconds in Time Values”.

    • For TIME, DATETIME, and TIMESTAMP columns, the encoding and storage requirements in new tables differ from such columns in tables created previously because these types now include a fractional seconds part.

    • Syntax for temporal literals now produces temporal values: DATE 'str', TIME 'str', and TIMESTAMP 'str', and the ODBC-syntax equivalents. The resulting value includes a trailing fractional seconds part if specified. Previously, the temporal type keyword was ignored and these constructs produced the string value. See Standard SQL and ODBC Date and Time Literals

    • Functions that take temporal arguments accept values with fractional seconds. Return values from temporal functions include fractional seconds as appropriate.

    • Three INFORMATION_SCHEMA tables, COLUMNS, PARAMETERS, and ROUTINES, now have a DATETIME_PRECISION column. Its value is the fractional seconds precision for TIME, DATETIME, and TIMESTAMP columns, and NULL for other data types.

    • The C API accommodates fractional seconds as follows:

      • In the MYSQL_FIELD column metadata structure, the decimals member indicates the fractional seconds precision for TIME, DATETIME, and TIMESTAMP columns. Clients can determine whether a result set temporal column has a fractional seconds part by checking for a nonzero decimals value in the corresponding MYSQL_FIELD structure. Previously, the decimals member indicated the precision for numeric columns and was zero otherwise.

      • In the MYSQL_TIME structure used for the binary protocol, the second_part member indicates the microseconds part for TIME, DATETIME, and TIMESTAMP columns. Previously, the second_part member was unused.

    In some cases, previously accepted syntax may produce different results. The following items indicate where existing code may need to be changed to avoid problems:

    • Some expressions produce results that differ from previous results. Examples: The timestamp system variable returns a value that includes a microseconds fractional part rather than an integer value. Functions that return a result that includes the current time (such as CURTIME(), SYSDATE(), or UTC_TIMESTAMP()) interpret an argument as an fsp value and the return value includes a fractional seconds part of that many digits. Previously, these functions permitted an argument but ignored it.

    • TIME values are converted to DATETIME by adding the time to the current date. (This means that the date part of the result differs from the current date if the time value is outside the range from '00:00:00' to '23:59:59'.) Previously, conversion of TIME values to DATETIME was unreliable. See Section 11.3.7, “Conversion Between Date and Time Types”.

    • TIMESTAMP(N) was permitted in old MySQL versions, but N was a display width rather than fractional seconds precision. Support for this behavior was removed in MySQL 5.5.3, so applications that are reasonably up to date should not be subject to this issue. Otherwise, code must be rewritten.

    Note

    There may be problems replicating from a master server that understands fractional seconds to an older slave that does not:

    • For CREATE TABLE statements containing columns that have an fsp value greater than 0, replication will fail due to parser errors.

    • Statements that use temporal data types with an fsp value of 0 will work for with statement-based logging but not row-based logging. In the latter case, the data types have binary formats and type codes on the master that differ from those on the slave.

    • Some expression results will differ on master and slave. For example, expressions that involve the timestamp system variable or functions that return the current time have different results, as described earlier.

    (Bug #8523, Bug #11745064)

InnoDB Notes

Optimizer Features

  • These query optimizer improvements were implemented:

    • The optimizer detects and optimizes away these useless query parts within IN/ALL/SOME/EXISTS subqueries:

      • DISTINCT

      • GROUP BY, if there is no HAVING clause and no aggregate functions

      • ORDER BY, which has no effect because LIMIT is not supported in these subqueries

Performance Schema Notes

  • The Performance Schema has these additions:

    • The Performance Schema now permits instrument and consumer configuration at server startup, which previously was possible only at runtime using UPDATE statements for the setup_instruments and setup_consumers tables. This change was made because configuration at runtime is too late to disable instruments that have already been initialized during server startup. For example, the wait/sync/mutex/sql/LOCK_open mutex is initialized once during server startup, so attempts to disable the corresponding instrument at runtime have no effect.

      To control an instrument at server startup, use an option of this form:

      --performance_schema_instrument='instrument_name=value'
      

      Here, instrument_name is an instrument name such as wait/sync/mutex/sql/LOCK_open, and value is one of these values:

      • off, false, or 0: Disable the instrument

      • on, true, or 1: Enable and time the instrument

      • counted: Enable and count (rather than time) the instrument

      Each --performance_schema_instrument option can specify only one instrument name, but multiple instances of the option can be given to configure multiple instruments. In addition, patterns are permitted in instrument names to configure instruments that match the pattern. To configure all condition synchronization instruments as enabled and counted, use this option:

      --performance_schema_instrument='wait/synch/cond/%=counted'

      To disable all instruments, use this option:

      --performance_schema_instrument='%=off'

      Longer instrument name strings take precedence over shorter pattern names, regardless of order. For information about specifying patterns to select instruments, see Section 20.2.3.2.2, “Naming Instruments or Consumers for Filtering Operations”.

      An unrecognized instrument name is ignored. It is possible that a plugin installed later may create the instrument, at which time the name is recognized and configured.

      To control a consumer at server startup, use an option of this form:

      --performance_schema_consumer_consumer_name=value
      

      Here, consumer_name is a consumer name such as events_waits_history, and value is one of these values:

      • off, false, or 0: Do not collect events for the consumer

      • on, true, or 1: Collect events for the consumer

      For example, to enable the events_waits_history consumer, use this option:

      --performance_schema_consumer_events_waits_history=on

      The permitted consumer names can be found by examining the setup_consumers table. Patterns are not permitted.

      Along with the preceding changes to permit configuration at server startup, the default instrument and consumer configuration has changed. Previously, all instruments and consumers were enabled by default. Now, instruments are disabled except the statement, I/O, and idle instruments. Consumers are disabled except the global, thread, and current-statement consumers. These changes produce a default configuration with a low overhead.

    • Tables that have an EVENT_ID column now also have an END_EVENT_ID column to support determination of nested event relationships:

      As before, EVENT_ID is populated with the thread current event counter when an event starts. In addition, END_EVENT_ID is NULL until the event ends, at which point it is set to the new thread current event counter. This permits the relationship event B is included in event A to be determined using the following expression, without having to follow each inclusion relationship using NESTING_EVENT_ID:

      A.EVENT_ID <= B.EVENT_ID AND B.END_EVENT_ID <= A.END_EVENT_ID
    • The Performance Schema aggregates file I/O operations in two places, the events_waits_summary_xxx tables and the file_summary_xxx tables. It was possible to join the events_waits_summary_global_by_event_name table to the file_summary_by_event_name by using the EVENT_NAME column. However, it was not possible to do the same with the events_waits_summary_by_instance and file_summary_by_instance tables because the former uses OBJECT_INSTANCE_BEGIN as the instance identifier and the latter uses FILE_NAME. This means that it was possible to obtain both file I/O latency and usage per file, but not to correctly correlate latency to usage when there was more than one form of file (such as multiple redo logs, table files, and so forth).

      To address this issue, the file_summary_by_instance table now has an OBJECT_INSTANCE_BEGIN column. In addition, both file_summary_by_instance and file_summary_by_event_name have additional aggregation columns (such as timer wait information), which in many cases makes it possible to obtain the desired summary information without need for a join at all.

    If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the performance_schema database.

    For more information, see Chapter 20, MySQL Performance Schema.

Functionality Added or Changed

  • Performance: InnoDB: You can now set the InnoDB page size for uncompressed tables to 8KB or 4KB, as an alternative to the default 16KB. This setting is controlled by the innodb_page_size configuration option. You specify the size when creating the MySQL instance. All InnoDB tablespaces within an instance share the same page size. Smaller page sizes can help to avoid redundant or inefficient I/O for certain combinations of workload and storage devices, particularly SSD devices with small block sizes.

  • Performance: InnoDB: New optimizations apply to read-only InnoDB transactions. See Section 14.2.5.2.2, “Optimizations for Read-Only Transactions” for details. The new optimizations make autocommit more applicable to InnoDB queries than before, as a way to signal that a transaction is read-only because it is a single-statement SELECT.

  • 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 if the required client-side plugin is installed on the slave side in the directory named by the slave plugin_dir system variable. (Bug #12897501)

  • The optimizer trace capability now tracks temporary tables created by the server during statement execution. (Bug #13400713)

  • 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)

  • Upgrading from an Advanced GPL RPM package to an Advanced RPM 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)

  • MEMORY table creation time is now available in the CREATE_TIME column of the INFORMATION_SCHEMA.TABLES table and the Create_time column of SHOW TABLE STATUS output. (Bug #51655, Bug #11759349)

  • Previously, MySQL servers from 5.1 and up refused to open ARCHIVE tables created in 5.0 because opening them caused a server crash. The server now can open 5.0 ARCHIVE tables, and REPAIR TABLE updates them to the format used in 5.6. However, the recommended upgrade procedure is still to dump 5.0 ARCHIVE tables before upgrading and reload them after upgrading. (Bug #48633, Bug #11756687)

  • The make_win_bin_dist script is no longer used and has been removed from MySQL distributions and the manual. (Bug #58241)

  • Error messages that referred only to an error code now also include the corresponding error description. (Bug #48348, Bug #11756433)

  • The MySQL code base was changed to permit use of the C++ Standard Library and to enable exceptions and runtime type information (RTTI). This change has the following implications:

    • Libraries and executables depend on some C++ standard library. On Linux, this has not been the case previously. On Solaris, the default dependency has changed from the default library to libstlport, which is now included with binary distributions for users whose system does not have it.

    • The -fno-rtti and -fno-exceptions options are no longer used to build plugins, such as storage engines. Users who write their own plugins should omit these options if they were using tem.

    • C++ users who compile from source should set CXX to a C++ compiler rather than a C compiler. For example, use g++ rather than gcc. This includes the server as well as client programs.

    • mysql_config now has a --cxxflags option. This is like the --cflags option, but produces flags appropriate for a C++ compiler rather than a C compiler.

    • User-defined functions can be written in C++ using standard library features.

Bugs Fixed

  • Security Enhancement: Replication: The START SLAVE statement now accepts USER and PASSWORD options. By default, MySQL native authentication is used, and the user name and password are stored in the master.info repository. This behavior can be overridden by additionally specifying the name (DEFAULT_AUTH) and location (PLUGIN_DIR) of an authentication plugin when issuing START SLAVE. .

    As part of this change, warnings are now issued in the following cases:

    1. If START SLAVE USER="..." PASSWORD="..." or CHANGE MASTER TO MASTER_USER="..." MASTER_PASSWORD="..." is executed using an unencrypted connection, the warning message Sending passwords in plain text without SSL/TLS is extremely insecure is generated (ER_INSECURE_PLAIN_TEXT).

    2. If the user name and password are stored in or read from the master.info repository in the course of executing CHANGE MASTER TO, a warning message is printed out to the error log: Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended (ER_INSECURE_CHANGE_MASTER).

    Note

    The text of a running START SLAVE statement, including values for USER and PASSWORD, can be seen in the output of a concurrent SHOW PROCESSLIST statement. The complete text of a CHANGE MASTER TO statement is also visible to SHOW PROCESSLIST.

    See also Section 6.3.6, “Pluggable Authentication”. (Bug #13083642)

  • Performance: InnoDB: The process of deallocating the InnoDB Adaptive 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)

  • Performance: InnoDB: This fix improves the performance of instrumentation code for InnoDB buffer pool operations. (Bug #12950803, Bug #62294)

  • Performance: InnoDB: This fix improved the efficiency and concurrency of freeing pages in the InnoDB buffer pool when performing a DROP TABLE for an InnoDB table when the innodb_file_per_table option 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)

  • 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 SELECT statement whose order cannot always be determined. When using STATEMENT logging mode, a warning is issued in the binary log for any of these statements; when using MIXED logging 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 SELECT can 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 16.1.2.1, “Advantages and Disadvantages of Statement-Based and Row-Based Replication”. (Bug #11758262, Bug #50439)

  • Incompatible Change: Previously, Aborted connection errors were written to the error log based on the session value of log_warnings, which permitted users with minimal privileges to cause many messages to be written to the log unless restricted by the MAX_CONNECTIONS_PER_HOUR resource limit. Now this logging is based on the global log_warnings variable. There are no remaining uses of the session log_warnings variable, so it has been removed and the variable now has only a global value. (Bug #53466, Bug #11761014)

  • Important Change: InnoDB: If an ALTER TABLE statement failed for an InnoDB table due to an error code from an underlying file-renaming system call, InnoDB could lose track of the .ibd file for the table. This issue only occurred when the innodb_file_per_table configuration option was enabled, and when the low-level error persisted through thousands of retry attempts. In MySQL 5.1, this issue applied to the InnoDB Plugin but not the built-in InnoDB storage engine.

    For example, if you encounter an error like the following:

    mysql> alter table sb2 add column d2 int;
    ERROR 1025 (HY000): Error on rename of './sbtest/#sql-1eb9_1' to 
    './sbtest/sb2' (errno: -1) 

    you might be able to access the #sql* table by copying a .frm file from a table with an identical schema. The table name to use for the .frm filewould be `sbtest.#mysql50##sql-1eb9_1` in the preceding example. (Bug #12884631, Bug #62146)

  • Important Change: Replication: Setting an empty user in a CHANGE MASTER TO statement caused an invalid internal result and is no longer permitted. Trying to use MASTER_USER='' or setting MASTER_PASSWORD while leaving MASTER_USER unset causes the statement to fail with an error. (Bug #13427949)

  • InnoDB: An internal deadlock could occur within InnoDB, on a server doing a substantial amount of change buffering for DML operations, particularly DELETE statements. (Bug #13340047)

  • InnoDB: Fixed a compilation problem that affected the InnoDB source code with gcc 4.6.1. The affected InnoDB source file was btr/btr0cur.c. (Bug #13116045)

  • InnoDB: Querying the INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS table could cause the server to halt with an assertion error, in debug builds only. (Bug #12960058)

  • InnoDB: Valgrind errors when building with the settings innodb_checksum_algorithm=innodb and innodb_checksum_algorithm=crc32 were fixed. (Bug #12939557)

  • InnoDB: Unused functions were removed from the internal InnoDB code related to mini-transactions, to clarify the logic. (Bug #12626794, Bug #61240)

  • InnoDB: 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: An UPDATE statement for an InnoDB table 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 code ER_UNDO_RECORD_TOO_BIG. In MySQL 5.1 with the InnoDB Plugin, this error is reported using the existing code ER_TOO_BIG_ROWSIZE. (Bug #12547647)

  • InnoDB: This fix corrects cases where the MySQL server could hang or abort with a long semaphore wait message. (This is a different issue than when these symptoms occurred during a CHECK TABLE statement.) (Bug #11766591, Bug #59733)

  • InnoDB: Issuing INSERT...ON DUPLICATE KEY statements for InnoDB tables from concurrent threads could cause a deadlock, particularly with the INSERT...ON DUPLICATE KEY UPDATE form. The problem could also be triggered by issuing multiple INSERT IGNORE statements. 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)

  • Partitioning: CHECKSUM TABLE returned 0 for a partitioned table unless the statement was used with the EXTENDED option. (Bug #11933226, Bug #60681)

  • Partitioning: Error 1214 (ER_TABLE_CANT_HANDLE_FT), given when trying to use a FULLTEXT index with a partitioned table, displayed the misleading text The used table type doesn't support FULLTEXT indexes was misleading and has been replaced with Error 1752 (ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING) which shows the more accurate FULLTEXT index is not supported for partitioned tables. (Bug #11763825, Bug #56590)

  • Partitioning: Using ALTER TABLE to remove partitioning from a valid MyISAM table could corrupt it. (Bug #52599, Bug #11760213)

  • Replication: The value set for the slave_parallel_workers system variable (or the corresponding --slave-parallel-workers server option) was not always honored correctly; in such cases a random value was used. (Bug #13334470)

  • Replication: Execution of LOAD DATA on a MyISAM table having an after-insert trigger which wrote into an InnoDB table caused multi-threaded statement-based replication to abort with error 1742 (Cannot execute the current event group in the parallel mode). (Bug #12982188)

  • Replication: Several warnings and informational messages were revised for typographic errors and clarity. (Bug #12947248, Bug #12978113)

  • 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_warnings must be greater than 1 for this message to be printed to the error log. (Bug #11760927, Bug #53375)

  • Replication: mysqlbinlog --hexdump printed the last row of the hex dump incorrectly, in two ways:

    1. If the length of the last row was eight bytes, the end of the previous row was copied to the end of the last row, padding the last row to full length.

    2. If the length of the last row was less than sixteen bytes, its textual representation was not aligned with that of previous rows.

    (Bug #11747887, Bug #34386)

  • 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.

  • Replication: --replicate-rewrite-db=from_name->to_name did not work correctly when the name of the source database (from_name) consisted of only a single character. (Bug #34332, Bug #11747866)

  • With InnoDB change buffering enabled and innodb_page_size set to an 8K or 4K page size, an UPDATE statement could fail if a column being updated contained a value longer than 1/8th of the page size. (Bug #13336585)

  • An incorrect InnoDB assertion could cause the server to halt. This issue only affected debug builds. The assertion referenced the source file btr0pcur.ic and the variable cursor->pos_state. (Bug #13358468)

  • A derived table with more than 64 columns caused a server crash. (Bug #13354889)

  • Writes to the slow log involved a call to thd->current_utime() even if no log entries ended up being written, unnecessarily reducing performance. (Bug #13326965)

  • Access privileges were checked for each stored program instruction, even if the instruction used no tables, resulting in reduced performance. (Bug #13251277)

  • The error message for ER_EVENT_CANNOT_ALTER_IN_THE_PAST was incorrect. (Bug #13247871)

  • Rounding DBL_MAX returned DBL_MAX, not 'inf'. (Bug #13261955)

  • For materialized temporary tables, a missing key length check could cause incorrect query results. (Bug #13261277)

  • 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)

  • Subqueries with OUTER JOIN could return incorrect results if the subquery referred to a column from another SELECT. (Bug #13068506)

  • mysql_plugin returned the wrong error code from failed server bootstrap execution. (Bug #12968567)

  • mysql_plugin mishandled the --plugin-ini, --mysqld, and --my-print-defaults options under some circumstances. (Bug #12968815)

  • The Performance Schema nested some network I/O events within the wrong statement. (Bug #12981100)

  • Internal conversion of zero to binary and back could yield a result with incorrect precision. (Bug #12911710)

  • With index condition pushdown enabled, STRAIGHT_JOIN queries could produce incorrect results. (Bug #12822678, Bug #12724899)

  • Valgrind warnings generated by filesort operations were fixed. (Bug #12856915)

  • An IN-to-EXISTS subquery transformation could yield incorrect results if the outer value list contained NULL. (Bug #12838171)

  • The result of ROUND() was incorrect for certain numbers. (Bug #12744991)

  • A warning resulting from use of SPACE() referred to REPEAT() in the warning message. (Bug #12735829)

  • IN and EXISTS subqueries with DISTINCT and ORDER BY could return incorrect results. (Bug #12709738)

  • Several improvements were made to the libedit library 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)

  • SELECT SQL_BUFFER_RESULT query results included too many rows if a GROUP BY clause was optimized away. (Bug #12578908)

  • mysqldump --all-databases did not dump the replication log tables. (They could be dumped only by naming them explicitly when invoking mysqldump, and using the --master-data option.)

    As a result of the fix for this problem, it is now possible to execute statements requiring read locks on the replication log tables at any time, while any statements requiring a write lock on either or both of these tables are disallowed whenever replication is in progress. For more information, see Section 16.2.2, “Replication Relay and Status Logs”. (Bug #12402875, Bug #60902)

  • mysqld_safe did not properly check for an already running instance of mysqld. (Bug #11878394)

  • For a lower_case_table_names value 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)

  • The help message for mysql_install_db did not indicate that it supports the --defaults-file, --defaults-extra-file and --no-defaults options. (Bug #58898, Bug #11765888)

  • myisampack could create corrupt FULLTEXT indexes when compressing tables. (Bug #53646, Bug #11761180)

  • For debug builds, an assertion could be raised for ALTER statements that performed a RENAME operation. This occurred for storage engine handlertons that exposed the HTON_FLUSH_AFTER_RENAME flag. (Bug #38028, Bug #11749050)

  • An assertion designed to detect zero-length sort keys also was raised when the entire key set fit in memory. (Bug #58200, Bug #11765254)

  • An ALTER TABLE that included an ADD ... AFTER operation to add a new column after a column that had been modified earlier in the statement failed to find the existing column. (Bug #34972, Bug #11748057)

  • A linking problem prevented the FEDERATED storage engine plugin from loading. (Bug #40942, Bug #11750417)

  • When a join operation contained a view, the optimizer sometimes failed to associate the view's WHERE clause with the first table or view in a join when it was possible to do so, resulting in a less efficient query. (Bug #59696, Bug #11766559)

  • A multiple-table UPDATE statement required the UPDATE privilege on a view which was only read if the view was processed using the merge algorithm. (Bug #59957, Bug #11766767)

  • If index condition pushdown access was chosen and then abandoned, some variables were not cleared, leading to incorrect query results. (Bug #62533)

  • For FEDERATED tables, loss of connection to the remote table during some insert operations could cause a server crash. (Bug #34660, Bug #11747970)

  • mysql_install_db printed the --skip-grant-tables server option as --skip-grant in one of its error messages. (Bug #58534, Bug #11765553)

  • A query that selected a GROUP_CONCAT() function result could return different values depending on whether an ORDER BY of the function result was present. (Bug #41090, Bug #11750518)

  • Subqueries could return incorrect results when materialization was enabled. (Bug #40037, Bug #11749901, Bug #12705660, Bug #12908058)

  • InnoDB used incorrect identifier quoting style in an error message that resulted in an error if a user followed the suggestion in the message. (Bug #49556, Bug #11757503)

  • OPTIMIZE TABLE could corrupt MyISAM tables if myisam_use_mmap was enabled. (Bug #49030, Bug #11757032)

  • ARCHIVE tables with NULL columns could cause server crashes or become corrupt under concurrent load. (Bug #51252, Bug #11758979)

  • During optimization, ZEROFILL values may be converted to string constants. However, CASE expressions did not handle switching data types after the planning stage, leading to CASE finding a null pointer instead of its argument. (Bug #57135, Bug #11764313)

  • 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 KILL statement tried to kill the old dump thread. 4) An INSERT statement caused a binary log rotation. (Bug #56299, Bug #11763573)

  • The estimate of space required for filesort operations could be too high, resulting in inefficient initialization. (Bug #37359, Bug #11748783)

  • If a plugin was uninstalled, thread local variables for plugin variables of string type with wth PLUGIN_VAR_MEMALLOC flag were not freed. (Bug #56652, Bug #11763882)

  • An assertion was raised when selecting from a view that selects from a view that used a user-defined function that had been deleted. (Bug #59546, Bug #11766440)

  • mysql_upgrade did not upgrade the system tables or create the mysql_upgrade_info file when run with the --write-binlog or --skip-write-binlog option. (Bug #60223, Bug #11827359)

  • Concurrent access to ARCHIVE tables could cause corruption. (Bug #42784, Bug #11751793)

  • The SQL_BIG_RESULT modifier could change the results for queries that included a GROUP BY clause. (Bug #53534, Bug #11761078)

  • The CMake configuration checks did not properly test whether the C compiler supports the inline keyword. (Bug #61708, Bug #12711108)

  • For some queries, the index_merge access method was used even when more expensive then ref access. (Bug #32254, Bug #11747423)

  • Collation for the SPACE() function was determined by the parse time value of the collation_connection system variable (instead of the runtime value), which could give unexpected results from prepared statements, triggers, and stored procedures. (Bug #23637, Bug #11746123)

D.1.8. Changes in MySQL 5.6.3 (2011-10-03, Milestone 6)

Note

This is a milestone release, for use at your own risk. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward.

Parallel Event Execution (multi-threaded slave)

  • Replication: MySQL replication now supports a multi-threaded slave executing replication events from the master across different databases in parallel, which can result in significant improvements in application throughput when certain conditions are met. The optimum case is that the data be partitioned per database, and that updates within a given database occur in the same order relative to one another as they do on the master. However, transactions do not need to be coordinated between different databases.

    The slave_parallel_workers server system variable (added in this release) sets the number of slave worker threads for executing replication events in parallel. When parallel execution is enabled, the slave SQL thread acts as the coordinator for the slave worker threads, among which transactions are distributed on a per-database basis. This means that a worker thread on the slave slave can process successive transactions on a given database without waiting for updates on other databases to complete.

    Due to the fact that transactions on different databases can occur in a different order on the slave than on the master, checking for the most recently executed transaction does not guarantee that all previous transactions from the master have been executed on the slave. This has implications for logging and recovery when using a multi-threaded slave. For information about how to interpret binary logging information when using multi-threading on the slave, see Section 13.7.5.35, “SHOW SLAVE STATUS Syntax”.

Optimizer Features

  • These query optimizer improvements were implemented:

    • The EXPLAIN statement now provides execution plan information for DELETE, INSERT, REPLACE, and UPDATE statements. Previously, EXPLAIN provided information only for SELECT statements.

    • The optimizer more efficiently handles subqueries in the FROM clause (that is, derived tables):

      • Materialization of subqueries in the FROM clause is postponed until their contents are needed during query execution, which improves performance. Previously, subqueries in the FROM clause were materialized for EXPLAIN SELECT statements. This resulted in partial SELECT execution, even though the purpose of EXPLAIN is to obtain query plan information, not to execute the query. This materialization no longer occurs, so EXPLAIN is faster for such queries. For non-EXPLAIN queries, delay of materialization may result in not having to do it at all. Consider a query that joins the result of a subquery in the FROM clause to another table: If the optimizer processes that other table first and finds that it returns no rows, the join need not be carried out further and the optimizer can completely skip materializing the subquery.

      • During query execution, the optimizer may add an index to a derived table to speed up row retrieval from it.

      For more information, see Section 8.13.15.3, “Optimizing Subqueries in the FROM Clause (Derived Tables)”.

    • A Batched Key Access (BKA) join algorithm is now available that uses both index access to the joined table and a join buffer. The BKA algorithm supports inner join and outer join operations, including nested outer joins. Benefits of BKA include improved join performance due to more efficient table scanning.

      Two flags have been added to the optimizer_switch system variable (block_nested_loop and batched_key_access). These flags control how the optimizer uses the Block Nested-Loop and Batched Key Access join algorithms. Previously, the optimizer_join_cache_level system variable was used for join buffer control; this variable has been removed.

      For more information, see Section 8.13.11, “Block Nested-Loop and Batched Key Access Joins”.

    • The optimizer now has a tracing capability. This will be of use to optimizer developers, and also to users who file bugs against the optimizer and want to provide more information that will help resolve the bug. The interface is provided by a set of optimizer_trace_xxx system variables and the INFORMATION_SCHEMA.OPTIMIZER_TRACE table, but is subject to change. For details, see MySQL Internals: Tracing the Optimizer.

    (Bug #44802, Bug #11753371, Bug #14295, Bug #11745379)

Performance Schema Notes

  • The Performance Schema has these additions:

    • The Performance Schema now instruments stages and statements. Stages are steps during the statement-execution process, such as parsing a statement, opening a table, or performing a filesort operation. Stages correspond to the thread states displayed by SHOW PROCESSLIST or that are visible in the INFORMATION_SCHEMA.PROCESSLIST table. Stages begin and end when state values change.

      Within the event hierarchy, wait events nest within stage events, which nest within statement events. To reflect this nesting in wait-event tables such as events_waits_current, the NESTING_EVENT_ID column now can be non-NULL to indicate the EVENT_ID value of the event within which an event is nested, and NESTING_EVENT_TYPE is a new column indicating the type of the nesting event.

      The setup_instruments table now contains instruments with names that begin with stage and statement. Corresponding to these instruments, the setup_timers table now contains rows with NAME values of stage and statement that indicate the unit for stage and statement event timing. The default unit for each is NANOSECOND.

      These new tables store stage and statement events:

      The setup_consumers table now contains consumer values with names corresponding to those table names. These consumers may be used to filter collection of stage and statement events.

      There are also summary tables that provide aggregated stage and statement information.

      Application developers can use statement instrumentation to see in detail the statements generated by an application, and how these statements are executed by the server. Stage instrumentation can be used to focus on particular parts of statements. This information may be useful to change how an application issues queries against the database, to minimize the application footprint on the server, and to improve application performance and scalability.

    • The Performance Schema now provides statistics about connections to the server. When a client connects, it does so under a particular user name and from a particular host. The Performance Schema tracks connections per account (user name plus host name) and separately per user name and per host name, using these tables:

      • accounts: Connection statistics per client account

      • hosts: Connection statistics per client host name

      • users: Connection statistics per client user name

      There are also summary tables that provide aggregated connection information.

      It is good security practice to define a dedicated account per application, so that an application is given privileges to perform only those actions that it needs during its operation. This also facilitates monitoring because the information in the connection tables can be used by application developers to see load statistics per application when deploying several applications against a given database server.

    • Previously, the setup_objects table could be used only to specify by inclusion which objects to instrument. There was no way to explicitly disable object instrumentation, such as to configure instrumention for all tables except those in a particular database. Now the setup_objects table includes an ENABLED column that indicates whether to instrument matching objects. This feature improves the setup_objects table usability because it permits exclusion patterns.

      The default table contents now include a row that disables instrumentation for tables in the mysql database, which is a change from the previous default object instrumentation. This change is chosen assuming that end users want to instrument application objects, not internal server tables. The change reduces the default Performance Schema overhead because I/O and locks on mysql tables are not instrumented.

      The table also includes rows that disable instrumentation for tables in the INFORMATION_SCHEMA and performance_schema databases. This is not a change in behavior because those tables were not instrumented before, but these rows make the full object instrumentation defaults explicit.

    • The Performance Schema now instruments sockets. This enables monitoring of network communication to and from the server. Information collected includes network activity such as socket instances, socket operations, and number of bytes transmitted and received.

      The setup_instruments table now contains instruments with names that begin with wait/io/socket. There is also an idle instrument used for idle events when a socket is waiting for the next request from the client. Corresponding to the latter instrument, the setup_timers table now contains a row with a NAME value of idle that indicates the unit for idle event timing. The default unit is MICROSECOND.

      These new tables contain socket information:

      • socket_instances: A real-time snapshot of the active connections to the MySQL server

      • socket_summary_by_instance: Aggregate timer and byte count statistics generated by the wait/io/socket/* instruments for all socket I/O operations, per socket instance

      • socket_summary_by_event_name: Aggregate timer and byte count statistics generated by the wait/io/socket/* instruments for all socket I/O operations, per socket instrument

      The information in the socket tables can be used by application developers, particularly those developing web-based applications, to assess the volume of network traffic directly attributable to queries generated by their application. This can be particularly useful during development of applications intended for large-scale implementations.

    If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the performance_schema database.

    For more information, see Chapter 20, MySQL Performance Schema.

Functionality Added or Changed

  • Performance: InnoDB: At shutdown, MySQL can record the pages that are cached in the InnoDB buffer pool, then reload those same pages upon restart. This technique can help to quickly reach consistent throughput after a restart, without a lengthy warmup period. This preload capability uses a compact save format and background I/O to minimize overhead on the MySQL server. The basic dump/restore capability is enabled through the configuration options innodb_buffer_pool_dump_at_shutdown and innodb_buffer_pool_load_at_startup. Related configuration options such as innodb_buffer_pool_dump_now and innodb_buffer_pool_load_now offer extra flexibility for advanced users to configure the MySQL server for different workloads. See Section 14.2.5.2.7, “Faster Restart by Preloading the InnoDB Buffer Pool” for details. (Bug #11765816, Bug #58819)

  • Performance: InnoDB: Improved concurrency for extending InnoDB tablespace files, which could prevent stalls on busy systems with many tables that use that innodb_file_per_table setting. (Bug #11763692, Bug #56433)

  • Performance: InnoDB: You can improve the efficiency of the InnoDB checksum feature by specifying the configuration option innodb_checksum_algorithm=crc32, which turns on a faster checksum algorithm. This option replaces the innodb_checksums option. Data written using the old checksum algorithm (option value innodb) is fully upward-compatible; tablespaces modified using the new checksum algorithm (option value crc32) cannot be downgraded to an earlier version of MySQL that does not support the innodb_checksum_algorithm option. See Section 14.2.5.2.6, “Fast CRC32 Checksum Algorithm” for details. (Bug #11757757, Bug #49852)

  • Performance: InnoDB: This feature optionally moves the InnoDB undo log out of the system tablespace into one or more separate tablespaces. The I/O patterns for the undo log make these new tablespaces good candidates to move to SSD storage, while keeping the system tablespace on hard disk storage. This feature is controlled by the configuration options innodb_undo_directory, innodb_undo_tablespaces, and innodb_undo_logs (formerly known as innodb_rollback_segments). Users cannot drop the separate tablespaces created to hold InnoDB undo logs, or the individual segments inside those tablespaces.

    MySQL instances configured this way are not downward-compatible; older versions of MySQL cannot access the undo logs that reside in their own tablespace.

    For details, see Section 14.2.5.2.3, “Separate Tablespaces for InnoDB Undo Logs”.

  • Performance: InnoDB: Work continues to offload flush operations from the InnoDB main thread, doing them in the page_cleaner thread instead. The latest changes to the the buffer pool flushing algorithms can improve performance for some I/O-bound workloads, particularly in configurations with multiple buffer pool instances. You control this feature by adjusting the settings for the innodb_lru_scan_depth and innodb_flush_neighbors configuration options. To find the optimal settings, test each combination of the above settings with both the Adaptive Hash Index and the Doublewrite Buffer turned on and off. See Section 14.2.5.2.8, “Improvements to Buffer Pool Flushing” for more details.

  • Performance: InnoDB: The InnoDB thread-scheduling code has been enhanced to work better with greater than 16 threads. Where possible, atomic instructions are used. You control this feature by setting the configuration option innodb_thread_concurrency to a non-zero value, and adjusting the value of innodb_adaptive_max_sleep_delay. See Section 14.2.5.2.14, “Changes Regarding Thread Concurrency” for details.

  • Performance: InnoDB: The code that detects deadlocks in InnoDB transactions has been modified to use a fixed-size work area rather than a recursive algorithm. The resulting detection operation is faster as a result. You do not need to do anything to take advantage of this enhancement. For details, see Section 14.2.5.2.5, “Non-Recursive Deadlock Detection”.

  • Incompatible Change: In the audit plugin interface, the event_class member was removed from the mysql_event_general structure 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_VERSION was increased to 0x0300.

    The plugin_audit.h header file, and the NULL_AUDIT example plugin in the plugin/audit_null directory were modified per these changes. See Section 22.2.4.8, “Writing Audit Plugins”.

  • Important Change: Replication: The RESET SLAVE statement has been extended with an ALL keyword. In addition to deleting the master.info, relay-log.info, and all relay log files, RESET SLAVE ALL also clears all connection information otherwise held in memory following execution of RESET SLAVE. (Bug #11809016)

  • InnoDB: InnoDB now permits concurrent reads while creating a secondary index. (Bug #11853126)

    References: See also Bug #11751388, Bug #11784056, Bug #11815600.

  • InnoDB: The InnoDB redo log files now have a maximum combined size of 512GB, increased from 4GB. You can specify the larger values through the innodb_log_file_size option. (Bug #11765780, Bug #58779)

  • InnoDB: InnoDB tables can now be created with character sets whose collation ID is greater than 255. This capability opens up InnoDB tables for use with a range of user-defined character sets. MySQL's predefined character sets have previously been limited to a maximum of 255, and now that restriction is lifted. See Section 14.2.6.3, “2-Byte Collation IDs for InnoDB Tables” for details.

  • Replication: MySQL 5.6.1 added timestamps to the error messages shown in the Last_IO_Error and Last_SQL_Error columns of the output of SHOW SLAVE STATUS. Now these timestamps are shown in separate columns of their own, named Last_IO_Error_Timestamp and Last_SQL_Error_Timestamp, respectively. (Bug #11765599, Bug #58584)

    References: See also Bug #43535, Bug #11752361.

  • Replication: BEGIN, COMMIT, and ROLLBACK statements are now cached along with the statements instead of being written when the cache is flushed to the binary log. This change does not affect DDL statements—which are written into the statement cache, then immediately flushed—or Incident events (which, along with Rotate events, are still written directly to the binary log).

    References: See also Bug #57275, Bug #11764443.

  • Following EXPLAIN EXTENDED, a change has been made to the transformed query displayed by SHOW WARNINGS. Each SELECT part now is preceded by the id value from the associated EXPLAIN output row. This makes it easier to see the correspondence between those rows and parts of the transformed query. For example, this query:

    EXPLAIN EXTENDED SELECT 36 FROM DUAL

    results in:

    /* select#1 */ select 36 from dual

    And this query:

    EXPLAIN EXTENDED SELECT a FROM t
    WHERE a IN (SELECT b FROM u UNION SELECT c from v)

    results in:

    /* select#1 */ select a from t where a in (/* select#2 */
    select b from u union /* select#3 */ select c from v);

    (Bug #13035597)

  • Several memory allocation calls were eliminated, resulting in improved performance. (Bug #12552221)

  • CMake configuration support on Linux now provides a boolean ENABLE_GCOV option to control whether to include support for gcov. (Bug #12549572)

  • 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)

  • The server now exposes SSL certificate expiration dates through the Ssl_server_not_before and Ssl_server_not_after status variables. Both variables have values in ANSI time format (for example, Sep 12 16:22:06 2013 GMT), or are blank for non-SSL connections. (Bug #57648, Bug #11764778)

  • When invoked with the --auto-generate-sql option, mysqlslap dropped the schema specified with the --create-schema option 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-schema option that both creates and drops a schema. (Bug #58090, Bug #11765157)

  • Previously, TEMPORARY tables created with CREATE TEMPORARY TABLES had the default storage engine unless the definition included an explicit ENGINE option. (The default engine is the value of the default_storage_engine system variable.) Since MySQL 5.5.5, when the default storage engine was changed from the nontransactional MyISAM engine to the transactional InnoDB engine, TEMPORARY tables have incurred the overhead of transactional processing.

    To permit the default storage engine for TEMPORARY tables to be set independently of the default engine for permanent tables, the server now supports a default_tmp_storage_engine system variable. For example, to create TEMPORARY tables as nontransactional tables by default, start the server with --default_tmp_storage_engine=MyISAM. The storage engine for TEMPORARY tables can still be specified on an individual basis by including an ENGINE option in table definitions. (Bug #49232, Bug #11757216)

  • A new server option, --plugin-load-add, complements the --plugin-load option. --plugin-load-add adds a plugin or plugins to the set of plugins to be loaded at startup. The argument format is the same as for --plugin-load. --plugin-load-add can be used to avoid specifying a large set of plugins as a single long unwieldy --plugin-load argument.

    --plugin-load-add can be given in the absence of --plugin-load, but any instance of --plugin-load-add that appears before --plugin-load. has no effect because --plugin-load resets the set of plugins to load.

    This change affects the output of mysqld --verbose --help in that a value for plugin-load is no longer printed. (Bug #59026, Bug #11766001)

  • The mysql client program now has a --binary-mode option that helps when processing mysqlbinlog output that may contain BLOB values. By default, mysql translates \r\n in statement strings to \n and interprets \0 as the statement terminator. --binary-mode disables both features. It also disables all mysql commands except charset and delimiter in non-interactive mode (for input piped to mysql or loaded using the source command). (Bug #33048, Bug #11747577)

  • Previously, for MySQL binaries linked against OpenSSL, if an SSL key file supplied to the MySQL server or a MySQL client program (using the --ssl-key option) was protected by a passphrase, the program would prompt the user for the passphrase. This is now also the case for MySQL binaries linked against yaSSL. (Bug #44559, Bug #11753167)

  • The NULL_AUDIT example plugin in the plugin/audit_null directory has been updated to count instances of events in the MYSQL_AUDIT_CONNECTION_CLASS event class. See Section 22.2.4.8, “Writing Audit Plugins”.

  • The max_allowed_packet system variable now controls the maximum size of parameter values that can be sent with the mysql_stmt_send_long_data() C API function.

  • For temporary tables created with the CREATE TEMPORARY TABLE statement, the privilege model has changed.

    Previously, the CREATE TEMPORARY TABLES privilege enabled users to create temporary tables with the CREATE TEMPORARY TABLE statement. However, other operations on a temporary table, such as INSERT, UPDATE, or SELECT, required additional privileges for those operations for the database containing the temporary table, or for the nontemporary table of the same name.

    To keep privileges for temporary and nontemporary tables separate, a common workaround for this situation was to create a database dedicated to the use of temporary tables. Then for that database, a user could be granted the CREATE TEMPORARY TABLES privilege, along with any other privileges required for temporary table operations done by that user.

    Now, the CREATE TEMPORARY TABLES privilege enables users to create temporary tables with CREATE TEMPORARY TABLE, as before. However, after a session has created a temporary table, the server performs no further privilege checks on the table. The creating session can perform any operation on the table, such as DROP TABLE, INSERT, UPDATE, or SELECT.

    One implication of this change is that a session can manipulate its temporary tables even if the current user has no privilege to create them. Suppose that the current user does not have the CREATE TEMPORARY TABLES privilege but is able to execute a DEFINER-context stored procedure that executes with the privileges of a user who does have CREATE TEMPORARY TABLES and that creates a temporary table. While the procedure executes, the session uses the privileges of the defining user. After the procedure returns, the effective privileges revert to those of the current user, which can still see the temporary table and perform any operation on it. (Bug #27480, Bug #11746602)

  • The Windows installer now creates an item in the MySQL menu named MySQL command line client - Unicode. This item invokes the mysql client with properties set to communicate through the console to the MySQL server using Unicode. It passes the --default-character-set=utf8 option to mysql and sets the font to the Lucida Console Unicode-compatible font. See Section 4.5.1.6.1, “Unicode Support on Windows”.

  • MySQL now includes support for manipulating IPv6 network addresses and for validating IPv4 and IPv6 addresses:

    • The INET6_ATON() and INET6_NTOA() functions convert between string and numeric forms of IPv6 addresses. Because numeric-format IPv6 addresses require more bytes than the largest integer type, the representation uses the VARBINARY data type.

    • The IS_IPV4() and IS_IPV6() functions test whether a string value represents a valid IPv4 or IPv6 address. The IS_IPV4_COMPAT() and IS_IPV4_MAPPED() functions test whether a numeric-format value represents a valid IPv4-compatible or IPv4-mapped address.

    • No changes were made to the INET_ATON() or INET_NTOA() functions that manipulate IPv4 addresses.

    IS_IPV4() is more strict than INET_ATON() about what constitutes a valid IPv4 address, so it may be useful for applications that need to perform strong checks against invalid values. Alternatively, use INET6_ATON() to convert IPv4 addresses to internal form and check for a NULL result (which indicates an invalid address). INET6_ATON() is equally strong as IS_IPV4() about checking IPv4 addresses.

  • Client programs now display more information for SSL errors to aid in diagnosis and debugging of connection problems. (Bug #21287, Bug #11745920)

  • The undocumented --all option for perror has been removed. Also, perror no longer displays messages for BDB error codes.

  • The following items are deprecated and will be removed in a future MySQL release. Where alternatives are shown, applications should be updated to use them.

  • 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-load option at server startup or using the INSTALL PLUGIN and UNINSTALL PLUGIN statements at runtime. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”.

  • mysqld now has an --ignore-db-dir option that tells the server to ignore a given name for purposes of the SHOW DATABASES statement or INFORMATION_SCHEMA tables. For example, if a MySQL configuration locates the data directory at the root of a file system on Unix, the system might create a lost+found directory there that the server should ignore. Starting the server with --ignore-db-dir=lost+found causes that name not to be listed as a database.

    To specify more than one name, use this option multiple times, once for each name. Specifying the option with an empty value (that is, as --ignore-db-dir=) resets the directory list to the empty list.

    Instances of this option given at server startup are used to set the ignore_db_dirs system variable.

    In addition to directories named by --ignore-db-dir, directories having a name that begins with a period are ignored. (Bug #22615, Bug #11746029)

  • MySQL binaries linked against OpenSSL (but not yaSSL) now support certificate revocation lists for SSL connections:

    • The MySQL server and MySQL client programs that support SSL recognize --ssl-crl and --ssl-crlpath options for specifying a revocation list file or directory containing such files.

    • The ssl_crl and ssl_crlpath system variables indicate the values of the --ssl-crl and --ssl-crlpath options with which the server was started.

    • The CHANGE MASTER TO statement has MASTER_SSL_CRL and MASTER_SSL_CRLPATH options for specifying revocation list information to use when the slave connects to the master. The mysql.slave_master_info file has two more rows to store the values of these options. The SHOW SLAVE STATUS statement has has two more columns to display the values of these options.

      The mysql_options() C API function has MYSQL_OPT_SSL_CRL and MYSQL_OPT_SSL_CRLPATH options for specifying revocation list information to use when the client connects to the master. In addition, mysql_options() now also supports MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CERT, MYSQL_OPT_SSL_CIPHER, and MYSQL_OPT_SSL_KEY options for specifying other SSL parameters.

    (Bug #31224, Bug #11747191)

  • Statement logging has been modified so that passwords do not appear in plain text. Passwords in statements such as CREATE USER or GRANT are rewritten not to appear literally in statement text, for the general query log, slow query log, and binary log.

    Password rewriting can be suppressed for the general query log by starting the server with the --log-raw option. This option may be useful for diagnostic purposes, to see the exact text of statements as received by the server, but for security reasons is not recommended for production use.

  • 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_plugin structure now has a flags member, which can be set to the OR of the applicable flags. The PLUGIN_OPT_NO_INSTALL flag indicates that the plugin cannot be loaded at runtime with the INSTALL PLUGIN statement. This is appropriate for plugins that must be loaded at server startup with the --plugin-load option. The PLUGIN_OPT_NO_UNINSTALL flag indicates that the plugin cannot be unloaded at runtime with the UNINSTALL PLUGIN statement.

    The new member changes the interface, so the plugin interface version, MYSQL_PLUGIN_INTERFACE_VERSION, has been incremented from 0x0102 to 0x0103. Plugins that require access to the new member must be recompiled to use version 0x0103 or higher.

Bugs Fixed

  • Security Fix: Bug #59533 was fixed.

  • Performance: InnoDB: This fix improves the performance of operations on VARCHAR(N) columns in InnoDB tables, where N is declared as a large value but the actual string values in the table are short. (Bug #12835650)

  • Performance: InnoDB: The mechanism that InnoDB uses to detect if the MySQL server is idle was made more accurate, to avoid slowdown due to flush operations that normally occur when no other activity is taking place. The mechanism now considers that the server is not idle if there are pending read requests for the InnoDB buffer pool. (Bug #11766123, Bug #59163)

  • Incompatible Change: For socket I/O, an optimization for the case when the server used alarms for timeouts could cause a slowdown when socket timeouts were used instead.

    The fix for this issue results in several changes:

    • Previously, timeouts applied to entire packet-level send or receive operations. Now timeouts apply to individual I/O operations at a finer level, such as sending 10 bytes of a given packet.

    • The handling of packets larger than max_allowed_packet has changed. Previously, if an application sent a packet bigger than the maximum permitted size, or if the server failed to allocate a buffer sufficiently large to hold the packet, the server kept reading the packet until its end, then skipped it and returned an ER_NET_PACKET_TOO_LARGE error. Now the server disconnects the session if it cannot handle such large packets.

    • On Windows, the default value for the MYSQL_OPT_CONNECT_TIMEOUT option to mysql_options() is no longer 20 seconds. Now the default is no timeout (infinite), the same as on other platforms.

    • Building and running MySQL on POSIX systems now requires support for poll() and O_NONBLOCK. These should be available on any modern POSIX system.

    (Bug #54790, Bug #11762221, Bug #36225, Bug #11762221, Bug #51244, Bug #11758972)

  • Incompatible Change: Handling of a date-related assertion was modified. 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().

    It was later determined that stricter handling is unnecessary for LAST_DAY(), which was reverted to permit a zero day part in MySQL 5.6.5.

    References: See also Bug #13458237.

  • InnoDB: Replication: Trying to update a column, previously set to NULL, of an InnoDB table with no primary key caused replication to fail with Can't find record in 'table' on the slave. (Bug #11766865, Bug #60091)

  • InnoDB: The DATA_LENGTH column in the INFORMATION_SCHEMA.TABLES table now correctly reports the on-disk sizes of tablespaces for InnoDB compressed tables. (Bug #12770537)

  • InnoDB: A failed CREATE INDEX operation for an InnoDB table could result in some memory being allocated but not freed. This memory leak could affect tables created with the ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED setting. (Bug #12699505)

  • InnoDB: With the configuration settings innodb_file_per_table=1 and innodb_file_format=Barracuda, inserting a column value greater than half the page size, and including that column in a secondary index, could cause a crash when that column value was updated. (Bug #12637786)

  • InnoDB: The underlying tables to support the InnoDB persistent statistics feature were renamed and moved into the mysql database. innodb.table_stats became mysql.innodb_table_stats, and innodb.index_stats became mysql.innodb_index_stats. (Bug #12604399)

  • InnoDB: The server could halt if InnoDB interpreted 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 long InnoDB threads were waiting, which formerly could produce false positives. (Bug #11877216, Bug #11755413, Bug #47183)

  • InnoDB: With the setting lower_case_table_names=2, inserts into InnoDB tables covered by foreign key constraints could fail after a server restart. (Bug #11831040, Bug #60196, Bug #60909)

  • InnoDB: If the MySQL Server crashed immediately after creating an InnoDB table, attempting to access the table after restart could cause another crash. The issue could occur if the server halted after InnoDB created the primary index for the table, but before the index definition was recorded in the MySQL metadata. (Bug #11766824, Bug #60042)

  • InnoDB: 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: The MySQL server could hang during CREATE TABLE, OPTIMIZE TABLE, or ALTER TABLE or other DDL operation that performs a table copy for an InnoDB table, 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: With the setting lower_case_table_names=2, inserts into InnoDB tables 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 be NULL in some cases. (Bug #12380149)

  • 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: 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)

  • Partitioning: Attempting to use ALTER TABLE ... EXCHANGE PARTITION to exchange a view with a (nonexistent) partition of a table that was not partitioned caused the server to crash. (Bug #11766232, Bug #60039)

  • Partitioning: The UNIX_TIMESTAMP() function was not treated as a monotonic function for purposes of partition pruning. (Bug #11746819, Bug #28928)

  • Partitioning: A problem with a previous fix for poor performance of INSERT ON DUPLICATE KEY UPDATE statements 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: When using row-based replication and attribute promotion or demotion (see Section 16.4.1.8.2, “Replication of Columns Having Different Data Types”), memory allocated internally for conversion of BLOB columns was not freed afterwards. (Bug #12558519)

  • Replication: A memory leak could occur when re-creating a missing master info repository, because a new I/O cache used for a reference to the repository was re-created when the repository was re-created, but the previous cache was never removed. (Bug #12557307)

  • Replication: A mistake in thread cleanup could cause a replication master to crash. (Bug #12578441)

  • Replication: A race condition could occur between a user thread and the SQL thread when both tried to read the same memory before its value was safely set. This issue has now been corrected.

    In addition, internal functions relating to creation of and appending to log events, when storing data, used memory local to the functions which was freed when the functions returned. As part of the fix for this problem, the output of SHOW SLAVE STATUS has been modified such that it no longer refers to files or file names in the accompanying status message, but rather contains one of the messages Making temporary file (append) before replaying LOAD DATA INFILE or Making temporary file (create) before replaying LOAD DATA INFILE. (Bug #12416611)

  • Replication: The name of the Ssl_verify_server_cert column in the mysql.slave_master_info table was misspelled as Ssl_verify_servert_cert. (Bug #12407446, Bug #60988)

  • Replication: When mysqlbinlog was invoked using --base64-output=decode-row and --start-position=pos, (where pos is 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: It is no longer possible to change the storage engine used by the mysql.slave_master_info and mysql.slave_relay_log_info tables while replication is running. This means that, to make replication crash-safe, you must make sure that both of these tables use a transactional storage engine before starting replication.

    For more information, see Section 16.2.2, “Replication Relay and Status Logs”, and Options for logging slave status to tables. (Bug #11765887, Bug #58897)

  • Replication: A failed CREATE USER statement was mistakenly written to the binary log. (Bug #11827392, Bug #60082)

  • Replication: When a slave requested a binary log file which did not exist on the master, the slave continued to request the file regardless. This caused the slave's error log to be flooded with low-level EE_FILENOTFOUND errors (error code 29) from the master. (Bug #11745939, Bug #21437)

  • Replication: Retrying a transaction on the slave could insert extra data into nontransactional tables. (Bug #11763126, Bug #55789)

    References: See also Bug #11763471, Bug #56184.

  • Replication: A transaction was written to the binary log even when it did not update any nontransactional tables. (Bug #11763471, Bug #56184)

    References: See also Bug #11763126, Bug #55789.

  • Replication: Typographical errors appeared in the text of several replication error messages. (The word position was misspelled as postion.) (Bug #11762616, Bug #55229)

  • Replication: mysqlbinlog using the --raw option did not function correctly with binary logs from MySQL Server versions 5.0.3 and earlier. (Bug #11763265, Bug #55956)

  • Replication: Temporary deadlocks in the slave SQL thread could cause unnecessary Deadlock found when trying to get lock; try restarting transaction error messages to be logged on the slave.

    Now in such cases, only a warning is logged unless slave_transaction_retries has been exceeded by the number of such warnings for a given transaction. (Bug #11748510, Bug #36524)

  • 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.

  • Replication: If a LOAD DATA INFILE statement—replicated using statement-based replication—featured a SET clause, the name-value pairs were regenerated using a method (Item::print()) intended primarily for generating output for statements such as EXPLAIN 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 INFILE statements for statement-based replication. (Bug #60580, Bug #11902767)

    References: See also Bug #34283, Bug #11752526, Bug #43746.

  • Replication: Using the --server-id option 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)

  • Replication: Error 1590 (ER_SLAVE_INCIDENT) caused the slave to stop even when it was started with --slave-skip-errors=1590. (Bug #59889, Bug #11768580, Bug #11799671)

  • Replication: A failed DROP DATABASE statement could break statement-based replication. (Bug #58381, Bug #11765416)

  • The Performance Schema caused a bottleneck for LOCK_open. (Bug #12993572)

  • mysqld_safe ignored any value of plugin_dir specified in my.cnf files. (Bug #12925024)

  • The metadata locking subsystem added too much overhead for INFORMATION_SCHEMA queries that were processed by opening only .frm or .TRG files and had to scan many tables. For example, SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS was affected. (Bug #12828477)

  • 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.

  • Compilation failed on Mac OS X 10.7 (Lion) with a warning: Implicit declaration of function 'pthread_init' (Bug #12779790)

  • The result for ANY subqueries with nested joins could be missing rows. (Bug #12795555)

  • Compiling the server with maintainer mode enabled failed for gcc 4.6 or higher. (Bug #12727287)

  • For prepared statements, an OK could be sent to the client if the prepare failed due to being killed. (Bug #12661349)

  • Some Valgrind warnings were corrected:

    • For the SUBSTRING(), LEFT(), RIGHT(), LPAD(), RPAD(), and REPEAT() functions, a missing NULL value check was corrected.

    • For the LIKE operator, an attempt to use an uninitialized string buffer in the case of an empty wildcard was corrected.

    (Bug #12634989, Bug #59851, Bug #11766684)

  • For debug builds, a field-type check raised an assertion if the type was MYSQL_TYPE_NULL. (Bug #12620084)

  • Adding support for Windows authentication to libmysql introduced a link dependency on the system Secur32 library. The Microsoft Visual C++ link information now pulls in this library automatically. (Bug #12612143)

  • The option-parsing code for empty strings leaked memory. (Bug #12589928)

  • With index condition pushdown enabled, a crash could occur due to an invalid end-of-range value. (Bug #12601961)

  • The server could fail to free allocated memory when INSERT DELAYED was used with binary logging enabled. (Bug #12538873)

  • A DBUG_ASSERT added by Bug #11792200 was overly aggressive in raising assertions. (Bug #12537160)

  • In some cases, memory allocated for Query_tables_list::sroutines() was not freed properly. (Bug #12429877)

  • Assignments to NEW.var_name within triggers, where var_name had a BLOB or TEXT type, were not properly handled and produced incorrect results. (Bug #12362125)

  • 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 NULL value check in Item_func_round::fix_length_and_dec(). (Bug #12392636)

  • An assertion could be raised if Index Condition Pushdown code pushed down an index condition containing a subquery. (Bug #12355958)

  • InnoDB could add temporary index information to INFORMATION_SCHEMA, which could raise an assertion. (Bug #12340873)

  • On Windows, the server rejected client connections if no DNS server was available. (Bug #12325375)

  • XA COMMIT could 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 assertion could be raised during two-phase commits if the binary log was used as the transaction coordinator log. (Bug #12346411)

  • A too-strict assertion could cause a server crash. (Bug #12321461)

  • mysql_list_fields() returned incorrect character set information for character columns of views. (Bug #12337762)

  • mysql_upgrade did not properly upgrade the authentication_string column of the mysql.user table. (Bug #11936829)

  • The optimizer sometimes chose a forward index scan followed by a filesort to reverse the order rather than scanning the index in reverse order. (Bug #11882131)

  • InnoDB invoked some zlib functions without proper initialization. (Bug #11849231)

  • With index condition pushdown enabled, queries that used STRAIGHT_JOIN on data that included NULL values could return incorrect results. (Bug #11873324)

  • Previously, an inappropriate error message was produced if a multiple-table update for an InnoDB table 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 'tbl_name1' and 'tbl_name2' (Bug #11882110)

    References: See also Bug #11764529.

  • Corrected a condition that produced an InnoDB message in the error log, unlock row could not find a 3 mode lock on the record. This situation could occur with a combination of a subquery and a FOR UPDATE clause under the READ UNCOMMITTED isolation level. The fix also improves the debuggability of such messages by including the original SQL statements that caused them. (Bug #11766322, Bug #59410)

  • Division of large numbers could cause stack corruption. (Bug #11792200)

  • With Valgrind enabled, InnoDB semaphore wait timeouts were too low and could expire. (Bug #11765460)

  • CHECK TABLE and REPAIR TABLE failed to find problems with MERGE tables that had underlying tables missing or with the wrong storage engine. Issues were reported only for the first underlying table. (Bug #11754210)

  • SHOW EVENTS did not always show events from the correct database. (Bug #41907, Bug #11751148)

  • An assertion was raised if a statement tried to upgrade a metadata lock while there was an active FLUSH TABLE tbl_list WITH READ LOCK statement. Now if a statement tries to upgrade a metadata lock in this situation, the server returns an ER_TABLE_NOT_LOCKED_FOR_WRITE error to the client. (Bug #57649, Bug #11764779)

  • With the conversion from GNU autotools to CMake for configuring MySQL, the USE_SYMDIR preprocessor symbol was omitted. This caused failure of symbolic links (described at Section 8.11.3.1, “Using Symbolic Links”). (Bug #59408, Bug #11766320)

  • The code for PROCEDURE ANALYSE() had a missing DBUG_RETURN statement, which could cause a server crash in debug builds. (Bug #58140, Bug #11765202)

  • For a client connected using SSL, the Ssl_cipher_list status variable was empty and did not show the possible cipher types. (Bug #52596, Bug #11760210)

  • In Item::get_date, a Valgrind warning for a missing NULL value check was corrected. (Bug #59164, Bug #11766124)

  • In Item_func_month::val_str(), a Valgrind warning for a too-late NULL value check was corrected. (Bug #59166, Bug #11766126)

  • In Item_func::val_decimal, a Valgrind warning for a missing NULL value 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)

  • In extract_date_time(), a Valgrind warning for a missing end-of-string check was corrected. (Bug #59151, Bug #11766112)

  • A missing variable initialization for Item_func_set_user_var objects could raise an assertion. (Bug #59527, Bug #11766424)

  • In string context, the MIN() and MAX() functions did not take into account the unsignedness of a BIGINT UNSIGNED argument. (Bug #59132, Bug #11766094)

  • 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 InnoDB tables that needed repair, leaving them in a nonupgraded state. This occurred because:

    To fix the problem, the following changes were made to CHECK TABLE ... FOR UPGRADE and mysqlcheck. Because mysql_upgrade invokes mysqlcheck, these changes also fix the problem for mysql_upgrade.

    • CHECK TABLE ... FOR UPGRADE returns a different error if a table needs repair but its storage engine does not support REPAIR TABLE:

      Previous:

      Error: ER_TABLE_NEEDS_UPGRADE
      Table upgrade required. Please do "REPAIR TABLE `tbl_name`" or
      dump/reload to fix it!
      

      Now:

      Error: ER_TABLE_NEEDS_REBUILD
      Table 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 ... FORCE statement. The FORCE option for ALTER TABLE was recognized but did nothing; now it is implemented and acts as a null alter operation that rebuilds the table.

    (Bug #47205, Bug #11755431)

  • With prepared statements, the server could attempt to send result set metadata after the table had been closed. (Bug #56115, Bug #11763413)

  • CREATE TRIGGER and DROP TRIGGER can 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)

  • On Windows, the authentication_string column recently added to the mysql.user table caused the Configuration Wizard to fail. (Bug #59038, Bug #11766011)

  • The mysql_load_client_plugin() C API function did not clear the previous error. (Bug #60075, Bug #11766854)

  • An invalid pathname argument for the --defaults-extra-file option of MySQL programs caused a program crash. (Bug #59234, Bug #11766184)

  • The optimizer sometimes requested ordered access from a storage engine when ordered access was not required. (Bug #57601, Bug #11764737)

  • Attempts to grant the EXECUTE or ALTER ROUTINE privilege for a nonexistent stored procedure returned success instead of an error. (Bug #51401, Bug #11759114)

  • The optimizer sometimes incorrectly processed HAVING clauses for queries that did not also have an ORDER BY clause. (Bug #48916, Bug #11756928)

  • Table I/O for the Performance Schema table_io_waits_summary_by_index_usage table was counted as using no index for UPDATE and DELETE statements, even when an index was used. (Bug #60905, Bug #12370950)

  • 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 lower_case_table_names=2, resolution of objects qualified by database names could fail. (Bug #50924, Bug #11758687)

  • The server permitted max_allowed_packet to be set lower than net_buffer_length, which does not make sense because max_allowed_packet is the upper limit on net_buffer_length values. Now a warning occurs and the value remains unchanged. (Bug #59959, Bug #11766769)

  • LOAD DATA INFILE errors could leak I/O cache memory. (Bug #58072, Bug #11765141)

  • Setting optimizer_join_cache_level to 3 or greater raised an assertion for some queries. (Bug #59651, Bug #11766522)

  • PROCEDURE ANALYSE() could leak memory for NULL results, and could return incorrect results if used with a LIMIT clause. (Bug #48137, Bug #11756242)

  • Selecting from a view for which the definition included a HAVING clause 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)

  • 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)

  • CREATE TABLE syntax permits specification of a STORAGE {DEFAULT|DISK|MEMORY} option. However, this value was not written to the .frm file, so that a subsequent CREATE TABLE ... LIKE for the table did not include that option.

    Also, ALTER TABLE of a table that had a tablespace incorrectly destroyed the tablespace. (Bug #60111, Bug #11766883, Bug #34047, Bug #11747789)

  • In Item_func_in::fix_length_and_dec(), a Valgrind warning for uninitialized values was corrected. (Bug #59270, Bug #11766212)

  • An incorrect max_length value for YEAR values could be used in temporary result tables for UNION, leading to incorrect results. (Bug #59343, Bug #11766270)

  • An internal client macro reference was removed from the client_plugin.h header file. This reference made the file unusable. (Bug #60746, Bug #12325444)

  • In some cases, SHOW WARNINGS returned an empty result when the previous statement failed. (Bug #55847, Bug #11763166)

  • Comparison of a DATETIME stored program variable and NOW() resulted in Illegal mix of collations error when character_set_connection was set to utf8. (Bug #60625, Bug #11926811)

  • On Linux, the mysql client built using the bundled libedit did not read ~/.editrc. (Bug #49967, Bug #11757855)

  • For some queries, the optimizer performed range analysis too many times for the same index. (Bug #59415, Bug #11766327)

  • For LOAD DATA INFILE, multi-byte character sequences could be pushed onto a stack too small to accommodate them. (Bug #58069, Bug #11765139)

  • In ROUND() calculations, a Valgrind warning for uninitialized memory was corrected. (Bug #58937, Bug #11765923)

    References: This bug is a regression of Bug #33143.

  • Table objects associated with one session's optimizer structures could be closed after being passed to another session, prematurely ending the second session's table or index scan. (Bug #56080, Bug #11763382)

  • Valgrind warnings caused by comparing index values to an uninitialized field were corrected. (Bug #58705, Bug #11765713)

  • The mysql client sometimes did not properly close sessions terminated by the user with Control+C. (Bug #52515, Bug #11760134)

  • In debug builds, Field_new_decimal::store_value() was subject to buffer overflows. (Bug #55436, Bug #11762799)

  • An attempt to install nonexistent files during installation was corrected. (Bug #43247, Bug #11752142)

  • For repeated invocation of some stored procedures, the server consumed memory that it did not release until the connection terminated. (Bug #60025, Bug #11848763)

  • Some tables were not instrumented by the Performance Schema even though they were listed in the setup_objects table. (Bug #59150, Bug #11766111)

  • On some platforms, the Incorrect value: xxx for column yyy at row zzz error produced by LOAD DATA INFILE could have an incorrect value of zzz. (Bug #46895, Bug #11755168)

  • For an InnoDB table, dropping and adding an index in a single ALTER TABLE statement could fail. (Bug #54927, Bug #11762345)

  • An embedded client aborted rather than issuing an error message if it issued a TEE command (\T file_name) and the directory containing the file did not exist. This occurred because the wrong error handler was called. (Bug #57491, Bug #11764633)

  • For an outer join with a NOT IN subquery in the WHERE clause, a null left operand to the NOT IN returned was treated differently than a literal NULL operand. (Bug #56881, Bug #11764086)

  • As a side effect of optimizing condition AND TRUE or condition OR FALSE, MySQL for certain subqueries forgot that the columns used by the condition needed to be read, which raised an assertion in debug builds. (Bug #58690, Bug #11765699)

  • Using CREATE EVENT IF NOT EXISTS for an event that already existed and was enabled caused multiple instances of the event to run. (Bug #61005, Bug #12546938)

  • The range created by the optimizer when OR-ing two conditions could be incorrect, causing incorrect query results. (Bug #58834, Bug #11765831)

  • 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)

  • On FreeBSD 64-bit builds of the embedded server, exceptions were not prevented from propagating into the embedded application. (Bug #38965, Bug #11749418)

  • In MySQL 5.1 and up, if a table had triggers that used syntax supported in 5.0 but not 5.1, the table became unavailable. Now the table is marked as having broken triggers. These should be dropped and recreated manually. (Bug #45235, Bug #11753738)

  • LOAD DATA INFILE incorrectly 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)

  • Incorrect handling of metadata locking for FLUSH TABLES WITH READ LOCK for 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 LOCK from proceeding until the end of the transaction rather than at the end of the particular statement.

    (Bug #61401, Bug #12641342)

  • CREATE TABLE ... LIKE for a MyISAM table definition that included an DATA DIRECTORY or INDEX DIRECTORY table option failed, instead of creating a table with those options omitted as documented. (Bug #52354, Bug #11759990)

  • ALTER TABLE {MODIFY|CHANGE} ... FIRST did 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 for ALTER TABLE DROP COLUMN ... ADD COLUMN statements intended to produce a new version of the table with exactly the same structure as the old version. (Bug #61493, Bug #12652385)

  • 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)

  • 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 STATUS command). (Bug #61205, Bug #12565712)

  • Threads blocked in the waiting for table metadata state were not visible in performance_schema.THREADS or SHOW PROFILE. (Bug #56475, Bug #11763728)

  • Previously, Performance Schema table columns that held byte counts were BIGINT UNSIGNED. These were changed to BIGINT (signed). This makes it easier to perform calculations that compute differences between columns. (Bug #59631, Bug #11766504)

  • The server failed to compile if partitioning support was disabled. (Bug #61625, Bug #12694147)

  • Upgrades using an RPM package recreated the test database, which is undesirable when the DBA had removed it. (Bug #45415, Bug #11753896)

  • The mysql-log-rotate script was updated because it referred to deprecated MySQL options. (Bug #61038, Bug #12546842)

  • For some statements such as DESCRIBE or SHOW, views with too many columns produced errors. (Bug #49437, Bug #11757397)

  • For unknown users, the native password plugin reported incorrectly that no password had been specified even when it had. (Bug #59792, Bug #11766641)

  • For queries with many eq_ref joins, the optimizer took excessive time to develop an execution plan. (Bug #41740, Bug #11751026, Bug #58225, Bug #11765274)

  • The embedded server crashed when argc = 0. (Bug #57931, Bug #12561297)

  • If a statement ended with mismatched quotes, the server accepted the statement and interpreted whatever was after the initial quote as a text string. (Bug #60993, Bug #12546960)

  • Some status variables rolled over to zero after reaching the maximum 32-bit value. They have been changed to 64-bit values. (Bug #42698, Bug #11751727)

  • The mysql_affected_rows() C API function returned 3 (instead of 2) for INSERT ... ON DUPLICATE KEY UPDATE statements where there was a duplicated key value. (Bug #46675, Bug #11754979)

  • ALTER EVENT could change the event status. (Bug #57156, Bug #11764334)

  • A handled condition (error or warning) could be shown as not handled at the end of the statement. (Bug #55843, Bug #11763162)

    References: This bug is a regression of Bug #23032.

  • (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)

  • CREATE TABLE without an ENGINE option 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)

  • SELECT DISTINCT with a deterministic stored function in the WHERE clause could produce incorrect results. (Bug #59736, Bug #11766594)

  • Spatial operations on certain corner cases could cause a server crash: Polygons with zero-point linerings; polygons with touching linerings. (Bug #51979, Bug #11759650, Bug #47429, Bug #11755628)

  • Index condition pushdown code accessed an uninitialized variable. (Bug #59843, Bug #11766678)

  • With DISTINCT, CONCAT(col_name,...) returned incorrect results when the arguments to CONCAT() were columns with an integer data type declared with a display width narrower than the values in the column. (For example, if an INT(1) column contained 1111.) (Bug #4082)

D.1.9. Changes in MySQL 5.6.2 (2011-04-11)

Note

This is a milestone release, for use at your own risk. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward.

INFORMATION_SCHEMA Tables for InnoDB Buffer Pool Information

INFORMATION_SCHEMA Table for InnoDB Metrics

Persistent InnoDB Optimizer Statistics

INFORMATION_SCHEMA Tables for InnoDB Data Dictionary

  • InnoDB: The InnoDB data dictionary, containing metadata about InnoDB tables, columns, indexes, and foreign keys, is available for SQL queries through a set of INFORMATION_SCHEMA tables.

InnoDB Configurable Data Dictionary Cache

  • InnoDB: InnoDB now uses the table_definition_cache option value as a guide to remove table metadata from memory when many different InnoDB tables are accessed. InnoDB removes table metadata using a variation of the LRU algorithm. (Parent and child tables in foreign key relationships are exempted from removal.) (Bug #20877, Bug #11745884)

Optimizer Features

  • The optimizer implements Index Condition Pushdown (ICP), an optimization for the case where MySQL retrieves rows from a table using an index. Without ICP, the storage engine traverses the index to locate rows in the base table and returns them to the MySQL server which evaluates the WHERE condition for the rows. With ICP enabled, and if parts of the WHERE condition can be evaluated by using only fields from the index, the MySQL server pushes this part of the WHERE condition down to the storage engine. The storage engine then evaluates the pushed index condition by using the index entry and only if this is satisfied is base row be read. ICP can reduce the number of accesses the storage engine has to do against the base table and the number of accesses the MySQL server has to do against the storage engine. For more information, see Section 8.13.4, “Index Condition Pushdown Optimization”.

  • The optimizer implements Disk-Sweep Multi-Range Read. Reading rows using a range scan on a secondary index can result in many random disk accesses to the base table when the table is large and not stored in the storage engine's cache. With the Disk-Sweep Multi-Range Read (MRR) optimization, MySQL tries to reduce the number of random disk access for range scans by first scanning the index only and collecting the keys for the relevant rows. Then the keys are sorted and finally the rows are retrieved from the base table using the order of the primary key. The motivation for Disk-sweep MRR is to reduce the number of random disk accesses and instead achieve a more sequential scan of the base table data. For more information, see Section 8.13.10, “Multi-Range Read Optimization”.

  • The optimizer now more efficiently handles queries (and subqueries) of the following form:

    SELECT ... FROM single_table ... ORDER BY non_index_column [DESC] LIMIT [M,]N;
    

    That type of query is common in web applications that display only a few rows from a larger result set. For example:

    SELECT col1, ... FROM t1 ... ORDER BY name LIMIT 10;
    SELECT col1, ... FROM t1 ... ORDER BY RAND() LIMIT 15;

    The sort buffer has a size of sort_buffer_size. If the sort elements for N rows are small enough to fit in the sort buffer (M+N rows if M was specified), the server can avoid using a merge file and perform the sort entirely in memory. For details, see Section 8.2.1.3, “Optimizing LIMIT Queries”.

Explicit Partition Selection

  • Partitioning: It is now possible to select one or more partitions or subpartitions when querying a partitioned table. In addition, many data modification statements (DELETE, INSERT, REPLACE, UPDATE, LOAD DATA, and LOAD XML) that act on partitioned tables also now support explicit partition selection. For example, assume we have a table named t with some integer column named c, and t has 4 partitions named p0, p1, p2, and p3. Then the query SELECT * FROM t PARTITION (p0, p1) WHERE c < 5 returns rows only in partitions p0 and p1 that match the WHERE condition, whereas partitions p2 and p3 are not checked.

    For additional information and examples, see Section 17.5, “Partition Selection”, as well as the descriptions of the statements just listed.

Performance Schema Notes

  • The Performance Schema has these additions:

    • The Performance Schema now has tables that contain summaries for table and index I/O wait events, as generated by the wait/io/table/sql/handler instrument:

      The information in these tables can be used to assess the impact of table I/O performed by applications. For example, it is possible to see which tables are used and which indexes are used (or not used), or to identify bottlenecks on a table when multiple applications access it. The results may be useful to change how applications issue queries against a database, to minimize application footprint on the server and to improve application performance and scalability.

      A change that accompanies the new tables is that the events_waits_current table now has an INDEX_NAME column to identify which index was used for the operation that generated the event. The same is true of the event-history tables, events_waits_history, and events_waits_history_long.

    • The Performance Schema now has an instrument named wait/lock/table/sql/handler in the setup_instruments table for instrumenting table lock wait events. It differs from wait/io/table/sql/handler, which instruments table I/O. This enables independent instrumentation of table I/O and table locks.

      Accompanying the new instrument, the Performance Schema has a table named table_lock_waits_summary_by_table that aggregates table lock wait events, as generated by the new instrument. The grouping is by table.

      The information in this table may be used to assess the impact of table locking performed by applications. The results may be useful to change how applications issue queries against the database and use table locks, to minimize the application footprint on the server and to improve application performance and scalability. For example, an application locking tables for a long time may negatively affect other applications; the instrumentation makes this visible.

    • To selectively control which tables to instrument for I/O and locking, use the setup_objects table. See Section 20.2.3.2.1.2, “Pre-Filtering by Object”.

    If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the performance_schema database.

    For more information, see Chapter 20, MySQL Performance Schema.

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 the SO_PEERCRED socket 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 6.3.6.4, “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 6.3.6.3, “The Cleartext Client-Side Authentication Plugin”.

Crash-Safe Binary Log

  • Replication: The MySQL Server now records and reads back only complete events or transactions to and from the binary log. By default, the server now logs the length of the event as well as the event itself and uses this information to verify that the event was written correctly to the log. A master also uses by default this value to verify events when reading from the binary log.

    If you enable writing of checksums (using the binlog_checksum system variable), the master can use these instead by enabling the master_verify_checksum system variable. The slave I/O thread also verifies events received from the master. You can cause the slave SQL thread to use checksums (if available) as well, when reading from the relay log, by enabling the slave_sql_verify_checksum system variable on the slave.

  • Replication: Support for checksums when writing and reading the binary log is added to the MySQL Server. Writing checksums into the binary log is disabled by default; it can be enabled by starting the server with the --binlog-checksum option. To cause the server to read checksums from the binary log, start the server with the --master-verify-checksum option. The --slave-sql-verify-checksum option causes the slave to read checksums from the relay log.

Slave Log Tables

  • Replication: It is now possible to write information about the slave connection to the master and about the slave's execution point within the relay log to tables rather than files. Logging of master connection information and of slave relay log information to tables can be done independently of one another; this is controlled by the --master-info-repository and --relay-log-info-repository server options. When --master-info-repository is set to TABLE, connection information is logged in the slave_master_info table in the mysql system database. When --relay-log-info-repository is set to TABLE, relay log information is logged to the slave_relay_log_info table, also in the mysql database.

Row Image Control

  • Replication: Added the binlog_row_image server system variable, which can be used to enable row image control for row-based replication. This means that you can potentially save disk space, network resources, and memory usage by the MySQL Server by logging only those columns that are required for uniquely identifying rows, or which are actually changed on each row, as opposed to logging all columns for each and every row change event. In addition, you can use a noblob mode where all columns, except for unneeded BLOB or TEXT columns, are logged.

    For more information, see System variables used with the binary log. (Bug #47200, Bug #11755426, Bug #47303, Bug #56917, Bug #11755426, Bug #11755513, Bug #11764116)

Functionality Added or Changed

  • Performance: InnoDB: A separate InnoDB thread (page_cleaner) now handles the flushing of dirty pages that was formerly done by the InnoDB master thread. (Bug #11762412, Bug #55004)

  • Performance: InnoDB: The InnoDB kernel mutex has been split into several mutexes and rw-locks, for improved concurrency.

  • Performance: InnoDB: The innodb_purge_threads system variable can now be set to a value higher than 1.

  • Incompatible Change: The following obsolete constructs have been removed. Where alternatives are shown, applications should be updated to use them.

  • Important Change: Replication: Added the --binlog-rows-query-log-events option for mysqld. Using this option causes a server logging in row-based mode to write informational rows query log events (SQL statements, for debugging and other purposes) to the binary log. MySQL server and MySQL programs from MySQL 5.6.2 and later normally ignore such events, so that they do not pose an issue when reading the binary log. mysqld and mysqlbinlog from previous MySQL releases cannot read such events in the binary log, and fail if they attempt to do so. For this reason, you should never prepare logs for a MySQL 5.6.1 or earlier replication slave server (or other reader such as mysqlbinlog) with this option enabled on the master. (Bug #11758695, Bug #50935, Bug #11758695)

  • InnoDB: InnoDB can optionally log details about all deadlocks that occur, to assist with troubleshooting and diagnosis. This feature is controlled by the innodb_print_all_deadlocks system variable. (Bug #1784, Bug #17572)

  • Replication: On MySQL replication slaves having multiple network interfaces, it is now possible to set which interface to use for connecting to the master using the MASTER_BIND='interface' option in a CHANGE MASTER TO statement.

    The value set by this option can be seen in the Master_Bind column of the output from SHOW SLAVE STATUS or the Bind column of the mysql.slave_master_info table. (Bug #25939, Bug #11746389)

  • Replication: Added the log_bin_basename system variable, which contains the complete file name and path to the binary log file. (The log_bin system variable shows only whether or not binary logging is enabled; log_bin_basename, however, reflects the name set with the --log-bin server option.) Also added relay_log_basename system variable, which shows the file name and complete path to the relay log file.

    References: See also Bug #19614, Bug #11745759.

  • The mysql_upgrade, mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow, and mysqlslap clients now have --default-auth and --plugin-dir options 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 ON or OFF, but previously this did not work at server startup. Now at startup such variables can be enabled by setting them to ON or TRUE, or disabled by setting them to OFF or FALSE. Any other nonnumeric value 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 aborted to 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)

  • MySQL distributions now include an INFO_SRC file that contains information about the source distribution, such as the MySQL version from which it was created. MySQL binary distributions additionally include an INFO_BIN file 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-server directory. In tar.gz and derived packages, they are located in the Docs directory under the location where the distribution is unpacked. (Bug #42969, Bug #11751935)

  • If the --init-file option is given, the server now writes messages indicating the beginning and end of file execution to the error log. (Bug #48387, Bug #11756463)

  • The server now writes thread shutdown messages to the error log during the shutdown procedure. (Bug #48388, Bug #11756464)

  • The server now includes the thread ID in rows written to the slow query log. In the slow query log file, the thread ID is the last value in the line. In the mysql.slow_log log table, there is a new thread_id column.

    To update the slow_log table if you are upgrading from an earlier release, run mysql_upgrade and restart the server. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. (Bug #53630, Bug #11761166)

  • Multi-read range access is now based on cost estimates and no longer used for simple queries for which it is not beneficial. (Bug #37576, Bug #11748865)

  • mysqldump --xml now displays comments from column definitions. (Bug #13618, Bug #11745324)

  • A new plugin service, my_plugin_log_service, enables plugins to report errors and specify error messages. The server writes the messages to the error log. See Section 22.2.5, “MySQL Services for Plugins”.

  • Previously, for queries that were aborted due to a sort problem or terminated with KILL in the middle of a sort, the server wrote the message Sort aborted to 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_size to be allocated

    • Somebody ran KILL id in the middle of a filesort operation

    • The 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)

  • The undocumented SHOW NEW MASTER statement has been removed.

  • Windows provides APIs based on UTF-16LE for reading from and writing to the console. MySQL now supports a utf16le character set for UTF-16LE, and the mysql client for Windows has been modified to provide improved Unicode support by using these APIs.

    To take advantage of this change, you must run mysql within a console that uses a compatible Unicode font and set the default character set to a Unicode character set that is supported for communication with the server. For instructions, see Section 4.5.1.6.1, “Unicode Support on Windows”.

Bugs Fixed

  • Security Fix: Pre-evaluation of LIKE predicates during view preparation could cause a server crash. (Bug #54568, Bug #11762026, CVE-2010-3836)

  • Performance: InnoDB: An UPDATE statement for an InnoDB table could be slower than necessary if it changed a column covered by a prefix index, but did not change the prefix portion of the value. The fix improves performance for InnoDB 1.1 in MySQL 5.5 and higher, and the InnoDB Plugin for MySQL 5.1. (Bug #58912, Bug #11765900)

  • Incompatible Change: Replication: It is no longer possible to issue a CREATE TABLE ... SELECT statement which changes any tables other than the table being created. Any such statement is not executed and instead fails with an error.

    One consequence of this change is that FOR UPDATE may no longer be used at all with the SELECT portion of a CREATE TABLE ... SELECT.

    This means that, prior to upgrading from a previous release, you should rewrite any CREATE TABLE ... SELECT statements that cause changes in other tables so that the statements no longer do so.

    This change also has implications for statement-based replication between a MySQL 5.6 (or later slave) and a master running a previous version of MySQL. In such a case, if a CREATE TABLE ... SELECT statement on the master that causes changes in other tables succeeds on the master, the statement nonetheless fails on the slave, causing replication to stop. To keep this from happening, you should either use row-based replication, or rewrite the offending statement before running it on the master. (Bug #11749792, Bug #11745361, Bug #39804, Bug #55876)

    References: See also Bug #47899.

  • Incompatible Change: When auto_increment_increment is 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 UNSIGNED value. 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 col_name), where col_name is a DATE or DATETIME column, is now disallowed altogether because its return value depends on the value of the default_week_format system variable. (Bug #54483, Bug #11761948)

    References: See also Bug #57071, Bug #11764255.

  • Important Change: Replication: The CHANGE MASTER TO statement required the value for RELAY_LOG_FILE to be an absolute path, whereas the MASTER_LOG_FILE path could be relative.

    The inconsistent behavior is resolved by permitting relative paths for RELAY_LOG_FILE, in which case the path is assumed to be relative to the slave's data directory. (Bug #12190, Bug #11745232)

  • Partitioning: InnoDB: 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 InnoDB tables. (Bug #59013)

  • InnoDB: This fix introduces a new configuration option, innodb_change_buffer_max_size, which defines the size of the change buffer as a percentage of the size of the buffer pool. Because the change buffer shares memory space with the buffer pool, a workload with a high rate of DML operations could cause pages accessed by queries to age out of the buffer pool sooner than desirable. This fix also devotes more I/O capacity to flushing entries from the change buffer when it exceeds 1/2 of its maximum size. (Bug #11766168, Bug #59214)

  • InnoDB: It was not possible to query the information_schema.INNODB_TRX table while other connections were running queries involving BLOB types. (Bug #55397, Bug #11762763)

  • InnoDB: The presence of a double quotation mark inside the COMMENT field for a column could prevent a foreign key constraint from being created properly. (Bug #59197, Bug #11766154)

  • InnoDB: InnoDB returned values for rows examined in the query plan that were higher than expected. NULL values were treated in an inconsistent way. The inaccurate statistics could trigger false positives in combination with the max_join_size setting, because the queries did not really examine as many rows as reported.

    A new configuration option innodb_stats_method lets you specify how NULL values are treated when calculating index statistics. Allowed values are nulls_equal (the default), nulls_unequal and null_ignored. The meanings of these values are similar to those of the myisam_stats_method option. (Bug #30423)

  • Partitioning: Failed ALTER TABLE ... PARTITION statements could cause memory leaks. (Bug #56380, Bug #11763641)

    References: See also Bug #46949, Bug #11755209, Bug #56996, Bug #11764187.

  • Replication: When using the statement-based logging format, INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE statements 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 SLAVE stopped 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 SLAVE stops 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)

  • Replication: The --help text for mysqlbinlog now indicates that the --verbose (-v) option outputs pseudo-SQL that is not necessarily valid SQL and cannot be guaranteed to work verbatim in MySQL clients. (Bug #47557, Bug #11755743)

  • Replication: mysqlbinlog printed USE statements 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 TABLE statement failed with Error: No Database Selected because the second USE statement was not played back, due to the fact that a database other than mydb was never selected.

    This fix ensures that mysqlbinlog outputs a USE statement whenever it reads one from the binary log. (Bug #50914, Bug #11758677)

  • Two unused test files in storage/ndb/test/sql contained 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.

  • An OUTER JOIN query using WHERE col_name IS NULL could return an incorrect result. (Bug #58490, Bug #11765513)

  • When using ExtractValue() or UpdateXML(), 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)

  • Issuing EXPLAIN EXTENDED for a query that would use condition pushdown could cause mysqld to crash. (Bug #58553, Bug #11765570)

  • An assertion could be raised if –1 was inserted into an AUTO_INCREMENT column by a statement writing more than one row. (Bug #50619, Bug #11758417)

  • On FreeBSD, if mysqld was killed with a SIGHUP signal, it could corrupt InnoDB .ibd files. (Bug #51023, Bug #11758773)

  • An uninitialized variable for the index condition pushdown access method could result in a server crash or Valgrind warnings. (Bug #58837, Bug #11765834)

  • If filesort fell back to an ordinary sort/merge, it could fail to handle memory correctly. (Bug #59331, Bug #11766260)

  • In a subquery, a UNION with no referenced tables (or only a reference to the DUAL virtual table) did not permit an ORDER BY clause. (Bug #58970, Bug #11765950)

  • MIN(year_col) could return an incorrect result in some cases. (Bug #59211, Bug #11766165)

  • Comparisons of aggregate values with TIMESTAMP values were incorrect. (Bug #59330, Bug #11766259)

  • If max_allowed_packet was set larger than 16MB, the server failed to reject too-large packets with Packet too large errors. (Bug #58887, Bug #11765878)

  • OPTIMIZE TABLE for an InnoDB table could raise an assertion if the operation failed because it had been killed. (Bug #58933, Bug #11765920)

  • --autocommit=ON did not work (it set the global autocommit value to 0, not 1). (Bug #59432, Bug #11766339)

  • Valgrind warnings about uninitialized variables were corrected. (Bug #59145, Bug #11766106)

  • 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 DEFAULT_CHARSET and DEFAULT_COLLATION CMake options did not work. (Bug #58991, Bug #11765967)

  • When mysqladmin was run with the --sleep and --count options, it went into an infinite loop executing the specified command. (Bug #58221, Bug #11765270)

  • mysqlslap failed to check for a NULL return from mysql_store_result() and crashed trying to process the result set. (Bug #59109, Bug #11766074)

  • DELETE or UPDATE statements could fail if they used DATE or DATETIME values with a year, month, or day part of zero. (Bug #59173)

  • Running a query against an InnoDB table twice, first with index condition pushdown enabled and then with it disabled, could produce different results. (Bug #58816, Bug #11765813)

  • For DIV expressions, assignment of the result to multiple variables could cause a server crash. (Bug #59241, Bug #11766191)

    References: See also Bug #8457.

  • If one connection locked the mysql.func table using either FLUSH TABLES WITH READ LOCK or LOCK TABLE mysql.func WRITE and a second connection tried to either create or drop a UDF function, a deadlock occurred when the first connection tried to use a UDF function. (Bug #53322, Bug #11760878)

  • The parser failed to initialize some internal objects properly, which could cause a server crash in the cleanup phase after statement execution. (Bug #47511, Bug #11755703)

  • In debug builds, SUBSTRING_INDEX(FORMAT(...), FORMAT(...)) could cause a server crash. (Bug #58371, Bug #11765406)

  • A NOT IN predicate with a subquery containing a HAVING clause could retrieve too many rows, when the subquery itself returned NULL. (Bug #58818, Bug #11765815)

  • Outer joins on a unique key could return incorrect results. (Bug #57034, Bug #11764219)

  • The ESCAPE clause for the LIKE operator permits only expressions that evaluate to a constant at execution time, but aggregate functions were not being rejected. (Bug #59149, Bug #11766110)

  • WHERE conditions of the following forms were evaluated incorrectly and could return incorrect results:

    WHERE null-valued-const-expression NOT IN (subquery)
    WHERE null-valued-const-expression IN (subquery) IS UNKNOWN
    

    (Bug #58628, Bug #11765642)

  • Condition pushdown optimization could push down conditions with incorrect column references. (Bug #58134, Bug #11765196)

  • Outer joins with an empty table could produce incorrect results. (Bug #58422, Bug #11765451)

  • A query that contained an aggregate function but no GROUP BY clause was implicitly grouped. But implicitly grouped queries return zero or one row, so ordering does not make sense. (Bug #47853)

  • The server and client did not always properly negotiate authentication plugin names. (Bug #59453, Bug #11766356)

  • SHOW PRIVILEGES did not display a row for the PROXY privilege. (Bug #59275, Bug #11766216)

  • The Performance Schema did not update status handler status variables, so SHOW STATUS LIKE '%handler%' produced undercounted values. (Bug #59799, Bug #11766645)

  • The mysql client went into an infinite loop if the standard input was a directory. (Bug #57450, Bug #11764598)

  • Aggregation followed by a subquery could produce an incorrect result. (Bug #59839, Bug #11766675)

  • A query of the following form returned an incorrect result, where the values for col_name in the result set were entirely replaced with NULL values:

    SELECT DISTINCT col_name ... ORDER BY col_name DESC;
    

    (Bug #59308, Bug #11766241)

  • mysqldump did not quote database names in ALTER DATABASE statements in its output, which could cause an error at reload time for database names containing a dash. (Bug #59398, Bug #11766310)

  • SHOW PROFILE could truncate source file names or fail to show function names. (Bug #59273, Bug #11766214)

  • Memory leaks detected by Valgrind, some of which could cause incorrect query results, were corrected. (Bug #59110, Bug #11766075)

  • 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 function INSERT(), undefined behavior ensued. (Bug #58165, Bug #11765225)

  • Some 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 some systems, debug builds of comp_err could fail due to an uninitialized variable. (Bug #59906, Bug #11766729)

  • 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:

    • MyISAM: Got error 134 from storage engine

    • InnoDB: Can't find record in 'tbl'

    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)

  • DES_DECRYPT() could crash if the argument was not produced by DES_ENCRYPT(). (Bug #59632, Bug #11766505)

  • On FreeBSD and OpenBSD, the server incorrectly checked the range of the system date, causing legal values to be rejected. (Bug #55755, Bug #11763089)

  • Parsing nested regular expressions could lead to recursion resulting in a stack overflow crash. (Bug #58026, Bug #11765099)

  • With index condition pushdown enabled, a join could produce an extra row due to parts of the select condition for the second table in the join not being evaluated. (Bug #59186, Bug #11766144)

  • injector::transaction did not have support for rollback. (Bug #58082, Bug #11765150)

  • With index condition pushdown enabled, incorrect results were returned for queries on MyISAM tables involving HAVING and LIMIT, when the column in the WHERE condition contained NULL. (Bug #58838, Bug #11765835)

  • Starting the server with the --defaults-file=file_name option, where the file name had no extension, caused a server crash. (Bug #58455, Bug #11765482)

  • Internally, XOR items partially behaved like functions and partially as conditions. This resulted in inconsistent handling and crashes. The issue is fixed by consistently treating XOR items as functions. (Bug #59793, Bug #11766642)

  • SHOW WARNINGS output following EXPLAIN EXTENDED could include unprintable characters. (Bug #57341, Bug #11764503)

  • An assertion was raised if a stored routine had a DELETE IGNORE statement that failed but due to the IGNORE had not reported any error. (Bug #58709, Bug #11765717)

  • For a query that used a subquery that included GROUP BY inside a < ANY() construct, no rows were returned when there should have been. (Bug #56690, Bug #11763918)

  • There was an erroneous restriction on file attributes for LOAD DATA INFILE. (Bug #59085, Bug #11766052)

  • SHOW CREATE TRIGGER failed if there was a temporary table with the same name as the trigger subject table. (Bug #58996, Bug #11765972)

  • DISTINCT aggregates on DECIMAL UNSIGNED fields could trigger an assertion. (Bug #52171, Bug #11759827)

  • Bitmap functions used in one thread could change bitmaps used by other threads, raising an assertion. (Bug #43152, Bug #11752069)

  • Attempting to create a spatial index on a CHAR column longer than 31 bytes led to an assertion failure if the server was compiled with safemutex support. (Bug #59888, Bug #11766714)

  • An assertion was raised if an XA COMMIT was 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)

  • The MYSQL_HOME environment variable was being ignored. (Bug #59280, Bug #11766219)

  • When CASE ... WHEN arguments had different character sets, 8-bit values could be referenced as utf16 or utf32 values, raising an assertion. (Bug #44793, Bug #11753363)

  • An incorrect character set pointer passed to my_strtoll10_mb2() caused an assertion to be raised. (Bug #59648, Bug #11766519)

  • The greedy query plan optimizer failed to consider the size of intermediate query results when calculating the cost of a query. This could result in slowly executing queries when there are much faster execution plans available. (Bug #59326, Bug #11766256)

  • FIND_IN_SET() could work differently in MySQL 5.5 than in 5.1. (Bug #59405, Bug #11766317)

  • Setting the optimizer_switch system variable to an invalid value caused a server crash. (Bug #59894, Bug #11766719)

  • On Windows, an object in thread local storage could be used before the object was created. (Bug #55730, Bug #11763065)

  • DATE_ADD() and DATE_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 of connection_collation. (Bug #31384, Bug #11747221)

D.1.10. Changes in MySQL 5.6.1 (Not released, Milestone 5)

Note

This is a milestone release, for use at your own risk. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward.

Performance Schema Notes

  • The Performance Schema has these additions:

    • The setup_consumers table contents have changed. Previously, the table used a flat structure with a one-to-one correspondence between consumer name and destination table. This has been replaced with a hierarchy of consumer settings that enable progressively finer control of which destinations receive events. The previous xxx_summary_xxx consumers no longer exist. Instead, the Performance Schema maintains appropriate summaries automatically for the levels for which settings in the consumer hierarchy are enabled. For example, if only the top-level (global) consumer is enabled, only global summaries are maintained. Others, such as thread-level summaries, are not. See Section 20.2.3.2.1.4, “Pre-Filtering by Consumer”. In addition, optimizations have been added to reduce Performance Schema overhead.

    • It is now possible to filter events by object using the new setup_objects table. Currently, this table can be used to selectively instrument tables, based on schema names and/or table names. See Section 20.2.3.2.1.2, “Pre-Filtering by Object”. A new table, objects_summary_global_by_type, summarizes events for objects.

    • It is now possible to filter events by thread, and the Performance Schema collects more information for each thread. A new table, setup_actors, can be used to selectively instrument user connections, based on the user name and/or host name of each connecting session. The threads table, which contains a row for each active server thread, was extended with several new columns. With these additions, the information available in threads is like that available from the INFORMATION_SCHEMA.PROCESSLIST table or the output from SHOW PROCESSLIST. Thus, all three serve to provide information for thread-monitoring purposes. Use of threads differs from use of the other two thread information sources in these ways:

      • Access to threads does not require a mutex and has minimal impact on server performance. INFORMATION_SCHEMA.PROCESSLIST and SHOW PROCESSLIST have negative performance consequences because they require a mutex.

      • threads provides additional information for each thread, such as whether it is a foreground or background thread, and the location within the server associated with the thread.

      • threads provides information about background threads. This means that threads can be used to monitor activity the other thread information sources cannot.

      • You can control which threads are monitored by setting the INSTRUMENTED column or by using the setup_actors table.

      For these reasons, DBAs who perform server monitoring using INFORMATION_SCHEMA.PROCESSLIST or SHOW PROCESSLIST may wish to monitor using threads instead.

    If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the performance_schema database.

    For more information, see Chapter 20, MySQL Performance Schema.

Functionality Added or Changed

  • Incompatible Change: The following obsolete constructs have been removed. Where alternatives are shown, applications should be updated to use them.

  • Important Change: Replication: Replication filtering options such as --replicate-do-db, --replicate-rewrite-db, and --replicate-do-table were not consistent with one another in regard to case sensitivity. Now all --replicate-* options follow the same rules for case sensitivity applying to names of databases and tables elsewhere in the MySQL server, including the effects of the lower_case_table_names system variable. (Bug #51639, Bug #11759334)

  • Important Change: Replication: Added the MASTER_RETRY_COUNT option to the CHANGE MASTER TO statement, and a corresponding Master_Retry_Count column to the output of SHOW SLAVE STATUS. The option sets the value shown in this column. MASTER_RETRY_COUNT is intended eventually to replace the older (and now deprecated) --master-retry-count server option, and is now the preferred method for setting the maximum number of times that the slave may attempt to reconnect after losing its connection to the master. (Bug #44209, Bug #11752887, Bug #44486, Bug #11753110)

  • InnoDB: InnoDB can now report the total size of the rollback segment, measured in pages. The value is reported through the information_schema.innodb_metrics table, using the counter trx_rseg_curent_size. You enable and query the counter as follows:

    mysql (information_schema) > set global innodb_monitor_enable = 'trx_rseg_curent_size';
    
    mysql (information_schema) > select name, count, max_count, comment from innodb_metrics where name = 'trx_rseg_curent_size';
    +----------------------+-------+-----------+----------------------------------------+
    | name                 | count | max_count | comment                                |
    +----------------------+-------+-----------+----------------------------------------+
    | trx_rseg_curent_size |   346 |       346 | Current rollback segment size in pages |
    +----------------------+-------+-----------+----------------------------------------+

    (Bug #57584)

  • Replication: Added the Slave_last_heartbeat status variable, which shows when a replication slave last received a heartbeat signal. The value is displayed using TIMESTAMP format. (Bug #45441)

  • Replication: SHOW SLAVE STATUS now displays the actual number of retries for each connection attempt made by the I/O thread. (Bug #56416, Bug #11763675)

  • Replication: Timestamps have been added to the output of SHOW SLAVE STATUS to show when the most recent I/O and SQL thread errors occurred. The Last_IO_Error column is now prefixed with the timestamp for the most recent I/O error, and Last_SQL_Error shows the timestamp for the most recent SQL thread error. The timestamp values use the format YYMMDD HH:MM:SS in both of these columns. For more information, see Section 13.7.5.35, “SHOW SLAVE STATUS Syntax”. (Bug #43535, Bug #11752361)

  • Unknown table error messages that included only the table name now include the database name as well. (Bug #34750, Bug #11747993)

  • There is now a bind_address system variable containing the value of the --bind-address option. This enables the address to be accessed at runtime. (Bug #44355, Bug #11752999)

  • A --bind-address option 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 a MYSQL_OPT_BIND option for specifying the interface. The argument is a host name or IP address (specified as a string).

  • The Block Nested-Loop (BNL) Join algorithm previously used only for inner joins has been extended and can be employed for outer join operations, including nested outer joins. For more information, see Section 8.13.11, “Block Nested-Loop and Batched Key Access Joins”.

    In conjunction with this work, a new system variable, optimizer_join_cache_level, controls how join buffering is done.

  • Several changes were made to optimizer-related system variables:

  • Croatian collations were added for Unicode character sets: utf8_croatian_ci, ucs2_croatian_ci, utf8mb4_croatian_ci, utf16_croatian_ci, and utf32_croatian_ci. Thee collations have tailoring for Croatian letters: Č, Ć, , Đ, Lj, Nj, Š, Ž. They are based on Unicode 4.0.

  • Previously, EXPLAIN output for a large union truncated the UNION RESULT row at the end of the list as follows if the string became too large:

    <union1,2,3,4,...>

    To make it easier to understand the union boundaries, truncation now occurs in the middle of the string:

    <union1,2,3,...,9>

    (Bug #30597, Bug #11747073)

  • Changes to replication in MySQL 5.6 make mysqlbinlog output generated by the --base64-output=ALWAYS option unusable. ALWAYS is now an invalid value for this option. If the option is given without a value, the effect is now the same as --base64-output=AUTO rather than --base64-output=ALWAYS.

    References: See also Bug #28760.

  • The OpenGIS specification defines functions that test the relationship between two geometry values. MySQL originally implemented these functions such that they used object bounding rectangles and returned the same result as the corresponding MBR-based functions. Corresponding versions are now available that use precise object shapes. These versions are named with an ST_ prefix. For example, Contains() uses object bounding rectangles, whereas ST_Contains() uses object shapes. For more information, see Section 12.17.5.4.2, “Functions That Test Spatial Relationships Between Geometries”.

    There are also now ST_ aliases for existing spatial functions that were already exact. For example, ST_IsEmpty() is an alias for IsEmpty()

    In addition, the IsSimple() spatial function is now implemented. (Bug #4249, Bug #11744883)

  • The Unicode implementation has been extended to include a utf16le character set, which corresponds to the UTF-16LE encoding of the Unicode character set. This is similar to utf16 (UTF-16) but is little-endian rather than big-endian.

    Two utf16le collations are available:

    • utf16le_general_ci: The default collation, case sensitive (similar to utf16_general_ci).

    • utf16le_bin: Case sensitive, with by-codepoint comparison that provides the same order as utf16_bin.

    There are some limitations on the use of utf16le. With the exception of the item regarding user-defined collations, these are the same as the limitations on ucs2, utf16, and utf32.

    • utf16le cannot be used as a client character set, which means that it also does not work for SET NAMES or SET CHARACTER SET.

    • It is not possible to use LOAD DATA INFILE to load data files that use utf16le.

    • FULLTEXT indexes cannot be created on a column that uses utf16le. However, you can perform IN BOOLEAN MODE searches on the column without an index.

    • The use of ENCRYPT() with utf16le is not recommended because the underlying system call expects a string terminated by a zero byte.

    • It is not possible to create user-defined UCA collations for utf16le because there is no utf16le_unicode_ci collation, which would serve as the basis for such collations.

  • TO_BASE64() and FROM_BASE64() functions are now available to perform encoding to and from base-64 strings.

  • Support for adding Unicode collations that are based on the Unicode Collation Algorithm (UCA) has been improved:

    • MySQL now recognizes a larger subset of the LDML syntax that is used to write collation descriptions. In many cases, it is possible to download a collation definition from the Unicode Common Locale Data Repository and paste the relevant part (that is, the part between the <rules> and </rules> tags) into the MySQL Index.xml file.

    • Character representation in LDML rules is more flexible. Any character can be written literally, not just basic Latin letters. For collations based on UCA 5.2.0, hexadecimal notation can be used for any character, not just BMP characters.

    • When problems are found while parsing Index.xml, better diagnostics are produced.

    • For collations that require tailoring rules, there is no longer a fixed size limit on the tailoring information.

    For more information, see Section 10.4.4.2, “LDML Syntax Supported in MySQL”, and Section 10.4.4.3, “Diagnostics During Index.xml Parsing”.

  • The following items are deprecated and will be removed in a future MySQL release. Where alternatives are shown, applications should be updated to use them.

Bugs Fixed

  • Incompatible Change: Replication: When determining whether to replicate a CREATE DATABASE, DROP DATABASE, or ALTER DATABASE statement, database-level options now take precedence over any --replicate-wild-do-table options. In other words, when trying to replicate one of these statements, --replicate-wild-do-table options are now checked if and only if there are no database-level options that apply to the statement. (Bug #46110, Bug #11754498)

  • Incompatible Change: Replication: The behavior of INSERT DELAYED statements when using statement-based replication has changed as follows:

    Previously, when using binlog_format=STATEMENT, a warning was issued in the client when executing INSERT DELAYED; now, no warning is issued in such cases.

    Previously, when using binlog_format=STATEMENT, INSERT DELAYED was logged as INSERT DELAYED; now, it is logged as an INSERT, without the DELAYED option.

    However, when binlog_format=STATEMENT, INSERT DELAYED continues to be executed as INSERT (without the DELAYED option). The behavior of INSERT DELAYED remains unchanged when using binlog_format=ROW: INSERT DELAYED generates no warnings, is executed as INSERT DELAYED, and is logged using the row-based format.

    This change also affects binlog_format=MIXED, because INSERT DELAYED is no longer considered unsafe. Now, when the logging format is MIXED, no switch to row-based logging occurs. This means that the statement is logged as a simple INSERT (that is, without the DELAYED option), 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: CREATE TABLE statements (including CREATE TABLE ... LIKE) are now prohibited whenever a LOCK TABLES statement is in effect.

    One consequence of this change is that CREATE TABLE ... LIKE makes the same checks as CREATE TABLE and does not just copy the .frm file. 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: Starvation of FLUSH TABLES WITH READ LOCK statements 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 a HANDLER statement tried to update data through a DML statement while another connection tried to execute FLUSH TABLES WITH READ LOCK concurrently.

    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_metadata mutex was replaced with metadata locks on events. As a result, DDL operations on events are now prohibited under LOCK 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 for FLUSH TABLES WITH READ LOCK are 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 lock is replaced by Waiting for global read lock.

      • Previously, Waiting for release of readlock was used to indicate that DML/DDL statements were waiting for release of a read lock and Waiting to get readlock was used to indicate that FLUSH TABLES WITH READ LOCK was waiting to acquire a global read lock. Now Waiting for global read lock is used for both cases.

      • Previously, Waiting for release of readlock was used for all statements that caused an explicit or implicit commit to indicate that they were waiting for release of a read lock and Waiting for all running commits to finish was used by FLUSH TABLES WITH READ LOCK. Now Waiting for commit lock is used for both cases.

      • There are two other new states, Waiting for trigger metadata lock and Waiting for event metadata lock.

    (Bug #57006, Bug #11764195, Bug #54673, Bug #11762116)

  • InnoDB: Replication: If the master had innodb_file_per_table=OFF, innodb_file_format=Antelope (and innodb_strict_mode=OFF), or both, certain CREATE TABLE options, such as KEY_BLOCK_SIZE, were ignored. This could permit the master to avoid raising ER_TOO_BIG_ROWSIZE errors.

    However, the ignored CREATE TABLE options were still written into the binary log, so that, if the slave had innodb_file_per_table=ON and innodb_file_format=Barracuda, it could encounter an ER_TOO_BIG_ROWSIZE error 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_table and innodb_file_format. This could cause problems during upgrades.

    To address this issue, the default values for innodb_file_per_table and innodb_file_format are reverted to the MySQL 5.1 default values—that is, OFF and Antelope, respectively. (Bug #56318, Bug #11763590)

  • InnoDB: If the MySQL Server crashed immediately after creating an InnoDB table, the server could quit with a signal 11 during the subsequent restart. The issue could occur if the server halted after InnoDB created 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: With binary logging enabled, InnoDB could halt during crash recovery with a message referring to a transaction ID of 0. (Bug #54901, Bug #11762323)

  • Replication: Due to changes made in MySQL 5.5.3, settings made in the binlog_cache_size and max_binlog_cache_size server 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 variables binlog_stmt_cache_size and max_binlog_stmt_cache_size, which affect only the binary log statement cache.

    In addition, the Binlog_cache_use status variable was incremented whenever either cache was used, and Binlog_cache_disk_use was 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 variables Binlog_stmt_cache_use and Binlog_stmt_cache_disk_use, which are incremented only by usage of the binary log statement cache.

    The behavior of the max_binlog_cache_size system variable with regard to active sessions has also been changed to match that of the binlog_cache_size system variable: Previously, a change in max_binlog_cache_size took effect in existing sessions; now, as with a change in binlog_cache_size, a change in max_binlog_cache_size takes 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.6, “Server Status Variables”. (Bug #57275, Bug #11764443)

  • Replication: The Binlog_cache_use and Binlog_cache_disk_use status variables 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: 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.

  • Replication: When lower_case_table_names was set to 1 on the slave, but not on the master, names of databases in replicated statements were not converted, causing replication to fail on slaves using case-sensitive file systems. This occurred for both statement-based and row-based replication.

    In addition, when using row-based replication with lower_case_table_names set to 1 on the slave only, names of tables were also not converted, also causing replication failure on slaves using case-sensitive file systems. (Bug #37656)

  • Replication: When STOP SLAVE is 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 contained CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, 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 subsequent START SLAVE statement, 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 TABLE statements, DROP TEMPORARY TABLE statements, or both, the SQL thread now waits until the transaction ends, then stops. (Bug #56118, Bug #11763416)

  • The range optimizer ignored conditions on inner tables in semi-join IN subqueries, causing the optimizer to miss good query execution plans. (Bug #35674, Bug #11748263)

  • A server crash or memory overrun could occur with a dependent subquery and joins. (Bug #34799, Bug #11748009)

  • Selecting from a view that referenced the same table in the FROM clause and an IN clause caused a server crash. (Bug #33245)

  • The server returned incorrect results for WHERE ... OR ... GROUP BY queries against InnoDB tables. (Bug #37977, Bug #11749031)

  • An incorrectly checked XOR subquery optimization resulted in an assertion failure. (Bug #37899, Bug #11748998)

  • A query that could use one index to produce the desired ordering and another index for range access with index condition pushdown could cause a server crash. (Bug #37851, Bug #11748981)

  • The optimizer could underestimate the memory required for column descriptors during join processing and cause memory corruption or a server crash. (Bug #42744, Bug #11751763)

  • NULL values were not grouped properly for some joins containing GROUP BY. (Bug #45267, Bug #11753766)

  • A HAVING clause could be lost if an index for ORDER BY was available, incorrectly permitting additional rows to be returned. (Bug #45227, Bug #11753730)

  • A Valgrind failure occurred in fn_format when called from archive_discover. (Bug #58205, Bug #11765259)

  • Passing a string that was not null-terminated to UpdateXML() or ExtractValue() caused the server to fail with an assertion. (Bug #57279, Bug #11764447)

  • With index condition pushdown enabled, InnoDB could crash due to a mismatch between what pushdown code expected to be in a record versus what was actually there. (Bug #36981, Bug #11748647)

  • In bootstrap mode, the server could not execute statements longer than 10,000 characters. (Bug #55817, Bug #11763139)

  • After setting collation_connection to one of the collations for the ucs2 or utf16 character sets, it was not possible to change the collation thereafter. (Bug #65000, Bug #13970475)

  • The server crashed on optimizations that used the range checked for each record access method. (Bug #32229, Bug #11747417)

  • The server crashed on optimization of queries that compared an indexed DECIMAL column with a string value. (Bug #32262, Bug #11747426)

  • Compared to MySQL 5.1, the optimizer failed to use join buffering for certain queries, resulting in slower performance for those queries. (Bug #30363, Bug #11747028)

  • If the optimizer used a Multi-Range Read access method for index lookups, incorrect results could occur for rows that contained any BLOB or TEXT data types. (Bug #30622, Bug #11747076)

  • For Multi-Range Read scans used to resolve LIMIT queries, failure to close the scan caused file descriptor leaks for MyISAM tables. (Bug #30221, Bug #11746994)

  • Deeply nested subqueries could cause stack overflow or a server crash. (Bug #32680, Bug #11747503)

  • SHOW CREATE DATABASE did not account for the value of the lower_case_table_names system variable. (Bug #21317, Bug #11745926)

  • Contains() failed for multipolygon geometries. (Bug #32032, Bug #11747370)

D.1.11. Changes in MySQL 5.6.0 (Not released, Milestone 4)

Note

This is a milestone release, for use at your own risk. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward.

Performance Schema Notes

  • The Performance Schema now includes instrumentation for table input and output. Instrumented operations include row-level accesses to persistent base tables or temporary tables. Operations that affect rows are fetch, insert, update, and delete. For a view, waits are associated with base tables referenced by the view.

Globally Unique Server IDs

  • Replication: Globally unique IDs for MySQL servers were implemented. A UUID is now obtained automatically when the MySQL server starts. The server first checks for a UUID written in the auto.cnf file (in the server's data directory), and uses this UUID if found. Otherwise, the server generates a new UUID and saves it to this file (and creates the file if it does not already exist). This UUID is available as the server_uuid system variable.

    MySQL replication masters and slaves know each other's UUIDs. The value of a slave's UUID can be read in the output of SHOW SLAVE HOSTS. After a slave is started using START SLAVE, the value of the master's UUID is available on the slave in the output of SHOW SLAVE STATUS. (Bug #33815, Bug #11747723)

    References: See also Bug #16927, Bug #11745543.

Functionality Added or Changed

  • Partitioning: It is now possible to exchange a partition of a partitioned table or a subpartition of a subpartitioned table with a nonpartitioned table that otherwise has the same structure using the ALTER TABLE ... EXCHANGE PARTITION statement. This can be used, for example, for importing and exporting partitions.

    For more information and examples, see Section 17.3.3, “Exchanging Partitions and Subpartitions with Tables”.

  • Replication: These unused and deprecated items have been removed: the --init-rpl-role and --rpl-recovery-rank options, the rpl_recovery_rank system variable, and the Rpl_status status variable. (Bug #54649, Bug #11762095)

    References: See also Bug #34437, Bug #11747900, Bug #34635, Bug #11747961.

  • Replication: The SHOW SLAVE STATUS statement now has a Master_Info_File field indicating the location of the master.info file. (Bug #50316, Bug #11758151)

  • Replication: MySQL now supports delayed replication such that a slave server deliberately lags behind the master by at least a specified amount of time. The default delay is 0 seconds. Use the new MASTER_DELAY option for CHANGE MASTER TO to set the delay to N seconds:

    CHANGE MASTER TO MASTER_DELAY = N;
    

    An event received from the master is not executed until at least N seconds later than its execution on the master.

    START SLAVE and STOP SLAVE take effect immediately and ignore any delay. RESET SLAVE resets the delay to 0.

    SHOW SLAVE STATUS has three new fields that provide information about the delay:

    • SQL_Delay: The number of seconds that the slave must lag the master.

    • SQL_Remaining_Delay: When Slave_SQL_Running_State is Waiting until MASTER_DELAY seconds after master executed event, this field contains the number of seconds left of the delay. At other times, this field is NULL.

    • Slave_SQL_Running_State: The state of the SQL thread (analogous to Slave_IO_State). The value is identical to the State value of the SQL thread as displayed by SHOW PROCESSLIST.

    When the slave SQL thread is waiting for the delay to elapse before executing an event, SHOW PROCESSLIST displays its State value as Waiting until MASTER_DELAY seconds after master executed event.

    The relay-log.info file now contains the delay value, so the file format has changed. See Section 16.2.2.2, “Slave Status Logs”. In particular, the first line of the file now indicates how many lines are in the file. If you downgrade a slave server to a version older than MySQL 5.6, the older server will not read the file correctly. To address this, modify the file in a text editor to delete the initial line containing the number of lines.

    The introduction of delayed replication entails these restrictions:

    • Previously the BINLOG statement could execute all types of events. Now it can execute only format description events and row events.

    • The output from mysqlbinlog --base64-output=ALWAYS cannot be parsed. ALWAYS becomes an invalid value for this option in 5.6.1.

    For additional information, see Section 16.3.9, “Delayed Replication”. (Bug #28760, Bug #11746794)

  • The Romansh locale 'rm_CH' is now a permissible value for the lc_time_names system variable. (Bug #50915, Bug #11758678)

  • mysqlbinlog now has a --binlog-row-event-max-size option to enable large row events to be read from binary log files. (Bug #49932)

  • mysqldump now has an --add-drop-trigger option which adds a DROP TRIGGER IF EXISTS statement before each dumped trigger definition. (Bug #34325, Bug #11747863)

  • A new SQL function, WEIGHT_STRING(), returns the weight string for an input string. The weight string represents the sorting and comparison value of the input string. See Section 12.5, “String Functions”.

  • mysqlbinlog now has the capability to back up a binary log in its original binary format. When invoked with the --read-from-remote-server and --raw options, mysqlbinlog connects to a server, requests the log files, and writes output files in the same format as the originals. See Section 4.6.8.3, “Using mysqlbinlog to Back Up Binary Log Files”.

  • The Unicode character sets now have a xxx_german2_ci collation that provides DIN-2 (phone book) ordering (for example, utf8_german2_ci). See Section 10.1.14.1, “Unicode Character Sets”.

  • In MySQL 5.5, setting optimizer_search_depth to the deprecated value of 63 switched to the algorithm used in MySQL 5.0.0 (and previous versions) for performing searches. The value of 63 is now treated as invalid.

  • Unicode collation names now may include a version number to indicate the Unicode Collation Algorithm (UCA) version on which the collation is based. Initial collations thus created use version UCA 5.2.0. For example, utf8_unicode_520_ci is based on UCA 5.2.0. UCA-based Unicode collation names that do not include a version number are based on version 4.0.0.

    LOWER() and UPPER() perform case folding according to the collation of their argument. A character that has uppercase and lowercase versions only in a Unicode version more recent than 4.0.0 will be converted by these functions only if the argument has a collation that uses a recent enough UCA version.

    The LDML rules for creating user-defined collations are extended to permit an optional version attribute in <collation> tags to indicate the UCA version on which the collation is based. If the version attribute is omitted, its default value is 4.0.0. See Section 10.4.4, “Adding a UCA Collation to a Unicode Character Set”.

  • Vietnamese collations were added for the Unicode character sets. Those based on Unicode Collation Algorithm 5.2.0 have names of the form xxx_vietnamese_520_ci (for example, utf8_vietnamese_520_ci). Those based on Unicode Collation Algorithm 4.0.0 have names of the form xxx_vietnamese_ci (for example, utf8_vietnamese_ci). These collations are the same as the corresponding xxx_unicode_520_ci and xxx_unicode_ci collations except for precomposed characters which are accented versions of A, D, E, O, and U. There is no change to ideographic characters derived from Chinese. There are no digraphs.

Bugs Fixed

  • Security Fix: Bug #49124 was fixed.

  • InnoDB: The server could crash on shutdown, if started with --innodb-use-system-malloc=0. (Bug #55581, Bug #11762927)

  • 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. Now unsigned_flag is copied when the user variable value is copied, and the copy of unsigned_flag is then used for logging. (Bug #51426, Bug #11759138)

    References: See also Bug #49562, Bug #11757508.

  • The BLACKHOLE storage engine failed to load on Solaris and OpenSolaris if DTrace probes had been enabled. (Bug #47748, Bug #11755909)

  • Passwords for CREATE USER statements were written to the binary log in plaintext rather than in ciphertext. (Bug #50172)

  • Performance Schema code was subject to a buffer overflow. (Bug #53363)

  • Some error messages included a literal mysql database name rather than a parameter for the database name. (Bug #46792, Bug #11755079)

  • On Windows, an IPv6 connection to the server could not be made using an IPv4 address or host name. (Bug #52381, Bug #11760016)

  • In the ER_TABLEACCESS_DENIED_ERROR error message, the command name parameter could be truncated. (Bug #45355, Bug #11753840)

  • On Windows, the my_rename() function failed to check whether the source file existed. (Bug #51861, Bug #11759540)

  • The embedded server could crash when determining which directories to search for option files. (Bug #55062, Bug #11762465)

  • Subquery execution for EXPLAIN could be done incorrectly and raise an assertion. (Bug #52317, Bug #11759957)

  • The ref column of EXPLAIN output for subquery lines could be missing information. (Bug #50257, Bug #11758106)

  • There was a mixup between GROUP BY and ORDER BY concerning which indexes should be considered or permitted during query optimization. (Bug #52081, Bug #11759746)

  • Searches for data on a partial index for a column using the utf8 character set would fail. (Bug #24858)

  • To forestall the occurrence of possible relocation errors in the future, libmysys, libmystrings, and libdbug have been changed from normal libraries to noinst libtool helper libraries, and are no longer installed as separate libraries. (Bug #29791, Bug #11746931)

  • On Windows, mysqlslap crashed for attempts to connect using shared memory. (Bug #31173, Bug #11747181, Bug #59107, Bug #11766072)

  • For queries with GROUP BY, FORCE INDEX was not ignored as it should have been when it would result in a more expensive query execution plan. (Bug #18144, Bug #11745649)

  • A suboptimal query execution plan could be chosen when there were several possible range and ref accesses. Now preference is given to the keys that match the most parts and choosing the best one among them. (Bug #26106, Bug #11746406)

D.2. MySQL Connector/ODBC (MyODBC) Change History

D.2.1. Changes in MySQL Connector/ODBC Version 5.2

MySQL Connector/ODBC offers the choice of a Unicode-enabled or ANSI driver, both built on the same modern, ODBC-compliant codebase. Consider upgrading if you have remained on Connector/ODBC 3.51 because of the performance edge of the ANSI driver.

D.2.1.1. Changes in MySQL Connector/ODBC 5.2.2 (2012-09-20)

This is the first GA release for the Connector/ODBC 5.2.x series. Now the available downloads include both a Unicode driver and an ANSI driver based on the same modern codebase. Server-side stored procedures are enabled by default.

Functionality Added or Changed

  • The implementation of the SQLBindParameter() function was enhanced to support out and inout parameters when calling stored procedures. Designate the bind parameters intended to hold output values from stored procedures using the type specifiers SQL_PARAM_OUTPUT or SQL_PARAM_INPUT_OUTPUT.

    Note

    Currently, the support for out and inout parameters does not apply to LONGTEXT and LONGBLOB columns.

  • Server-side prepared statements are now enabled by default. To revert to the former behavior, using client-side emulation for prepared statemnts, specify the NO_SSPS option when configuring the DSN.

  • The download page now offers choices of a Unicode driver or an ANSI driver. Now users can get an ANSI driver with the combination of high performance and the latest standard-compliant behavior, rather than staying on the older 3.51 codebase.

Bugs Fixed

  • Improved error handling for bad input data, such as an incorrect SQLSetConnectAttr length. This fix improves reliability in cases such as an ANSI application using a Unicode driver. (Bug #14620420)

  • The string returned by the SQLNativeSql function was not null-terminated as it should be. (Bug #14559721)

  • After executing a stored procedure returning a combination of resultsets and OUT parameters, Connector/ODB would be disconnected from the server. The issue occurred after fetching the result sets and executing a subsequent query. (Bug #14512187)

D.2.2. Changes in MySQL Connector/ODBC Version 5.1

D.2.2.1. Changes in MySQL Connector/ODBC 5.1.11 (2012-04-30)

Functionality Added or Changed

Bugs Fixed

  • The SQLTables() function did not return the catalog correctly if the wildcard or SQL_ALL_CATALOGS was used. (Bug #13914518)

  • The fraction member in SQL_TIMESTAMP_STRUCT was always set to 0 when a timestamp was retrieved using SQLGetData(). The fix causes the fraction member to be correctly set, with a value representing nanoseconds. This issue did not occur when a result was retrieved as a string (SQLGetData() with SQL_C_CHAR). (Bug #12767740, Bug #60646)

  • Fractional seconds part of timestamp was ignored in prepared statements that use SQLBindParameter and SQL_C_TIMESTAMP type. For example, a prepared query comparing two timestamp values that only differed in the fractional part would consider the values identical. (Bug #12767761, Bug #60648)

  • On Windows platforms, some memory was leaked on each connection attempt due to an incorrect response to a SQLGetDiagRec() call. (Bug #11766029, Bug #59059)

D.2.2.2. Changes in MySQL Connector/ODBC 5.1.10 (2012-02-02)

Bugs Fixed

  • SQLFetch has to return error if indicator pointer is NULL for NULL value. (Bug #13542600)

  • In some cases, a TIMESTAMP field could be described as SQL_NO_NULLS. (Bug #13532987)

  • A failure on one statement causes another statement to fail. (Bug #13097201, Bug #62657)

D.2.2.3. Changes in MySQL Connector/ODBC 5.1.9 (2011-10-06)

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 The PAM Authentication Plugin, and The Windows Native Authentication Plugin. These capabilities result from linking the Connector/ODBC binaries against the MySQL 5.5.16 libmysql rather than the MySQL 5.1 libmysql used previously. The newer libmysql includes the client-side support needed for the server-side PAM and Windows authentication plugins.

Bugs Fixed

  • Some catalog functions (such as SQLColumns(), SQLStatistics(), and SQLPrimaryKeys()) would only return one row, when called after pre-execution failed. (Bug #12824839)

  • The CLI installer script mysqlodbc-installer was missing documentation about how to configure the optional data source parameters. (Bug #12810058)

  • The Install.bat script contained leftover 3.51 information, and did not properly install the 5.1 Connector/ODBC connector. (Bug #12781039)

  • With the option charset=cp1251 specified in the connection string, the results could be returned as CP1251 or as UTF8 depending on the query. For example, these queries could give results in different code pages:

    select if(1=1,'string in cp1251 code page',0) as 'string in cp1251 code page';
    select 'string in cp1251 code page' as 'string in cp1251 code page';
    

    (Bug #11765110, Bug #58038)

  • An off-by-one error, where sqlwcharchr might read one SQLWCHAR after the end of a string. (Bug #61586)

  • SQLExecute would return SQL_SUCCESS_WITH_INFO instead of SQL_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_timeout condition occurred, the operation returned the standard "end of data" status, rather than an error. (Bug #39878)

  • MS Access fields with VARCHAR NOT NULL columns could not be altered. (Bug #31067)

D.2.2.4. Changes in MySQL Connector/ODBC 5.1.8 (2010-11-07)

Functionality Added or Changed

  • Documentation in .CHM and .HLP format has been removed from the distribution. (Bug #56232)

Bugs Fixed

  • 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)

  • 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 returned VARCHAR(20) instead of VARCHAR. (Bug #57182)

  • 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)

  • The MySQL Connector/ODBC MSI installer did not set the InstallLocation value in the Microsoft Windows registry. (Bug #56978)

  • In bulk upload mode, SQLExecute would return SQL_SUCCESS, even when the uploaded data contained errors, such as primary key duplication, and foreign key violation. (Bug #56804)

  • SQLDescribeCol and SQLColAttribute could not be called before SQLExecute, if the query was parameterized and not all parameters were bound.

    Note, MSDN states that For performance reasons, an application should not call SQLColAttribute/SQLDescribeCol before executing a statement. However, it should still be possible to do so if performance reasons are not paramount. (Bug #56717)

  • When SQLNumResultCols() was called between SQLPrepare() and SQLExecute() the driver ran SET @@sql_select_limit=1, which limited the resultset to just one row. (Bug #56677)

D.2.2.5. Changes in MySQL Connector/ODBC 5.1.7 (2010-08-24)

Functionality Added or Changed

  • MySQL Connector/ODBC has been changed to support the CLIENT_INTERACTIVE flag. (Bug #48603)

Bugs Fixed

  • When executing the SQLProcedureColumns() ODBC function, the driver reported the following error:

    MySQL server does not provide the requested information

    (Bug #50400)

  • 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)

  • In contrast to all other ODBC catalog functions SQLTablePrivileges required the user to have SELECT privilege 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)

  • Executing SQLForeignKeys to 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)

  • 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)

  • 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)

  • SQLColAttribute for SQL_DESC_OCTET_LENGTH returned length including terminating null byte. It should not have included the null byte. (Bug #54206)

  • The SQLTables() function required approximately two to four minutes to return the list of 400 tables in a database. The SHOW TABLE STATUS query used by SQLTables() 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)

  • 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)

  • 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)

  • SQLPrimaryKeysW returned mangled strings for table name, column name and primary key name. (Bug #36441)

  • The SQLColumns function returned the incorrect transfer octet length into the column BUFFER_LENGTH for DECIMAL type. (Bug #53235)

  • SQLDescribeCol returned incorrect column definitions for SQLTables result. (Bug #37621)

  • Describing a view or table caused SQLPrepare to prefetch table data. For large tables this created an intolerable performance hit. (Bug #46411)

  • Bulk upload operations did not work for queries that used parameters. (Bug #48310)

  • Calling SQLColAttribute on a date column did not set SQL_DESC_DATETIME_INTERVAL_CODE. SQLColAttribute returned SQL_SUCCESS but the integer passed in was not set to SQL_CODE_DATE. (Bug #44576)

  • MySQL Connector/ODBC manually added a LIMIT clause to the end of certain SQL statements, causing errors for statements that contained code that should be positioned after the LIMIT clause. (Bug #49726)

  • 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 in SQLBindCol. (Bug #32821)

  • Conversions for many types were missing from the file driver/info.c. (Bug #43855)

  • If NO_BACKSLASH_ESCAPES mode was used on a server, escaping binary data led to server query parsing errors. (Bug #49029)

  • When opening ADO.Recordset from Microsoft Access 2003, a run-time error occurred:

    ErrNo: -2147467259 ErrMessage: Data provider or other service returned an E_FAIL status.

    (Bug #36996)

  • Option for handling bad dates was not available in the GUI. (Bug #30539)

D.2.2.6. Changes in MySQL Connector/ODBC 5.1.6 (2009-11-09)

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

  • MySQL Connector/ODBC overwrote the query log. MySQL Connector/ODBC was changed to append the log, rather than overwrite it. (Bug #44965)

  • Inserting a new record using SQLSetPos did not correspond to the database name specified in the SELECT statement when querying tables from databases other than the current one.

    SQLSetPos attempted to do the INSERT in the current database, but finished with a SQL_ERROR result and Table does not exist message from MySQL Server. (Bug #41946)

  • Binding SQL_C_BIT to an INTEGER column did not work.

    The sql_get_data() function only worked correctly for BOOLEAN columns that corresponded to SQL_C_BIT buffers. (Bug #39644)

  • In Access 97, when linking a table containing a LONGTEXT or TEXT field to a MySQL Connector/ODBC DSN, the fields were shown as TEXT(255) in the table structure. Data was therefore truncated to 255 characters. (Bug #40932)

  • 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  <- ERROR

    The 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)

  • When a column of type DECIMAL containing NULL was accessed, MySQL Connector/ODBC returned a 0 rather than a NULL. (Bug #41081)

  • Insertion of data into a LONGTEXT table 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)

  • MySQL Connector/ODBC updated some fields with random values, rather than with NULL. (Bug #41256)

  • Calling SQLDescribeCol() with a NULL buffer and nonzero buffer length caused a crash. (Bug #41942)

  • MySQL Connector/ODBC failed to build with MySQL 5.1.30 due to incorrect use of the data type bool. (Bug #42120)

  • The connection string option Enable Auto-reconnect did 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)

  • 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)

  • Connector/ODBC 5.1.5 was not able to connect if the connection string parameters contained spaces or tab symbols. For example, if the SERVER parameter 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)

  • Setting the ADO Recordset decimal field value to 44.56 resulted in an incorrect value of 445600.0000 being stored when the record set was updated with the Update method. (Bug #39961)

  • The SQLTablesW API gave incorrect results. For example, table name and table type were returned as NULL rather than as the correct values. (Bug #39957)

  • Calling SQLDriverConnect() with a NULL pointer for the output buffer caused a crash if SQL_DRIVER_NOPROMPT was also specified:

    SQLDriverConnect(dbc, NULL, "DSN=myodbc5", SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT)

    (Bug #40316)

  • 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 null while updating the database, even when column_name had been assigned a valid nonnull string. (Bug #37649)

  • The pointer passed to the SQLDriverConnect method 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)

  • The SQLDriverConnect method truncated the OutputConnectionString parameter to 52 characters. (Bug #37278)

  • The SQLGetInfo() function returned 0 for SQL_CATALOG_USAGE information. (Bug #39560)

  • When the SQLTables method was called with NULL passed as the tablename parameter, only one row in the resultset, with table name of NULL was returned, instead of all tables for the given database. (Bug #39561)

  • Microsoft Access was not able to read BIGINT values properly from a table with just two columns of type BIGINT and VARCHAR. #DELETE appeared instead of the correct values. (Bug #17679)

  • When the recordSet.Update function was called to update an adLongVarChar field, 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)

  • No result record was returned for SQLGetTypeInfo for the TIMESTAMP data type. An application would receive the result return 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)

D.2.2.7. Changes in MySQL Connector/ODBC 5.1.5 (2008-08-18)

Bugs Fixed

  • The connector failed to prompt for additional information required to create a DSN-less connection from an application such as Microsoft Excel. (Bug #37254)

  • Assigning a string longer than 67 characters to the TableType parameter resulted in a buffer overrun when the SQLTables() function was called. (Bug #36275)

  • After having successfully established a connection, a crash occurs when calling SQLProcedures() followed by SQLFreeStmt(), using the ODBC C API. (Bug #36069)

  • ODBC TIMESTAMP string format is not handled properly by Connector/ODBC. When passing a TIMESTAMP or DATE to 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)

  • SQLDriverConnect does not return SQL_NO_DATA on cancel. The ODBC documentation specifies that this method should return SQL_NO_DATA when the user cancels the dialog to connect. The connector, however, returns SQL_ERROR. (Bug #36293)

  • The ODBC connector randomly uses logon information stored in odbc-profile, or prompts the user for connection information and ignores any settings stored in odbc-profile. (Bug #36203)

D.2.2.8. Changes in MySQL Connector/ODBC 5.1.4 (2008-04-15)

Bugs Fixed

  • Wrong result obtained when using sum() on a decimal(8,2) field type. (Bug #35920)

  • The driver installer could not create a new DSN if many other drivers were already installed. (Bug #35776)

  • On Linux, SQLGetDiagRec() returned SQL_SUCCESS in cases when it should have returned SQL_NO_DATA. (Bug #33910)

  • The SQLColAttribute() function returned SQL_TRUE when querying the SQL_DESC_FIXED_PREC_SCALE (SQL_COLUMN_MONEY) attribute of a DECIMAL column. Previously, the correct value of SQL_FALSE was returned; this is now again the case. (Bug #35581)

  • The driver crashes ODBC Administrator on attempting to add a new DSN. (Bug #32057)

D.2.2.9. Changes in MySQL Connector/ODBC 5.1.3 (2008-03-26)

Platform-Specific Notes

  • Important Change: You must uninstall previous 5.1.x editions of MySQL Connector/ODBC before installing the new version.

  • 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.

  • 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 HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.

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 SSLVERIFY DSN parameter, setting the value to 1. (Bug #29955, Bug #34648)

  • Microsoft Access would be unable to use DBEngine.RegisterDatabase to create a DSN using the MySQL Connector/ODBC driver. (Bug #33825)

  • Using SqlGetData in combination with SQL_C_WCHAR would return overlapping data. (Bug #34429)

  • Inserting characters to a UTF8 table using surrogate pairs would fail and insert invalid data. (Bug #34672)

  • MySQL Connector/ODBC erroneously reported that it supported the CAST() and CONVERT() ODBC functions for parsing values in SQL statements, which could lead to bad SQL generation during a query. (Bug #33808)

  • 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)

  • 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)

  • Descriptor records were not cleared correctly when calling SQLFreeStmt(SQL_UNBIND). (Bug #34271)

  • Using a linked table in Access 2003 where the table has a BIGINT column as the first column in the table, and is configured as the primary key, shows #DELETED for all rows of the table. (Bug #24535)

  • Updating a RecordSet when the query involves a BLOB field would fail. (Bug #19065)

D.2.2.10. Changes in MySQL Connector/ODBC 5.1.2 (2008-02-13)

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

  • 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.

  • 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.

  • 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 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

  • SQLForeignKeys uses INFORMATION_SCHEMA when it is available on the server, which enables more complete information to be returned.

  • Disabled MYSQL_OPT_SSL_VERIFY_SERVER_CERT when using an SSL connection.

  • Explicit descriptors are implemented. (Bug #32064)

  • Changed SQL_ATTR_PARAMSET_SIZE to return an error until support for it is implemented.

  • 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.

Bugs Fixed

  • Specifying a nonexistent database name within the GUI dialog would result in an empty list, not an error. (Bug #33615)

  • The SSLCIPHER option 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)

  • When deleting rows from a static cursor, the cursor position would be incorrectly reported. (Bug #33388)

  • SQLGetInfo() reported characters for SQL_SPECIAL_CHARACTERS that were not encoded correctly. (Bug #33130)

  • When accessing column data, FLAG_COLUMN_SIZE_S32 did 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 LONGBLOB or LONGTEXT columns includes:

    • SQLColumns

    • SQLColAttribute

    • SQLColAttributes

    • SQLDescribeCol

    • SQLSpecialColumns (theoretically can have the same problem)

    (Bug #12805, Bug #30890)

  • Retrieving data from a BLOB column would fail within SQLGetDatawhen the target data type was SQL_C_WCHAR due to incorrect handling of the character buffer. (Bug #32684)

  • Dynamic cursors on statements with parameters were not supported. (Bug #11846)

  • Reading a TEXT column that had been used to store UTF8 data would result in the wrong information being returned during a query. (Bug #28617)

  • Evaluating a simple numeric expression when using the OLEDB for ODBC provider and ADO would return an error, instead of the result. (Bug #10128)

  • SQLForeignKeys would return an empty string for the schema columns instead of NULL. (Bug #19923)

  • Renaming an existing DSN entry would create a new entry with the new name without deleting the old entry. (Bug #31165)

  • Adding or updating a row using SQLSetPos() on a result set with aliased columns would fail. (Bug #6157)

D.2.2.11. Changes in MySQL Connector/ODBC 5.1.1 (2007-12-13)

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

  • 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.

  • 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.

  • 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 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

  • Incompatible Change: Do not permit SET NAMES in initial statement and in executed statements.

  • Incompatible Change: Removed monitor (myodbc3m) and dsn-editor (myodbc3c).

  • Incompatible Change: Replaced myodbc3i (now myodbc-installer) with MySQL Connector/ODBC 5.0 version.

  • The Windows installer now places files in a subdirectory of the Program Files directory instead of the Windows system directory.

  • Added MSI installer for Windows 64-bit. (Bug #31510)

  • Implemented support for SQLCancel(). (Bug #15601)

  • 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.

  • Implemented native Windows setup library

  • 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.

  • 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)

Bugs Fixed

  • Diagnostics were not correctly cleared on connection and environment handles.

  • SQLCopyDesc() did not correctly copy all records.

  • SQL_ODBC_SQL_CONFORMANCE was not handled by SQLGetInfo().

  • NULL pointers passed to SQLGetInfo() could result in a crash.

  • SQLError() incorrectly cleared the error information, making it unavailable from subsequent calls to SQLGetDiagRec().

  • ADO was unable to open record set using dynamic cursor. (Bug #32014)

  • SQLSetConnectAttr() did not clear previous errors, possibly confusing SQLError().

  • SQLDescribeColW returned UTF-8 column as SQL_VARCHAR instead of SQL_WVARCHAR. (Bug #32161)

  • Fixed SQL_ATTR_PARAM_BIND_OFFSET, and fixed row offsets to work with updatable cursors.

  • SQLSetPos with SQL_DELETE advances dynamic cursor incorrectly. (Bug #29765)

  • Recordset Update() fails when using adUseClient cursor. (Bug #26985)

  • ADO Not possible to update a client side cursor. (Bug #27961)

  • ADO applications would not open a RecordSet that contained a DECIMAL field. (Bug #31720)

  • 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)

  • 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)

  • The SET NAMES statement has been disabled because it causes problems in the ODBC driver when determining the current client character set. (Bug #32596)

  • Memory usage would increase considerably. (Bug #31115)

  • SQL statements are limited to 64KB. (Bug #30983, Bug #30984)

D.2.2.12. Changes in MySQL Connector/ODBC 5.1.0 (2007-09-10)

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

  • 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.

  • 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.

  • 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

  • Added support for SQL_C_WCHAR.

  • Added descriptor support (SQLGetDescField, SQLGetDescRec, etc).

  • Added support for Unicode functions (SQLConnectW, etc).

D.2.3. Changes in MySQL Connector/ODBC Version 5.0

D.2.3.1. Changes in MySQL Connector/ODBC 5.0.12 (Never released)

Note

Development on Connector/ODBC 5.0.x has ceased. New features and functionality will be incorporated into Connector/ODBC 5.1.

Version 5.0.12 has no changelog entries.

D.2.3.2. Changes in MySQL Connector/ODBC 5.0.11 (2007-01-31)

Functionality Added or Changed

  • Driver now builds and is partially tested under Linux with the iODBC driver manager.

  • Added support for ODBC v2 statement options using attributes.

Bugs Fixed

  • Transaction support has been added and tested. (Bug #25045)

  • Fixed the binding of certain integer types.

  • Updates of MEMO or TEXT columns from within Microsoft Access would fail. (Bug #25263)

  • Internal function, my_setpos_delete_ignore() could cause a crash. (Bug #22796)

  • Connection string parsing for DSN-less connections could fail to identify some parameters. (Bug #25316)

  • Fixed occasional mis-handling of the SQL_NUMERIC_C type.

D.2.3.3. Changes in MySQL Connector/ODBC 5.0.10 (2006-12-14)

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 wide-string type info for SQLGetTypeInfo().

  • Added initial support for removing braces when calling stored procedures and retrieving result sets from procedure calls. (Bug #24485)

  • Added initial unicode support in data and metadata. (Bug #24837)

  • Added loose handling of retrieving some diagnostic data. (Bug #15782)

Bugs Fixed

  • String query parameters are new escaped correctly. (Bug #19078)

  • Editing DSN no longer crashes ODBC data source administrator. (Bug #24675)

D.2.3.4. Changes in MySQL Connector/ODBC 5.0.9 (2006-11-22)

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 recognition of SQL_C_SHORT and SQL_C_TINYINT as C types.

  • Added support for column binding as SQL_NUMERIC_STRUCT.

Bugs Fixed

  • Fixed SQLGetData to clear the NULL indicator correctly during multiple calls.

  • Corrected retrieval multiple field types bit and blob/text.

  • Fixed statistics to fail if it couldn't be completed.

  • Catch use of SQL_ATTR_PARAMSET_SIZE and report error until we fully support.

  • ODBC v2 behavior in driver now supports ODBC v3 date/time types (since DriverManager maps them).

  • Fixed buffer length return for SQLDriverConnect.

  • Added limit of display size when requested using SQLColAttribute/SQL_DESC_DISPLAY_SIZE.

  • Fixed wildcard handling of and listing of catalogs and tables in SQLTables.

D.2.3.5. Changes in MySQL Connector/ODBC 5.0.8 (2006-11-17)

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

  • Wildcards now support escaped chars and underscore matching (needed to link tables with underscores in access).

  • Made distinction between CHAR/BINARY (and VAR versions).

  • Fixed display size to be length if max length isn’t available.

  • Also made SQL_DESC_NAME only fill in the name if there was a data pointer given, otherwise just the length.

Bugs Fixed

  • Fixed string length to chars, not bytes, returned by SQLGetDiagRec.

  • Fix size return from SQLDescribeCol.

  • Fixed type returned for MYSQL_TYPE_LONG to SQL_INTEGER instead of SQL_TINYINT.

  • Fixed handling of numeric pointers in SQLColAttribute.

  • Updated retrieval of descriptor fields to use the right pointer types.

  • Length now used when handling bind parameter (needed in particular for SQL_WCHAR) - this enables updating char data in MS Access.

  • Allow SQLDescribeCol to be called to retrieve the length of the column name, but not the name itself.

  • Fixed MDiagnostic to use correct v2/v3 error codes.

  • Set default return to SQL_SUCCESS if nothing is done for SQLSpecialColumns.

  • Fixed using wrong pointer for SQL_MAX_DRIVER_CONNECTIONS in SQLGetInfo.

  • Fixed binding using SQL_C_LONG.

D.2.3.6. Changes in MySQL Connector/ODBC 5.0.7 (2006-11-08)

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

  • Improved trace/log.

  • Added support for SQLStatistics to MYODBCShell.

Bugs Fixed

  • Fixed SQLDescribeCol returning column name length in bytes rather than chars.

  • Corrected incorrect column index within SQLStatistics. Many more tables can now be linked into MS Access.

  • SQLBindParameter now handles SQL_C_DEFAULT.

D.2.3.7. Changes in MySQL Connector/ODBC 5.0.6 (2006-11-03)

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

  • You no longer have to have MySQL Connector/ODBC 3.51 installed before installing this version.

  • Installation is provided in the form of a standard Microsoft System Installer (MSI).

  • MySQL Connector/ODBC supports both User and System DSNs.

Bugs Fixed

  • Installation is provided in the form of a standard Microsoft System Installer (MSI).

  • MySQL Connector/ODBC supports both User and System DSNs.

  • You no longer have to have MySQL Connector/ODBC 3.51 installed before installing this version.

D.2.3.8. Changes in MySQL Connector/ODBC 5.0.5 (2006-10-17)

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.

D.2.3.9. Changes in Connector/ODBC 5.0.3 (Connector/ODBC 5.0 Alpha 3) (20 June 2006)

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:

    • SQLBindParameter

    • SQLBindCol

D.2.3.10. Changes in Connector/ODBC 5.0.2 (Never released)

Connector/ODBC 5.0.2 was an internal implementation and testing release.

D.2.3.11. Changes in Connector/ODBC 5.0.1 (Connector/ODBC 5.0 Alpha 2) (05 June 2006)

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:

    • SQLAllocHandle

    • SQLCloseCursor

    • SQLColAttribute

    • SQLColumns

    • SQLConnect

    • SQLCopyDesc

    • SQLDisconnect

    • SQLExecDirect

    • SQLExecute

    • SQLFetch

    • SQLFreeHandle

    • SQLFreeStmt

    • SQLGetConnectAttr

    • SQLGetData

    • SQLGetDescField

    • SQLGetDescRec

    • SQLGetDiagField

    • SQLGetDiagRec

    • SQLGetEnvAttr

    • SQLGetFunctions

    • SQLGetStmtAttr

    • SQLGetTypeInfo

    • SQLNumResultCols

    • SQLPrepare

    • SQLRowcount

    • SQLTables

    The following ODBC API function are implemented, but not yet support all the available attributes/options:

    • SQLSetConnectAttr

    • SQLSetDescField

    • SQLSetDescRec

    • SQLSetEnvAttr

    • SQLSetStmtAttr

D.2.4. Changes in MySQL Connector/ODBC Version 3.51

D.2.4.1. Changes in MySQL Connector/ODBC 3.51.30 (2012-02-02)

Bugs Fixed

  • After downgrading from Connector/ODBC 5.1 to Connector/ODBC 3.51, unrecognized names for connection string parameters caused warning messages about unknown options. (Bug #13647492)

  • SQLFetch has to return error if indicator pointer is NULL for NULL value. (Bug #13542600)

  • In some cases, a TIMESTAMP field could be described as SQL_NO_NULLS. (Bug #13532987)

  • A failure on one statement causes another statement to fail. (Bug #13097201, Bug #62657)

  • Describing a view or table caused SQLPrepare to prefetch table data. For large tables this created an intolerable performance hit. (Bug #46411)

  • MySQL Connector/ODBC manually added a LIMIT clause to the end of certain SQL statements, causing errors for statements that contained code that should be positioned after the LIMIT clause. (Bug #49726)

D.2.4.2. Changes in MySQL Connector/ODBC 3.51.29 (2011-10-04)

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 The PAM Authentication Plugin, and The Windows Native Authentication Plugin. These capabilities result from linking the Connector/ODBC binaries against the MySQL 5.5.16 libmysql rather than the MySQL 5.1 libmysql used previously. The newer libmysql includes the client-side support needed for the server-side PAM and Windows authentication plugins.

Bugs Fixed

  • Some catalog functions (such as SQLColumns(), SQLStatistics(), and SQLPrimaryKeys()) would only return one row, when called after pre-execution failed. (Bug #12824839)

  • An off-by-one error, where sqlwcharchr might read one SQLWCHAR after the end of a string. (Bug #61586)

  • SQLExecute would return SQL_SUCCESS_WITH_INFO instead of SQL_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 NULL columns could not be altered. (Bug #31067)

D.2.4.3. Changes in MySQL Connector/ODBC 3.51.28 (2011-02-09)

Bugs Fixed

  • When using MySQL Connector/ODBC to fetch data, if a net_write_timeout condition occurred, the operation returned the standard "end of data" status, rather than an error. (Bug #39878)

  • SQLColAttribute(...SQL_DESC_CASE_SENSITIVE...) returned SQL_FALSE for binary types and SQL_TRUE for the rest. It should have returned SQL_TRUE for binary types, and SQL_FALSE for the rest. (Bug #54212)

  • SQLColAttribute for SQL_DESC_OCTET_LENGTH returned length including terminating null byte. It should not have included the null byte. (Bug #54206)

  • If NO_BACKSLASH_ESCAPES mode was used on a server, escaping binary data led to server query parsing errors. (Bug #49029)

  • Inserting a new record using SQLSetPos did not correspond to the database name specified in the SELECT statement when querying tables from databases other than the current one.

    SQLSetPos attempted to do the INSERT in the current database, but finished with a SQL_ERROR result and Table does not exist message from MySQL Server. (Bug #41946)

  • Microsoft Access was not able to read BIGINT values properly from a table with just two columns of type BIGINT and VARCHAR. #DELETE appeared instead of the correct values. (Bug #17679)

  • No result record was returned for SQLGetTypeInfo for the TIMESTAMP data type. An application would receive the result return code 100 (SQL_NO_DATA_FOUND). (Bug #30626)

D.2.4.4. Changes in MySQL Connector/ODBC 3.51.27 (2008-11-20)

Bugs Fixed

  • The client program hung when the network connection to the server was interrupted. (Bug #40407)

  • The connection string option Enable Auto-reconnect did 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)

D.2.4.5. Changes in MySQL Connector/ODBC 3.51.26 (2008-07-07)

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 empty org_table. (Bug #29402)

Bugs Fixed

  • When SHOW CREATE TABLE was invoked and then the field values read, the result was truncated and unusable if the table had many rows and indexes. (Bug #24131)

  • When an ADOConnection is created and attempts to open a schema with ADOConnection.OpenSchema an access violation occurs in myodbc3.dll. (Bug #30770)

D.2.4.6. Changes in MySQL Connector/ODBC 3.51.25 (2008-04-11)

Bugs Fixed

  • The SQLColAttribute() function returned SQL_TRUE when querying the SQL_DESC_FIXED_PREC_SCALE (SQL_COLUMN_MONEY) attribute of a DECIMAL column. Previously, the correct value of SQL_FALSE was 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_S32 did 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 LONGBLOB or LONGTEXT columns includes:

    • SQLColumns

    • SQLColAttribute

    • SQLColAttributes

    • SQLDescribeCol

    • SQLSpecialColumns (theoretically can have the same problem)

    (Bug #12805, Bug #30890)

D.2.4.7. Changes in MySQL Connector/ODBC 3.51.24 (2008-03-14)

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 SSLVERIFY DSN parameter, setting the value to 1. (Bug #29955, Bug #34648)

  • Using tables with a single quote or other nonstandard characters in the table or column names through ODBC would fail. (Bug #32989)

  • When using ADO, the count of parameters in a query would always return zero. (Bug #33298)

  • 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)

  • 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.

    Note

    ODBC Administrator may still be unable to register a System DSN unless the /Library/ODBC/odbc.ini file has the correct permissions. You should ensure that the file is writable by the admin group.

    (Bug #31495)

  • Using connection.Execute to create a record set based on a table without declaring the cmd option as adCmdTable will fail when communicating with versions of MySQL 5.0.37 and higher. The issue is related to the way that SQLSTATE is returned when ADO tries to confirm the existence of the target object. (Bug #27158)

  • Calling SQLFetch or SQLFetchScroll would return negative data lengths when using SQL_C_WCHAR. (Bug #31220)

  • 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)

  • When using the ODBC SQL_TXN_READ_COMMITTED option, 'dirty' records would be read from tables as if the option had not been applied. (Bug #31959)

  • Updating a RecordSet when the query involves a BLOB field would fail. (Bug #19065)

  • Static cursor was unable to be used through ADO when dynamic cursors were enabled. (Bug #27351)

  • SQLExtendedFetch() and SQLFetchScroll() ignored the rowset size if the Don't cache result DSN option was set. (Bug #32420)

  • SQLSetParam() caused memory allocation errors due to driver manager's mapping of deprecated functions (buffer length -1). (Bug #29871)

D.2.4.8. Changes in MySQL Connector/ODBC 3.51.23 (2008-01-09)

Platform-Specific Notes

  • 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.

  • The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.

Bugs Fixed

  • Renaming an existing DSN entry would create a new entry with the new name without deleting the old entry. (Bug #31165)

  • Cleaning up environment handles in multithread environments could result in a five (or more) second delay. (Bug #32366)

  • 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 because SQLAllocStmt() and SQLFreeStmt() did not synchronize access to the list of statements associated with a connection. (Bug #32587)

  • Setting the default database using the DefaultDatabase property of an ADO Connection object would fail with the error Provider does not support this property. The SQLGetInfo() returned the wrong value for SQL_DATABASE_NAME when no database was selected. (Bug #3780)

  • MySQL Connector/ODBC would incorrectly return SQL_SUCCESS when checking for distributed transaction support. (Bug #32727)

D.2.4.9. Changes in MySQL Connector/ODBC 3.51.22 (2007-11-13)

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

  • Unsigned integer values greater than the maximum value of a signed integer would be handled incorrectly. (Bug #32171)

  • When accessing information about supported operations, the driver would return incorrect information about the support for UNION. (Bug #32253)

  • The English locale would be used when formatting floating point values. The C locale is now used for these values. (Bug #32294)

  • 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_S32 option 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)

D.2.4.10. Changes in MySQL Connector/ODBC 3.51.21 (2007-10-08)

Bugs Fixed

  • Uninitiated memory could be used when C/ODBC internally calls SQLGetFunctions(). (Bug #31055)

  • 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 INSERT statement. (Bug #31246)

  • Not specifying a user in the DSN dialog would raise a warning even though the parameter is optional. (Bug #30499)

  • The wrong SQL_DESC_LITERAL_PREFIX would be returned for date/time types. (Bug #31009)

  • MySQL Connector/ODBC would return the wrong the error code when the server disconnects the active connection because the configured wait_timeout has expired. Previously it would return HY000. MySQL Connector/ODBC now correctly returns an SQLSTATE of 08S01. (Bug #3456)

  • When using ADO, a column marked as AUTO_INCREMENT could incorrectly report that the column permitted NULL values. This was dur to an issue with NULLABLE and IS_NULLABLE return values from the call to SQLColumns(). (Bug #26108)

  • The wrong COLUMN_SIZE would be returned by SQLGetTypeInfo for 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)

  • SQLSetParam() caused memory allocation errors due to driver manager's mapping of deprecated functions (buffer length -1). (Bug #29871)

D.2.4.11. Changes in MySQL Connector/ODBC 3.51.20 (2007-09-10)

Bugs Fixed

  • Removed check box in setup dialog for FLAG_FIELD_LENGTH (identified as Don't Optimize Column Width within the GUI dialog), which was removed from the driver in 3.51.18.

  • The wrong column size was returned for binary data. (Bug #30547)

  • The specified length of the user name and authentication parameters to SQLConnect() were not being honored. (Bug #30774)

  • SQLGetData() will now always return SQL_NO_DATA_FOUND on second call when no data left, even if requested size is 0. (Bug #30520)

  • SQLGetConnectAttr() did not reflect the connection state correctly. (Bug #14639)

  • Using FLAG_NO_PROMPT doesn't suppress the dialogs normally handled by SQLDriverConnect. (Bug #30840)

D.2.4.12. Changes in MySQL Connector/ODBC 3.51.19 (2007-08-10)

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.4.13, “Changes in MySQL Connector/ODBC 3.51.18 (2007-08-08)”.

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 as SQL_VARCHAR.

D.2.4.13. Changes in MySQL Connector/ODBC 3.51.18 (2007-08-08)

Platform-Specific Notes

  • A binary package without an installer is available for Microsoft Windows x64 Edition. There are no installer packages for Microsoft Windows x64 Edition.

  • Binary packages as disk images with installers are now available for Mac OS X.

  • Binary packages for Sun Solaris are now available as PKG packages.

  • 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 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

  • Incompatible Change: The FLAG_DEBUG option was removed.

  • 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 TRACE and TRACEFILE DSN options have been removed. Use the ODBC driver manager trace options instead.

  • When connecting to a specific database when using a DSN, the system tables from the mysql database are no longer also available. Previously, tables from the mysql database (catalog) were listed as SYSTEM TABLES by SQLTables() even when a different catalog was being queried. (Bug #28662)

  • The SQL_ATTR_ROW_BIND_OFFSET_PTR is now supported for row bind offsets. (Bug #6741)

  • 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)

Bugs Fixed

  • DATETIME column types would return FALSE in place of SQL_SUCCESS when requesting the column type information. (Bug #28657)

  • The SQL_DATA_TYPE column in SQLColumns() results did not report the correct value for date and time types.

  • The wrong value for DECIMAL_DIGITS in SQLColumns() was reported for FLOAT and DOUBLE fields, as well as the wrong value for the scale parameter to SQLDescribeCol(), and the SQL_DESC_SCALE attribute from SQLColAttribute().

  • Binary packages for Sun Solaris are now available as PKG packages.

  • Binary packages as disk images with installers are now available for Mac OS X.

  • The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.

  • SQLConnect() and SQLDriverConnect() 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 wrong value for SQL_DESC_TYPE was returned for date and time types.

  • The value for SQL_DESC_FIXED_PREC_SCALE was not returned correctly for values in MySQL 5.0 and later.

  • The SQL_DATETIME_SUB column in SQLColumns() was not correctly set for date and time types.

  • The wrong value from SQL_DESC_LITERAL_SUFFIX was returned for binary fields.

  • The SQL_COLUMN_TYPE, SQL_COLUMN_DISPLAY and SQL_COLUMN_PRECISION values would be returned incorrectly by SQLColumns(), SQLDescribeCol() and SQLColAttribute() when accessing character columns, especially those generated through concat(). The lengths returned should now conform to the ODBC specification. The FLAG_FIELD_LENGTH option no longer has any affect on the results returned. (Bug #27862)

  • The SQLColumns() function could return incorrect information about TIMESTAMP columns, indicating that the field was not nullable. (Bug #14414)

  • Obtaining the length of a column when using a character set for the connection of utf8 would result in the length being returned incorrectly. (Bug #19345)

  • Getting table metadata (through the SQLColumns() would fail, returning a bad table definition to calling applications. (Bug #29888)

  • When using a table with multiple TIMESTAMP columns, the final TIMESTAMP column within the table definition would not be updatable. Note that there is still a limitation in MySQL server regarding multiple TIMESTAMP columns. (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 the s and u modifiers for the -d command-line option. (Bug #29964)

  • BIT(n) columns are now treated as SQL_BIT data where n = 1 and binary data where n > 1.

  • 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 SQLColumns() function could return incorrect information about AUTO_INCREMENT columns, 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.

D.2.4.14. Changes in MySQL Connector/ODBC 3.51.17 (2007-07-14)

Platform-Specific Notes

  • A binary package without an installer is available for Microsoft Windows x64 Edition. There are no installer packages for Microsoft Windows x64 Edition.

  • Binary packages as disk images with installers are now available for Mac OS X.

  • Binary packages for Sun Solaris are now available as PKG packages.

  • 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 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

  • The setup library has been split into its own RPM package, to enable installing the driver itself with no GUI dependencies.

  • 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 NAMES statement. You can also configure the character set value from the GUI configuration. (Bug #9498, Bug #6667)

  • Dis-allow NULL ptr for null indicator when calling SQLGetData() if value is null. Now returns SQL_ERROR w/state 22002.

  • Fixed calling convention ptr and wrong free in myodbc3i, and fixed the null terminating (was only one, not two) when writing DSN to string.

Bugs Fixed

  • Fixed a problem where the GUI would crash when configuring or removing a System or User DSN. (Bug #27315)

  • For a stored procedure that returns multiple result sets, MySQL Connector/ODBC returned only the first result set. (Bug #16817)

  • The HP-UX 11.23 IA64 binary package does not include the GUI bits because of problems building Qt on that platform.

  • The driver was using mysql_odbc_escape_string(), which does not handle the NO_BACKSLASH_ESCAPES SQL mode. Now it uses mysql_real_escape_string(), which does. (Bug #9498)

  • myodbc3i did not correctly format driver info, which could cause the installation to fail. (Bug #29709)

  • The binary packages for Sun Solaris are only provided as tarballs, not the PKG format.

  • 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)

  • 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)

  • MySQL Connector/ODBC crashed with Crystal Reports due to a problem with SQLProcedures(). (Bug #28316)

  • Added a new DSN option (FLAG_ZERO_DATE_TO_MIN) to retrieve XXXX-00-00 dates 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_ZERO only changes 0000-01-01 to 0000-00-00. (Bug #13766)

  • The Mac OS X binary packages are only provided as tarballs, there is no installer.

  • Fixed possible crash if SQLBindCol() was not called before SQLSetPos().

  • Correctly return error if SQLBindCol is called with an invalid column.

  • 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.

  • When inserting a large BLOB field, MySQL Connector/ODBC would crash due to a memory allocation error. (Bug #10562)

  • If there was more than one unique key on a table, the correct fields were not used in handling SQLSetPos(). (Bug #10563)

  • Calling SQLGetDiagField with RecNumber 0, DiagIdentifier NOT 0 returned SQL_ERROR, preventing access to diagnostic header fields. (Bug #16224)

  • There are no binary packages for Microsoft Windows x64 Edition.

D.2.4.15. Changes in MySQL Connector/ODBC 3.51.16 (2007-06-14)

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

  • Data in TEXT columns would fail to be read correctly. (Bug #16917)

  • Calls to SQLNativeSql() could cause stack corruption due to an incorrect pointer cast. (Bug #28758)

  • SQLForeignKeys does not escape _ and % in the table name arguments. (Bug #27723)

  • When using stored procedures, making a SELECT or second stored procedure call after an initial stored procedure call, the second statement will fail. (Bug #27544)

  • Using cursors on results sets with multi-column keys could select the wrong value. (Bug #28255)

  • When using the Don't Cache Results (option value 1048576) with Microsoft Access, the connection will fail using DAO/VisualBasic. (Bug #4657)

  • Using BETWEEN with date values, the wrong results could be returned. (Bug #15773)

  • Return values from SQLTables() may be truncated. (Bug #22797)

  • Specifying strings as parameters using the adBSTR or adVarWChar types, (SQL_WVARCHAR and SQL_WLONGVARCHAR) would be incorrectly quoted. (Bug #16235)

  • SQL_WVARCHAR and SQL_WLONGVARCHAR parameters were not properly quoted and escaped. (Bug #16235)

  • SQLTables() did not distinguish tables from views. (Bug #23031)

D.2.4.16. Changes in MySQL Connector/ODBC 3.51.15 (2007-05-07)

Bugs Fixed

  • When inserting data using bulk statements (through SQLBulkOperations), the indicators for all rows within the insert would not updated correctly. (Bug #24306)

  • Using SQLDriverConnect instead of SQLConnect could cause later operations to fail. (Bug #7912)

  • An incorrect transaction isolation level may not be returned when accessing the connection attributes. (Bug #27589)

  • The SQLTransact() function did not support an empty connection handle. (Bug #21588)

  • Adding a new DSN with the myodbc3i utility under AIX would fail. (Bug #27220)

  • Using SQLProcedures does not return the database name within the returned resultset. (Bug #23033)

  • 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)

  • MySQL Connector/ODBC would incorrectly claim to support SQLProcedureColumns (by returning true when queried about SQLPROCEDURECOLUMNS with SQLGetFunctions), but this functionality is not supported. (Bug #27591)

D.2.4.17. Changes in MySQL Connector/ODBC 3.51.14 (2007-03-08)

Functionality Added or Changed

  • Use of SQL_ATTR_CONNECTION_TIMEOUT on the server has now been disabled. If you attempt to set this attribute on your connection the SQL_SUCCESS_WITH_INFO will be returned, with an error number/string of HYC00: Optional feature not supported. (Bug #19823)

  • Added support for the HENV handlers in SQLEndTran().

  • Added auto-reconnect option to MySQL Connector/ODBC option parameters.

  • Added auto is null option to MySQL Connector/ODBC option parameters. (Bug #10910)

Bugs Fixed

  • The SQLDriverConnect() ODBC method did not work with recent MySQL Connector/ODBC releases. (Bug #12393)

  • When retrieving TIME columns, C/ODBC would incorrectly interpret the type of the string and could interpret it as a DATE type instead. (Bug #25846)

  • The ODBC driver name and version number were incorrectly reported by the driver. (Bug #19740)

  • On 64-bit systems, some types would be incorrectly returned. (Bug #26024)

  • 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)

  • MySQL Connector/ODBC may insert the wrong parameter values when using prepared statements under 64-bit Linux. (Bug #22446)

  • A string format exception would be raised when using iODBC, MySQL Connector/ODBC and the embedded MySQL server. (Bug #16535)

  • Using MySQL Connector/ODBC, with SQLBindCol and binding the length to the return value from SQL_LEN_DATA_AT_EXEC fails with a memory allocation error. (Bug #20547)

D.2.4.18. Changes in MySQL Connector/ODBC 3.51.13 (Never released)

Connector/ODBC 3.51.13 was an internal implementation and testing release.

Version 3.51.13 has no changelog entries.

D.2.4.19. Changes in MySQL Connector/ODBC 3.51.12 (2005-02-11)

Functionality Added or Changed

  • N/A

Bugs Fixed

  • SQLColumns() returned no information for tables that had a column named using a reserved word. (Bug #9539)

  • File DSNs could not be saved. (Bug #12019)

  • Using stored procedures with ADO, where the CommandType has been set correctly to adCmdStoredProc, calls to stored procedures would fail. (Bug #15635)

D.2.4.20. Changes in MySQL Connector/ODBC 3.51.11 (2005-01-28)

Bugs Fixed

  • mysql_list_dbcolumns() and insert_fields() were retrieving all rows from a table. Fixed the queries generated by these functions to return no rows. (Bug #8198)

  • SQLGetTypoInfo() returned tinyblob for SQL_VARBINARY and nothing for SQL_BINARY. Fixed to return varbinary for SQL_VARBINARY, binary for SQL_BINARY, and longblob for SQL_LONGVARBINARY. (Bug #8138)

D.3. MySQL Connector/Net Change History

D.3.1. Changes in MySQL Connector/Net Version 6.6

Changes in MySQL Connector/Net 6.6.4 (2012-10-19, GA)

Changes in MySQL Connector/Net 6.6.3 (2012-09-28, Beta)

Changes in MySQL Connector/Net 6.6.2 (August 2012, Beta)

Continued improvements and fixes to the 6.6 feature set.

Stored Procedure Debugging

  • This beta release removes several of the earlier limitations on stored procedure debugging:

    • Functions and triggers can now be debugged.

    • Intellisense is enabled in the debugger window.

    • The debugger supports the SQL grammar for all MySQL versions from 5.0 to 5.6.

    • When a debugging session is finished, stored routines that were instrumented are now restored to their original form.

    • You can now evaluate and change session variables, in addition to local variables in the procedure.

    • Conditional breakpoints are supported now.

    • When debugging a routine that has parameters, the debugger prompts for values to use for the parameters. These prompted values no longer overwrite session variables that have the same names.

    • You do not need to check the Save password checkbox when creating a new connection in Server Explorer.

    These limitations remain:

    • Some MySQL functions cannot be debugged currently (get_lock, release_lock, begin, commit, rollback, set transaction level).

    • Only one debug session may be active on a given server.

Changes in MySQL Connector/Net 6.6.1 (2012-08-08, Alpha)

Continued improvements and fixes to the 6.6 feature set.

Version 6.6.1 has no changelog entries.

Changes in MySQL Connector/Net 6.6.0 (2012-07-17, Alpha)

First alpha release for Connector/NET 6.6. Major features of Connector/Net 6.6:

  • Stored procedure debugging in Microsoft Visual Studio.

  • Entity Framework 4.3 Code First support.

  • Pluggable authentication (not available in this alpha).

Entity Framework Code First Support

  • To support the Entity Framework 4.3.1, Connector/Net can now use the Code First approach when developing against a model, and keep track of the changes in the Entity Model and in the Database. This new Entity Framework 4.3.1 feature is focused in allowing your database to be updated along with your Code First Model changes.

Stored Procedure Debugging

  • The Connector/Net integration with Visual Studio now includes stored procedure debugging. It works in a very intuitive manner, by simply clicking Debug Routine from Server Explorer. The limitations in this preliminary alpha release include:

    • Can only debug stored procedures. Functions and triggers cannot be debugged yet.

    • Intellisense is currently not enabled in the debugger window.

    • Some MySQL functions cannot be debugged currently (get_lock, release_lock, begin, commit, rollback, set transaction level).

    • Only 5.1 grammar is currently supported.

    • Only one debug session may be active on a given server.

    • The debugger instruments your procedures automatically. The original procedure might not be not restored correctly.

    • Evaluating and changing session variables are not supported. Local variables in the procedure are supported.

    • Conditional breakpoints are not supported.

    • When debugging a routine that has parameters, the debugger will prompt for those values. It will create session variables out of them, so be careful to not use your own session variables that have the same name.

    • When creating a new connection in Server Explorer, please check the Save password checkbox.

Bugs Fixed

  • When using Entity Framework with Connector/Net, the association property OnDelete was not taken into account in the CreateDatabaseScript function of the ObjectContext, leading to an error message System.Data.UpdateException was unhandled. The SQL generated by the CreateDatabaseScript function was missing ON DELETE and ON UPDATE clauses. These clauses were filled in correctly by the DDL generation wizard. (Bug #14008752, Bug #64779)

  • A call to a stored procedure or function in an application using the Code First entity framework could result in an error:

    Unhandled Exception: MySql.Data.MySqlClient.MySqlException: You have an error 
    in your SQL syntax; ...

    The code change allows syntax such as the following to invoke a stored procedure, without using the CALL statement and without using CommandType.StoredProcedure.

    int count = myContext.Database.SqlQuery<int>("GetCount").First(); 

    (Bug #14008699, Bug #64999)

  • When using the Entity Framework Code First approach, the generated code could be incorrect:

    • Missing length specifier for data types, such as VARBINARY instead of VARBINARY(n).

    • ALTER TABLE statements referring to nonexistent tables, when private members were specified inside the main class.

    (Bug #13900091, Bug #64216)

D.3.2. Changes in MySQL Connector/Net Version 6.5

Changes in MySQL Connector/Net 6.5.5 (2012-12-03)

Fixes issues since the 6.5.4 release.

Functionality Added or Changed

  • The medium trust support using the MySQLClientPermissions class is now more flexible: in addition to the original deployment method, where the library is installed in the Global Assembly Cache (GAC), you can also install the library within a bin or lib folder inside the project or solution. When the library is deployed somewhere other than the GAC, the only protocol supported is TCP/IP. Existing applications that use the library installed in the GAC must now include an extra connection option, includesecurityasserts=true. For details, see Section 21.2.5.19, “Working with Partial Trust / Medium Trust”. (Bug #14668820, Bug #65036)

Bugs Fixed

  • Performance: The LINQ to SQL data provider for MySQL was generating inefficient code for the StartsWith() and Contains() methods, calling the MySQL LOCATE() function rather than using a LIKE operator with a % wildcard. The fix causes both methods to use the LIKE syntax, although only StartsWith() gains a substantial performance improvement. Queries involving the StartsWith() method can now take advantage of an index on the corresponding column. (Bug #14009363, Bug #64935)

  • Performance: The LINQ to SQL data provider for MySQL was generating inefficient code for the Contains() method, producing a query with multiple OR clauses instead of the more efficient IN clause. (Bug #14016344, Bug #64934)

  • Under some circumstances, setting CacheServerProperties=true in the connection string could cause a Packet too large error. With connection pooling enabled and CacheServerProperties=true, the first connection worked as expected, but the second, third, and so on connections would fail if the query exceeded 1024 bytes. (Bug #14593547, Bug #66578)

  • Connector/Net did not support creating an entity with a key of type string. During database creation, a MySqlException was thrown saying BLOB/TEXT column 'Name' used in key specification without a key length. The DDL produced by the provider specified a MEDIUMTEXT column for the primary key without specifying a length for the key. This fix is particularly important when working with Entity Framework versions 4.3 and later, since the __MigrationsHitory table (which replaces the EdmMetadata table) uses a string property as its key. (Bug #14540202, Bug #65289, Bug #64288)

  • The ExecuteNonQuery() could return an error Parameter '?' must be defined, when attempting to execute a statement such as:

    insert into table_name (Field1, Field1) VALUES(?,?)

    That is, when referencing the same field twice with two different ? placeholders. (Bug #14499549, Bug #66060)

  • Customizing precision by calling the HasPrecision() method within the OnModelCreating() method in a Code First project would always produce precision settings (10,2) rather than the specified precision. (Bug #14469048, Bug #65001)

  • The MySQL Connector/Net EntityFramework provider would throw NullReferenceException when trying to insert a new record with an empty VALUES clause. Such an INSERT should work when the only required (NOT NULL) column in the table is a primary key auto-increment column. (Bug #14479715, Bug #66066)

  • When building commands through the MySql.Data.MySqlClient.MySqlCommand() class, memory could be leaked because some IO.MemoryStream instances were not being freed efficiently. The memory leak could be an issue in SQL-heavy applications, for example a logging application processing large numbers of INSERT statements. (Bug #14468204, Bug #65696)

  • Using the Entity Data Model Designer decimal type and CreateDatabase function, the values were stored with 0 digits at the right of the decimal point. With this fix, the default is 2 digits to the right of the decimal point, and any precision specified through the Entity Data Model Designer is applied correctly. (Bug #14474342, Bug #65127)

  • When using a MySQL database set up as UTF32 as an ASP.net membership database, web applications could give a key too long error, and the Website Administration Tool would not connect to providers. The cause was that the column my_aspnet_sessions.SessionId, when converted from Latin1 character set to UTF32 with 4 bytes per character, exceeded the length limit for a primary key:

    Specified key was too long; max key length is 767 bytes

    (Bug #14495292, Bug #65144)

  • When using the ASP.net web security functionality with a MySQL database, using features that access the my_aspnet_usersinroles table caused an exception:

    MySql.Data.MySqlClient.MySqlException: Table 'testdb.my_aspnet_usersinrole' doesn't exist.

    For example, this error could occur when trying to remove the user from a role or find users in a role. The fix corrects the spelling of the table name to my_aspnet_usersinroles. (Bug #14405338, Bug #65805)

  • Although the member variable MySqlCommand.LastInsertedId was a 64-bit long, its value was effectively capped at the maximum value of Int32 (2,147,483,647). If a primary key exceeded this value, the value of LastInsertedId was wrong. This mismatch could be an issue for tables with large numbers of rows. (Bug #14171960, Bug #65452)

  • When using Entity Framework with Connector/Net, the association property OnDelete was not taken into account in the CreateDatabaseScript function of the ObjectContext, leading to an error message System.Data.UpdateException was unhandled. The SQL generated by the CreateDatabaseScript function was missing ON DELETE and ON UPDATE clauses. These clauses were filled in correctly by the DDL generation wizard. (Bug #14008752, Bug #64779)

  • A call to a stored procedure or function in an application using the Code First entity framework could result in an error:

    Unhandled Exception: MySql.Data.MySqlClient.MySqlException: You have an error 
    in your SQL syntax; ...

    The code change allows syntax such as the following to invoke a stored procedure, without using the CALL statement and without using CommandType.StoredProcedure.

    int count = myContext.Database.SqlQuery<int>("GetCount").First(); 

    (Bug #14008699, Bug #64999)

  • When using the Entity Framework Code First approach, the generated code could be incorrect:

    • Missing length specifier for data types, such as VARBINARY instead of VARBINARY(n).

    • ALTER TABLE statements referring to nonexistent tables, when private members were specified inside the main class.

    (Bug #13900091, Bug #64216)

  • The milliseconds portion of a date/time value was not stored correctly for the datatype DATETIME(3). (Bug #13881444, Bug #64686)

  • When the length of a VARCHAR column was edited in Table Designer, the data type could be saved incorrectly as BIT. (Bug #13916560)

  • Any sequence of Take(n) method calls followed by Count or LongCount would cause a System.Data.EntityCommandCompilationException error. (Bug #13913047, Bug #64749)

  • When using the MySqlProfileProvider, calling the function ProfileManager.DeleteProfiles could throw an InvalidCastException exception. (Bug #13790123, Bug #64470)

  • In Visual Studio Table Designer, the name of a new index was always derived from the name of the table and could not be changed. (Bug #13613801)

  • When using the Entity Framework Code First approach, the generated code could be use the MEDIUMTEXT data type in contexts where other types such as VARCHAR were more appropriate, leading to errors such as:

    error 0064: Facet 'MaxLength' must not be specified for type 'mediumtext'.

    (Bug #13582335, Bug #63920)

  • In LINQ to Entity queries, including a child entity (1-n) and its entities (n-n) returned the wrong results. For example:

    db.Authors.Include("Books.Editions").AsEnumerable().First();

    (Bug #13491698, Bug #62801)

  • Formerly, cleanup operations for expired sessions were fully automatic, with no ability to catch the timeout event and do application-specific cleanup. This fix adds a enableSessionExpireCallback connection option to let developers catch the event when a session expires. When enableSessionExpireCallback is enabled, the global.asax.session_end event is raised before data is deleted from the my_aspnet_sessions table. When enableSessionExpireCallback is disabled, the data is deleted from the my_aspnet_sessions table without raising the event first. The timeout period for session expiry is specified in the web.config file, in the timeout option of the sessionState section. (Bug #13354935, Bug #62266)

Changes in MySQL Connector/Net 6.5.4 (2012-03-08)

First GA release for Connector/NET 6.5.

Bugs Fixed

  • In Visual Studio Table Designer, if you tried to save a new table using an existing table name, subsequently you would not be prompted to choose a new name, preventing you from saving the table. (Bug #13785918)

  • When creating a Visual Studio Web Application Project, using the ADO.NET Entity Data Model and generating the model from a database, the Entity Framework Model was not created. This operation gave an error:

    Access denied for user 'root'@'localhost' (using password: NO)

    (Bug #13610452)

  • When creating a project in VisualStudio using a .NET framework such as 3.0 or 3.5 (anything less than 4.0), the Connector/Net library (MySql.Data.dll) was not listed in the Add References dialog box. The workaround was to browse to the library and add it manually. (Bug #13491678, Bug #60462)

Changes in MySQL Connector/Net 6.5.3 (2012-02-27)

Second Release Candidate (RC) release.

Bugs Fixed

  • The performance when setting the CommandText property on the MySqlCommand class was improved by enhancing the efficiency of a string comparison operation. (Bug #13739383, Bug #64012)

  • Fixed MySqlTime parsing to avoid throwing an exception when handling milliseconds (as result of a timediff operation). (Bug #13708884, Bug #64268)

  • In Visual Studio Table Designer, when adding a second foreign key, the new name was incorrectly assigned to the first foreign key in the list. (Bug #13613824)

  • In Visual Studio Table Designer, changes to a field were sometimes not detected until you switched focus away from that field. (Bug #13613755)

Changes in MySQL Connector/Net 6.5.2 (2012-02-15)

First Release Candidate (RC) release.

Bugs Fixed

  • In Visual Studio Table Designer, when editing a foreign key relationship, choosing a column name on the left side made that column name unavailable on the right side. (Bug #13615258)

  • In Visual Studio Table Designer, an error could occur if you added and deleted column information for foreign keys in a particular sequence. (Bug #13610235)

  • In Visual Studio Table Designer, deleting a foreign key relationship in the Relationship dialog required clicking twice. (Bug #13610283)

  • In Visual Studio Table Designer, modifying the Columns field in the Indexes/Keys dialog multiple times could cause an error. (Bug #13613765)

  • In Visual Studio Table Designer, it was possible to save a new foreign key relationship without filling in the fields of the Foreign Key Relationship dialog. (Bug #13613839)

  • In Visual Studio Table Designer, changing the length of a VARCHAR field could cause an error. (Bug #13611677)

  • If MySqlCommand.CommandText was equal to null, then MySqlCommand.ExecuteReader() would throw the wrong exception: NullReferenceException instead of InvalidOperationException. (Bug #13624659, Bug #64092)

  • When using connection pooling, the connections in the pool were not automatically closed upon application exit. With the setting log-warnings=2, you could encounter Aborted connection errors in the MySQL error log. The workaround was to explicitly call MySql.Data.MySqlClient.MySqlConnection.ClearAllPools(); upon exiting the application. (Bug #13629471, Bug #63942)

  • The MySQL script generated by using the function CreateDatabaseScript used names with incorrect singular/plural forms. (Bug #13582837, Bug #62150)

  • In Visual Studio Table Designer, the Add -> Function Import... dialog could close prematurely when you pressed the Get Column Information button. (Bug #13511736)

  • 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 (2012-01-23)

Second beta release.

Bugs Fixed

  • In Table Designer for Visual Studio, trying to delete foreign keys from an InnoDB table showed an error, and the change was not saved. (Bug #13481362)

  • After an UPDATE statement, Connector/Net would generate incorrect SELECT SQL statements if a value in the WHERE clause was not also present in the SET clause of the UPDATE. (Bug #13491689, Bug #62134)

  • IntelliSense would emit an error when the "-" (minus) character was typed. (Bug #13522344)

Changes in MySQL Connector/Net 6.5.0 (2011-12-22)

First beta release.

Functionality Added or Changed

Bugs Fixed

  • The MySqlDataReader.GetDateTime() method was not recognizing that TIMESTAMP values had already been converted to the local time zone of the MySQL server, which could cause incorrect results if the value was later processed through the ToLocalTime() method. The fix causes the Kind property to be correctly set to Local rather than Unspecified. (Bug #13591554, Bug #63812)

  • Visual Studio 2010 Table Designer could give an error Object reference not set to an instance of an object for schemas with certain combinations of column names and foreign key references. The SQL syntax was incorrect for the ALTER TABLE statement generated by the Table Designer. (Bug #13591545, Bug #63714)

D.3.3. Changes in MySQL Connector/Net Version 6.4

D.3.3.1. Changes in MySQL Connector/Net 6.4.6 (2012-11-26)

This release fixes bugs since 6.4.5.

Bugs Fixed

  • Under some circumstances, setting CacheServerProperties=true in the connection string could cause a Packet too large error. With connection pooling enabled and CacheServerProperties=true, the first connection worked as expected, but the second, third, and so on connections would fail if the query exceeded 1024 bytes. (Bug #14593547, Bug #66578)

  • Connector/Net did not support creating an entity with a key of type string. During database creation, a MySqlException was thrown saying BLOB/TEXT column 'Name' used in key specification without a key length. The DDL produced by the provider specified a MEDIUMTEXT column for the primary key without specifying a length for the key. This fix is particularly important when working with Entity Framework versions 4.3 and later, since the __MigrationsHitory table (which replaces the EdmMetadata table) uses a string property as its key. (Bug #14540202, Bug #65289, Bug #64288)

  • The ExecuteNonQuery() could return an error Parameter '?' must be defined, when attempting to execute a statement such as:

    insert into table_name (Field1, Field1) VALUES(?,?)

    That is, when referencing the same field twice with two different ? placeholders. (Bug #14499549, Bug #66060)

  • Customizing precision by calling the HasPrecision() method within the OnModelCreating() method in a Code First project would always produce precision settings (10,2) rather than the specified precision. (Bug #14469048, Bug #65001)

  • The MySQL Connector/Net EntityFramework provider would throw NullReferenceException when trying to insert a new record with an empty VALUES clause. Such an INSERT should work when the only required (NOT NULL) column in the table is a primary key auto-increment column. (Bug #14479715, Bug #66066)

  • When building commands through the MySql.Data.MySqlClient.MySqlCommand() class, memory could be leaked because some IO.MemoryStream instances were not being freed efficiently. The memory leak could be an issue in SQL-heavy applications, for example a logging application processing large numbers of INSERT statements. (Bug #14468204, Bug #65696)

  • Using the Entity Data Model Designer decimal type and CreateDatabase function, the values were stored with 0 digits at the right of the decimal point. With this fix, the default is 2 digits to the right of the decimal point, and any precision specified through the Entity Data Model Designer is applied correctly. (Bug #14474342, Bug #65127)

  • When using a MySQL database set up as UTF32 as an ASP.net membership database, web applications could give a key too long error, and the Website Administration Tool would not connect to providers. The cause was that the column my_aspnet_sessions.SessionId, when converted from Latin1 character set to UTF32 with 4 bytes per character, exceeded the length limit for a primary key:

    Specified key was too long; max key length is 767 bytes

    (Bug #14495292, Bug #65144)

  • When using the ASP.net web security functionality with a MySQL database, using features that access the my_aspnet_usersinroles table caused an exception:

    MySql.Data.MySqlClient.MySqlException: Table 'testdb.my_aspnet_usersinrole' doesn't exist.

    For example, this error could occur when trying to remove the user from a role or find users in a role. The fix corrects the spelling of the table name to my_aspnet_usersinroles. (Bug #14405338, Bug #65805)

  • Although the member variable MySqlCommand.LastInsertedId was a 64-bit long, its value was effectively capped at the maximum value of Int32 (2,147,483,647). If a primary key exceeded this value, the value of LastInsertedId was wrong. This mismatch could be an issue for tables with large numbers of rows. (Bug #14171960, Bug #65452)

  • When using Entity Framework with Connector/Net, the association property OnDelete was not taken into account in the CreateDatabaseScript function of the ObjectContext, leading to an error message System.Data.UpdateException was unhandled. The SQL generated by the CreateDatabaseScript function was missing ON DELETE and ON UPDATE clauses. These clauses were filled in correctly by the DDL generation wizard. (Bug #14008752, Bug #64779)

  • A call to a stored procedure or function in an application using the Code First entity framework could result in an error:

    Unhandled Exception: MySql.Data.MySqlClient.MySqlException: You have an error 
    in your SQL syntax; ...

    The code change allows syntax such as the following to invoke a stored procedure, without using the CALL statement and without using CommandType.StoredProcedure.

    int count = myContext.Database.SqlQuery<int>("GetCount").First(); 

    (Bug #14008699, Bug #64999)

  • When using the Entity Framework Code First approach, the generated code could be incorrect:

    • Missing length specifier for data types, such as VARBINARY instead of VARBINARY(n).

    • ALTER TABLE statements referring to nonexistent tables, when private members were specified inside the main class.

    (Bug #13900091, Bug #64216)

  • When using the MySqlProfileProvider, calling the function ProfileManager.DeleteProfiles could throw an InvalidCastException exception. (Bug #13790123, Bug #64470)

  • In Visual Studio Table Designer, the name of a new index was always derived from the name of the table and could not be changed. (Bug #13613801)

  • When using the Entity Framework Code First approach, the generated code could be use the MEDIUMTEXT data type in contexts where other types such as VARCHAR were more appropriate, leading to errors such as:

    error 0064: Facet 'MaxLength' must not be specified for type 'mediumtext'.

    (Bug #13582335, Bug #63920)

D.3.3.2. Changes in MySQL Connector/Net 6.4.5 (2012-05-19)

This release fixes bugs since 6.4.4.

Bugs Fixed

  • When the length of a VARCHAR column was edited in Table Designer, the data type could be saved incorrectly as BIT. (Bug #13916560)

  • Any sequence of Take(n) method calls followed by Count or LongCount would cause a System.Data.EntityCommandCompilationException error. (Bug #13913047, Bug #64749)

  • The performance when setting the CommandText property on the MySqlCommand class was improved by enhancing the efficiency of a string comparison operation. (Bug #13739383, Bug #64012)

  • In Visual Studio Table Designer, if you tried to save a new table using an existing table name, subsequently you would not be prompted to choose a new name, preventing you from saving the table. (Bug #13785918)

  • The MySQL script generated by using the function CreateDatabaseScript used names with incorrect singular/plural forms. (Bug #13582837, Bug #62150)

  • Visual Studio 2010 Table Designer could give an error Object reference not set to an instance of an object for schemas with certain combinations of column names and foreign key references. The SQL syntax was incorrect for the ALTER TABLE statement generated by the Table Designer. (Bug #13591545, Bug #63714)

  • In Table Designer for Visual Studio, trying to create a table could fail if you saved changes immediately after entering the data type for a column. The workaround was to click somewhere else in the grid before saving changes. (Bug #13477805)

  • Creating a table through the Server Explorer Window on Visual Studio 2010 could fail with a MySQL syntax error. The properties in the CREATE TABLE statement could be listed in incorrect order. (Bug #13475830)

  • In Table Designer for Visual Studio, trying to delete foreign keys from an InnoDB table showed an error, and the change was not saved. (Bug #13481362)

  • In LINQ to Entity queries, including a child entity (1-n) and its entities (n-n) returned the wrong results. For example:

    db.Authors.Include("Books.Editions").AsEnumerable().First();

    (Bug #13491698, Bug #62801)

  • When creating a project in VisualStudio using a .NET framework such as 3.0 or 3.5 (anything less than 4.0), the Connector/Net library (MySql.Data.dll) was not listed in the Add References dialog box. The workaround was to browse to the library and add it manually. (Bug #13491678, Bug #60462)

  • After an UPDATE statement, Connector/Net would generate incorrect SELECT SQL statements if a value in the WHERE clause was not also present in the SET clause of the UPDATE. (Bug #13491689, Bug #62134)

  • Formerly, cleanup operations for expired sessions were fully automatic, with no ability to catch the timeout event and do application-specific cleanup. This fix adds a enableSessionExpireCallback connection option to let developers catch the event when a session expires. When enableSessionExpireCallback is enabled, the global.asax.session_end event is raised before data is deleted from the my_aspnet_sessions table. When enableSessionExpireCallback is disabled, the data is deleted from the my_aspnet_sessions table without raising the event first. The timeout period for session expiry is specified in the web.config file, in the timeout option of the sessionState section. (Bug #13354935, Bug #62266)

  • Connector/NET experienced poor performance when adding parameters to the MySQLCommand. (Bug #62653, Bug #13331475)

  • The Unicode quotation mark character U+0022 was not escaped by the MySQLHelper class. (Bug #62585, Bug #13092886)

  • Using a return parameter without a name resulted in an IndexOutOfRangeException exception. (Bug #62416, Bug #13006969)

  • The Mono runtime did not support hashed passwords. (Bug #62203, Bug #13041618)

  • Connector/NET incorrectly maps PrimitiveTypeKind.Byte to tinyint, instead of utinyint. And PrimitiveTypeKind.SByte mapping was added, to tinyint. (Bug #62135, Bug #13061713)

  • Connector/NET would incorrectly map decimal values to ANSI strings. (Bug #62246, Bug #13050570)

D.3.3.3. Changes in MySQL Connector/Net 6.4.4 (2011-09-26)

This release fixes bugs since 6.4.3.

Functionality Added or Changed

Bugs Fixed

  • (Bug #12897149)

  • When creating a tableadapter through a Dataset form in Visual Studio, the MaxLength of the field for a CHAR column 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 a TextBox. (Bug #12860224, Bug #62094)

  • When adding a MEDIUMTEXT or LONGTEXT column Visual Studio, the facet Fixed length had to be set to false, even though these types allow arbitrary lengths. (Bug #12848277, Bug #54915)

  • An error out of sync with server could occur when connecting in the Visual Studio Entity Framework. The issue occurred only on some MySQL servers, all with versions earlier than MySQL 5.5. (Bug #12853286, Bug #61806)

  • Using a combination of ListView, EntityDataSource with TypeFilter and Include EntityCollection Navigation Property, and DataPager caused a NullReferenceException error in the System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect function. (Bug #12776517, Bug #61714)

  • Executing a LINQ to Entity query could result in a NullReferenceException error. (Bug #12776598, Bug #61729)

  • On Model First changed column types generated in SQL scripts to produce more suitable MySql types. (Bug #59244, Bug #12707104)

  • MySqlScript was modified to enable correct processing of the DELIMITER command when not followed by a new line. (Bug #61680, Bug #12732279)

  • MySqlDataReader.Close was modified to use Default behavior when clearing remaining result sets. (Bug #61690, Bug #12723423)

  • The ASP.NET membership provider was modified to create and query all related tables using lowercase names. (Bug #61108, Bug #12702009)

D.3.3.4. Changes in MySQL Connector/Net 6.4.3 (2011-07-03)

This release fixes bugs since 6.4.2.

Bugs Fixed

  • SchemaDefinition-5.5.ssdl was modified to treat CHAR(36) columns as a GUID. (Bug #61657, Bug #12708208)

  • SqlFragment.QuoteIdentifier was modified to add MySQL quotes around identifiers. (Bug #61635, Bug #12707285)

D.3.3.5. Changes in MySQL Connector/Net 6.4.2 (2011-06-29)

This release fixes bugs since 6.4.1.

Bugs Fixed

  • Modified ProviderManifest.xml to map TIMESTAMP database columns to the DateTime .NET type. (Bug #55351, Bug #12652602)

  • Modified MySqlConnection.BeginTransaction to throw a NotSupportedException for Snapshot isolation level. (Bug #61589, Bug #12698020)

  • Fixed Entity Framework provider GROUP BY clause generation by adding all group-by keys to the SELECT statement. (Bug #46742, Bug #12622129)

D.3.3.6. Changes in MySQL Connector/Net 6.4.1 (2011-06-06, Alpha)

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 a SELECT is performed on the mysql.proc table 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.7. Changes in MySQL Connector/Net 6.4.0 (Unknown)

Version 6.4.0 has no changelog entries.

D.3.4. Changes in MySQL Connector/Net Version 6.3

D.3.4.1. Changes in MySQL Connector/Net 6.3.9 (2012-04-11)

This release fixes bugs since 6.3.8.

Bugs Fixed

  • When the length of a VARCHAR column was edited in Table Designer, the data type could be saved incorrectly as BIT. (Bug #13916560)

  • Any sequence of Take(n) method calls followed by Count or LongCount would cause a System.Data.EntityCommandCompilationException error. (Bug #13913047, Bug #64749)

  • When adding a ADO.NET Entity Data Model and generating the model from a database containing foreign keys, the foreign keys were not included in the generated model. (Bug #13800109)

  • The performance when setting the CommandText property on the MySqlCommand class was improved by enhancing the efficiency of a string comparison operation. (Bug #13739383, Bug #64012)

  • Fixed MySqlTime parsing to avoid throwing an exception when handling milliseconds (as result of a timediff operation). (Bug #13708884, Bug #64268)

  • In Visual Studio Table Designer, when adding a second foreign key, the new name was incorrectly assigned to the first foreign key in the list. (Bug #13613824)

  • In Visual Studio Table Designer, when editing a foreign key relationship, choosing a column name on the left side made that column name unavailable on the right side. (Bug #13615258)

  • In Visual Studio Table Designer, an error could occur if you added and deleted column information for foreign keys in a particular sequence. (Bug #13610235)

  • In Visual Studio Table Designer, deleting a foreign key relationship in the Relationship dialog required clicking twice. (Bug #13610283)

  • In Visual Studio Table Designer, modifying the Columns field in the Indexes/Keys dialog multiple times could cause an error. (Bug #13613765)

  • In Visual Studio Table Designer, it was possible to save a new foreign key relationship without filling in the fields of the Foreign Key Relationship dialog. (Bug #13613839)

  • In Visual Studio Table Designer, changes to a field were sometimes not detected until you switched focus away from that field. (Bug #13613755)

  • In Visual Studio Table Designer, changing the length of a VARCHAR field could cause an error. (Bug #13611677)

  • When creating a Visual Studio Web Application Project, using the ADO.NET Entity Data Model and generating the model from a database, the Entity Framework Model was not created. This operation gave an error:

    Access denied for user 'root'@'localhost' (using password: NO)

    (Bug #13610452)

  • If MySqlCommand.CommandText was equal to null, then MySqlCommand.ExecuteReader() would throw the wrong exception: NullReferenceException instead of InvalidOperationException. (Bug #13624659, Bug #64092)

  • When using connection pooling, the connections in the pool were not automatically closed upon application exit. With the setting log-warnings=2, you could encounter Aborted connection errors in the MySQL error log. The workaround was to explicitly call MySql.Data.MySqlClient.MySqlConnection.ClearAllPools(); upon exiting the application. (Bug #13629471, Bug #63942)

  • The MySQL script generated by using the function CreateDatabaseScript used names with incorrect singular/plural forms. (Bug #13582837, Bug #62150)

  • In Visual Studio Table Designer, the Add -> Function Import... dialog could close prematurely when you pressed the Get Column Information button. (Bug #13511736)

  • In LINQ to Entity queries, including a child entity (1-n) and its entities (n-n) returned the wrong results. For example:

    db.Authors.Include("Books.Editions").AsEnumerable().First();

    (Bug #13491698, Bug #62801)

  • After an UPDATE statement, Connector/Net would generate incorrect SELECT SQL statements if a value in the WHERE clause was not also present in the SET clause of the UPDATE. (Bug #13491689, Bug #62134)

  • 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)

  • IntelliSense would emit an error when the "-" (minus) character was typed. (Bug #13522344)

  • The class MySql.Data.Types.MySqlDateTime was not serializable. (Bug #11750161, Bug #40555)

  • Connector/NET incorrectly maps PrimitiveTypeKind.Byte to tinyint, instead of utinyint. And PrimitiveTypeKind.SByte mapping was added, to tinyint. (Bug #62135, Bug #13061713)

  • Connector/NET would incorrectly map decimal values to ANSI strings. (Bug #62246, Bug #13050570)

  • On Model First changed column types generated in SQL scripts to produce more suitable MySql types. (Bug #59244, Bug #12707104)

D.3.4.2. Changes in MySQL Connector/Net 6.3.8 (2011-12-16)

This release fixes bugs since 6.3.7.

Bugs Fixed

  • In Visual Studio Table Designer, if you tried to save a new table using an existing table name, subsequently you would not be prompted to choose a new name, preventing you from saving the table. (Bug #13785918)

  • Visual Studio 2010 Table Designer could give an error Object reference not set to an instance of an object for schemas with certain combinations of column names and foreign key references. The SQL syntax was incorrect for the ALTER TABLE statement generated by the Table Designer. (Bug #13591545, Bug #63714)

  • In table designer for Visual Studio, you could not create a foreign key that referenced the same table as source and destination. When adding a new relationship, the Referenced table list did not offer the original table as one of the choices. (Bug #13481340)

  • Creating a table through the Server Explorer Window on Visual Studio 2010 could fail with a MySQL syntax error. The properties in the CREATE TABLE statement could be listed in incorrect order. (Bug #13475830)

  • In Table Designer for Visual Studio, trying to delete foreign keys from an InnoDB table showed an error, and the change was not saved. (Bug #13481362)

  • When creating a project in VisualStudio using a .NET framework such as 3.0 or 3.5 (anything less than 4.0), the Connector/Net library (MySql.Data.dll) was not listed in the Add References dialog box. The workaround was to browse to the library and add it manually. (Bug #13491678, Bug #60462)

  • 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)

  • When creating a foreign key relationship in Table Designer, changes to the ON UPDATE and ON CASCADE settings were not reflected in the actual table definition, as displayed by SHOW CREATE TABLE. (Bug #13481348)

  • Removing a method was not affecting the indexes list of the table object, as defined within the Table Designer. (Bug #13481313)

  • The columns added in descending sort order were not included in the index, as defined within the Server Explorer. (Bug #13481709)

  • The comment property and index type were not added in the definition of the index, as defined within the Server Explorer. (Bug #13481314)

  • The Connector/Net installed for all users, and thus was not available in the Add/Remove Programs dialog for users other than the one who installed it. (Bug #13447941)

  • The default value for VARCHAR and CHAR field types would contain single quotation marks. (Bug #13442506)

  • When creating a tableadapter through a Dataset form in Visual Studio, the MaxLength of the field for a CHAR column 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 a TextBox. (Bug #12860224, Bug #62094)

  • When adding a MEDIUMTEXT or LONGTEXT column Visual Studio, the facet Fixed length had to be set to false, even though these types allow arbitrary lengths. (Bug #12848277, Bug #54915)

  • Using a combination of ListView, EntityDataSource with TypeFilter and Include EntityCollection Navigation Property, and DataPager caused a NullReferenceException error in the System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect function. (Bug #12776517, Bug #61714)

  • Executing a LINQ to Entity query could result in a NullReferenceException error. (Bug #12776598, Bug #61729)

  • Connector/NET experienced poor performance when adding parameters to the MySQLCommand. (Bug #62653, Bug #13331475)

  • The Unicode quotation mark character U+0022 was not escaped by the MySQLHelper class. (Bug #62585, Bug #13092886)

  • Using a return parameter without a name resulted in an IndexOutOfRangeException exception. (Bug #62416, Bug #13006969)

  • The Mono runtime did not support hashed passwords. (Bug #62203, Bug #13041618)

  • Modified ProviderManifest.xml to map TIMESTAMP database columns to the DateTime .NET type. (Bug #55351, Bug #12652602)

  • Modified MySqlConnection.BeginTransaction to throw a NotSupportedException for Snapshot isolation level. (Bug #61589, Bug #12698020)

  • SchemaDefinition-5.5.ssdl was modified to treat CHAR(36) columns as a GUID. (Bug #61657, Bug #12708208)

  • SqlFragment.QuoteIdentifier was modified to add MySQL quotes around identifiers. (Bug #61635, Bug #12707285)

  • MySqlScript was modified to enable correct processing of the DELIMITER command when not followed by a new line. (Bug #61680, Bug #12732279)

  • MySqlDataReader.Close was modified to use Default behavior when clearing remaining result sets. (Bug #61690, Bug #12723423)

  • The ASP.NET membership provider was modified to create and query all related tables using lowercase names. (Bug #61108, Bug #12702009)

D.3.4.3. Changes in MySQL Connector/Net 6.3.7 (2011-06-22)

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

  • MySQLConnectionStringBuilder.ContainsKey() incorrectly returned false when testing whether a keyword was part of the connection string. (Bug #11766671, Bug #59835)

  • Fixed Entity Framework provider GROUP BY clause generation by adding all group-by keys to the SELECT statement. (Bug #46742, Bug #12622129)

  • A NullReferenceException was thrown on disposal of a TransactionScope object. (Bug #59346, Bug #11766272)

  • 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)

  • MySQL Connector/Net 6.3.6 did not work with Visual Studio 2010. (Bug #60723, Bug #12394470)

  • MysqlDataReader.GetSchemaTable returned incorrect values and types. (Bug #59989, Bug #11776346)

  • Setting Membership.ApplicationName had no effect. (Bug #59438, Bug #11770465)

  • All queries other than INSERT were executed individually instead of as a batch even though batching was enabled for the connection. (Bug #59616, Bug #11850286)

  • 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)

D.3.4.4. Changes in MySQL Connector/Net 6.3.6 (2011-01-03)

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 a SELECT is performed on the mysql.proc table 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

  • 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 MySqlTokenizer contained unnecessary Substring and Trim calls:

    string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();

    The variable token was not used anywhere in the code. (Bug #58757)

  • MembershipProvider did not generate hashes correctly if the algorithm was keyed. The Key of the algorithm should have been set if the HashAlgorithm was KeyedHashAlgorithm. (Bug #58906)

  • When attempting to create an ADO.NET Entity Data Model, MySQL connections were not available. (Bug #58278)

  • MySqlCommand.ExecuteReader(CommandBehavior) threw a NullReferenceException when being called with CommandBehavior.CloseConnection, if the SQL statement contained a syntax error, or contained invalid data such as an invalid column name. (Bug #58652)

  • 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)

  • Code introduced to fix bug #54863 proved problematic on .NET version 3.5 and above. (Bug #58853)

  • ReadFieldLength() returned incorrect value for BIGINT autoincrement columns. (Bug #58373)

  • Calling the Read() method on a DataReader obtained from MySqlHelper.ExecuteReader generated 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)

  • MySQL Connector/Net did not support the utf8mb4 character set. When attempting to connect to utf8mb4 tables or columns, an exception KeyNotFoundException was generated. (Bug #58244)

  • Default values returned for text columns were not quoted. This meant that the COLUMN_DEFAULT field of the GetSchema columns 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)

  • 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)

  • MySQL Connector/Net for .NET/Mono attempted to dynamically load the assembly Mono.Posix.dll when a Unix socket was used to connect to the server. This failed and the connector was not able to use a Unix socket unless the Mono.Posix.dll assembly was previously loaded by the program. (Bug #56410)

  • 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)

D.3.4.5. Changes in MySQL Connector/Net 6.3.5 (2010-10-12)

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.CommandTimeout to 0 had no effect. It should have resulted in an infinite timeout. (Bug #57265)

  • When an output parameter was declared as type MySqlDbType.Bit, it failed to return with the correct value. (Bug #56756)

  • 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 Timeout connection string option had no effect. (Bug #56806)

  • MySQL Connector/Net experienced two problems as follows:

    1. A call to System.Data.Objects.ObjectContext.DatabaseExists() returned false, even if the database existed.

    2. 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)

  • MySqlHelper.ExecuteReader did not include an overload accepting MySqlParameter objects when using a MySqlConnection. However, MySqlHelper did include an overload for MySqlParameter objects 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)

D.3.4.6. Changes in MySQL Connector/Net 6.3.4 (2010-09-01, Generally Available)

First GA release. This release fixes bugs since 6.3.3.

Bugs Fixed

  • Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)

  • Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)

  • 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.PostedDate is a DateTimeOffset, and the underlying column type is a TIMESTAMP, the following exception was generated:

    MySqlException occurred
    Unable to serialize date/time value

    MySQL Connector/Net has now been changed so that all TIMESTAMP columns will be surfaced as DateTime. (Bug #52550)

  • Attempting to read Double.MinValue from a DOUBLE column 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)

  • The calculation of lockAge in the Session Provider sometimes generated a System.Data.SqlTypes.SqlNullValueException. (Bug #55701)

  • The INSERT command was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)

  • 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)

  • Calling MySqlDataAdapter.Update(DataTable) resulted in an unacceptable performance hit when updating large amounts of data. (Bug #55609)

D.3.4.7. Changes in MySQL Connector/Net 6.3.3 (2010-07-27)

This release fixes bugs since 6.3.2.

Bugs Fixed

  • Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)

  • CHAR(36) columns were not recognized as GUIDs when used in views with entity models. (Bug #52085)

  • MySQL Connector/Net 6.3.2 failed to install on Windows Vista. (Bug #53975)

  • When batching was used in MySqlDataAdapter, a connection was not opened automatically in MySqlDataAdapter.Update(). This resulted in an InvalidOperationException exception 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)

  • MySQL Connector/Net did not process Thread.Abort() correctly, and failed to cancel queries currently running on the server. (Bug #54012)

  • MySQL Connector/Net did not throw an EndOfStreamException exception when net_write_timeout was exceeded. (Bug #53439)

  • The icon for the MySQL Web Configuration Tool was not displayed in Visual Studio for Web Application Projects. (Bug #54571)

  • Database name was emitted into typed datasets. This prevented users using the configured default database. (Bug #33870)

  • MySqlDataAdapter.Update() generated concurrency violations for custom stored procedure driven update commands that used UpdateRowSource.FirstReturnedRecord. (Bug #54895)

  • Several calls to DataAdapter.Update() with intervening changes to DataTable resulted in ConcurrencyException exceptions being generated. (Bug #54863)

  • MySQL Connector/Net generated a null reference exception when TransactionScope was used by multiple threads. (Bug #54681)

  • The MySQL Connector/Net installation failed due to machine.config files not being present in configuration folders.

    MySQL Connector/Net has been changed to skip over configuration folders that do not contain a machine.config file. (Bug #52352)

  • If MySqlDataAdapter was used with an INSERT command where the VALUES clause contained an expression with parentheses in it, and set the adapter.UpdateBatchSize parameter to be greater than one, then the call to adapter.Update either generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)

  • The MySqlHelper object did not have an overloaded version of the ExecuteReader method that accepted a MySqlConnection object. (Bug #54570)

  • Garbage Collector disposal of a MySqlConnection object 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)

  • The method MySql.Data.Common.QueryNormalizer.CollapseValueList generated an ArgumentOutOfRangeException. (Bug #54152, Bug #53865)

  • 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)

D.3.4.8. Changes in MySQL Connector/Net 6.3.2 (2010-05-24, Beta)

First Beta release. This release fixes bugs since 6.3.1.

Functionality Added or Changed

  • Procedure caching 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 TEXT column containing more than 32767 bytes. (Bug #54040)

  • In MySQL Connector/Net, the MySqlConnection.Abort() method contained a try...catch construct, with an empty catch block. 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=true was used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)

  • In MySQL Connector/Net, the LoadCharsetMap() function of the CharSetMap class 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 latin1 character set is the same as the windows-cp1252 character 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 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)

  • MySQL Connector/Net 6.3.1 failed to install. (Bug #51407, Bug #51604)

  • When calling ExecuteNonQuery on a command object, the following exception occurred:

    Index and length must refer to a location within the string.
    Parameter name: length

    (Bug #51610)

D.3.4.9. Changes in MySQL Connector/Net 6.3.1 (2010-03-02)

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 mode that supports use of square brackets to delimit symbols. (Bug #35852)

Bugs Fixed

  • Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)

  • MySqlCommand.Parameters.Clear() did not work. (Bug #50444)

  • When the UpdateBatchSize property was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)

  • The method Command.TrimSemicolons used StringBuilder, 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)

  • 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)

  • A connection string set in web.config could 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)

  • When trying to create stored procedures from an SQL script, a MySqlException was thrown when attempting to redefine the DELIMITER:

    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 MySqlScript class has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)

D.3.4.10. Changes in MySQL Connector/Net 6.3.0 (2010-02-16, Alpha)

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 RequiresNew or Suppress options. (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

  • The method MySqlDataReader.GetSchemaTable() returned 0 in the NumericPrecision field for decimal and newdecimal columns. (Bug #48171)

  • 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)

  • When adding a data set in Visual Studio 2008, the following error was generated:

    Relations couldn't be added. 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)

D.3.5. Changes in MySQL Connector/Net Version 6.2

D.3.5.1. Changes in MySQL Connector/Net 6.2.6 (Not yet released)

This release fixes bugs since 6.2.5.

Version 6.2.6 has no changelog entries.

D.3.5.2. Changes in MySQL Connector/Net 6.2.5 (2011-07-01)

This release fixes bugs since 6.2.4.

Bugs Fixed

  • MySQLConnectionStringBuilder.ContainsKey() incorrectly returned false when testing whether a keyword was part of the connection string. (Bug #11766671, Bug #59835)

  • Modified ProviderManifest.xml to map TIMESTAMP database columns to the DateTime .NET type. (Bug #55351, Bug #12652602)

  • Modified MySqlConnection.BeginTransaction to throw a NotSupportedException for Snapshot isolation level. (Bug #61589, Bug #12698020)

  • Fixed Entity Framework provider GROUP BY clause generation by adding all group-by keys to the SELECT statement. (Bug #46742, Bug #12622129)

  • SchemaDefinition-5.5.ssdl was modified to treat CHAR(36) columns as a GUID. (Bug #61657, Bug #12708208)

  • SqlFragment.QuoteIdentifier was modified to add MySQL quotes around identifiers. (Bug #61635, Bug #12707285)

  • A NullReferenceException was thrown on disposal of a TransactionScope object. (Bug #59346, Bug #11766272)

  • 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)

  • A typed dataset did not get the table name. (Bug #57894, Bug #11764989)

  • MysqlDataReader.GetSchemaTable returned incorrect values and types. (Bug #59989, Bug #11776346)

  • Setting Membership.ApplicationName had no effect. (Bug #59438, Bug #11770465)

  • All queries other than INSERT were executed individually instead of as a batch even though batching was enabled for the connection. (Bug #59616, Bug #11850286)

  • The MySqlTokenizer contained unnecessary Substring and Trim calls:

    string token = sql.Substring(startIndex, stopIndex - startIndex).Trim();

    The variable token was not used anywhere in the code. (Bug #58757)

  • MembershipProvider did not generate hashes correctly if the algorithm was keyed. The Key of the algorithm should have been set if the HashAlgorithm was KeyedHashAlgorithm. (Bug #58906)

  • MySqlCommand.ExecuteReader(CommandBehavior) threw a NullReferenceException when being called with CommandBehavior.CloseConnection, if the SQL statement contained a syntax error, or contained invalid data such as an invalid column name. (Bug #58652)

  • 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)

  • Code introduced to fix bug #54863 proved problematic on .NET version 3.5 and above. (Bug #58853)

  • ReadFieldLength() returned incorrect value for BIGINT autoincrement columns. (Bug #58373)

  • MySQL Connector/Net did not support the utf8mb4 character set. When attempting to connect to utf8mb4 tables or columns, an exception KeyNotFoundException was generated. (Bug #58244)

  • Default values returned for text columns were not quoted. This meant that the COLUMN_DEFAULT field of the GetSchema columns collection did not return a valid SQL expression. (Bug #56509)

  • MySQL Connector/Net for .NET/Mono attempted to dynamically load the assembly Mono.Posix.dll when a Unix socket was used to connect to the server. This failed and the connector was not able to use a Unix socket unless the Mono.Posix.dll assembly was previously loaded by the program. (Bug #56410)

  • Setting MySqlCommand.CommandTimeout to 0 had no effect. It should have resulted in an infinite timeout. (Bug #57265)

  • When an output parameter was declared as type MySqlDbType.Bit, it failed to return with the correct value. (Bug #56756)

  • 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 Timeout connection string option had no effect. (Bug #56806)

  • MySqlHelper.ExecuteReader did not include an overload accepting MySqlParameter objects when using a MySqlConnection. However, MySqlHelper did include an overload for MySqlParameter objects when using a string object containing the connection string to the database. (Bug #56755)

D.3.5.3. Changes in MySQL Connector/Net 6.2.4 (2010-08-30)

This release fixes bugs since 6.2.3.

Functionality Added or Changed

  • Procedure caching 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

  • 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)

  • Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)

  • Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)

  • EventLog was not disposed in the SessionState provider. (Bug #52550)

  • Attempting to read Double.MinValue from a DOUBLE column 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)

  • The calculation of lockAge in the Session Provider sometimes generated a System.Data.SqlTypes.SqlNullValueException. (Bug #55701)

  • The INSERT command was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)

  • 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)

  • 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)

  • Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)

  • CHAR(36) columns were not recognized as GUIDs when used in views with entity models. (Bug #52085)

  • When batching was used in MySqlDataAdapter, a connection was not opened automatically in MySqlDataAdapter.Update(). This resulted in an InvalidOperationException exception 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)

  • MySQL Connector/Net did not process Thread.Abort() correctly, and failed to cancel queries currently running on the server. (Bug #54012)

  • MySQL Connector/Net did not throw an EndOfStreamException exception when net_write_timeout was exceeded. (Bug #53439)

  • The icon for the MySQL Web Configuration Tool was not displayed in Visual Studio for Web Application Projects. (Bug #54571)

  • Database name was emitted into typed datasets. This prevented users using the configured default database. (Bug #33870)

  • MySqlDataAdapter.Update() generated concurrency violations for custom stored procedure driven update commands that used UpdateRowSource.FirstReturnedRecord. (Bug #54895)

  • Several calls to DataAdapter.Update() with intervening changes to DataTable resulted in ConcurrencyException exceptions being generated. (Bug #54863)

  • If MySqlDataAdapter was used with an INSERT command where the VALUES clause contained an expression with parentheses in it, and set the adapter.UpdateBatchSize parameter to be greater than one, then the call to adapter.Update either generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)

  • The MySqlHelper object did not have an overloaded version of the ExecuteReader method that accepted a MySqlConnection object. (Bug #54570)

  • Garbage Collector disposal of a MySqlConnection object 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)

  • The method MySql.Data.Common.QueryNormalizer.CollapseValueList generated an ArgumentOutOfRangeException. (Bug #54152, Bug #53865)

  • 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 MySQL Connector/Net, the MySqlConnection.Abort() method contained a try...catch construct, with an empty catch block. 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=true was used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)

  • In MySQL Connector/Net, the LoadCharsetMap() function of the CharSetMap class 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 latin1 character set is the same as the windows-cp1252 character set and it extends the official ISO 8859-1 or IANA latin1. (Bug #51927)

  • Periodically the session provider threw an SqlNullValueException exception. When this happened, the row within the my_aspnet_Sessions table had locked always 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 the locked value was manually changed to '0'. (Bug #52175)

  • 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)

D.3.5.4. Changes in MySQL Connector/Net 6.2.3 (2010-04-10)

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 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)

  • When calling ExecuteNonQuery on a command object, the following exception occurred:

    Index and length must refer to a location within the string.
    Parameter name: length

    (Bug #51610)

  • Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)

  • MySqlCommand.Parameters.Clear() did not work. (Bug #50444)

  • When the UpdateBatchSize property was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)

  • The method Command.TrimSemicolons used StringBuilder, 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)

  • 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)

  • A connection string set in web.config could 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)

  • 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)

  • A FormatException was generated when an empty string was returned from a stored function. (Bug #49642)

  • MySqlDataReader.GetUInt64 returned an incorrect value when reading a BIGINT UNSIGNED column containing a value greater than 2147483647. (Bug #49794)

  • Calling a User Defined Function using Entity SQL in the Entity Framework caused a NullReferenceException. (Bug #45277)

  • When trying to create stored procedures from an SQL script, a MySqlException was thrown when attempting to redefine the DELIMITER:

    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 MySqlScript class has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)

D.3.5.5. Changes in MySQL Connector/Net 6.2.2 (2009-12-22, Generally Available)

First GA release of 6.2. This release fixes bugs since 6.2.1.

Bugs Fixed

  • 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)

  • The method MySqlDataReader.GetSchemaTable() returned 0 in the NumericPrecision field for decimal and newdecimal columns. (Bug #48171)

  • 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)

  • When adding a data set in Visual Studio 2008, the following error was generated:

    Relations couldn't be added. 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)

  • Connection objects were not garbage collected when not in use. (Bug #31996)

D.3.5.6. Changes in MySQL Connector/Net 6.2.1 (2009-11-16, Beta)

This release fixes bugs since 6.2.0.

Functionality Added or Changed

  • The MySqlParameter class now has a property named PossibleValues. This property is NULL unless the parameter is created by MySqlCommandBuilder.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)

  • 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”.

  • 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.

  • Prior to MySQL Connector/Net 6.2, MySqlCommand.CommandTimeout included user processing time, that is processing time not related to direct use of the connector. Timeout was implemented through a .NET Timer, that triggered after CommandTimeout seconds.

    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 the MySqlReader.Read method 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.

Bugs Fixed

  • When building the MySql.Data project 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)

  • When used, the Encrypt connection 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 Encrypt option has been fixed so that it does not generate an exception, it will be removed completely in version 6.4. (Bug #48290)

  • Cloning of MySqlCommand was not typesafe. To clone a MySqlCommand it 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)

  • An entity model created from a schema containing a table with a column of type UNSIGNED BIGINT and a view of the table did not behave correctly. When an entity was created and mapped to the view, the column that was of type UNSIGNED BIGINT was displayed as BIGINT. (Bug #47872)

  • 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 MySqlDecimal type, along with the supporting method GetMySqlDecimal. (Bug #48100)

  • 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)

D.3.5.7. Changes in MySQL Connector/Net 6.2.0 (2009-10-21, Alpha)

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 specific web.config. (Bug #47815)

  • When loading the MySQLClient-mono.sln file 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.6. Changes in MySQL Connector/Net Version 6.1

D.3.6.1. Changes in MySQL Connector/Net 6.1.7 (Not released, Generally Available)

This release fixes bugs since 6.1.6.

Version 6.1.7 has no changelog entries.

D.3.6.2. Changes in MySQL Connector/Net 6.1.6 (Not released, Generally Available)

This release fixes bugs since 6.1.5.

Version 6.1.6 has no changelog entries.

D.3.6.3. Changes in MySQL Connector/Net 6.1.5 (2010-08-30, Generally Available)

This release fixes bugs since 6.1.4.

Bugs Fixed

  • 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)

  • Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)

  • Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)

  • EventLog was not disposed in the SessionState provider. (Bug #52550)

  • Attempting to read Double.MinValue from a DOUBLE column 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)

  • The calculation of lockAge in the Session Provider sometimes generated a System.Data.SqlTypes.SqlNullValueException. (Bug #55701)

  • The INSERT command was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)

  • 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)

  • Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)

  • CHAR(36) columns were not recognized as GUIDs when used in views with entity models. (Bug #52085)

  • When batching was used in MySqlDataAdapter, a connection was not opened automatically in MySqlDataAdapter.Update(). This resulted in an InvalidOperationException exception 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)

  • MySQL Connector/Net did not throw an EndOfStreamException exception when net_write_timeout was exceeded. (Bug #53439)

  • The icon for the MySQL Web Configuration Tool was not displayed in Visual Studio for Web Application Projects. (Bug #54571)

  • Database name was emitted into typed datasets. This prevented users using the configured default database. (Bug #33870)

  • MySqlDataAdapter.Update() generated concurrency violations for custom stored procedure driven update commands that used UpdateRowSource.FirstReturnedRecord. (Bug #54895)

  • Several calls to DataAdapter.Update() with intervening changes to DataTable resulted in ConcurrencyException exceptions being generated. (Bug #54863)

  • If MySqlDataAdapter was used with an INSERT command where the VALUES clause contained an expression with parentheses in it, and set the adapter.UpdateBatchSize parameter to be greater than one, then the call to adapter.Update either generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)

  • The MySqlHelper object did not have an overloaded version of the ExecuteReader method that accepted a MySqlConnection object. (Bug #54570)

  • Garbage Collector disposal of a MySqlConnection object 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)

  • The method MySql.Data.Common.QueryNormalizer.CollapseValueList generated an ArgumentOutOfRangeException. (Bug #54152, Bug #53865)

  • 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)

D.3.6.4. Changes in MySQL Connector/Net 6.1.4 (2010-04-28, Generally Available)

This release fixes bugs since 6.1.3.

Functionality Added or Changed

  • Procedure caching 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 a try...catch construct, with an empty catch block. This meant that any exception generated at this point would not be caught. (Bug #52769)

  • If FunctionsReturnString=true was used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)

  • In MySQL Connector/Net, the LoadCharsetMap() function of the CharSetMap class 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 latin1 character set is the same as the windows-cp1252 character 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 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)

  • When calling ExecuteNonQuery on a command object, the following exception occurred:

    Index and length must refer to a location within the string.
    Parameter name: length

    (Bug #51610)

  • Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)

  • MySqlCommand.Parameters.Clear() did not work. (Bug #50444)

  • When the UpdateBatchSize property was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)

  • The method Command.TrimSemicolons used StringBuilder, 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)

  • A connection string set in web.config could 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)

  • When the MySqlScript.execute() method was called, the following exception was generated:

    InvalidOperationException : The CommandText property has not been properly initialized.

    (Bug #50344)

  • A FormatException was generated when an empty string was returned from a stored function. (Bug #49642)

  • MySqlDataReader.GetUInt64 returned an incorrect value when reading a BIGINT UNSIGNED column containing a value greater than 2147483647. (Bug #49794)

  • Calling a User Defined Function using Entity SQL in the Entity Framework caused a NullReferenceException. (Bug #45277)

  • The method MySqlDataReader.GetSchemaTable() returned 0 in the NumericPrecision field for decimal and newdecimal columns. (Bug #48171)

  • 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)

  • When adding a data set in Visual Studio 2008, the following error was generated:

    Relations couldn't be added. 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)

  • When trying to create stored procedures from an SQL script, a MySqlException was thrown when attempting to redefine the DELIMITER:

    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 MySqlScript class has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)

D.3.6.5. Changes in MySQL Connector/Net 6.1.3 (2009-11-16, Generally Available)

This release fixes bugs since 6.1.2.

Bugs Fixed

  • When building the MySql.Data project 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)

  • Cloning of MySqlCommand was not typesafe. To clone a MySqlCommand it 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)

  • An entity model created from a schema containing a table with a column of type UNSIGNED BIGINT and a view of the table did not behave correctly. When an entity was created and mapped to the view, the column that was of type UNSIGNED BIGINT was displayed as BIGINT. (Bug #47872)

  • For some character sets such as UTF-8, a CHAR column would sometimes be incorrectly interpreted as a GUID by MySQL Connector/Net.

    MySQL Connector/Net was changed so that a column would only be interpreted as a GUID if it had a character length of 36, as opposed to a byte length of 36. (Bug #47985)

  • 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 MySqlDecimal type, along with the supporting method GetMySqlDecimal. (Bug #48100)

  • If MySqlConnection.GetSchema was 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 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 specific web.config. (Bug #47815)

  • Attempting to build MySQL Connector/Net 6.1 MySQL.Data from 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.sln file 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.6.6. Changes in MySQL Connector/Net 6.1.2 (2009-09-08, Generally Available)

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)

  • Input parameters were missing from Stored Procedures when using them with ADO.NET Data Entities. (Bug #44985)

  • 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 
    Description: 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 NullReferenceException to be thrown. When the method MySqlPacket::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)

  • 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)

D.3.6.7. Changes in MySQL Connector/Net 6.1.1 (2009-08-20, Beta)

This is the first Beta release of 6.1.

Bugs Fixed

  • In the MySqlDataReader class the GetSByte function returned a byte value instead of an sbyte value. (Bug #46620)

  • 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)

  • An exception was generated when using TIMESTAMP columns with the Entity Framework. (Bug #46311)

  • Errors occurred when using the Entity Framework with cultures that used a comma as the decimal separator. This was because the formatting for SINGLE, DOUBLE and DECIMAL values was not handled correctly. (Bug #44455)

  • When reading data, such as with a MySqlDataAdapter on a MySqlConnection, MySQL Connector/Net could potentially enter an infinite loop in CompressedStream.ReadNextpacket() if compression was enabled. (Bug #43678)

  • 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)

  • Conversion of MySQL TINYINT(1) to boolean failed. (Bug #46205, Bug #46359, Bug #41953)

  • Calling the Entity Framework SaveChanges() method of any MySQL ORM Entity with a column type TIME, generated an error message:

    Unknown PrimitiveKind Time

    (Bug #45457)

  • When attempting to connect to MySQL using the Compact Framework version of MySQL Connector/Net, an IndexOutOfRangeException exception was generated on trying to open the connection. (Bug #43736)

  • The Entity Framework provider was not calling DBSortExpression correctly when the Skip and Take methods 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)

  • 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)

  • 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 keepalive parameter, which prevents disconnects by sending an empty TCP packet after a specified timeout. (Bug #40684)

  • 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 in Profile.Name the string was not saved to the my_aspnet_Profiles table. If an attempt was made to force the save with Profile.Save() the following error was generated:

    Server Error in '/mono' Application
    
    --------------------------------------------------------------------------------
    
    The requested feature is not implemented.
    Description: 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)

  • MySQL Connector/Net CHM documentation stated that MySQL Server 3.23 was supported. (Bug #42110)

  • When populating a MySQL database table in Visual Studio using the Table Editor, if a VARCHAR(10) column was changed to a VARCHAR(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 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 OK was clicked to acknowledge the error the installer exited. (Bug #45474)

  • 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.build

    The following error occurred:

    BUILD FAILED
    
    Error loading buildfile.
    Encoding name 'Windows-1252' not supported.
    Parameter name: name

    (Bug #42411)

  • 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 the UseProcedureBodies option. This broke any application for which the application's parameter names did not match the parameter names in the Stored Procedure, resulting in an ArgumentException with 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)

D.3.6.8. Changes in MySQL Connector/Net 6.1.0 (2009-07-15, Alpha)

This is the first Alpha release of 6.1.

Functionality Added or Changed

  • 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.

  • Session State Provider - This enables you to store the state of your website in a MySQL server.

  • 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.

  • 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=true to the connection string and the old BINARY(16) type will be used instead.

D.3.7. Changes in MySQL Connector/Net Version 6.0

D.3.7.1. Changes in MySQL Connector/Net 6.0.8 (Not released)

Fixes bugs since 6.0.7.

Version 6.0.8 has no changelog entries.

D.3.7.2. Changes in MySQL Connector/Net 6.0.7 (2010-08-30)

Fixes bugs since 6.0.6.

Bugs Fixed

  • 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)

  • Opening a connection in the Visual Studio Server Explorer and choosing to alter an existing routine required another authentication at the server. (Bug #44715)

  • Stored procedure enumeration code generated an error if a procedure was used in a dataset that did not return any resultsets. (Bug #50671)

  • EventLog was not disposed in the SessionState provider. (Bug #52550)

  • Attempting to read Double.MinValue from a DOUBLE column 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)

  • The INSERT command was significantly slower with MySQL Connector/Net 6.x compared to 5.x, when compression was enabled. (Bug #48243)

  • Membership schema creation failed if the default schema collation was not Latin1. (Bug #53174)

  • When batching was used in MySqlDataAdapter, a connection was not opened automatically in MySqlDataAdapter.Update(). This resulted in an InvalidOperationException exception 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)

  • MySqlDataAdapter.Update() generated concurrency violations for custom stored procedure driven update commands that used UpdateRowSource.FirstReturnedRecord. (Bug #54895)

  • Several calls to DataAdapter.Update() with intervening changes to DataTable resulted in ConcurrencyException exceptions being generated. (Bug #54863)

  • If MySqlDataAdapter was used with an INSERT command where the VALUES clause contained an expression with parentheses in it, and set the adapter.UpdateBatchSize parameter to be greater than one, then the call to adapter.Update either generated an exception or failed to batch the commands, executing each insert individually. (Bug #54386)

  • The MySqlHelper object did not have an overloaded version of the ExecuteReader method that accepted a MySqlConnection object. (Bug #54570)

  • Garbage Collector disposal of a MySqlConnection object 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)

  • The method MySql.Data.Common.QueryNormalizer.CollapseValueList generated an ArgumentOutOfRangeException. (Bug #54152, Bug #53865)

  • 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)

D.3.7.3. Changes in MySQL Connector/Net 6.0.6 (2010-04-28)

Fixes bugs since 6.0.5.

Functionality Added or Changed

  • Procedure caching 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 a try...catch construct, with an empty catch block. This meant that any exception generated at this point would not be caught. (Bug #52769)

  • If FunctionsReturnString=true was used in the connection string, the decimal separator (according to locale) was not interpreted. (Bug #52187)

  • In MySQL Connector/Net, the LoadCharsetMap() function of the CharSetMap class 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 latin1 character set is the same as the windows-cp1252 character 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 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)

  • When calling ExecuteNonQuery on a command object, the following exception occurred:

    Index and length must refer to a location within the string.
    Parameter name: length

    (Bug #51610)

  • Binary Columns were not displayed in the Query Builder of Visual Studio. (Bug #50171)

  • MySqlCommand.Parameters.Clear() did not work. (Bug #50444)

  • When the UpdateBatchSize property was set to a value greater than 1, only the first row was applied to the database. (Bug #50123)

  • The method Command.TrimSemicolons used StringBuilder, 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)

  • A connection string set in web.config could 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)

  • When the MySqlScript.execute() method was called, the following exception was generated:

    InvalidOperationException : The CommandText property has not been properly initialized.

    (Bug #50344)

  • A FormatException was generated when an empty string was returned from a stored function. (Bug #49642)

  • MySqlDataReader.GetUInt64 returned an incorrect value when reading a BIGINT UNSIGNED column containing a value greater than 2147483647. (Bug #49794)

  • Calling a User Defined Function using Entity SQL in the Entity Framework caused a NullReferenceException. (Bug #45277)

  • The method MySqlDataReader.GetSchemaTable() returned 0 in the NumericPrecision field for decimal and newdecimal columns. (Bug #48171)

  • 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)

  • When adding a data set in Visual Studio 2008, the following error was generated:

    Relations couldn't be added. 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)

  • When trying to create stored procedures from an SQL script, a MySqlException was thrown when attempting to redefine the DELIMITER:

    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 MySqlScript class has been fixed to support the delimiter statement as it is found in SQL scripts. (Bug #46429)

D.3.7.4. Changes in MySQL Connector/Net 6.0.5 (2009-11-12)

This is a new release, fixing recently discovered bugs.

Bugs Fixed

  • Cloning of MySqlCommand was not typesafe. To clone a MySqlCommand it 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)

  • An entity model created from a schema containing a table with a column of type UNSIGNED BIGINT and a view of the table did not behave correctly. When an entity was created and mapped to the view, the column that was of type UNSIGNED BIGINT was displayed as BIGINT. (Bug #47872)

  • 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 MySqlDecimal type, along with the supporting method GetMySqlDecimal. (Bug #48100)

  • If MySqlConnection.GetSchema was 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 loading the MySQLClient-mono.sln file 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)

  • Input parameters were missing from Stored Procedures when using them with ADO.NET Data Entities. (Bug #44985)

  • Using a DataAdapter with a linked MySqlCommandBuilder the following exception was thrown when trying to call da.Update(DataRow[] rows):

    Connection must be valid and open

    (Bug #34657)

  • If an error occurred during connection to a MySQL Server, deserializing the error message from the packet buffer caused a NullReferenceException to be thrown. When the method MySqlPacket::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 MySqlDataReader class the GetSByte function returned a byte value instead of an sbyte value. (Bug #46620)

  • 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)

  • An exception was generated when using TIMESTAMP columns with the Entity Framework. (Bug #46311)

  • Errors occurred when using the Entity Framework with cultures that used a comma as the decimal separator. This was because the formatting for SINGLE, DOUBLE and DECIMAL values was not handled correctly. (Bug #44455)

  • When reading data, such as with a MySqlDataAdapter on a MySqlConnection, MySQL Connector/Net could potentially enter an infinite loop in CompressedStream.ReadNextpacket() if compression was enabled. (Bug #43678)

  • 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)

  • Conversion of MySQL TINYINT(1) to boolean failed. (Bug #46205, Bug #46359, Bug #41953)

  • Calling the Entity Framework SaveChanges() method of any MySQL ORM Entity with a column type TIME, generated an error message:

    Unknown PrimitiveKind Time

    (Bug #45457)

  • When attempting to connect to MySQL using the Compact Framework version of MySQL Connector/Net, an IndexOutOfRangeException exception was generated on trying to open the connection. (Bug #43736)

  • The Entity Framework provider was not calling DBSortExpression correctly when the Skip and Take methods 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)

  • 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)

  • 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 keepalive parameter, which prevents disconnects by sending an empty TCP packet after a specified timeout. (Bug #40684)

  • 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 in Profile.Name the string was not saved to the my_aspnet_Profiles table. If an attempt was made to force the save with Profile.Save() the following error was generated:

    Server Error in '/mono' Application
    
    --------------------------------------------------------------------------------
    
    The requested feature is not implemented.
    Description: 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)

  • MySQL Connector/Net CHM documentation stated that MySQL Server 3.23 was supported. (Bug #42110)

  • When populating a MySQL database table in Visual Studio using the Table Editor, if a VARCHAR(10) column was changed to a VARCHAR(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 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 OK was clicked to acknowledge the error the installer exited. (Bug #45474)

  • 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.build

    The following error occurred:

    BUILD FAILED
    
    Error loading buildfile.
    Encoding name 'Windows-1252' not supported.
    Parameter name: name

    (Bug #42411)

  • 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 the UseProcedureBodies option. This broke any application for which the application's parameter names did not match the parameter names in the Stored Procedure, resulting in an ArgumentException with 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)

  • The EscapeString code carried out escaping by calling string.Replace multiple 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)

  • In MySQL Connector/Net 6.0.4 using GetProcData generated an error because the parameters data table was only created if MySQL Server was at least version 6.0.6, or if the UseProcedureBodies connection string option was set to true.

    Also the DeriveParameters command generated a null reference exception. This was because the parameters data table, which was null, was used in a for each loop. (Bug #45952)

  • 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)

  • 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)

  • Adding the Allow Batch=False option 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)

  • A MySQL Connector/Net test program that connected to MySQL Server using the connection string option compress=true crashed, 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 WeakReferences in the Compressed stream class, which was causing the crash. (Bug #45463)

D.3.7.5. Changes in MySQL Connector/Net 6.0.4 (2009-06-16)

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
    permitted IP 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 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)

  • 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)

  • 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 be‎havior)
    at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()

    (Bug #44960)

  • The Microsoft Visual Studio solution file MySQL-VS2005.sln was invalid. Several projects could not be loaded and thus it was not possible to build MySQL Connector/Net from source. (Bug #44822)

  • 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 DataReader in MySQL Connector/Net 6.0.3 considered a BINARY(16) field as a GUID with a length of 16. (Bug #44507)

  • The MySQL Connector/Net MySQLRoleProvider reported that there were no roles, even when roles existed. (Bug #44414)

D.3.7.6. Changes in MySQL Connector/Net 6.0.3 (2009-04-28)

First GA release.

Functionality Added or Changed

  • The MySqlTokenizer failed to split fieldnames from values if they were not separated by a space. This also happened if the string contained certain characters. As a result MySqlCommand.ExecuteNonQuery raised 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 MySqlException was 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

  • Column types for SchemaProvider and ISSchemaProvider did not match.

    When the source code in SchemaProvider.cs and ISSchemaProvider.cs were compared it was apparent that they were not using the same column types. The base provider used SQL such as SHOW CREATE TABLE, while ISSchemaProvider used the schema information tables. Column types used by the base class were INT64 and the column types used by ISSchemaProvider were UNSIGNED. (Bug #44123)

  • MySQL.Data was 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.Data was not displayed when References, Add Reference was selected. (Bug #44141)

D.3.7.7. Changes in MySQL Connector/Net 6.0.2 (2009-04-07, Beta)

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)

D.3.7.8. Changes in MySQL Connector/Net 6.0.1 (2009-04-02, Beta)

This is a new Beta development release, fixing recently discovered bugs.

Bugs Fixed

  • Generating an Entity Data Model (EDM) schema with a table containing columns with data types MEDIUMTEXT and LONGTEXT generated a runtime error message Max value too long or too short for Int32. (Bug #43480)

  • An insert and update error was generated by the decimal data type in the Entity Framework, when a German collation was used. (Bug #43574)

D.3.7.9. Changes in MySQL Connector/Net 6.0.0 (2009-03-02, Alpha)

This is a new Alpha development release.

Bugs Fixed

  • A null reference exception was generated when MySqlConnection.ClearPool(connection) was called. (Bug #42801)

D.3.8. Changes in MySQL Connector/Net Version 5.3

D.3.8.1. Changes in MySQL Connector/Net 5.3.0 (Not released)

Version 5.3.0 has no changelog entries.

D.3.9. Changes in MySQL Connector/Net Version 5.2

D.3.9.1. Changes in MySQL Connector/Net 5.2.8 (Not released)

Version 5.2.8 has no changelog entries.

D.3.9.2. Changes in MySQL Connector/Net 5.2.7 (2009-07-15)

Bugs Fixed

  • The EscapeString code carried out escaping by calling string.Replace multiple 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)

  • 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)

  • 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)

  • 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
    permitted IP 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 MySQL Connector/Net test program that connected to MySQL Server using the connection string option compress=true crashed, 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 WeakReferences in the Compressed stream class, which was causing the crash. (Bug #45463)

  • The Microsoft Visual Studio solution file MySQL-VS2005.sln was 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)

  • 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)

D.3.9.3. Changes in MySQL Connector/Net 5.2.6 (2009-04-28)

Functionality Added or Changed

  • A new connection string option has been added: use affected rows. When true the connection will report changed rows instead of found rows. (Bug #44194)

Bugs Fixed

  • Calling GetSchema() on Indexes or IndexColumns failed where index or column names were restricted.

    In SchemaProvider.cs, methods GetIndexes() and GetIndexColumns() passed their restrictions directly to GetTables(). This only worked if the restrictions were no more specific than schemaName and tableName. If IndexName was given, this was passed to GetTables() where it was treated as TableType. As a result no tables were returned, unless the index name happened to be BASE TABLE or VIEW. 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 Complete method of the transaction. (Bug #43553)

  • A null reference exception was generated when MySqlConnection.ClearPool(connection) was called. (Bug #42801)

  • The GetGuid() method of MySqlDataReader did not treat BINARY(16) column data as a GUID. When operating on such a column a FormatException exception was generated. (Bug #41452)

  • When using MySqlBulkLoader.Load(), the text file is opened by NativeDriver.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 the finally{} clause by calling fs.Close(), but since the stream was never successfully opened, this was an attempt to execute a method of a null reference. (Bug #43332)

  • MySQLMembershipProvider.ValidateUser only used the userId to validate. However, it should also use the applicationId to perform the validation correctly.

    The generated query was, for example:

    SELECT Password, PasswordKey, PasswordFormat, IsApproved, Islockedout
          FROM my_aspnet_Membership WHERE userId=13

    Note that applicationId is not used. (Bug #42574)

  • When ASP.NET membership was configured to not require password question and answer using requiresQuestionAndAnswer="false", a SqlNullValueException was generated when using MembershipUser.ResetPassword() to reset the user password. (Bug #41408)

  • There was an error in the ProfileProvider class in the private ProfileInfoCollection GetProfiles() function. The column of the final table was named lastUpdatdDate ('e' is missing) instead of the correct lastUpdatedDate. (Bug #41654)

  • When MySql.Web.Profile.MySQLProfileProvider was configured, it was not possible to assign a name other than the default name MySQLProfileProvider.

    If the name SCC_MySQLProfileProvider was assigned, an exception was generated when attempting to use Page.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)

  • If a Stored Procedure contained spaces in its parameter list, and was then called from MySQL Connector/Net, an exception was generated. However, the same Stored Procedure called 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 DATETIME format contained an erroneous space. (Bug #41021)

  • When ExecuteNonQuery was called with a command type of Stored Procedure it worked for one user but resulted in a hang for another user with the same database permissions.

    However, if CALL was used in the command text and ExecuteNonQuery was used with a command type of Text, the call worked for both users. (Bug #40139)

D.3.9.4. Changes in MySQL Connector/Net 5.2.5 (2008-11-19)

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)

D.3.9.5. Changes in MySQL Connector/Net 5.2.4 (2008-11-13)

Bugs Fixed

  • MySqlDataReader did not feature a GetSByte method. (Bug #40571)

  • GetDefaultCollation and GetMaxLength were not thread safe. These functions called the database to get a set of parameters and cached them in two static dictionaries in the function InitCollections. However, if many threads called them they would try to insert the same keys in the collections resulting in duplicate key exceptions. (Bug #40231)

  • The connection string option Functions Return String did not set the correct encoding for the result string. Even though the connection string option Functions Return String=true; is set, the result of SELECT DES_DECRYPT() contained ?? instead of the correct national character symbols. (Bug #40076)

  • When working with stored procedures MySQL Connector/Net generated an exception Unknown "table parameters" in information_schema. (Bug #40382)

  • 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)

  • After the ConnectionString property was initialized using the public setter of DbConnectionStringBuilder, the GetConnectionString method of MySqlConnectionStringBuilder incorrectly returned null when true was assigned to the includePass parameter. (Bug #39728)

  • If, when using the MySqlTransaction transaction object, an exception was thrown, the transaction object was not disposed of and the transaction was not rolled back. (Bug #39817)

  • 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 a Time column through the use of MySqlParameter caused MySqlException to be thrown. (Bug #39275)

  • 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)

  • 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 Add, Query, Use Existing Stored Procedures selected, if you then attempted to select a stored procedure, the window would close and no error message would be displayed. (Bug #39252)

D.3.9.6. Changes in MySQL Connector/Net 5.2.3 (2008-08-19)

Functionality Added or Changed

  • String escaping functionality has been moved from the MySqlString class to the MySqlHelper class, where it can be accessed by the EscapeString method. (Bug #36205)

  • Error string was returned after a 28000 second wait_timeout. This has been changed to generate a ConnectionState.Closed event. (Bug #38119)

  • Changed how the procedure schema collection is retrieved. If use procedure bodies=true then the mysql.proc table is selected directly as this is up to 50 times faster than the current information_schema implementation. If use procedure bodies=false, then the information_schema collection is queried. (Bug #36694)

Bugs Fixed

  • MySQL Connector/Net uninstaller did not clean up all installed files. (Bug #38534)

  • The GetOrdinal() method failed to return the ordinal if the column name string contained an accent. (Bug #38721)

  • GetSchema did not work correctly when querying for a collection, if using a non-English locale. (Bug #35459)

  • There was a short circuit evaluation error in the MySqlCommand.CheckState() method. When the statement connection == null was true a NullReferenceException was thrown and not the expected InvalidOperationException. (Bug #38276)

  • The provider did not silently create the user if the user did not exist. (Bug #38243)

  • When reading back a stored double or single value using the .NET provider, the value had less precision than the one stored. (Bug #33322)

  • Unnecessary network traffic was generated for the normal case where the web provider schema was up to date. (Bug #37469)

  • 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 TINYINT in 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)

  • MySqlReader.GetOrdinal() performance enhancements break existing functionality. (Bug #37239)

  • The autogenerateschema option produced tables with incorrect collations. (Bug #36444)

  • 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)

D.3.9.7. Changes in MySQL Connector/Net 5.2.2 (2008-05-12)

Bugs Fixed

  • Product documentation incorrectly stated '?' is the preferred parameter marker. (Bug #37349)

  • 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)

  • 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)

  • 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)

  • The DbCommandBuilder.QuoteIdentifer method was not implemented. (Bug #35492)

  • Tables with GEOMETRY field types would return an unknown data type exception. (Bug #36081)

  • When creating a connection, setting the ConnectionString property of MySqlConnection to NULL would throw an exception. (Bug #35619)

  • When using encrypted passwords, the GetPassword() function would return the wrong string. (Bug #35336)

  • An error would be raised when calling GetPassword() with a NULL value. (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 NULL value for that field. (Bug #35041)

  • When using SqlDataSource to open a connection, the connection would not automatically be closed when access had completed. (Bug #34460)

  • When creating a new stored procedures, the new parameter code which permits the use of the @ symbol would interfere with the specification of a DEFINER. (Bug #34940)

  • Using the TableAdapter Wizard would fail when generating commands that used stored procedures due to the change in supported parameter characters. (Bug #34941)

  • Using the TableAdapter wizard in combination with a suitable SELECT statement, only the associated INSERT statement would also be created, rather than the required DELETE and UPDATE statements. (Bug #31338)

  • Fixed profile provider that would throw an exception if you were updating a profile that already existed.

  • Fixed problem in datagrid code related to creating a new table. This problem may have been introduced with .NET 2.0 SP1.

D.3.9.8. Changes in MySQL Connector/Net 5.2.1 (2008-02-27)

Bugs Fixed

  • A race condition could occur within the procedure cache resulting the cache contents overflowing beyond the configured cache size. (Bug #34338)

  • When altering a stored procedure within Visual Studio, the parameters to the procedure could be lost. (Bug #34359)

  • Attempting to use an isolation level other than the default with a transaction scope would use the default isolation level. (Bug #34448)

  • A number of issues were identified in the case, connection and schema areas of the code for MembershipProvider, RoleProvider, ProfileProvider. (Bug #34495)

  • When executing statements that used stored procedures and functions, the new parameter code could fail to identify the correct parameter format. (Bug #34699)

  • 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)

  • 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)

  • 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)

  • The provider code has been updated to fix a number of outstanding issues.

  • Fixed problem with Visual Studio 2008 integration that caused pop-up menus on server explorer nodes to not function

D.3.9.9. Changes in MySQL Connector/Net 5.2.0 (2008-02-11)

Functionality Added or Changed

  • Performing GetValue() on a field TINYINT(1) returned a BOOLEAN. While not a bug, this caused problems in software that expected an INT to be returned. A new connection string option Treat Tiny As Boolean has been added with a default value of true. If set to false the provider will treat TINYINT(1) as INT. (Bug #34052)

  • Added ClearPool and ClearAllPools features.

  • DDEX provider now works under Visual Studio 2008 beta 2.

  • Added support for DbDataAdapter UpdateBatchSize. Batching is fully supported including collapsing inserts down into the multi-value form if possible.

Bugs Fixed

  • In an open connection where the server had disconnected unexpectedly, the status information of the connection would not be updated properly. (Bug #33909)

  • The status of connections reported through the state change handler was not being updated correctly. (Bug #34082)

  • 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)

  • Some speed improvements have been implemented in the TokenizeSql process used to identify elements of SQL statements. (Bug #34220)

  • Incorporated some connection string cache optimizations sent to us by Maxim Mass. (Bug #34000)

  • Using compression in the MySQL connection with MySQL Connector/Net would be slower than using native (uncompressed) communication. (Bug #27865)

  • Commands executed from within the state change handler would fail with a NULL exception. (Bug #30964)

  • Memory usage could increase and decrease significantly when updating or inserting a large number of rows. (Bug #31090)

  • Column name metadata was not using the character set as defined within the connection string being used. (Bug #31185)

  • 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)

  • When running a stored procedure multiple times on the same connection, the memory usage could increase indefinitely. (Bug #30116)

  • The MySqlDbType.Datetime has been replaced with MySqlDbType.DateTime. The old format has been obsoleted. (Bug #26344)

D.3.10. Changes in MySQL Connector/Net Version 5.1

D.3.10.1. Changes in MySQL Connector/Net 5.1.8 (Not released)

Version 5.1.8 has no changelog entries.

D.3.10.2. Changes in MySQL Connector/Net 5.1.7 (2008-08-21)

Bugs Fixed

  • GetSchema did not work correctly when querying for a collection, if using a non-English locale. (Bug #35459)

  • There was a short circuit evaluation error in the MySqlCommand.CheckState() method. When the statement connection == null was true a NullReferenceException was thrown and not the expected InvalidOperationException. (Bug #38276)

  • When reading back a stored double or single value using the .NET provider, the value had less precision than the one stored. (Bug #33322)

  • 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)

  • As MySqlDbType.DateTime is not available in VB.Net the warning The datetime enum value is obsolete was always shown during compilation. (Bug #37406)

  • An unknown MySqlErrorCode was encountered when opening a connection with an incorrect password. (Bug #37398)

  • 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)

  • SemaphoreFullException is generated when application is closed. (Bug #36688)

  • 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)

D.3.10.3. Changes in MySQL Connector/Net 5.1.6 (2008-05-12)

Bugs Fixed

  • 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 DbCommandBuilder.QuoteIdentifer method was not implemented. (Bug #35492)

  • When creating a connection pool, specifying an invalid IP address will cause the entire application to crash, instead of providing an exception. (Bug #36432)

  • The MembershipProvider will raise an exception when the connection string is configured with enablePasswordRetrival = true and RequireQuestionAndAnswer = false. (Bug #36159)

  • When calling GetNumberOfUsersOnline an exception is raised on the submitted query due to a missing parameter. (Bug #36157)

  • Tables with GEOMETRY field types would return an unknown data type exception. (Bug #36081)

  • When creating a connection, setting the ConnectionString property of MySqlConnection to NULL would throw an exception. (Bug #35619)

  • A race condition could occur within the procedure cache resulting the cache contents overflowing beyond the configured cache size. (Bug #34338)

  • When altering a stored procedure within Visual Studio, the parameters to the procedure could be lost. (Bug #34359)

  • Attempting to use an isolation level other than the default with a transaction scope would use the default isolation level. (Bug #34448)

  • When using SqlDataSource to open a connection, the connection would not automatically be closed when access had completed. (Bug #34460)

  • Using the TableAdapter wizard in combination with a suitable SELECT statement, only the associated INSERT statement would also be created, rather than the required DELETE and UPDATE statements. (Bug #31338)

D.3.10.4. Changes in MySQL Connector/Net 5.1.5 (Not released)

Version 5.1.5 has no changelog entries.

D.3.10.5. Changes in MySQL Connector/Net 5.1.4 (2007-11-20)

Bugs Fixed

  • Trying to use a connection that was not open could return an ambiguous and misleading error message. (Bug #31262)

  • A syntax error in a set of batch statements could leave the data adapter in a state that appears hung. (Bug #31930)

  • 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 timeout has been added to the connection string options. (Bug #27958)

  • MySQL Connector/Net would incorrectly report success when enlisting in a distributed transaction, although distributed transactions are not supported. (Bug #31703)

  • A date string could be returned incorrectly by MySqlDateTime.ToString() when the date returned by MySQL was 0000-00-00 00:00:00. (Bug #32010)

  • Commands executed from within the state change handler would fail with a NULL exception. (Bug #30964)

  • Memory usage could increase and decrease significantly when updating or inserting a large number of rows. (Bug #31090)

  • Column name metadata was not using the character set as defined within the connection string being used. (Bug #31185)

  • 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)

  • 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)

  • 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)

  • Setting the size of a string parameter after the value could cause an exception. (Bug #32094)

  • 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)

  • Column types with only 1-bit (such as BOOLEAN and TINYINT(1) were not returned as boolean fields. (Bug #27959)

  • When running a stored procedure multiple times on the same connection, the memory usage could increase indefinitely. (Bug #30116)

  • The MySqlDbType.Datetime has been replaced with MySqlDbType.DateTime. The old format has been obsoleted. (Bug #26344)

  • The server error code was not updated in the Data[] hash, which prevented DbProviderFactory users from accessing the server error code. (Bug #27436)

  • Extracting data through XML functions within a query returns the data as System.Byte[]. This was due to MySQL Connector/Net incorrectly identifying BLOB fields as binary, rather than text. (Bug #30233)

D.3.10.6. Changes in MySQL Connector/Net 5.1.3 (2007-09-21, Beta)

This is a new Beta development release, fixing recently discovered bugs.

Bugs Fixed

  • An incorrect ConstraintException could be raised on an INSERT when 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)

  • Calling SHOW CREATE PROCEDURE for routines with a hyphen in the catalog name produced a syntax error. (Bug #29526)

  • Using the membership/role providers when validationKey or decryptionKey parameters are set to AutoGenerate, an exception would be raised when accessing the corresponding values. (Bug #29235)

  • Visual Studio Plugin: Adding a new query based on a stored procedure that uses the SELECT statement would terminate the query/TableAdapter wizard. (Bug #29098)

  • 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 TransactionScope would cause an InvalidOperationException. (Bug #28709)

  • The Saudi Hijri calendar was not supported. (Bug #29931)

  • A DATE field would be updated with a date/time value, causing a MySqlDataAdapter.Update() exception. (Bug #30077)

  • Connecting to a MySQL server earlier than version 4.1 would raise a NullException. (Bug #29476)

  • Certain operations would not check the UsageAdvisor setting, 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=dbname appearing multiple times in the resulting string. (Bug #29123)

  • A FormatException error would be raised if a parameter had not been found, instead of Resources.ParameterMustBeDefined. (Bug #29312)

D.3.10.7. Changes in MySQL Connector/Net 5.1.2 (2007-06-18)

This is a new Beta development release, fixing recently discovered bugs.

Bugs Fixed

  • Creating a user would fail due to the application name being set incorrectly. (Bug #28648)

  • 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: Query Builder would fail to show TINYTEXT columns, and any columns listed after a TINYTEXT column correctly. (Bug #28437)

  • Visual Studio Plugin: Adding a new query based on a stored procedure that used a UPDATE, INSERT or DELETE statement would terminate the query/TableAdapter wizard. (Bug #28536)

  • Log messages would be truncated to 300 bytes. (Bug #28706)

  • Visual Studio Plugin: Update commands would not be generated correctly when using the TableAdapter wizard. (Bug #26347)

D.3.10.8. Changes in MySQL Connector/Net 5.1.1 (2007-05-23)

Bugs Fixed

  • Running the statement SHOW PROCESSLIST would 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 MySQLDataAdapter.FillSchema() on a stored procedure would raise an exception: Invalid attempt to access a field before calling Read(). (Bug #27668)

  • Fixed password property on MySqlConnectionStringBuilder to use PasswordPropertyText attribute. This causes dots to show instead of actual password text.

  • Installation of the MySQL Connector/Net on Windows would fail if VisualStudio had not already been installed. (Bug #28260)

  • DATETIME fields from versions of MySQL before 4.1 would be incorrectly parsed, resulting in a exception. (Bug #23342)

  • The UNSIGNED flag for parameters in a stored procedure would be ignored when using MySqlCommandBuilder to obtain the parameter information. (Bug #27679)

  • MySQL Connector/Net would look for the wrong table when executing User.IsRole(). (Bug #28251)

D.3.10.9. Changes in MySQL Connector/Net 5.1.0 (2007-05-01)

Functionality Added or Changed

  • Added Membership and Role provider contributed by Sean Wright (thanks!).

  • 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.

  • Rewrote stored procedure parsing code using a new SQL tokenizer. Really nasty procedures including nested comments are now supported.

  • Now compiles for .NET CF 2.0.

D.3.11. Changes in MySQL Connector/Net Version 5.0

D.3.11.1. Changes in MySQL Connector/Net 5.0.10 (Not released)

Version 5.0.10 has no changelog entries.

D.3.11.2. Changes in MySQL Connector/Net 5.0.9 (Not released)

Version 5.0.9 has no changelog entries.

D.3.11.3. Changes in MySQL Connector/Net 5.0.8 (2007-08-21)

Note

This version introduces a new installer technology.

Bugs Fixed

  • 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.

  • An incorrect ConstraintException could be raised on an INSERT when 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)

  • 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)

  • 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 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.

  • Accessing the results from a large query when using data compression in the connection will fail to return all the data. (Bug #28204)

  • Calling SHOW CREATE PROCEDURE for routines with a hyphen in the catalog name produced a syntax error. (Bug #29526)

  • Fixed the database schema collection so that it works on servers that are not properly respecting the lower_case_table_names setting.

  • A DATE field would be updated with a date/time value, causing a MySqlDataAdapter.Update() exception. (Bug #30077)

  • Log messages would be truncated to 300 bytes. (Bug #28706)

  • Certain operations would not check the UsageAdvisor setting, causing log messages from the Usage Advisor even when it was disabled. (Bug #29124)

  • 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 problem where MySqlConnection.BeginTransaction checked 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.

  • Extracting data through XML functions within a query returns the data as System.Byte[]. This was due to MySQL Connector/Net incorrectly identifying BLOB fields as binary, rather than text. (Bug #30233)

  • Using the same connection string multiple times would result in Database=dbname appearing multiple times in the resulting string. (Bug #29123)

  • A FormatException error would be raised if a parameter had not been found, instead of Resources.ParameterMustBeDefined. (Bug #29312)

D.3.11.4. Changes in MySQL Connector/Net 5.0.7 (2007-05-18)

Bugs Fixed

  • When cloning an open MySqlClient.MySqlConnection with the Persist Security Info=False option set, the cloned connection is not usable because the security information has not been cloned. (Bug #27269)

  • Running the statement SHOW PROCESSLIST would return columns as byte arrays instead of native columns. (Bug #28448)

  • Enlisting a null transaction would affect the current connection object, such that further enlistment operations to the transaction are not possible. (Bug #26754)

  • The CreateFormat column of the DataTypes collection did not contain a format specification for creating a new column type. (Bug #25947)

  • Using logging (with the logging=true parameter to the connection string) would not generate a log file. (Bug #27765)

  • Building a connection string within a tight loop would show slow performance. (Bug #28167)

  • The characterset property would not be identified during a connection (also affected Visual Studio Plugin). (Bug #26147, Bug #27240)

  • Using MySQLDataAdapter.FillSchema() on a stored procedure would raise an exception: Invalid attempt to access a field before calling Read(). (Bug #27668)

  • Attempting to change the Connection Protocol property within a PropertyGrid control would raise an exception. (Bug #26472)

  • DATETIME fields from versions of MySQL before 4.1 would be incorrectly parsed, resulting in a exception. (Bug #23342)

  • The UNSIGNED flag for parameters in a stored procedure would be ignored when using MySqlCommandBuilder to obtain the parameter information. (Bug #27679)

  • If you close an open connection with an active transaction, the transaction is not automatically rolled back. (Bug #27289)

D.3.11.5. Changes in MySQL Connector/Net 5.0.6 (2007-03-22)

Bugs Fixed

  • cmd.Parameters.RemoveAt("Id") will cause an error if the last item is requested. (Bug #27187)

  • MySqlParameterCollection and parameters added with Insert method can not be retrieved later using ParameterName. (Bug #27135)

  • MySQL Visual Studio Plugin 1.1.2 does not work with MySQL Connector/Net 5.0.5. (Bug #26960)

  • Exception thrown when using large values in UInt64 parameters. (Bug #27093)

  • 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)

D.3.11.6. Changes in MySQL Connector/Net 5.0.5 (2007-03-07)

Functionality Added or Changed

  • Added Use Procedure Bodies connection string option to enable calling procedures without using procedure metadata.

  • Fixed problem with calling stored functions when a return parameter was not given.

  • Fixed problem with parameter name hashing where the hashes were not getting updated when parameters were removed from the collection.

  • Return parameters created with DeriveParameters now have the name RETURN_VALUE.

  • Added MySqlParameterCollection.AddWithValue and marked the Add(name, value) method as obsolete.

  • Fixed problem that prevented use of SchemaOnly or SingleRow command behaviors with stored procedures or prepared statements.

  • Assembly now properly appears in the Visual Studio 2005 Add/Remove Reference dialog.

  • 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 SqlClient supports. We now support using either syntax for adding parameters however we also respond exactly like SqlClient in 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.

Bugs Fixed

  • Applications would crash when calling with CommandType set to StoredProcedure.

  • BINARY and VARBINARY columns would be returned as a string, not binary, data type. (Bug #25605)

  • MySqlConnection throws an exception when connecting to MySQL v4.1.7. (Bug #25726)

  • Incorrect values/formats would be applied when the OldSyntax connection string option was used. (Bug #25950)

  • High CPU utilization would be experienced when there is no idle connection waiting when using pooled connections through MySqlPool.GetConnection. (Bug #24373)

  • Opening a connection would be slow due to host name lookup. (Bug #26152)

  • The UpdateRowSource.FirstReturnedRecord method does not work. (Bug #25569)

  • 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)

  • Returned data types of a DataTypes collection do not contain the right correct CLR data type. (Bug #25907)

  • When connecting to a MySQL Server earlier than version 4.1, the connection would hang when reading data. (Bug #25458)

  • Registry would be incorrectly populated with installation locations. (Bug #25928)

  • MySqlConnection.GetSchema fails with NullReferenceException for Foreign Keys. (Bug #26660)

  • Times with negative values would be returned incorrectly. (Bug #25912)

  • MySQL Connector/Net would not compile properly when used with Mono 1.2. (Bug #24263)

  • MySQL Connector/Net would fail to install under Windows Vista. (Bug #26430)

  • Using ExecuteScalar() with more than one query, where one query fails, will hang the connection. (Bug #25443)

  • When a MySqlConversionException is raised on a remote object, the client application would receive a SerializationException instead. (Bug #24957)

  • A critical ConnectionPool error would result in repeated System.NullReferenceException. (Bug #25603)

  • When connecting to a server, the return code from the connection could be zero, even though the host name was incorrect. (Bug #24802)

  • GetSchema and DataTypes would throw an exception due to an incorrect table name. (Bug #25906)

  • SELECT did not work correctly when using a WHERE clause containing a UTF-8 string. (Bug #25651)

D.3.11.7. Changes in MySQL Connector/Net 5.0.4 (Not released)

This is a new Beta development release, fixing recently discovered bugs.

Version 5.0.4 has no changelog entries.

D.3.11.8. Changes in MySQL Connector/Net 5.0.3 (2007-01-05)

Functionality Added or Changed

  • SSL support has been updated.

  • The ShapZipLib library has been replaced with the deflate support provided within .NET 2.0.

  • Support for the embedded server and client library have been removed from this release. Support will be added back to a later release.

  • Improved speed and performance by re-architecting certain sections of the code.

  • The ViewColumns GetSchema collection has been updated.

  • The CommandBuilder.DeriveParameters function has been updated to the procedure cache.

  • Metadata from stored procedures and stored function execution are cached.

  • The MySqlCommand object now supports asynchronous query methods. This is implemented useg the BeginExecuteNonQuery and EndExecuteNonQuery methods.

  • PerfMon hooks have been added to monitor the stored procedure cache hits and misses.

  • Usage Advisor has been implemented. The Usage Advisor checks your queries and will report if you are using the connection inefficiently.

Bugs Fixed

  • When using a DbNull.Value as 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 the DbNull.Value. (Bug #24565)

  • Using Driver.IsTooOld() would return the wrong value. (Bug #24661)

  • Nested transactions (which are unsupported)do not raise an error or warning. (Bug #22400)

  • When adding parameter objects to a command object, if the parameter direction is set to ReturnValue before the parameter is added to the command object then when the command is executed it throws an error. (Bug #25013)

  • Deleting a connection to a disconnected server when using the Visual Studio Plugin would cause an assertion failure. (Bug #23687)

  • Additional text added to error message (Bug #25178)

  • An exception would be raised, or the process would hang, if SELECT privileges on a database were not granted and a stored procedure was used. (Bug #25033)

  • Stored procedure executions are not thread safe. (Bug #23905)

D.3.11.9. Changes in MySQL Connector/Net 5.0.2 (2006-11-06)

Functionality Added or Changed

  • 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.

  • Implemented a stored procedure cache. By default, the connector caches the metadata for the last 25 procedures that are seen. You can change the number of procedures that are cached by using the procedure cache connection string.

  • An Ignore Prepare option has been added to the connection string options. If enabled, prepared statements will be disabled application-wide. The default for this option is true.

Bugs Fixed

  • Within Mono, using the PreparedStatement interface could result in an error due to a BitArray copying error. (Bug #18186)

  • An exception would be thrown when calling GetSchemaTable and fields was null. (Bug #23538)

  • During installation, an antivirus error message would be raised (indicating a malicious script problem). (Bug #23245)

  • MySQL Connector/Net did not work as a data source for the SqlDataSource object used by ASP.NET 2.0. (Bug #16126)

  • One system where IPv6 was enabled, MySQL Connector/Net would incorrectly resolve host names. (Bug #23758)

  • A System.FormatException exception would be raised when invoking a stored procedure with an ENUM input parameter. (Bug #23268)

  • Using Windows Vista (RC2) as a nonprivileged user would raise a Registry key 'Global' access denied. (Bug #22882)

  • Column names with accented characters were not parsed properly causing malformed column names in result sets. (Bug #23657)

  • 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)

D.3.11.10. Changes in MySQL Connector/Net 5.0.1 (2006-10-01)

Bugs Fixed

  • Submitting an empty string to a command object through prepare raises an System.IndexOutOfRangeException, rather than a MySQL Connector/Net exception. (Bug #18391)

  • 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)

  • Using ExecuteScalar with a datetime field, where the value of the field is "0000-00-00 00:00:00", a MySqlConversionException exception would be raised. (Bug #11991)

  • The MySqlexception class is now derived from the DbException class. (Bug #21874)

  • Incorrect field/data lengths could be returned for VARCHAR UTF8 columns. (Bug #14592)

  • You can now install the MySQL Connector/Net MSI package from the command line using the /passive, /quiet, /q options. (Bug #19994)

  • An MySql.Data.Types.MySqlConversionException would 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)

  • Starting a transaction on a connection created by MySql.Data.MySqlClient.MySqlClientFactory, using BeginTransaction without specifying an isolation level, causes the SQL statement to fail with a syntax error. (Bug #22042)

  • The # would not be accepted within column/table names, even though it was valid. (Bug #21521)

  • MySQL Connector/Net on a Turkish operating system, may fail to execute certain SQL statements correctly. (Bug #22452)

D.3.11.11. Changes in MySQL Connector/Net 5.0.0 (2006-08-08)

Functionality Added or Changed

  • Implemented MySqlConnectionBuilder class.

  • Completely refactored how column values are handled to avoid boxing in some cases.

  • Implemented Usage Advisor.

  • Added Async query methods.

  • Implemented classes and interfaces for ADO.Net 2.0 support.

  • Added perfmon hooks for stored procedure cache hits and misses.

  • Implemented MySqlClientFactory class.

  • Added internal implemention of SHA1 so we don't have to distribute the OpenNetCF on mobile devices.

  • Added procedure metadata caching.

  • Reworked connection string classes to be simpler and faster.

  • Reimplemented PacketReader/PacketWriter support into MySqlStream class.

  • Added usage advisor warnings for requesting column values by the wrong type.

  • Refactored test suite to test all protocols in a single pass.

  • Replaced use of ICSharpCode with .NET 2.0 internal deflate support.

Bugs Fixed

  • CommandText: Question mark in comment line is being parsed as a parameter. (Bug #6214)

D.3.12. Changes in MySQL Connector/Net Version 1.0

D.3.12.1. Changes in MySQL Connector/Net 1.0.11 (Not released)

Version 1.0.11 has no changelog entries.

D.3.12.2. Changes in MySQL Connector/Net 1.0.10 (2007-08-24)

Bugs Fixed

  • BINARY and VARBINARY columns would be returned as a string, not binary, data type. (Bug #25605)

  • An incorrect ConstraintException could be raised on an INSERT when adding rows to a table with a multiple-column unique key index. (Bug #30204)

  • MySqlParameterCollection and parameters added with Insert method can not be retrieved later using ParameterName. (Bug #27135)

  • 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)

  • High CPU utilization would be experienced when there is no idle connection waiting when using pooled connections through MySqlPool.GetConnection. (Bug #24373)

  • Publisher listed in "Add/Remove Programs" is not consistent with other MySQL products. (Bug #27253)

  • When a MySqlConversionException is raised on a remote object, the client application would receive a SerializationException instead. (Bug #24957)

  • A critical ConnectionPool error would result in repeated System.NullReferenceException. (Bug #25603)

D.3.12.3. Changes in MySQL Connector/Net 1.0.9 (2007-02-02)

Functionality Added or Changed

  • 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.

  • Implemented a stored procedure cache. By default, the connector caches the metadata for the last 25 procedures that are seen. You can change the number of procedures that are cached by using the procedure cache connection string.

  • An Ignore Prepare option has been added to the connection string options. If enabled, prepared statements will be disabled application-wide. The default for this option is true.

  • Improved CommandBuilder.DeriveParameters to first try and use the procedure cache before querying for the stored procedure metadata. Return parameters created with DeriveParameters now have the name RETURN_VALUE.

  • 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.

  • The ICSharpCode ZipLib is no longer used by the Connector, and is no longer distributed with it.

Bugs Fixed

  • When using a DbNull.Value as 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 the DbNull.Value. (Bug #24565)

  • Within Mono, using the PreparedStatement interface could result in an error due to a BitArray copying error. (Bug #18186)

  • An System.OverflowException would be raised when accessing a varchar field over 255 bytes. (Bug #23749)

  • Using Driver.IsTooOld() would return the wrong value. (Bug #24661)

  • Nested transactions do not raise an error or warning. (Bug #22400)

  • Additional text added to error message. (Bug #25178)

  • When adding parameter objects to a command object, if the parameter direction is set to ReturnValue before the parameter is added to the command object then when the command is executed it throws an error. (Bug #25013)

  • MySqlConnection throws a NullReferenceException and ArgumentNullException when connecting to MySQL v4.1.7. (Bug #25726)

  • 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)

  • One system where IPv6 was enabled, MySQL Connector/Net would incorrectly resolve host names. (Bug #23758)

  • Times with negative values would be returned incorrectly. (Bug #25912)

  • The CommandBuilder would mistakenly add insert parameters for a table column with auto incrementation enabled. (Bug #23862)

  • Using ExecuteScalar() with more than one query, where one query fails, will hang the connection. (Bug #25443)

  • When connecting to a server, the return code from the connection could be zero, even though the host name was incorrect. (Bug #24802)

  • Stored procedure executions are not thread safe. (Bug #23905)

  • SELECT did not work correctly when using a WHERE clause containing a UTF-8 string. (Bug #25651)

D.3.12.4. Changes in MySQL Connector/Net 1.0.8 (2006-10-20)

Functionality Added or Changed

  • The method for retrieving stored procedure metadata has been changed so that users without SELECT privileges on the mysql.proc table can use a stored procedure.

  • Stored procedures are now cached.

Bugs Fixed

  • When working with multiple threads, character set initialization would generate errors. (Bug #17106)

  • 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)

  • Submitting an empty string to a command object through prepare raises an System.IndexOutOfRangeException, rather than a MySQL Connector/Net exception. (Bug #18391)

  • Called MySqlCommandBuilder.DeriveParameters for a stored procedure that has no paramers would cause an application crash. (Bug #15077)

  • The connection string parser did not permit single or double quotation marks in the password. (Bug #16659)

  • The CommandBuilder ignored Unsigned flag at Parameter creation. (Bug #17375)

  • 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)

  • CHAR type added to MySqlDbType. (Bug #17749)

  • Using ExecuteScalar with a datetime field, where the value of the field is "0000-00-00 00:00:00", a MySqlConversionException exception would be raised. (Bug #11991)

  • Parameter substitution in queries where the order of parameters and table fields did not match would substitute incorrect values. (Bug #19261)

  • The MySqlDateTime class did not contain constructors. (Bug #15112)

  • When running a query that included a date comparison, a DateReader error would be raised. (Bug #19481)

  • When using an unsigned 64-bit integer in a stored procedure, the unsigned bit would be lost stored. (Bug #16934)

  • Incorrect field/data lengths could be returned for VARCHAR UTF8 columns. (Bug #14592)

  • A SELECT query on a table with a date with a value of '0000-00-00' would hang the application. (Bug #17736)

  • You can now install the MySQL Connector/Net MSI package from the command line using the /passive, /quiet, /q options. (Bug #19994)

  • An MySql.Data.Types.MySqlConversionException would 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)

  • The DiscoverParameters function would fail when a stored procedure used a NUMERIC parameter type. (Bug #19515)

  • Unsigned data types were not properly supported. (Bug #16788)

  • The # would not be accepted within column/table names, even though it was valid. (Bug #21521)

  • DataReader would show the value of the previous row (or last row with nonnull data) if the current row contained a datetime field with a null value. (Bug #16884)

  • IDataRecord.GetString would raise NullPointerException for null values in returned rows. Method now throws SqlNullValueException. (Bug #19294)

  • MySQL Connector/Net on a Turkish operating system, may fail to execute certain SQL statements correctly. (Bug #22452)

  • Calling Close on a connection after calling a stored procedure would trigger a NullReferenceException. (Bug #20581)

  • An exception would be raised when using an output parameter to a System.String value. (Bug #17814)

D.3.12.5. Changes in MySQL Connector/Net 1.0.7 (2005-11-21)

Bugs Fixed

  • Calling a stored procedure where a parameter contained special characters (such as '@') would produce an exception. Note that ANSI_QUOTES had to be enabled to make this possible. (Bug #13753)

  • A #42000Query was empty exception occurred when executing a query built with MySqlCommandBuilder, 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 cp932 character set. (Bug #13806)

  • The Ping() method did not update the State property of the Connection object. (Bug #13658)

  • Implemented the MySqlCommandBuilder.DeriveParameters method 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)

  • Unsigned tinyint (NET byte) would lead to and incorrectly determined parameter type from the parameter value. (Bug #18570)

D.3.12.6. Changes in MySQL Connector/Net 1.0.6 (2005-10-03)

Bugs Fixed

  • Field names that contained the following characters caused errors: ()%<>/ (Bug #13036)

  • MySQL Connector/Net 1.0.5 could not connect on Mono. (Bug #13345)

  • The MySQL Connector/Net 1.0.5 installer would not install alongside MySQL Connector/Net 1.0.4. (Bug #12835)

  • Serializing a parameter failed if the first value passed in was NULL. (Bug #13276)

  • The nant build sequence had problems. (Bug #12978)

D.3.12.7. Changes in MySQL Connector/Net 1.0.5 (2005-08-29)

Bugs Fixed

  • A call to a stored procedure caused an exception if the stored procedure had no parameters. (Bug #11542)

  • Added support to call a stored function from MySQL Connector/Net. (Bug #10644)

  • MySQL Connector/Net interpreted the new decimal data type as a byte array. (Bug #11294)

  • Trying to use a stored procedure when Connection.Database was not populated generated an exception. (Bug #11450)

  • The ConnectionString property could not be set when a MySqlConnection object was added with the designer. (Bug #12551, Bug #8724)

  • With multiple hosts in the connection string, MySQL Connector/Net would not connect to the last host in the list. (Bug #12628)

  • Connection could fail when .NET thread pool had no available worker threads. (Bug #10637)

  • MySQL Connector/Net could not work properly with certain regional settings. (WL#8228)

  • Certain malformed queries would trigger a Connection must be valid and open error message. (Bug #11490)

  • MySQL Connector/Net could not connect to MySQL 4.1.14. (Bug #12771)

  • Trying to read a TIMESTAMP column generated an exception. (Bug #7951)

  • Decimal parameters caused syntax errors. (Bug #10152, Bug #11550, Bug #10486)

  • Parameters were not recognized when they were separated by linefeeds. (Bug #9722)

  • The cp1250 character set was not supported. (Bug #11621)

  • Calling MySqlConnection.clone when a connection string had not yet been set on the original connection would generate an error. (Bug #10281)

  • The MySqlCommandBuilder class could not handle queries that referenced tables in a database other than the default database. (Bug #8382)

D.3.12.8. Changes in MySQL Connector/Net 1.0.4 (2005-01-20)

Bugs Fixed

  • MySqlCommand.Connection returns an IDbConnection. (Bug #7258)

  • Fixed problem that causes named pipes to not work with some blob functionality.

  • Fixed another small problem with prepared statements.

  • Quote character \222 not quoted in EscapeString. (Bug #7724)

  • Clone method bug in MySqlCommand. (Bug #7478)

  • Added or filled out several more topics in the API reference documentation.

  • Fixed problem with shared memory connections.

  • Calling prepare causing exception. (Bug #7243)

  • MySqlDataReader.GetString(index) returns non-Null value when field is Null. (Bug #7612)

  • MySqlAdapter.Fill method throws error message Non-negative number required. (Bug #7345)

  • Problem with Multiple resultsets. (Bug #7436)

  • MySqlReader.GetInt32 throws exception if column is unsigned. (Bug #7755)

  • GetBytes was not working. (Bug #7704)

D.3.12.9. Changes in MySQL Connector/Net 1.0.3 (2004-10-12, gamma)

Bugs Fixed

  • Made MySQL the default named pipe name.

  • Now SHOW COLLATION is used upon connection to retrieve the full list of charset ids.

  • Inserting DateTime causes System.InvalidCastException to be thrown. (Bug #7132)

  • Integer "out" parameter from stored procedure returned as string. (Bug #6668)

  • Int64 Support in MySqlCommand Parameters. (Bug #6863)

  • Changed the name of the test suite to MySql.Data.Tests.dll.

  • Added Ping method to MySqlConnection.

  • Invalid query string when using inout parameters (Bug #7133)

  • Errors in parsing stored procedure parameters. (Bug #6902)

  • Added ServerThread property to MySqlConnection to expose server thread id.

  • InvalidCast when using DATE_ADD-function. (Bug #6879)

  • Fixed problem where multiple resultsets having different numbers of columns would cause a problem.

  • MySqlDateTime in Datatables sorting by Text, not Date. (Bug #7032)

  • MySqlDataReader.GetChar(int i) throws IndexOutOfRange exception. (Bug #6770)

  • An Open Connection has been Closed by the Host System. (Bug #6634)

  • Fixed Invalid character set index: 200. (Bug #6547)

  • Exception stack trace lost when re-throwing exceptions. (Bug #6983)

  • Fixed major problem with detecting null values when using prepared statements.

  • Installer now includes options to install into GAC and create Start Menu items.

  • Connections now do not have to give a database on the connection string.

  • Test suite fails with MySQL 4.0 because of case sensitivity of table names. (Bug #6831)

D.3.12.10. Changes in MySQL Connector/Net 1.0.2 (2004-11-15, gamma)

Bugs Fixed

  • Fixed problem where calling stored procedures might cause an "Illegal mix of collations" problem.

  • Fixed Objects not being disposed (Bug #6649)

  • Fixed double type handling in MySqlParameter(string parameterName, object value). (Bug #6428)

  • Fixed #HY000 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ (Bug #6322)

  • Fixed Installation directory ignored using custom installation (Bug #6329)

  • Fixed Long inserts take very long time (Bu #5453)

  • Fixed Charset-map for UCS-2 (Bug #6541)

  • Fixed Zero date "0000-00-00" is returned wrong when filling Dataset (Bug #6429)

  • Fixed problem where setting command text leaves the command in a prepared state

  • Updated the installer to include the new samples

  • Provider is now using character set specified by server as default

  • Fixed problem with MySqlBinary where string values could not be used to update extended text columns

  • Added charset connection string option

  • Added the TableEditor CS and VB sample

D.3.12.11. Changes in MySQL Connector/Net 1.0.1 (2004-10-27, Beta)

Bugs Fixed

  • Virtualized driver subsystem so future releases could easily support client or embedded server support

  • Setting DbType threw a NullReferenceException. (Bug #5469)

  • Fixed constructor initialize problems in MySqlCommand() (Bug #5613)

  • Fixed System.OverflowException when using YEAR data type. (Bug #6036)

  • Fixed Yet Another "object reference not set to an instance of an object" (Bug #5496)

  • CP1252 is now used for Latin1 only when the server is 4.1.2 and later

  • Refactored compression code into CompressedStream to clean up NativeDriver

  • Fixed Parsing the ';' char (Bug #5876)

  • Fixed problem where Min Pool Size was not being respected

  • Fixed problem where connector was not issuing a CMD_QUIT before closing the socket

  • Fixed MySqlDataReader and 'show tables from ...' behavior (Bug #5256)

  • Fixed problem where MySqlParameterCollection.Add() would throw unclear exception when given a null value (Bug #5621)

  • Cannot run a stored procedure populating mysqlcommand.parameters (Bug #5474)

  • Fixed Russian character support as well

  • Fixed problem with ConnectionInternal where a key might be added more than once

  • Implemented SequentialAccess

  • Fixed IndexOutOfBounds when reading BLOB with DataReader with GetString(index). (Bug #6230)

  • Fixed MySqlDateTime sets IsZero property on all subseq.records after first zero found (Bug #6006)

  • Using PacketWriter instead of Packet for writing to streams

  • Added Aggregate function test (wasn't really a bug)

  • MySqlCommand saw instances of "?" as parameters in string literals. (Bug #5392)

  • Field buffers being reused to decrease memory allocations and increase speed

  • Possible bug in MySqlParameter(string, object) constructor (Bug #5602)

  • Fixed NET Connector source missing resx files (Bug #6216)

  • Fixed serializing of floating point parameters (double, numeric, single, decimal) (Bug #5900)

  • Fixed Method TokenizeSql() uses only a limited set of valid characters for parameters (Bug #6217)

  • Fixed problem where connection lifetime on the connect string was not being respected

  • DataReader reported all rows as NULL if one row was NULL. (Bug #5388)

  • Fixed Can't display Chinese correctly (Bug #5288)

  • Fixed missing Reference in DbType setter (Bug #5897)

  • Added test case for resetting the command text on a prepared command

  • Fixed GetBoolean returns wrong values (Bug #6227)

  • IsNullable error (Bug #5796)

  • Fixed DBNull Values causing problems with retrieving/updating queries. (Bug #5798)

  • Calling GetChars on a LONGTEXT column threw an exception. (Bug #5458)

  • Fixed problem where using old syntax while using the interfaces caused problems

  • Fixed problem in PacketReader where it could try to allocate the wrong buffer size in EnsureCapacity

D.3.12.12. Changes in MySQL Connector/Net 1.0.0 (2004-09-01)

Bugs Fixed

  • Removed some last references to ByteFX.

  • Fixed problem with using compression.

  • Updated many of the test cases.

  • Thai encoding not correctly supported. (Bug #3889)

  • Added COPYING.rtf file for use in installer.

  • Removed all of the XML comment warnings.

  • Bumped version number to 1.0.0 for beta 1 release.

D.3.13. Changes in MySQL Connector/Net Version 0.9.0 (30 August 2004)

  • Added test fixture for prepared statements.

  • All type classes now implement a SerializeBinary method for sending their data to a PacketWriter.

  • Added PacketWriter class 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.

  • SingleRow behavior now working right even with limit.

  • GetBytes now 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 GetSchema would return false for IsUnique when the column is key.

  • MySqlDataReader GetXXX methods now using the field level MySqlValue object and not performing conversions.

  • DataReader returning NULL for time column. (Bug #5097)

  • Added test case for LOAD DATA LOCAL INFILE.

  • Added replacetext custom nant task.

  • Added CommandBuilderTest fixture.

  • Added Last One Wins feature to CommandBuilder.

  • Fixed persist security info case problem.

  • Fixed GetBool so 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.MySqlClient caches passwords if Persist Security Info is 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 MySqlField41 as a subclass of MySqlField.

  • Changed many classes to now use the new .Types types.

  • Changed type enum int to Int32, short to Int16, and bigint to Int64.

  • Added dummy types UInt16, UInt32, and UInt64 to 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 UserReset test in PoolingTests.cs.

  • Connections are now reset using COM_CHANGE_USER when pulled from the pool.

  • Implemented SingleResultSet behavior.

  • 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.

  • MySqlCommandBuilder fails with multi-word column names. (Bug #4486)

  • Fixed bug in TokenizeSql where underscore would terminate character capture in parameter name.

  • Added test case for spaces in column names.

  • MySqlDataReader.GetBytes do not work correctly. (Bug #4324)

  • Added GetBytes() test case to DataReader test fixture.

  • Now reading all server variables in InternalConnection.Configure into Hashtable.

  • Now using string[] for index map in CharSetMap.

  • Added CRInSQL test case for carriage returns in SQL.

  • Setting maxPacketSize to default value in Driver.ctor.

  • Setting MySqlDbType on a parameter doesn't set generic type. (Bug #4442)

  • Removed obsolete data types Long and LongLong.

  • 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 ServerStatusFlags enum.

  • Changed name of ServerStatus enum to ServerStatusFlags.

  • Inserted data row doesn't update properly.

  • Error processing show create table. (Bug #4074)

  • Change Packet.ReadLenInteger to ReadPackedLong and added packet.ReadPackedInteger that always reads integers packed with 2,3,4.

  • Added syntax.cs test 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 TestSuite folder.

  • 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)

  • GetValues was 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 MySqlInternalConnection to InternalConnection.

  • SQL is now parsed as chars, fixes problems with other languages.

  • Added logging and allow batch connection string options.

  • RowUpdating event not set when setting the DataAdapter property. (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.build Nant 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.MySQLClient back to MySql.Data.MySqlClient.

  • Fixed bug in CharSetMapping where 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 TimeSpan code in parameter.cs to properly serialize a timespan object to mysql time format (thanks Gianluca Colombo).

  • Added TimeStamp to parameter serialization code. Prevented DataAdapter updates from working right (thanks Michael King).

  • Fixed a misspelling in MySqlHelper.cs (thanks Patrick Kristiansen).

D.3.14. Changes in MySQL Connector/Net Version 0.76

  • 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 DBConnectionString to support changes done to MySqlConnectionString.

  • Removed SqlCommandEditor and DataAdapterPreviewDialog.

  • Using new long return values in many places.

  • Integrated new CompressedStream class.

  • Changed ConnectionString and added attributes to permit it to be used in MySqlClient.Design.

  • Changed packet.cs to support newer lengths in ReadLenInteger.

  • Changed other classes to use new properties and fields of MySqlConnectionString.

  • ConnectionInternal is now using PING to see whether the server is available.

  • Moved toolbox bitmaps into resource folder.

  • Changed field.cs to 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 StreamCreator where 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).

D.3.15. Changes in MySQL Connector/Net Version 0.75

  • Enum values now supported as parameter values (thanks Philipp Sumi).

  • Year data type now supported.

  • Fixed compression.

  • Fixed bug where a parameter with a TimeSpan as 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 ConnectionString handling so that it better matches the standard set by SqlClient.

  • A MySqlException is 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 ConnectionString docs.

  • Removed MultiHostStream and MySqlStream. Replaced it with Common/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 IsAlive fails.

  • Added Platform.cs and StreamCreator.cs.

  • Fixed Field.cs to properly handle 4.1 style timestamps.

  • Changed Common.Version to Common.DBVersion to avoid name conflict.

  • Fixed field.cs so that text columns return the right field type.

  • Added MySqlError class to provide some reference for error codes (thanks Geert Veenstra).

D.3.16. Changes in MySQL Connector/Net Version 0.74

  • Added Unix socket support (thanks Mohammad DAMT).

  • Only calling Thread.Sleep when no data is available.

  • Improved escaping of quote characters in parameter data.

  • Removed misleading comments from parameter.cs.

  • Fixed pooling bug.

  • Fixed ConnectionString editor dialog (thanks marco p (pomarc)).

  • UserId now 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 MultiHostStream capability. 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 MySqlPool deadlock condition as well as stupid bug where CreateNewPooledConnection was not ever adding new connections to the pool. Also fixed MySqlStream.ReadBytes and ReadByte to not use TicksPerSecond which 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 ExecuteReader would sometime return null (thanks Lloyd Dupont).

  • Fixed major bug with null field handling (thanks Naucki).

  • Enclosed queries for max_allowed_packet and characterset inside try catch (and set defaults).

  • Fixed problem where socket was not getting closed properly (thanks Steve!).

  • Fixed problem where ExecuteNonQuery was not always returning the right value.

  • Fixed InternalConnection to not use @@session.max_allowed_packet but 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.Add method to match SqlClient (thanks Joshua Mouch).

  • Fixed ConnectionString parsing to handle no and yes for boolean and not lowercase values (thanks Naucki).

  • Added InternalConnection class, changes to pooling.

  • Implemented Persist Security Info.

  • Added security.cs and version.cs to project

  • Fixed DateTime handling in Parameter.cs (thanks Burkhard Perkens-Golomb).

  • Fixed parameter serialization where some types would throw a cast exception.

  • Fixed DataReader to convert all returned values to prevent casting errors (thanks Keith Murray).

  • Added code to Command.ExecuteReader to return null if the initial SQL statement throws an exception (thanks Burkhard Perkens-Golomb).

  • Fixed ExecuteScalar bug introduced with restructure.

  • Restructure to permit LOCAL DATA INFILE and 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.Add methods to better match SqlClient (thanks Joshua Mouch).

  • Corrected Connection.CreateCommand to return a MySqlCommand type.

  • 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.show from DataReader code (thanks Joshua Mouch).

  • Fixed a nasty bug in the split SQL code (thanks everyone!).

D.3.17. Changes in MySQL Connector/Net Version 0.71

  • Fixed bug in MySqlStream where 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 MySqlException serializable (thanks Mathias Hasselmann).

D.3.18. Changes in MySQL Connector/Net Version 0.70

  • 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 String data type handling to parameter serialization.

  • Fixed sequence problem in driver that occurred after thrown exception (thanks Burkhard Perkens-Golomb).

  • Added support for CommandBehavior.SingleRow to DataReader.

  • 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 MySqlStream class to simplify timeouts and driver coding.

  • Fixed DataReader so 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.Value handling in the fields.

  • Added several unit tests.

  • Fixed MySqlException base 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 MySqlParameter for (name, type, size, srccol)

  • Fixed bug in MySqlDataReader where it didn't check for null fieldlist before returning field count.

  • Started adding MySqlClient unit tests (added MySqlClient/Tests folder and some test cases).

  • Fixed some things in Connection String handling.

  • Moved INIT_DB to MySqlPool. I may move it again, this is in preparation of the conference.

  • Fixed bug inside CommandBuilder that 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 CoonectionPooling is 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 Value property.

  • 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 MySQLDbType property to Parameter object and added proper conversion code to convert from DbType to MySQLDbType).

  • Removed unused ObjectToString method from MySQLParameter.cs.

  • Fixed Add(..) method in ParameterCollection so that it doesn't use Add(name, value) instead.

  • Fixed IndexOf and Contains in ParameterCollection to be aware that parameter names are now stored without @.

  • Fixed Command.ConvertSQLToBytes so it only permits characters that can be in MySQL variable names.

  • Fixed DataReader and Field so that blob fields read their data from Field.cs and GetBytes works right.

  • Added simple query builder editor to CommandText property of MySQLCommand.

  • Fixed CommandBuilder and Parameter serialization to account for Parameters not storing @ in their names.

  • Removed MySQLFieldType enum from Field.cs. Now using MySQLDbType enum.

  • Added Designer attribute to several classes to prevent designer view when using VS.Net.

  • Fixed Initial catalog typo in ConnectionString designer.

  • Removed 3 parameter constructor for MySQLParameter that conflicted with (name, type, value).

  • Changed MySQLParameter so paramName is now stored without leading @ (this fixed null inserts when using designer).

  • Changed TypeConverter for MySQLParameter to use the constructor with all properties.

D.3.19. Changes in MySQL Connector/Net Version 0.68

  • Fixed sequence issue in driver.

  • Added DbParametersEditor to make parameter editing more like SqlClient.

  • Fixed Command class so that parameters can be edited using the designer

  • Update connection string designer to support Use Compression flag.

  • 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.

  • CommandBuilder using DBNull.Value.

  • CommandBuilder now builds insert command correctly when an auto_insert field is not present.

  • Field now uses typeof keyword to return System.Types (performance).

D.3.20. Changes in MySQL Connector/Net Version 0.65

  • MySQLCommandBuilder now implemented.

  • Transaction support now implemented (not all table types support this).

  • GetSchemaTable fixed 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 SqlClient classes.

D.3.21. Changes in MySQL Connector/Net Version 0.60

  • Protocol compression using SharpZipLib (www.icsharpcode.net).

  • Named pipes on Windows now working properly.

  • Work done to improve Timestamp data type handling.

  • Implemented IEnumerable on DataReader so DataGrid would work.

D.3.22. Changes in MySQL Connector/Net Version 0.50

  • Speed increased dramatically by removing bugging network sync code.

  • Driver no longer buffers rows of data (more ADO.Net compliant).

  • Conversion bugs related to TIMESTAMP and DATETIME fields fixed.

D.4. MySQL Visual Studio Plugin Change History

Note

As of Connector/Net 5.1.2 (14 June 2007), the Visual Studio 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”.

D.4.1. Changes in MySQL Visual Studio Plugin 1.0.3 (Not yet released)

Bugs Fixed

  • DataSet wizard would show all tables instead of only the tables available within the selected database. (Bugs #26348)

  • Running queries based on a stored procedure would cause the data set designer to terminate. (Bugs #26364)

D.4.2. Changes in MySQL Visual Studio Plugin 1.0.2 (Not yet released)

Version 1.0.2 has no changelog entries.

D.4.3. Changes in MySQL Visual Studio Plugin 1.0.1 (2006-10-04)

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.4.4. Changes in MySQL Visual Studio Plugin 1.0.0 (2006-10-04)

Bugs Fixed

  • DDEX (Data Designer Extensibility) compatibility.

  • Ability to work with MySQL objects (tables, views, stored procedures, etc) from within Server Explorer.

D.5. MySQL Connector/J Change History

D.5.1. Changes in MySQL Connector/J 5.1

D.5.1.1. Changes in MySQL Connector/J 5.1.22 (2012-09-11)

Fixes bugs found since release 5.1.21.

Bugs Fixed

  • Performance: The com.mysql.jdbc.getCharsetNameForIndex() method was made more efficient, resulting in better performance for queries against tables containing many columns with string data types. (Bug #14236302, Bug #65508)

  • The LoadBalancingConnectionProxy.pickNewConnection() method could incorrectly flag the current connection as invalid after testing another connection. The selection process could choose another (potentially offline) host, leading to a connection is closed error when trying to use a connection after re-balancing:

    No operations allowed after connection closed.
    Connection closed after inability to pick valid new connection during fail-over.

    (Bug #14563127)

  • With profileSQL=true and useNanosForElapsedTime=true specified in the connection URL, query and fetch duration were not reported correctly. The com.mysql.jdbc.MysqlIO.sqlQueryDirect() method always measured times in milliseconds rather than switching between milliseconds and nanoseconds. (Bug #14273046, Bug #57662)

  • ResultSet objects created by the getGeneratedKeys() method were not being automatically closed, leading to potential memory leaks if the application did not explicitly close the ResultSet objects. (Bug #14192873, Bug #65503)

  • Implemented the getVersionColumns() method, which formerly always returned an empty result set. Now this method returns the timestamp columns that are updated every time a row is changed. (Bug #13636546, Bug #63800)

  • Connecting to a server that used a UCS2 character set would throw an exception:

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 '??' at line 1 

    Now, Connector/J sets characterEncoding implicitly to UTF-8 when the server character set is UCS2. Because the Connector/J UTF-8 implementation does not cover all UCS-2 characters, note that truncation might occur in some cases. (Bug #11751035, Bug #41752)

D.5.1.2. Changes in MySQL Connector/J 5.1.21 (2012-07-03)

Fixes bugs found since release 5.1.20.

Functionality Added or Changed

Bugs Fixed

  • With a connection encoding of gbk and a server encoding of latin1, a call such as PreparedStatement.setString(1, "0f0f0702") could throw an exception java.lang.StringIndexOutOfBoundsException. (Bug #13943893, Bug #64731)

  • When Connector/J was connected to a MySQL 5.5 server, the error message for an invalid query could be returned in the wrong character set and appear garbled. (Bug #13702427, Bug #64205)

  • The timezone entry was missing for MEST - Middle European Summer Time. (Bug #11748548, Bug #36662)

  • Specifying a non-existent character set in the characterEncoding or characterSetResults connection options could produce a NullPointerException error. The error could occur with a typographical mistake, such as using a hyphen instead of an underscore in the name. (Bug #11749010, Bug #37931)

D.5.1.3. Changes in MySQL Connector/J 5.1.20 (2012-05-01)

Fixes bugs found since release 5.1.19.

Bugs Fixed

  • Important Change: This fix corrects an issue introduced in Connector/J 5.1.19 that caused connection errors with MySQL 4.1 and earlier servers. A java.lang.ClassCastException exception occurred during connection initialization when com.mysql.jdbc.ConnectionImpl.buildCollationMapping() interpreted the output of the SHOW COLLATION statement. (Bug #13958793)

  • Using Connector/J 5.1.19 in combination with JBoss could result in an error while establishing a connection: MySQLNonTransientConnectionException: Bad handshake. This issue occurred when using the old-style password hash, which requires the mysql_old_password plugin during handshake. A workaround was to replace the 16-byte hash with a 41-byte one, as explained in Section 6.1.2.4, “Password Hashing in MySQL”. (Bug #13990612, Bug #64983)

  • A MySQLSyntaxErrorException could occur when calling certain methods while connected to a MySQL 5.6.5 or higher server. Affected methods included StatementImpl.execute() and PreparedStatement.execute(). The cause was the removal of the SET OPTION syntax in the MySQL Server. The methods were modified to use the newer SET syntax internally. (Bug #13955027)

  • A java.lang.StringIndexOutOfBoundsException exception could occur when manipulating date/time values with fractional seconds. (Bug #13960556)

  • The savepoint identifier generated by the java.sql.Connection#.setSavepoint() function could be misinterpreted as a floating-point number, for example values such as 123e10 or 123e10foo. Such values could cause replication errors on slave servers because the values are not quoted in the binary log. The fix ensures that the savepoint identifiers do not begin with digits. (Bug #11763271, Bug #55962)

  • If the string limit was used in a column name, prepared statements incorrectly treated the statement as if it used a LIMIT clause. For example, a prepared statement with maxrows set to 0 could incorrectly reuse the value from a previous call to setMaxRows(). This issue applied to both quoted and unquoted column names, and server-side and client-side prepared statements. (Bug #11748492, Bug #36478)

D.5.1.4. Changes in MySQL Connector/J 5.1.19 (April 2012)

Fixes bugs found since release 5.1.18.

Functionality Added or Changed

  • Added support for pluggable authentication. via the com.mysql.jdbc.AuthenticationPlugin interface (which extends the standard extension interface). Examples are in com/mysql/jdbc/authentication and in testsuite.regression.ConnectionRegressionTest. This feature introduces three new connection properties:

    • authenticationPlugins defines a comma-delimited list of classes that implement com.mysql.jdbc.AuthenticationPlugin and are used for authentication unless disabled by the disabledAuthenticationPlugins property.

    • disabledAuthenticationPlugins defines a comma-delimited list of classes implementing com.mysql.jdbc.AuthenticationPlugin or mechanisms, i.e. mysql_native_password. The authentication plugins or mechanisms cannot be used for authentication. Authentication will fail if it requires one of these classes. It is an error to disable the default authentication plugin, either the one named by defaultAuthenticationPlugin property or the hardcoded one if defaultAuthenticationPlugin property is not set.

    • defaultAuthenticationPlugin defines the name of a class implementing com.mysql.jdbc.AuthenticationPlugin, which is used as the default authentication plugin. It is an error to use a class that is not listed in authenticationPlugins and is not one of the built-in plugins. It is an error to set as default a plugin that is disabled by being listed in the disabledAuthenticationPlugins property. It is an error to set this value to null or the empty string; there must be at least one valid default authentication plugin specified for the connection, meeting all the constraints listed above.

Bugs Fixed

  • Reduced the memory overhead for server-side prepared statements. Each prepared statement allocated a 4K buffer for converting streams. Now this allocation is skipped when no set*Stream() methods have been used.

  • The Connection.changeUser() method did not check for closed connections, leading to NullPointerException errors when this method was called on a closed connection.

D.5.1.5. Changes in MySQL Connector/J 5.1.18 (2011-10-04)

Fixes bugs found since release 5.1.17.

Functionality Added or Changed

  • Added the function MYSQL_INDEX_TO_MYSQL_CHARSET to retrieve the server charset name, using an index instead of parsing variables to CharsetMapping.java

Bugs Fixed

  • The LRUCache implementation removed the eldest entry, rather than the least-recently accessed. (Bug #13036537)

  • Changed cacheCallableStatements to cacheCallableStmts in maxPerformance.properties, to allow proper caching. (Bug #13036309)

  • Added a new ant flag, com.mysql.jdbc.junit.fork, which controls whether JUnit will fork new processes.

    The value on: The default, and legacy behavior. Or off): Required for Windows, as otherwise process fork failure errors will result while running the test suite via ant on Windows. (Bug #12784170)

  • Not putting a space between VALUES() and ON DUPLICATE KEY UPDATE causes connector/J to both (A) Rewrite the query, although it includes an ON UPDATE statement and (B) To generate the wrong query with multiple ON DUPLICATE KEY statements. (Bug #12565726)

  • The loadBalanceBlacklistTimeout option was not functioning properly. Working connections were not being removed from the blacklist. (Bug #63135)

  • Connector/J now guards against the condition where a call to KILL QUERY will kill the next query issued by the server, if no query is in process. (Bug #61501)

  • The "old" warnings were returned when Statement.getWarnings() was called after Statement.clearWarnings(). (Bug #61866, Bug #12791594)

  • 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 statement KILL QUERY (which is what the driver uses to implement Statement.cancel()) is rather non-deterministic, and thus the use of Statement.cancel() should be avoided if possible. (Bug #61501)

  • A connection could not be established when the URL contained both sessionVariables and characterEncoding. (Bug #61201, Bug #12649557)

  • Reverting changes made to ConnectionImpl.java, the private boolean characterSetNamesMatches function.

D.5.1.6. Changes in MySQL Connector/J 5.1.17 (2011-07-07)

Fixes bugs found since release 5.1.16.

Bugs Fixed

  • LIKE was not optimized in then server when run against INFORMATION_SCHEMA tables 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, LIKE takes care of that; otherwise, '=' is now used instead. The only exception is the information_schema database, which is handled separately. The patch covers both getTables() and getColumns(). (Bug #61332)

  • The first call to a stored procedure failed with No Database Selected. The workaround introduced in DatabaseMetaData.getCallStmtParameterTypes to fix the server bug where SHOW CREATE PROCEDURE was 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 String values.

    Important

    No longer use String.getBytes(...), or new String(byte[]...). Use the StringUtils method instead.

    (Bug #61105)

D.5.1.7. Changes in MySQL Connector/J 5.1.16 (Not released)

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.

D.5.1.8. Changes in MySQL Connector/J 5.1.15 (2011-02-09)

Fixes bugs found since release 5.1.14.

Bugs Fixed

  • Optional logging class com.mysql.jdbc.log.Log4JLogger was 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)

  • MySqlProcedure accepted null arguments as parameters, however the JDBC meta data did not indicate that. (Bug #38367, Bug #11749186)

  • 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)

  • 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=ASCII and characterEncoding=ASCII. (Bug #18086, Bug #11745647)

D.5.1.9. Changes in MySQL Connector/J 5.1.14 (6th December 2010)

Fixes bugs found since release 5.1.13.

Version 5.1.14 has no changelog entries.

D.5.1.10. Changes in MySQL Connector/J 5.1.13 (2010-06-24)

Fixes bugs found since release 5.1.12.

Functionality Added or Changed

  • Connector/J did not support utf8mb4 for servers 5.5.2 and newer.

    Connector/J now auto-detects servers configured with character_set_server=utf8mb4 or treats the Java encoding utf-8 passed using characterEncoding=... as utf8mb4 in the SET NAMES= calls it makes when establishing the connection. (Bug #54175)

Bugs Fixed

  • An unexpected exception when trying to register OUT parameters in CallableStatement.

    Sometimes Connector/J was not able to register OUT parameters for CallableStatements. (Bug #43576)

  • When the allowMultiQueries connection string option was set to true, a call to Statement.executeBatch() scanned the query for escape codes, even though setEscapeProcessing(false) had been called previously. (Bug #51704)

  • 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)

  • In the file DatabaseMetadata.java, the function private void getCallStmtParameterTypes failed 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 with getMetaData() on stored procedures. This was because PARAM_CAT was hardcoded in the code to NULL. In the case where nullcatalogmeanscurrent was true, 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, nullcatalogmeanscurrent was set to false then a crash resulted.

    Connector/J has been changed so that when NULL is passed as PARAM_CAT it will not crash when nullcatalogmeanscurrent is false, but rather iterate all catalogs in search of stored procedures. This means that PARAM_CAT is no longer hardcoded to NULL (see Bug #51904). (Bug #51912)

  • Logic in implementations of LoadBalancingConnectionProxy and LoadBalanceStrategy behaved differently as to which SQLExceptions 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 Connection object to throw an Exception when the first selected host was unavailable. This happened because MySqlIO.createNewIO() could throw an SQLException with a SQLState of 08001, which did not trigger the try another host logic in the LoadBalanceStrategy implementations, so an Exception was thrown after having only attempted connecting to a single host. (Bug #52231)

  • A load balanced Connection object with multiple open underlying physical connections rebalanced on commit(), 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 to Connection.commit() could throw a SQLException. 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 a SQLException if the server became unavailable during a rollback. The errant code only rethrew when ignoreNonTxTables was true and the exception did not have the error code 1196, SQLError.ER_WARNING_NOT_COMPLETE_ROLLBACK. (Bug #51776)

  • Objects created by ConnectionImpl, such as prepared statements, hold a reference to the ConnectionImpl that created them. However, when the load balancer picked a new connection, it did not update the reference contained in, for example, the PreparedStatement. 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)

  • When a StatementInterceptor was used and an alternate ResultSet was returned from preProcess(), the original statement was still executed. (Bug #51666)

  • jdbc:mysql:loadbalance:// would connect to the same host, even though loadBalanceStrategy was set to a value of random, and multiple hosts were specified. (Bug #51266)

D.5.1.11. Changes in MySQL Connector/J 5.1.12 (2010-02-18)

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 as mysql-connector-java-5.1.11 ( Revision: ${svn.Revision} ). The variable ${svn.Revision} was not replaced by the SVN revision number. (Bug #50288)

D.5.1.12. Changes in MySQL Connector/J 5.1.11 (2010-01-21)

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 loadBalanceBlacklistTimeout and loadBalanceStrategy to choose a mechanism for balancing the load, and failover or fault tolerance strategy for the slave pool. (Bug #49537)

Bugs Fixed

  • NullPointerException sometimes occurred in invalidateCurrentConnection() for load-balanced connections. (Bug #50288)

  • 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)

  • For pooled connections, Connector/J did not process the session variable time_zone when set using the URL, resulting in incorrect timestamp values being stored. (Bug #49700)

  • The deleteRow method caused a full table scan, when using an updatable cursor and a multi-byte character set. (Bug #49745)

  • The ExceptionInterceptor class did not provide a Connection context. (Bug #49607)

  • Ping left closed connections in the liveConnections map, causing subsequent Exceptions when that connection was used. (Bug #48605)

  • Using MysqlConnectionPoolDataSource with a load-balanced URL generated exceptions of type ClassCastException:

    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 Connection used a proxy, which delegated method calls, including equals() and hashCode(), to underlying Connection objects. This meant that successive calls to hashCode() 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 VALUES list by looking for VALUES (with trailing space). However, valid MySQL syntax permits VALUES to 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)

  • With the connection string option noDatetimeStringSync set to true, and server-side prepared statements enabled, the following exception was generated if an attempt was made to obtain, using ResultSet.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)

D.5.1.13. Changes in MySQL Connector/J 5.1.10 (2009-09-23)

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 was jdbc:mysql://localhost:6777, Connector/J would attempt to connect to port 3306, rather than 6777. (Bug #47494)

D.5.1.14. Changes in MySQL Connector/J 5.1.9 (2009-09-21)

Bugs Fixed

  • QueryTimeout did 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)

  • 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)

  • Accessing result set columns by name after the result set had been closed resulted in a NullPointerException instead of a SQLException. (Bug #41484)

  • The getSuperTypes method 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 be TYPE_CAT and that of the second column TYPE_SCHEM. The method however returned the names as TABLE_CAT and TABLE_SCHEM for first and second column respectively. (Bug #44508)

  • Calling ResultSet.deleteRow() on a table with a primary key of type BINARY(8) silently failed to delete the row, but only in some repeatable cases. The generated DELETE statement 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)

  • In the class com.mysql.jdbc.jdbc2.optional.SuspendableXAConnection, which is used when pinGlobalTxToPhysicalConnection=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 the SuspendableXAConnection was never pinned to the real XA connection. Instead it created new connections on calls to start, end, resume, and prepare. (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)

  • SQLException for data truncation error gave the error code as 0 instead of 1265. (Bug #44324)

  • The parseURL method in class com.mysql.jdbc.Driver did not work as expected. When given a URL such as jdbc:mysql://www.mysql.com:12345/my_database to parse, the property PORT_PROPERTY_KEY was found to be null and the HOST_PROPERTY_KEY property was found to be www.mysql.com:12345.

    Note

    Connector/J has been fixed so that it will now always fill in the PORT property (using 3306 if not specified), and the HOST property (using localhost if not specified) when parseURL() is called. The driver also parses a list of hosts into HOST.n and PORT.n properties as well as adding a property NUM_HOSTS for the number of hosts it has found. If a list of hosts is passed to the driver, HOST and PORT will be set to the values given by HOST.1 and PORT.1 respectively. 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 setDate method 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 cal was ignored. (Bug #23584)

D.5.1.15. Changes in MySQL Connector/J 5.1.8 (2009-07-16)

Bugs Fixed

  • The method Statement.getGeneratedKeys() did not return values for UNSIGNED BIGINTS with values greater than Long.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 than Long.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 by Statement.getGeneratedKeys() and if it is not a BigInteger, create one based on the java.lang.Long that is returned. (Bug #43196)

  • A statement interceptor received the incorrect parameters when used with a batched statement. (Bug #39426)

  • 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)

  • The RETURN_GENERATED_KEYS flag was being ignored. For example, in the following code the RETURN_GENERATED_KEYS flag was ignored:

    PreparedStatement ps = connection.prepareStatement("INSERT INTO table
      values(?,?)",PreparedStatement.RETURN_GENERATED_KEYS);

    (Bug #41448)

  • Using Connector/J 5.1.6 the method ResultSet.getObject returned a BYTE[] for following:

    SELECT TRIM(rowid) FROM tbl

    Where rowid had a type of INT(11) PRIMARY KEY AUTO_INCREMENT.

    The expected return type was one of CHAR, VARCHAR, CLOB, however, a BYTE[] was returned.

    Further, adding functionsNeverReturnBlobs=true to the connection string did not have any effect on the return type. (Bug #38387)

  • 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)

  • Calling Connection.serverPreparedStatement() variants that do not take result set type or concurrency arguments returned statements that produced result sets with incorrect defaults, namely TYPE_SCROLL_SENSITIVE. (Bug #45171)

  • When using rewriteBatchedStatements=true with:

    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)

  • 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 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)

  • 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 EscapeTokenizer into the inQuotes state. 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 EscapeTokenizer did not recognize that the first apostrophe was in a comment and thus set inQuotes to 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)

  • Using useInformationSchema with DatabaseMetaData.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)

  • 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)

  • 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)

  • When DatabaseMetaData.getProcedureColumns() was called, the value for LENGTH was always returned as 65535, regardless of the column type (fixed or variable) or the actual length of the column.

    However, if you obtained the PRECISION value, this was correct for both fixed and variable length columns. (Bug #41269)

  • The DEFERRABILITY column in database metadata result sets was expected to be of type SHORT. However, Connector/J returned it as INTEGER.

    This affected the following methods: getImportedKeys(), getExportedKeys(), getCrossReference(). (Bug #44867)

  • 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 type BOOLEAN. Connector/J however returns CHAR. (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 type INTEGER. Connector/J however returns SMALLINT. (Bug #44868)

  • 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 type INTEGER. Connector/J however returns SMALLINT. (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 type INTEGER. Connector/J however returns SMALLINT. (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 type INTEGER. Connector/J however returns SMALLINT. (Bug #44862)

  • Connector/J contains logic to generate a message text specifically for streaming result sets when there are CommunicationsException exceptions generated. However, this code was never reached.

    In the CommunicationsException code:

    private boolean streamingResultSetInPlay = false;
    
    public CommunicationsException(ConnectionImpl conn, long lastPacketSentTimeMs,
    long lastPacketReceivedTimeMs, Exception underlyingException) {
    
    this.exceptionMessage = SQLError.createLinkFailureMessageBasedOnHeuristics(conn,
          lastPacketSentTimeMs, lastPacketReceivedTimeMs, underlyingException,
          this.streamingResultSetInPlay);

    streamingResultSetInPlay was always false, which in the following code in SQLError.createLinkFailureMessageBasedOnHeuristics() never being executed:

    if (streamingResultSetInPlay) {
        exceptionMessageBuf.append(
        Messages.getString("CommunicationsException.ClientWasStreaming")); //$NON-NLS-1$
    } else {
    ...

    (Bug #44588)

  • 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)

  • 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)

  • MySQL Connector/J 5.1.7 was slower than previous versions when the rewriteBatchedStatements option was set to true.

    Note

    The performance regression in indexOfIgnoreCaseRespectMarker()has been fixed. It has also been made possible for the driver to rewrite INSERT statements with ON DUPLICATE KEY UPDATE clauses in them, as long as the UPDATE clause contains no reference to LAST_INSERT_ID(), as that would cause the driver to return bogus values for getGeneratedKeys() invocations. This has resulted in improved performance over version 5.1.7.

    (Bug #41532)

  • LoadBalancingConnectionProxy.doPing() did not have blacklist awareness.

    LoadBalancingConnectionProxy implemented doPing() 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)

  • When connecting with traceProtocol=true, no trace data was generated for the server greeting or login request. (Bug #43070)

  • 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)

  • A ConcurrentModificationException was generated in LoadBalancingConnectionProxy:

    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)

  • PreparedStatement.addBatch() did not check for all parameters being set, which led to inconsistent behavior in executeBatch(), especially when rewriting batched statements into multi-value INSERTs. (Bug #41161)

D.5.1.16. Changes in MySQL Connector/J 5.1.7 (2008-10-21)

Functionality Added or Changed

  • When statements include ON DUPLICATE UPDATE, and rewriteBatchedStatements is set to true, batched statements are not rewritten into the form INSERT INTO table VALUES (), (), (), instead the statements are executed sequentially.

Bugs Fixed

  • When using trustCertificateKeyStoreUrl or clientCertificateKeyStoreUrl, an IllegalStateException was caused by an uninitialized TrustManagerFactoryImpl object. (Bug #11748637, Bug #36948, Bug #38192)

  • The useOldAliasMetadataBehavior connection property was ignored. (Bug #35753)

  • Statement.getGeneratedKeys() returned two keys when using ON DUPLICATE KEY UPDATE and the row was updated, not inserted. (Bug #42309)

  • When getGeneratedKeys() was called on a statement that had not been created with RETURN_GENERATED_KEYS, no exception was thrown, and batched executions then returned erroneous values. (Bug #34185)

  • When configuring the Java Replication Driver the last slave specified was never used. (Bug #39611)

  • When using the replication driver with autoReconnect=true, Connector/J checks in PreparedStatement.execute (also called by CallableStatement.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-SELECT statements. However, this also blocked CALLs to stored procedures, even if the stored procedures were defined as SQL READ DATA or NO SQL. (Bug #40031)

  • When the LoadBalancingConnectionProxy handles a SQLException with SQL state starting with 08, it calls invalidateCurrentConnection, which in turn removes that Connection from liveConnections and the connectionsToHostsMap, 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 NullPointerException when trying to update stats, where connectionsToHostsMap.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 SQLException caused by a connection failure. (Bug #39784)

  • When using the random load balancing strategy and starting with two servers that were both unavailable, an IndexOutOfBoundsException was generated when removing a server from the whiteList. (Bug #38782)

  • The loadBalance bestResponseTime blacklists did not have a global state. (Bug #33861)

  • With large result sets ResultSet.findColumn became a performance bottleneck. (Bug #39962)

  • Connector/J ignored the value of the MySQL Server variable auto_increment_increment. (Bug #39956)

  • When an INSERT ON DUPLICATE KEY UPDATE was performed, and the key already existed, the affected-rows value was returned as 1 instead of 0. (Bug #39352)

  • Connector/J failed to parse TIMESTAMP strings for nanos correctly. (Bug #39911)

  • 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-latin1 password. (Bug #37570)

  • Incorrect result is returned from isAfterLast() in streaming ResultSet when using setFetchSize(Integer.MIN_VALUE). (Bug #35170)

D.5.1.17. Changes in MySQL Connector/J 5.1.6 (2008-03-07)

Functionality Added or Changed

  • Multiple result sets were not supported when using streaming mode to return data. Both normal statements and the result sets from stored procedures now return multiple results sets, with the exception of result sets using registered OUTPUT parameters. (Bug #33678)

  • Add the verifyServerCertificate property. If set to "false" the driver will not verify the server's certificate when useSSL is 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.

  • The profiler event handling has been made extensible using the profilerEventHandler connection property.

  • XAConnections and datasources have been updated to the JDBC-4.0 standard.

Bugs Fixed

  • Compiling in Eclipse could produce a compilation warning for line 814 in the filecom.mysql.jdbc.DatabaseMetaData.java. (Bug #11746221, Bug #24595)

  • Prepared statements from pooled connections caused a NullPointerException when closed() under JDBC-4.0. (Bug #35489)

  • When useServerPrepStmts=true and slow query logging is enabled, the connector throws a NullPointerException when it encounters a slow query. (Bug #35666)

  • The JDBC driver uses a different method for evaluating column names in resultsetmetadata.getColumnName() and when looking for a column in resultset.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)

  • DatabaseMetaData.getColumns() returns incorrect COLUMN_SIZE value for SET column. (Bug #36830)

  • When trying to read Time values like 00:00:00 with ResultSet.getTime(int) an exception is thrown. (Bug #36051)

  • 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)

  • 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)

  • JDBC connection URL parameters is ignored when using MysqlConnectionPoolDataSource. (Bug #35810)

  • MysqlConnectionPoolDataSource does not support ReplicationConnection. Notice that we implemented com.mysql.jdbc.Connection for ReplicationConnection, however, only accessors from ConnectionProperties are implemented (not the mutators), and they return values from the currently active connection. All other methods from com.mysql.jdbc.Connection are implemented, and operate on the currently active connection, with the exception of resetServerState() and changeUser(). (Bug #34937)

  • When calling isValid() on an active connection, if the timeout is nonzero then the Connection is invalidated even if the Connection is valid. (Bug #34703)

  • When retrieving the column type name of a geometry field, the driver would return UNKNOWN instead of GEOMETRY. (Bug #34194)

  • The internal class ResultSetInternalMethods referenced the nonpublic class com.mysql.jdbc.CachedResultSetMetaData. (Bug #33823)

  • ResultSet.getTimestamp() would throw a NullPointerException instead of a SQLException when called on an empty ResultSet. (Bug #33162)

  • ResultSet.getTimestamp() returns incorrect values for month/day of TIMESTAMPs when using server-side prepared statements (not enabled by default). (Bug #34913)

  • RowDataStatic doesn't always set the metadata in ResultSetRow, which can lead to failures when unpacking DATE, TIME, DATETIME and TIMESTAMP types when using absolute, relative, and previous result set navigation methods. (Bug #34762)

  • It was not possible to truncate a BLOB using Blog.truncate() when using 0 as an argument. (Bug #34677)

  • Statements with batched values do not return correct values for getGeneratedKeys() when rewriteBatchedStatements is set to true, and the statement has an ON DUPLICATE KEY UPDATE clause. (Bug #34093)

  • A NullPointerException could be raised when using client-side prepared statements and enabled the prepared statement cache using the cachePrepStmts. (Bug #33734)

  • 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)

  • Using server side cursors and cursor fetch, the table metadata information would return the data type name instead of the column name. (Bug #33594)

  • 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 retriesAllDown configuration 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 the loadBalanceStrategy configuration property. (Bug #32877)

  • 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)

  • ResultSet returned by Statement.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)

  • Using CallableStatement.setNull() on a stored function would throw an ArrayIndexOutOfBounds exception when setting the last parameter to null. (Bug #31823)

  • When using a connection from ConnectionPoolDataSource, some Connection.prepareStatement() methods would return null instead of the prepared statement. (Bug #32101)

  • MysqlValidConnectionChecker doesn't properly handle connections created using ReplicationConnection. (Bug #31790)

  • Fixed ResultSetMetadata.getColumnName() for result sets returned from Statement.getGeneratedKeys() - it was returning null instead of "GENERATED_KEY" as in 5.0.x.

  • 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 useLegacyDatetimeCode to "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 useLegacyDatetimeCode being 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)

  • 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)

D.5.1.18. Changes in MySQL Connector/J 5.1.5 (2007-10-09)

New Features, Compared to the 5.0 Series of Connector/J

  • JDBC-4.0 standardized unwrapping to interfaces that include vendor extensions.

  • Support for JDBC-4.0 XML processing using JAXP interfaces to DOM, SAX and StAX.

  • JDBC-4.0 support for setting per-connection client information (which can be viewed in the comments section of a query using SHOW PROCESSLIST on a MySQL server, or can be extended to support custom persistence of the information using a public interface).

  • Support for JDBC-4.0 NCHAR, NVARCHAR and NCLOB types.

Functionality Added or Changed

  • Added autoSlowLog configuration property, overrides slowQueryThreshold* 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 calling setTimestamp on a prepared statement, the timezone information stored in the calendar object was ignored. This resulted in the incorrect DATETIME information being stored. The following example illustrates this:

    Timestamp t = new Timestamp( cal.getTimeInMillis() );
    ps.setTimestamp( N, t, cal );

    (Bug #15604)

  • When a connection is in read-only mode, queries that are wrapped in parentheses were incorrectly identified DML statements. (Bug #28256)

D.5.1.19. Changes in MySQL Connector/J 5.1.4 (Not Released)

Only released internally.

Version 5.1.4 has no changelog entries.

D.5.1.20. Changes in MySQL Connector/J 5.1.3 (2007-09-10)

New Features, Compared to the 5.0 Series of Connector/J

  • JDBC-4.0 standardized unwrapping to interfaces that include vendor extensions.

  • Support for JDBC-4.0 XML processing using JAXP interfaces to DOM, SAX and StAX.

  • JDBC-4.0 support for setting per-connection client information (which can be viewed in the comments section of a query using SHOW PROCESSLIST on a MySQL server, or can be extended to support custom persistence of the information using a public interface).

  • Support for JDBC-4.0 NCHAR, NVARCHAR and NCLOB types.

Functionality Added or Changed

  • Setting useBlobToStoreUTF8OutsideBMP to true tells the driver to treat [MEDIUM/LONG]BLOB columns as [LONG]VARCHAR columns holding text encoded in UTF-8 that has characters outside the BMP (4-byte encodings), which MySQL server can't handle natively.

    Set utf8OutsideBmpExcludedColumnNamePattern to a regex so that column names matching the given regex will still be treated as BLOBs The regex must follow the patterns used for the java.util.regexpackage. The default is to exclude no columns, and include all columns.

    Set utf8OutsideBmpIncludedColumnNamePattern to specify exclusion rules to utf8OutsideBmpExcludedColumnNamePattern". The regex must follow the patterns used for the java.util.regex package.

  • New methods on com.mysql.jdbc.Statement: setLocalInfileInputStream() and getLocalInfileInputStream():

    • setLocalInfileInputStream() sets an InputStream instance that will be used to send data to the MySQL server for a LOAD DATA LOCAL INFILE statement rather than a FileInputStream or URLInputStream that represents the path given as an argument to the statement.

      This stream will be read to completion upon execution of a LOAD DATA LOCAL INFILE statement, and will automatically be closed by the driver, so it needs to be reset before each call to execute*() that would cause the MySQL server to request data to fulfill the request for LOAD DATA LOCAL INFILE.

      If this value is set to NULL, the driver will revert to using a FileInputStream or URLInputStream as required.

    • getLocalInfileInputStream() returns the InputStream instance that will be used to send data in response to a LOAD DATA LOCAL INFILE statement.

      This method returns NULL if no such stream has been set using setLocalInfileInputStream().

  • Errors encountered during Statement/PreparedStatement/CallableStatement.executeBatch() when rewriteBatchStatements has been set to true now return BatchUpdateExceptions according to the setting of continueBatchOnError.

    If continueBatchOnError is set to true, the update counts for the "chunk" that were sent as one unit will all be set to EXECUTE_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 the BatchUpdateException.

    If continueBatchOnError is 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 to EXECUTE_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.

  • Statement.setQueryTimeout()s now affect the entire batch for batched statements, rather than the individual statements that make up the batch.

  • JDBC-4.0 ease-of-development features including auto-registration with the DriverManager through the service provider mechanism, standardized Connection validity checks and categorized SQLExceptions based on recoverability/retry-ability and class of the underlying error.

  • The driver will automatically adjust the server session variable net_write_timeout when 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 named netTimeoutForStreamingResults, with a unit of seconds, the value '0' means the driver will not try and adjust this value).

  • Added experimental support for statement "interceptors" through the com.mysql.jdbc.StatementInterceptor interface, examples are in com/mysql/jdbc/interceptors. Implement this interface to be placed "in between" query execution, so that it can be influenced (currently experimental).

  • The data (and how it is stored) for ResultSet rows 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.

  • 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 BLOB or TEXT types 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 property largeRowSizeThreshold, which has a default value of 2KB.

  • Setting rewriteBatchedStatements to true now 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.

  • Connector/J now connects using an initial character set of utf-8 solely 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 for GROUP BY clauses. Defaults to false.

    • functionsNeverReturnBlobs: Should the driver always treat data from functions returning BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. Defaults to false.

Bugs Fixed

  • Schema objects with identifiers other than the connection character aren't retrieved correctly in ResultSetMetadata. (Bug #27867)

  • CallableStatement.executeBatch() doesn't work when connection property noAccessToProcedureBodies has been set to true.

    The fix involves changing the behavior of noAccessToProcedureBodies,in that the driver will now report all parameters as IN parameters but permit callers to call registerOutParameter() on them without throwing an exception. (Bug #28689)

  • NPE with null column values when padCharsWithSpace is set to true. (Bug #30851)

  • 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.

  • setObject(int, Object, int, int) delegate in PreparedStatementWrapper delegates to wrong method. (Bug #30892)

  • Connection.getServerCharacterEncoding() doesn't work for servers with version >= 4.1. (Bug #27182)

  • DatabaseMetaData.getColumns() doesn't contain SCOPE_* or IS_AUTOINCREMENT columns. (Bug #27915)

  • 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)

  • Closing a load-balanced connection would cause a ClassCastException. (Bug #29852)

  • DatabaseMetaData.getTypeInfo() for the types DECIMAL and NUMERIC will 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)

  • An ArithmeticException or NullPointerException would be raised when the batch had zero members and rewriteBatchedStatements=true when addBatch() was never called, or executeBatch() was called immediately after clearBatch(). (Bug #30550)

  • Collation on VARBINARY column 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)

  • Connection checker for JBoss didn't use same method parameters using reflection, causing connections to always seem "bad". (Bug #29106)

D.5.1.21. Changes in MySQL Connector/J 5.1.2 (2007-06-29)

This is a new Beta development release, fixing recently discovered bugs.

Functionality Added or Changed

  • Setting the configuration property rewriteBatchedStatements to true will 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, without SELECT or ON DUPLICATE KEY UPDATE clauses) INSERT or REPLACE statements.

D.5.1.22. Changes in MySQL Connector/J 5.1.1 (2007-06-22)

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 Connection implementation out into an interface to support java.sql.Wrapper functionality from ConnectionPoolDataSource. The vendor extensions are javadoc'd in the com.mysql.jdbc.Connection interface.

    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 ConnectionImpl throughout 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 to Connection.serverPrepareStatement() for consistency with Connection.clientPrepareStatement().

  • Setting rewriteBatchedStatements to true now 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.

  • See the sources (fully javadoc'd) for com.mysql.jdbc.StatementInterceptor for more details until we iron out the API and get it documented in the manual.

  • Added experimental support for statement "interceptors" through the com.mysql.jdbc.StatementInterceptor interface, examples are in com/mysql/jdbc/interceptors.

    Implement this interface to be placed "in between" query execution, so that you can influence it. (currently experimental).

    StatementInterceptors are "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 property statementInterceptors.

  • 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 BLOB or TEXT types 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 property largeRowSizeThreshold, which has a default value of 2KB.

  • Similar to Connection, we pulled out vendor extensions to Statement into an interface named com.mysql.Statement, and moved the Statement class into com.mysql.StatementImpl. The two methods (javadoc'd in com.mysql.Statement are enableStreamingResults(), which already existed, and disableStreamingResults() which sets the statement instance back to the fetch size and result set type it had before enableStreamingResults() was called.

  • The data (and how it is stored) for ResultSet rows 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.

  • Externalized the descriptions of connection properties.

  • Made it possible to retrieve prepared statement parameter bindings (to be used in StatementInterceptors, primarily).

  • 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.

D.5.1.23. Changes in MySQL Connector/J 5.1.0 (2007-04-11)

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).

Note

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

  • Added support for JDBC-4.0's Wrapper interface.

  • com.mysql.jdbc.java6.rtjar: Full path to your Java-6 rt.jar file

  • Added support for JDBC-4.0's client information. The backend storage of information provided using Connection.setClientInfo() and retrieved by Connection.getClientInfo() is pluggable by any class that implements the com.mysql.jdbc.JDBC4ClientInfoProvider interface and has a no-args constructor.

    The implementation used by the driver is configured using the clientInfoProvider configuration property (with a default of value of com.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.

  • New feature—driver will automatically adjust session variable net_write_timeout when 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 named netTimeoutForStreamingResults value and has a unit of seconds, the value 0 means the driver will not try and adjust this value).

  • 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_HOME to 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 executable

    • com.mysql.jdbc.java6.rtjar: Full path to your Java-6 rt.jar file

  • Added support for JDBC-4.0's SQLXML interfaces.

  • com.mysql.jdbc.java6.javac: Full path to your Java-6 javac executable

  • Added support for JDBC-4.0's NCLOB, and NCHAR/NVARCHAR types.

  • Added support for JDBC-4.0 categorized SQLExceptions.

  • Refactored CommunicationsException into a JDBC-3.0 version, and a JDBC-4.0 version (which extends SQLRecoverableException, now that it exists).

    Note

    This change means that if you were catching com.mysql.jdbc.CommunicationsException in your applications instead of looking at the SQLState class of 08, and are moving to Java 6 (or newer), you need to change your imports to that exception to be com.mysql.jdbc.exceptions.jdbc4.CommunicationsException, as the old class will not be instantiated for communications link-related errors under Java 6.

D.5.2. Changes in MySQL Connector/J 5.0

D.5.2.1. Changes in MySQL Connector/J 5.0.8 (2007-10-09)

Functionality Added or Changed

  • Driver will now fall back to sane defaults for max_allowed_packet and net_buffer_length if the server reports them incorrectly (and will log this situation at WARN level, since it is actually an error condition).

  • XAConnections now start in auto-commit mode (as per JDBC-4.0 specification clarification).

  • functionsNeverReturnBlobs: Should the driver always treat data from functions returning BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. 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 for GROUP BY clauses. Defaults to false.

    • functionsNeverReturnBlobs: Should the driver always treat data from functions returning BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. Defaults to false.

  • blobsAreStrings: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server for GROUP BY clauses. Defaults to false.

Bugs Fixed

  • Cached metadata with PreparedStatement.execute() throws NullPointerException. (Bug #27412)

  • UNSIGNED types not reported using DBMD.getTypeInfo(), and capitalization of type names is not consistent between DBMD.getColumns(), RSMD.getColumnTypeName() and DBMD.getTypeInfo().

    This fix also ensures that the precision of UNSIGNED MEDIUMINT and UNSIGNED BIGINT is reported correctly using DBMD.getColumns(). (Bug #27916)

  • 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)

  • When a connection is in read-only mode, queries that are wrapped in parentheses were incorrectly identified DML statements. (Bug #28256)

  • Schema objects with identifiers other than the connection character aren't retrieved correctly in ResultSetMetadata. (Bug #27867)

  • CallableStatement.executeBatch() doesn't work when connection property noAccessToProcedureBodies has been set to true.

    The fix involves changing the behavior of noAccessToProcedureBodies,in that the driver will now report all parameters as IN parameters but permit callers to call registerOutParameter() on them without throwing an exception. (Bug #28689)

  • NPE with null column values when padCharsWithSpace is set to true. (Bug #30851)

  • 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.

  • setObject(int, Object, int, int) delegate in PreparedStatementWrapper delegates to wrong method. (Bug #30892)

  • Connection.getServerCharacterEncoding() doesn't work for servers with version >= 4.1. (Bug #27182)

  • DatabaseMetaData.getColumns() doesn't contain SCOPE_* or IS_AUTOINCREMENT columns. (Bug #27915)

  • 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)

  • Closing a load-balanced connection would cause a ClassCastException. (Bug #29852)

  • DatabaseMetaData.getTypeInfo() for the types DECIMAL and NUMERIC will 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)

  • An ArithmeticException or NullPointerException would be raised when the batch had zero members and rewriteBatchedStatements=true when addBatch() was never called, or executeBatch() was called immediately after clearBatch(). (Bug #30550)

  • Collation on VARBINARY column 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)

  • Connection checker for JBoss didn't use same method parameters using reflection, causing connections to always seem "bad". (Bug #29106)

D.5.2.2. Changes in MySQL Connector/J 5.0.7 (2007-07-20)

Functionality Added or Changed

  • 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)?

    Note

    If useNanosForElapsedTime is set to true, 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).

  • Added new debugging functionality - Setting configuration property includeInnodbStatusInDeadlockExceptions to true will cause the driver to append the output of SHOW ENGINE INNODB STATUS to deadlock-related exceptions, which will enumerate the current locks held inside InnoDB.

  • tcpTrafficClass - Should the driver set traffic class or type-of-service fields? See the documentation for java.net.Socket.setTrafficClass() for more information.

  • 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.

  • Setting the configuration parameter useCursorFetch to true for 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.

  • Added configuration properties to enable tuning of TCP/IP socket parameters:

    • tcpNoDelay - Should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm, default true)?

    • tcpKeepAlive - Should the driver set SO_KEEPALIVE (default true)?

    • 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 useDynamicCharsetInfo to false now 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).

  • 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.

  • Added configuration property slowQueryThresholdNanos - if useNanosForElapsedTime is set to true, 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.

  • tcpNoDelay - Should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm, default true)?

  • Driver detects when it is running in a ColdFusion MX server (tested with version 7), and uses the configuration bundle coldFusion, which sets useDynamicCharsetInfo to false (see previous entry), and sets useLocalSessionState and autoReconnect to true.

  • 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).

  • tcpKeepAlive - Should the driver set SO_KEEPALIVE (default true)?

  • The driver will now automatically set useServerPrepStmts to true when useCursorFetch has been set to true, since the feature requires server-side prepared statements to function.

Bugs Fixed

  • 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() and SELECTs for executeUpdate() in plain and prepared statements to be aware of the same types of comments. (Bug #28469)

  • Parser in client-side prepared statements eats character following '/' if it is not a multi-line comment. (Bug #28851)

  • 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)

  • 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)

D.5.2.3. Changes in MySQL Connector/J 5.0.6 (2007-05-15)

Functionality Added or Changed

  • 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.

  • Driver will now use INSERT INTO ... VALUES (DEFAULT)form of statement for updatable result sets for ResultSet.insertRow(), rather than pre-populating the insert row with values from DatabaseMetaData.getColumns()(which results in a SHOW FULL COLUMNS on the server for every result set). If an application requires access to the default values before insertRow() has been called, the JDBC URL should be configured with populateInsertRowWithDefaultValues set to true.

    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.

  • 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 unless failoverReadOnly had been set to false.

  • com.mysql.jdbc.[NonRegistering]Driver now understands URLs of the format jdbc:mysql:replication:// and jdbc: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]ReplicationDriver to eventually disappear, to be replaced with com.mysql.jdbc[NonRegistering]Driver with the new URL prefix.

  • 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.

  • Give better error message when "streaming" result sets, and the connection gets clobbered because of exceeding net_write_timeout on the server.

  • New configuration property, enableQueryTimeouts (default true).

    When enabled, query timeouts set with Statement.setQueryTimeout() use a shared java.util.Timer instance for scheduling. Even if the timeout doesn't expire before the query is processed, there will be memory used by the TimerTask for 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 the maxPerformance configuration bundle).

  • Added configuration property useDynamicCharsetInfo. If set to false (the default), the driver will use a per-connection cache of character set information queried from the server when necessary, or when set to true, 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.

    Note

    This only affects the padCharsWithSpace configuration property and the ResultSetMetaData.getColumnDisplayWidth() method.

  • When useLocalSessionState is set to true and connected to a MySQL-5.0 or later server, the JDBC driver will now determine whether an actual commit or rollback statement needs to be sent to the database when Connection.commit() or Connection.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 padCharsWithSpace (defaults to false). If set to true, and a result set column has the CHAR type 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).

  • bestResponseTime: The driver will route the request to the host that had the best response time for the previous transaction.

  • 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 ReplicationConnection or lbpool).

    If the JDBC URL starts with jdbc:mysql:loadbalance://host-1,host-2,...host-n, the driver will create an implementation of java.sql.Connection that 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 loadBalanceStrategy JDBC 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.

Bugs Fixed

  • When the configuration property useCursorFetch was set to true, 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 during prepare()), causing corrupt reading of data due to type mismatch when the actual rows were returned. (Bug #26173)

  • Whitespace surrounding storage/size specifiers in stored procedure parameters declaration causes NumberFormatException to 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)

  • Connection.getTransactionIsolation() uses "SHOW VARIABLES LIKE" which is very inefficient on MySQL-5.0+ servers. (Bug #27655)

  • ResultSet.get*() with a column index < 1 returns misleading error message. (Bug #27317)

  • Fixed issue where calling getGeneratedKeys() on a prepared statement after calling execute() didn't always return the generated keys (executeUpdate() worked fine however). (Bug #27655)

  • BIT(> 1) is returned as java.lang.String from ResultSet.getObject() rather than byte[]. (Bug #25328)

  • PreparedStatement is not closed in BlobFromLocator.getBytes(). (Bug #26592)

  • Fast date/time parsing doesn't take into account 00:00:00 as a legal value. (Bug #26789)

  • 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)

  • 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)

  • CALL /* ... */ some_proc() doesn't work. As a side effect of this fix, you can now use /* */ 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.

    Note

    The statement when sent to the server will contain the comments as-is, they're not stripped during the process of preparing the PreparedStatement or CallableStatement.

    (Bug #27400)

  • 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)

  • Using ResultSet.get*() with a column index less than 1 returns a misleading error message. (Bug #27317)

  • CallableStatements with OUT/INOUT parameters that are "binary" (BLOB, BIT, (VAR)BINARY, JAVA_OBJECT) have extra 7 bytes. (Bug #25715)

  • Statement.setMaxRows() is not effective on result sets materialized from cursors. (Bug #25517)

D.5.2.4. Changes in MySQL Connector/J 5.0.5 (2007-03-02)

Functionality Added or Changed

  • We've added a new configuration option treatUtilDateAsTimestamp, which is false by 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.

  • 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.

  • Fixed logging of XA commands sent to server, it is now configurable using logXaCommands property (defaults to false).

  • Usage Advisor now detects empty results sets and does not report on columns not referenced in those empty sets.

  • Improved speed of datetime parsing for ResultSets that come from plain or nonserver-side prepared statements. You can enable old implementation with useFastDateParsing=false as a configuration parameter.

  • 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, 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 rewriteBatchedStatements feature can now be used with server-side prepared statements.

  • Usage Advisor will now issue warnings for result sets with large numbers of rows. You can configure the trigger value by using the resultSetSizeThreshold parameter, which has a default value of 100.

Bugs Fixed

  • When using a server-side prepared statement the driver would send timestamps to the server using nanoseconds instead of milliseconds. (Bug #21438)

  • Connection property socketFactory wasn'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)

  • Fixed an issue where XADataSources couldn't be bound into JNDI, as the DataSourceFactory didn't know how to create instances of them.

  • ParameterMetaData throws NullPointerException when prepared SQL has a syntax error. Added generateSimpleParameterMetadata configuration property, which when set to true will generate metadata reflecting VARCHAR for every parameter (the default is false, which will cause an exception to be thrown if no parameter metadata for the statement is actually available). (Bug #21267)

  • Connector/J now returns a better error message when server doesn't return enough information to determine stored procedure/function parameter types. (Bug #24065)

  • When using the rewriteBatchedStatements connection option with PreparedState.executeBatch() an internal memory leak would occur. (Bug #25073)

  • EscapeProcessor gets confused by multiple backslashes. We now push the responsibility of syntax errors back on to the server for most escape sequences. (Bug #25399)

  • Specifying US-ASCII as the character set in a connection to a MySQL 4.1 or newer server does not map correctly. (Bug #24840)

  • DatabaseMetaData.getSchemas() doesn't return a TABLE_CATALOG column. (Bug #23303)

  • INOUT parameters in CallableStatements get doubly escaped. (Bug #25379)

  • 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 UPDATE statements that are part of multi-statement queries would cause an SQLException error, "Result is from UPDATE". (Bug #25009)

  • When using server-side prepared statements and timestamp columns, value would be incorrectly populated (with nanoseconds, not microseconds). (Bug #21438)

  • Some exceptions thrown out of StandardSocketFactory were needlessly wrapped, obscuring their true cause, especially when using socket timeouts. (Bug #21480)

  • StringUtils.indexOfIgnoreCaseRespectQuotes() isn't case-insensitive on the first character of the target. This bug also affected rewriteBatchedStatements functionality when prepared statements did not use uppercase for the VALUES clause. (Bug #25047)

  • 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)

  • A query execution which timed out did not always throw a MySQLTimeoutException. (Bug #25836)

  • A connection error would occur when connecting to a MySQL server with certain character sets. Some collations/character sets reported as "unknown" (specifically cias variants of existing character sets), and inability to override the detected server character set. (Bug #23645)

  • Using setFetchSize() breaks prepared SHOW and other commands. (Bug #24360)

  • Fixed issue where field-level for metadata from DatabaseMetaData when using INFORMATION_SCHEMA didn't have references to current connections, sometimes leading to Null Pointer Exceptions (NPEs) when introspecting them using ResultSetMetaData. (Bug #25073)

  • Using DATETIME columns would result in time shifts when useServerPrepStmts was true. This occurred due to different behavior when using client-side compared to server-side prepared statements and the useJDBCCompliantTimezoneShift option. This is now fixed if moving from server-side prepared statements to client-side prepared statements by setting useSSPSCompatibleTimezoneShift to true, 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)

  • When using a JDBC connection URL that is malformed, the NonRegisteringDriver.getPropertyInfo method will throw a Null Pointer Exception (NPE). (Bug #22628)

  • Storing a java.util.Date object in a BLOB column would not be serialized correctly during setObject. (Bug #25787)

  • Inconsistency between getSchemas and INFORMATION_SCHEMA. (Bug #23304)

  • Calendars and timezones are now lazily instantiated when required. (Bug #24351)

  • Timer instance used for Statement.setQueryTimeout() created per-connection, rather than per-VM, causing memory leak. (Bug #25514)

  • Calling Statement.cancel() could result in a Null Pointer Exception (NPE). (Bug #24721)

Other Changes

  • 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.Field instances.

  • Use a java.util.TreeMap to map column names to ordinal indexes for ResultSet.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 normal HashMap with 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).

  • Fixed cases where ServerPreparedStatements weren't using cached metadata when cacheResultSetMetadata=true was used.

  • Take localSocketAddress property into account when creating instances of CommunicationsException when the underlying exception is a java.net.BindException, so that a friendlier error message is given with a little internal diagnostics.

  • Fixed some Null Pointer Exceptions (NPEs) when cached metadata was used with UpdatableResultSets.

  • When extracting foreign key information from SHOW CREATE TABLE in DatabaseMetaData, 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).

  • 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.

  • Changed cached result set metadata (when using cacheResultSetMetadata=true) to be cached per-connection rather than per-statement as previously implemented.

  • Throw exceptions encountered during timeout to thread calling Statement.execute*(), rather than RuntimeException.

  • Re-worked stored procedure parameter parser to be more robust. Driver no longer requires BEGIN in 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.

  • 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.

  • Avoid static synchronized code in JVM class libraries for dealing with default timezones.

D.5.2.5. Changes in MySQL Connector/J 5.0.4 (2006-10-20)

Bugs Fixed

  • Driver now supports {call sp} (without "()" if procedure has no arguments).

  • 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)

  • DatabaseMetaData correctly reports true for supportsCatalog*() methods.

  • Fixed configuration property jdbcCompliantTruncation was not being used for reads of result set values.

  • Driver was using milliseconds for Statement.setQueryTimeout() when specification says argument is to be in seconds. (Bug #22359)

  • Added new _ci collations to CharsetMapping - utf8_unicode_ci not working. (Bug #22456)

  • 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 now sends numeric 1 or 0 for client-prepared statement setBoolean() calls instead of '1' or '0'.

  • 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)

  • DBMD.getColumns() does not return expected COLUMN_SIZE for the SET type, now returns length of largest possible set disregarding whitespace or the "," delimiters to be consistent with the ODBC driver. (Bug #22613)

  • 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() and rsmd.getColumnName(), usually manifests itself as "Can't find column ('')" exceptions. (Bug #21379)

D.5.2.6. Changes in MySQL Connector/J 5.0.3 (2006-07-26, beta)

Functionality Added or Changed

  • Added configuration option noAccessToProcedureBodies which will cause the driver to create basic parameter metadata for CallableStatements when the user does not have access to procedure bodies using SHOW CREATE PROCEDURE or selecting from mysql.proc instead of throwing an exception. The default value for this option is false

Bugs Fixed

  • Fixed Statement.cancel() causes NullPointerException if 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 a NullPointerException, even though there is no active connection. (Bug #20650)

D.5.2.7. Changes in MySQL Connector/J 5.0.2 (2006-07-11)

Bugs Fixed

  • MysqlXaConnection.recover(int flags) now permits combinations of XAResource.TMSTARTRSCAN and TMENDRSCAN. To simulate the scanning nature of the interface, we return all prepared XIDs for TMSTARTRSCAN, and no new XIDs for calls with TMNOFLAGS, or TMENDRSCAN when not in combination with TMSTARTRSCAN. This change was made for API compliance, as well as integration with IBM WebSphere's transaction manager. (Bug #20242)

  • Fixed MysqlValidConnectionChecker for JBoss doesn't work with MySQLXADataSources. (Bug #20242)

  • Added connection/datasource property pinGlobalTxToPhysicalConnection (defaults to false). When set to true, when using XAConnections, the driver ensures that operations on a given XID are always routed to the same physical connection. This enables the XAConnection to support XA START ... JOIN after XA END has 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)

  • Fixed driver fails on non-ASCII platforms. The driver was assuming that the platform character set would be a superset of MySQL's latin1 when 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 the language system variable to the character set that is used for error messages. (Bug #18086)

  • Fixed can't use XAConnection for local transactions when no global transaction is in progress. (Bug #17401)

  • Better caching of character set converters (per-connection) to remove a bottleneck for multi-byte character sets. (Bug #20242)

  • Fixed ConnectionProperties (and thus some subclasses) are not serializable, even though some J2EE containers expect them to be. (Bug #19169)

D.5.2.8. Changes in MySQL Connector/J 5.0.1 (Not Released)

Not released due to a packaging error

Version 5.0.1 has no changelog entries.

D.5.2.9. Changes in MySQL Connector/J 5.0.0 (2005-12-22)

Bugs Fixed

  • Added support for Connector/MXJ integration using url subprotocol jdbc:mysql:mxj://.... (Bug #14729)

  • Idle timeouts cause XAConnections to 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)

  • Add one level of indirection of internal representation of CallableStatement parameter metadata to avoid class not found issues on JDK-1.3 for ParameterMetadata interface (which doesn't exist prior to JDBC-3.0).

  • Added service-provider entry to META-INF/services/java.sql.Driver for JDBC-4.0 support. (Bug #14729)

  • PreparedStatement.setString() didn't work correctly when sql_mode on server contained NO_BACKSLASH_ESCAPES and no characters that needed escaping were present in the string.

  • Fuller synchronization of Connection to 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)

  • Setting useJDBCCompliantTimezoneShift=true (it is not the default) causes the driver to use GMT for all TIMESTAMP/DATETIME time zones, and the current VM time zone for any other type that refers to time zones. This feature can not be used when useTimezone=true to convert between server and client time zones.

  • Moved all SQLException constructor usage to a factory in SQLError (ground-work for JDBC-4.0 SQLState-based exception classes). (Bug #14729)

  • 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.

  • Moved -bin-g.jar file into separate debug subdirectory to avoid confusion.

  • Removed Java5-specific calls to BigDecimal constructor (when result set value is '', (int)0 was being used as an argument indirectly using method return value. This signature doesn't exist prior to Java5.) (Bug #14729)

  • XADataSource implemented (ported from 3.2 branch which won't be released as a product). Use com.mysql.jdbc.jdbc2.optional.MysqlXADataSource as your datasource class name in your application server to utilize XA transactions in MySQL-5.0.10 and newer.

  • Implementation of Statement.cancel() and Statement.setQueryTimeout(). Both require MySQL-5.0.0 or newer server, require a separate connection to issue the KILL QUERY statement, and in the case of setQueryTimeout() creates an additional thread to handle the timeout functionality.

    Note: Failures to cancel the statement for setQueryTimeout() may manifest themselves as RuntimeExceptions rather 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)

  • Do not permit .setAutoCommit(true), or .commit() or .rollback() on an XA-managed connection as per the JDBC specification.

  • If the connection useTimezone is set to true, then also respect time zone conversions in escape-processed string literals (for example, "{ts ...}" and "{t ...}").

  • Return "[VAR]BINARY" for RSMD.getColumnTypeName() when that is actually the type, and it can be distinguished (MySQL-4.1 and newer). (Bug #14729)

  • Added unit tests for XADatasource, as well as friendlier exceptions for XA failures compared to the "stock" XAException (which has no messages).

  • Attempt detection of the MySQL type BINARY (it is an alias, so this isn't always reliable), and use the java.sql.Types.BINARY type mapping for it.

D.5.3. Changes in MySQL Connector/J 3.1

D.5.3.1. Changes in MySQL Connector/J 3.1.15 (Not yet released)

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).

Version 3.1.15 has no changelog entries.

D.5.3.2. Changes in MySQL Connector/J 3.1.14 (2006-10-19)

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)

  • Fixed ResultSet.getShort() for UNSIGNED TINYINT returns incorrect values when using server-side prepared statements. (Bug #20306)

  • Fixed Updatable result set that contains a BIT column fails when server-side prepared statements are used. (Bug #20485)

  • ReplicationDriver does not always round-robin load balance depending on URL used for slaves list. (Bug #19993)

  • 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)

  • DatabaseMetaData.getTables() or getColumns() with a bad catalog parameter threw an exception rather than return an empty result set (as required by the specification). (Bug #18258)

  • 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 memory leak with profileSQL=true. (Bug #16987)

  • Connection fails to localhost when using timeout and IPv6 is configured. (Bug #19726)

  • Fixed updatable result set throws ClassCastException when there is row data and moveToInsertRow() is called. (Bug #20479)

  • ResultSet.getSomeInteger() doesn't work for BIT(>1). (Bug #21062)

  • 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)

  • 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)

  • Fixed NullPointerException in MysqlDataSourceFactory due to Reference containing RefAddrs with null content. (Bug #16791)

  • 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)

  • Fixed can't pool server-side prepared statements, exception raised when re-using them. (Bug #20687)

  • DDriver throws NPE when tracing prepared statements that have been closed (in asSQL()). (Bug #21207)

  • ResultSet.getFloatFromString() can't retrieve values near Float.MIN/MAX_VALUE. (Bug #18880)

D.5.3.3. Changes in MySQL Connector/J 3.1.13 (2006-05-26)

Bugs Fixed

  • Added performance feature, re-writing of batched executes for Statement.executeBatch() (for all DML statements) and PreparedStatement.executeBatch() (for INSERTs with VALUE clauses only). Enable by using "rewriteBatchedStatements=true" in your JDBC URL. (Bug #18041)

  • DBMD.getColumns() returns wrong type for BIT. (Bug #15854)

  • PreparedStatement.setObject() serializes BigInteger as object, rather than sending as numeric value (and is thus not complementary to .getObject() on an UNSIGNED LONG type). (Bug #15383)

  • Fixed aliased column names where length of name > 251 are corrupted. (Bug #18554)

  • Exception thrown for new decimal type when using updatable result sets. (Bug #14609)

  • Improved performance of retrieving BigDecimal, Time, Timestamp and Date values from server-side prepared statements by creating fewer short-lived instances of Strings when the native type is not an exact match for the requested type. (Bug #18496)

  • Fixed calling clearParameters() on a closed prepared statement causes NPE. (Bug #17587)

  • Driver now aware of fix for BIT type metadata that went into MySQL-5.0.21 for server not reporting length consistently . (Bug #13601)

  • No "dos" character set in MySQL > 4.1.0. (Bug #15544)

  • Map "latin1" on MySQL server to CP1252 for MySQL > 4.1.0. (Bug #17587)

  • Fixed CallableStatement.registerOutParameter() not working when some parameters pre-populated. Still waiting for feedback from JDBC experts group to determine what correct parameter count from getMetaData() should be, however. (Bug #17898)

  • Fixed ResultSet.wasNull() not always reset correctly for booleans when done using conversion for server-side prepared statements. (Bug #17450)

  • Added support for Apache Commons logging, use "com.mysql.jdbc.log.CommonsLogger" as the value for the "logger" configuration property. (Bug #13469)

  • Fixed ResultSet.wasNull() returns incorrect value when extracting native string from server-side prepared statement generated result set. (Bug #19282)

  • Fixed updatable result set doesn't return AUTO_INCREMENT values for insertRow() 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 straightforward isAutoIncrement() check). (Bug #16841)

  • Fixed invalid classname returned for ResultSetMetaData.getColumnClassName() for BIGINT type. (Bug #19282)

  • INOUT parameter does not store IN value. (Bug #15464)

  • Fixed issue with ReplicationConnection incorrectly copying state, doesn't transfer connection context correctly when transitioning between the same read-only states. (Bug #15570)

  • 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 PreparedStatement.setObject(int, Object, int) doesn't respect scale of BigDecimals. (Bug #19615)

  • 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)

  • Fixed Statement.getGeneratedKeys() throws NullPointerException when no query has been processed. (Bug #17099)

  • ResultSet.getShort() for UNSIGNED TINYINT returned wrong values. (Bug #11874)

  • lib-nodist directory missing from package breaks out-of-box build. (Bug #15676)

  • Added additional accessor and mutator methods on ConnectionProperties so that DataSource users can use same naming as regular URL properties. (Bug #17587)

  • LogFactory now prepends com.mysql.jdbc.log to 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=CommonsLogger instead of logger=com.mysql.jdbc.log.CommonsLogger. (Bug #13469)

  • Fixed data truncation and getWarnings() only returns last warning in set. (Bug #18740)

  • Fixed issue where server-side prepared statements don't cause truncation exceptions to be thrown when truncation happens. (Bug #18041)

  • Fixed issue where driver was unable to initialize character set mapping tables. Removed reliance on .properties files 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 the CharsetMapping class. (Bug #14938)

D.5.3.4. Changes in MySQL Connector/J 3.1.12 (2005-11-30)

Bugs Fixed

  • Driver incorrectly closes streams passed as arguments to PreparedStatements. Reverts to legacy behavior by setting the JDBC configuration property autoClosePStmtStreams to true (also included in the 3-0-Compat configuration bundle). (Bug #15024)

  • storesMixedCaseIdentifiers() returns false (Bug #14562)

  • 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.

  • storesLowerCaseIdentifiers() returns true (Bug #14562)

  • Deadlock while closing server-side prepared statements from multiple threads sharing one connection. (Bug #14972)

  • OpenOffice expects DBMD.supportsIntegrityEnhancementFacility() to return true if 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 property overrideSupportsIntegrityEnhancementFacility to true causes the driver to return true for this method. (Bug #12975)

  • storesMixedCaseQuotedIdentifiers() returns false (Bug #14562)

  • logSlowQueries should give better info. (Bug #12230)

  • storesMixedCaseQuotedIdentifiers() returns true (Bug #14562)

  • maxQuerySizeToLog is not respected. Added logging of bound values for execute() phase of server-side prepared statements when profileSQL=true as well. (Bug #13048)

  • Process escape tokens in Connection.prepareStatement(...). You can disable this behavior by setting the JDBC URL configuration property processEscapeCodesForPrepStmts to false. (Bug #15141)

  • DatabaseMetaData.getColumns() doesn't return TABLE_NAME correctly. (Bug #14815)

  • If lower_case_table_names=0 (on server):

    • storesLowerCaseIdentifiers() returns false

    • storesLowerCaseQuotedIdentifiers() returns false

    • storesMixedCaseIdentifiers() returns true

    • storesMixedCaseQuotedIdentifiers() returns true

    • storesUpperCaseIdentifiers() returns false

    • storesUpperCaseQuotedIdentifiers() returns true

    (Bug #14562)

  • storesUpperCaseIdentifiers() returns false (Bug #14562)

  • storesUpperCaseQuotedIdentifiers() returns true (Bug #14562)

  • If lower_case_table_names=1 (on server):

    • storesLowerCaseIdentifiers() returns true

    • storesLowerCaseQuotedIdentifiers() returns true

    • storesMixedCaseIdentifiers() returns false

    • storesMixedCaseQuotedIdentifiers() returns false

    • storesUpperCaseIdentifiers() returns false

    • storesUpperCaseQuotedIdentifiers() returns true

    (Bug #14562)

  • Extraneous sleep on autoReconnect. (Bug #13775)

  • storesLowerCaseQuotedIdentifiers() returns true (Bug #14562)

  • Fixed DatabaseMetaData.stores*Identifiers():

    • If lower_case_table_names=0 (on server):

      • storesLowerCaseIdentifiers() returns false

      • storesLowerCaseQuotedIdentifiers() returns false

      • storesMixedCaseIdentifiers() returns true

      • storesMixedCaseQuotedIdentifiers() returns true

      • storesUpperCaseIdentifiers() returns false

      • storesUpperCaseQuotedIdentifiers() returns true

    • If lower_case_table_names=1 (on server):

      • storesLowerCaseIdentifiers() returns true

      • storesLowerCaseQuotedIdentifiers() returns true

      • storesMixedCaseIdentifiers() returns false

      • storesMixedCaseQuotedIdentifiers() returns false

      • storesUpperCaseIdentifiers() returns false

      • storesUpperCaseQuotedIdentifiers() returns true

    (Bug #14562)

  • Do not permit executeBatch() for CallableStatements with registered OUT/INOUT parameters (JDBC compliance).

  • Don't increase timeout for failover/reconnect. (Bug #6577)

  • Reconnect during middle of executeBatch() should not occur if autoReconnect is enabled. (Bug #13255)

  • storesMixedCaseIdentifiers() returns true (Bug #14562)

  • Usage advisor complains about unreferenced columns, even though they've been referenced. (Bug #15065)

  • storesLowerCaseQuotedIdentifiers() returns false (Bug #14562)

  • Java type conversion may be incorrect for MEDIUMINT. (Bug #14562)

  • Added com.mysql.jdbc.testsuite.url.default system property to set default JDBC url for testsuite (to speed up bug resolution when I'm working in Eclipse). (Bug #12975)

  • Unable to initialize character set mapping tables (due to J2EE classloader differences). (Bug #14938)

  • storesLowerCaseIdentifiers() returns false (Bug #14562)

  • Escape processor replaces quote character in quoted string with string delimiter. (Bug #14909)

  • Added configuration property useGmtMillisForDatetimes which when set to true causes ResultSet.getDate(), .getTimestamp() to return correct millis-since GMT when .getTime() is called on the return value (currently default is false for legacy behavior). (Bug #14562)

  • Fixed client-side prepared statement bug with embedded ? characters inside quoted identifiers (it was recognized as a placeholder, when it was not).

D.5.3.5. Changes in MySQL Connector/J 3.1.11 (2005-10-07)

Bugs Fixed

  • getExportedKeys() (Bug #12541)

  • Geometry types not handled with server-side prepared statements. (Bug #12104)

  • Specifying a catalog works as stated in the API docs. (Bug #12541)

  • Specifying NULL means that catalog will not be used to filter the results (thus all databases will be searched), unless you've set nullCatalogMeansCurrent=true in your JDBC URL properties. (Bug #12541)

  • explainSlowQueries hangs with server-side prepared statements. (Bug #12229)

  • Tokenizer for = in URL properties was causing sessionVariables=.... to be parameterized incorrectly. (Bug #12753)

  • getIndexInfo() (Bug #12541)

  • getProcedures() (and thus indirectly getProcedureColumns()) (Bug #12541)

  • Pstmt.setObject(...., Types.BOOLEAN) throws exception. (Bug #11798)

  • Reworked Field class, *Buffer, and MysqlIO to be aware of field lengths > Integer.MAX_VALUE. (Bug #11498)

  • Foreign key information that is quoted is parsed incorrectly when DatabaseMetaData methods use that information. (Bug #11781)

  • getImportedKeys() (Bug #12541)

  • 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)

  • Escape tokenizer doesn't respect stacked single quotation marks for escapes. (Bug #11797)

  • Escape processor didn't honor strings demarcated with double quotation marks. (Bug #11498)

  • maxPerformance.properties mis-spells elideSetAutoCommits. (Bug #11976)

  • Specifying "" means current catalog, even though this isn't quite JDBC spec compliant, it is there for legacy users. (Bug #12541)

  • getCrossReference() (Bug #12541)

  • Moved source code to Subversion repository. (Bug #11663)

  • The configuration property sessionVariables now permits you to specify variables that start with the @ sign. (Bug #13453)

  • The sendBlobChunkSize property is now clamped to max_allowed_packet with consideration of stream buffer size and packet headers to avoid PacketTooBigExceptions when max_allowed_packet is similar in size to the default sendBlobChunkSize which is 1M. (Bug #11781)

  • 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)

  • Statement.getWarnings() fails with NPE if statement has been closed. (Bug #10630)

  • Workaround for Bug #13374: ResultSet.getStatement() on closed result set returns NULL (as per JDBC 4.0 spec, but not backward-compatible). Set the connection property retainStatementAfterResultSetClose to true to be able to retrieve a ResultSet's statement after the ResultSet has been closed using .getStatement() (the default is false, to be JDBC-compliant and to reduce the chance that code using JDBC leaks Statement instances). (Bug #13277)

  • DBMD.storesLower/Mixed/UpperIdentifiers() reports incorrect values for servers deployed on Windows. (Bug #11575)

  • java.sql.Types.OTHER returned for BINARY and VARBINARY columns when using DatabaseMetaData.getColumns(). (Bug #12970)

  • 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 by java.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)

  • getColumns() (Bug #12541)

  • ResultSet.moveToCurrentRow() fails to work when preceded by a call to ResultSet.moveToInsertRow(). (Bug #11190)

  • Handling of catalog argument in DatabaseMetaData.getIndexInfo(), which also means changes to the following methods in DatabaseMetaData:

    • getBestRowIdentifier()

    • getColumns()

    • getCrossReference()

    • getExportedKeys()

    • getImportedKeys()

    • getIndexInfo()

    • getPrimaryKeys()

    • getProcedures() (and thus indirectly getProcedureColumns())

    • getTables()

    The catalog argument in all of these methods now behaves in the following way:

    • Specifying NULL means that catalog will not be used to filter the results (thus all databases will be searched), unless you've set nullCatalogMeansCurrent=true in 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 the jdbc2.optional package (connections built by ConnectionPoolDataSource instances).

    (Bug #12541)

  • getBestRowIdentifier() (Bug #12541)

  • VARBINARY data corrupted when using server-side prepared statements and .setBytes(). (Bug #11115)

  • Made Connection.clientPrepare() available from wrapped connections in the jdbc2.optional package (connections built by ConnectionPoolDataSource instances). (Bug #12541)

  • Only get char[] from SQL in PreparedStatement.ParseInfo() when needed. (Bug #10630)

  • ServerPreparedStatement.getBinding() now checks if the statement is closed before attempting to reference the list of parameter bindings, to avoid throwing a NullPointerException. (Bug #12970)

  • ResultSetMetaData from Statement.getGeneratedKeys() caused a NullPointerException to be thrown whenever a method that required a connection reference was called. (Bug #13277)

  • cp1251 incorrectly mapped to win1251 for servers newer than 4.0.x. (Bug #12752)

  • When gatherPerfMetrics is enabled for servers older than 4.1.0, a NullPointerException is thrown from the constructor of ResultSet if the query doesn't use any tables. (Bug #13043)

  • Incorrect generation of testcase scripts for server-side prepared statements. (Bug #11663)

  • GEOMETRY type not recognized when using server-side prepared statements. (Bug #11797)

  • Backport of VAR[BINARY|CHAR] [BINARY] types detection from 5.0 branch. (Bug #13277)

  • CallableStatement.clearParameters() now clears resources associated with INOUT/OUTPUT parameters as well as INPUT parameters. (Bug #11781)

  • getTables() (Bug #12541)

  • Fixed NullPointerException when converting catalog parameter in many DatabaseMetaDataMethods to byte[]s (for the result set) when the parameter is null. (null is not technically permitted by the JDBC specification, but we have historically permitted it). (Bug #13277)

  • StringUtils.getBytes() doesn't work when using multi-byte character encodings and a length in characters is specified. (Bug #11614)

  • Backport of Field class, ResultSetMetaData.getColumnClassName(), and ResultSet.getObject(int) changes from 5.0 branch to fix behavior surrounding VARCHAR BINARY/VARBINARY and 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 empty LOAD DATA INFILE packet sent to the server. (Bug #13277)

  • Fixed statements generated for testcases missing ; for plain statements. (Bug #11629)

  • ReplicationConnection won't switch to slave, throws Catalog can't be null exception. (Bug #11879)

  • Spurious ! on console when character encoding is utf8. (Bug #11629)

  • Properties shared between master and slave with replication connection. (Bug #12218)

  • Updated DBMD.supportsCorrelatedQueries() to return true for versions > 4.1, supportsGroupByUnrelated() to return true and getResultSetHoldability() to return HOLD_CURSORS_OVER_COMMIT. (Bug #11498)

  • Lifted restriction of changing streaming parameters with server-side prepared statements. As long as all streaming 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)

  • Connection.prepareCall() is database name case-sensitive (on Windows systems). (Bug #12417)

  • getPrimaryKeys() (Bug #12541)

D.5.3.6. Changes in MySQL Connector/J 3.1.10 (2005-06-23)

Bugs Fixed

  • Fixed connecting without a database specified raised an exception in MysqlIO.changeDatabaseTo().

  • Initial implemention of ParameterMetadata for PreparedStatement.getParameterMetadata(). Only works fully for CallableStatements, as current server-side prepared statements return every parameter as a VARCHAR type.

D.5.3.7. Changes in MySQL Connector/J 3.1.9 (2005-06-22)

Bugs Fixed

  • Fixed PreparedStatement.setClob() not accepting null as a parameter. (Bug #11360)

  • Actually write manifest file to correct place so it ends up in the binary jar file. (Bug #10144)

  • Try to handle OutOfMemoryErrors 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)

  • autoReconnect ping causes exception on connection startup. (Bug #11259)

  • Reorganized directory layout. Sources now are in src folder. Don't pollute parent directory when building, now output goes to ./build, distribution goes to ./dist. (Bug #10496)

  • Overhaul of character set configuration, everything now lives in a properties file.

  • Connection.setCatalog() is now aware of the useLocalSessionState configuration property, which when set to true will prevent the driver from sending USE ... to the server if the requested catalog is the same as the current catalog. (Bug #11115)

  • Setting cachePrepStmts=true now causes the Connection to 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, the prepStmtCacheSize parameter controls the size of these caches. (Bug #10850)

  • Don't send COM_RESET_STMT for each execution of a server-side prepared statement if it isn't required. (Bug #10850)

  • 3-0-Compat: Compatibility with Connector/J 3.0.x functionality (Bug #11115)

  • Production package doesn't include JBoss integration classes. (Bug #11411)

  • maxPerformance: Maximum performance without being reckless (Bug #11115)

  • Unsigned SMALLINT treated as signed for ResultSet.getInt(), fixed all cases for UNSIGNED integer values and server-side prepared statements, as well as ResultSet.getObject() for UNSIGNED TINYINT. (Bug #10156)

  • solarisMaxPerformance: Maximum performance for Solaris, avoids syscalls where it can (Bug #11115)

  • Added maintainTimeStats configuration property (defaults to true), 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 to false, removes two syscalls per query. (Bug #11115)

  • 0-length streams not sent to server when using server-side prepared statements. (Bug #10850)

  • The data type returned for TINYINT(1) columns when tinyInt1isBit=true (the default) can be switched between Types.BOOLEAN and Types.BIT using the new configuration property transformedBitIsBoolean, which defaults to false. If set to false (the default), DatabaseMetaData.getColumns() and ResultSetMetaData.getColumnType() will return Types.BOOLEAN for TINYINT(1) columns. If true, Types.BOOLEAN will be returned instead. Regardless of this configuration property, if tinyInt1isBit is enabled, columns with the type TINYINT(1) will be returned as java.lang.Boolean instances from ResultSet.getObject(...), and ResultSetMetaData.getColumnClassName() will return java.lang.Boolean. (Bug #10485)

  • VARBINARY data corrupted when using server-side prepared statements and ResultSet.getBytes(). (Bug #11115)

  • Added createDatabaseIfNotExist property (default is false), 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)

  • SQLException thrown when retrieving YEAR(2) with ResultSet.getString(). The driver will now always treat YEAR types as java.sql.Dates and return the correct values for getString(). Alternatively, the yearIsDateType connection property can be set to false and the values will be treated as SHORTs. (Bug #10485)

  • Connector/J dumping query into SQLException twice. (Bug #11360)

  • 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)

  • Removed nonsensical costly type conversion warnings when using usage advisor. (Bug #11411)

  • com.mysql.jdbc.PreparedStatement.ParseInfo does unnecessary call to toCharArray(). (Bug #9064)

  • Driver doesn't support {?=CALL(...)} for calling stored functions. This involved adding support for function retrieval to DatabaseMetaData.getProcedures() and getProcedureColumns() as well. (Bug #10310)

  • Memory leak in ServerPreparedStatement if serverPrepare() fails. (Bug #10144)

  • Added support/bug hunting feature that generates .sql test scripts to STDERR when autoGenerateTestcaseScript is set to true. (Bug #10496)

  • 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)

  • SQLException is thrown when using property characterSetResults with cp932 or eucjpms. (Bug #10496)

  • Made JDBC2-compliant wrappers public to enable access to vendor extensions. (Bug #10155)

  • Added the following configuration bundles, use one or many using the useConfigs configuration property:

    • maxPerformance: Maximum performance without being reckless

    • solarisMaxPerformance: Maximum performance for Solaris, avoids syscalls where it can

    • 3-0-Compat: Compatibility with Connector/J 3.0.x functionality

    (Bug #11115)

  • DatabaseMetaData.supportsMultipleOpenResults() now returns true. 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.LogUtils so that third parties can use it. (Bug #10155)

  • Made enableStreamingResults() visible on com.mysql.jdbc.jdbc2.optional.StatementWrapper. (Bug #10155)

  • 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.

D.5.3.8. Changes in MySQL Connector/J 3.1.8 (2005-04-14)

Bugs Fixed

  • Added finalizers to ResultSet and Statement implementations to be JDBC spec-compliant, which requires that if not explicitly closed, these resources should be closed upon garbage collection. (Bug #9319)

  • Should accept null for name patterns in DBMD (meaning %), even though it isn't JDBC compliant, for legacy's sake. Disable by setting connection property nullNamePatternMatchesAll to false (which will be the default value in C/J 3.2.x). (Bug #9769)

  • Fixed DatabaseMetaData.getTables() returning views when they were not asked for as one of the requested table types.

  • Check for empty strings ('') when converting CHAR/VARCHAR column data to numbers, throw exception if emptyStringsConvertToZero configuration property is set to false (for backward-compatibility with 3.0, it is now set to true by default, but will most likely default to false in 3.2). (Bug #8803)

  • The performance metrics feature now gathers information about number of tables referenced in a SELECT. (Bug #9704)

  • Fixed driver not returning true for -1 when ResultSet.getBoolean() was called on result sets returned from server-side prepared statements. (Bug #9778)

  • ServerPreparedStatements now correctly stream BLOB/CLOB data to the server. You can configure the threshold chunk size using the JDBC URL property blobSendChunkSize (the default is 1MB). (Bug #8868)

  • The logging system is now automatically configured. If the value has been set by the user, using the URL property logger or the system property com.mysql.jdbc.logger, then use that, otherwise, autodetect it using the following steps:

    1. Log4j, if it is available,

    2. Then JDK1.4 logging,

    3. Then fallback to our STDERR logging.

    (Bug #9704)

  • Added a Manifest.MF file with implementation information to the .jar file. (Bug #9778)

  • Should accept null for catalog (meaning use current) in DBMD methods, even though it is not JDBC-compliant for legacy's sake. Disable by setting connection property nullCatalogMeansCurrent to false (which will be the default value in C/J 3.2.x). (Bug #9917)

  • More tests in Field.isOpaqueBinary() to distinguish opaque binary (that is, fields with type CHAR(n) and CHARACTER 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)

  • Added support for the c3p0 connection pool's (http://c3p0.sf.net/) validation/connection checker interface which uses the lightweight COM_PING call to the server if available. To use it, configure your c3p0 connection pool's connectionTesterClassName property to use com.mysql.jdbc.integration.c3p0.MysqlConnectionTester. (Bug #9320)

  • DATA_TYPE column from DBMD.getBestRowIdentifier() causes ArrayIndexOutOfBoundsException when accessed (and in fact, didn't return any value). (Bug #8803)

  • DATE_FORMAT() queries returned as BLOBs from getObject(). (Bug #8868)

  • 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 BINARY to return correct/matching classes for RSMD.getColumnClassName() and ResultSet.getObject(). (Bug #9236)

  • PreparedStatement.getMetaData() inserts blank row in database under certain conditions when not using server-side prepared statements. (Bug #9320)

  • Added support for new precision-math DECIMAL type in MySQL 5.0.3 and up.

  • Better detection of LIMIT inside/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)

  • Made Connection.ping() a public method.

  • Stored procedures with DECIMAL parameters with storage specifications that contained , in them would fail. (Bug #9682)

  • 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)

  • Connection.canHandleAsPreparedStatement() now makes best effort to distinguish LIMIT clauses 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)

  • BlobFromLocator now uses correct identifier quoting when generating prepared statements. (Bug #8868)

  • Statement.getMoreResults() could throw NPE when existing result set was .close()d. (Bug #9704)

  • Fixed ResultSet.getTime() on a NULL value for server-side prepared statements throws NPE.

  • PreparedStatement.addBatch() doesn't work with server-side prepared statements and streaming BINARY data. (Bug #9040)

  • Fixed build.xml to not compile log4j logging if log4j not available. (Bug #9320)

  • Cannot use UTF-8 for characterSetResults configuration property. (Bug #9206)

  • PreparedStatement.setObject(int, Object, int type, int scale) now uses scale value for BigDecimal instances. (Bug #9682)

  • DBMD.supportsResultSetConcurrency() not returning true for forward-only/read-only result sets (we obviously support this). (Bug #8792)

  • Fixed regression in ping() for users using autoReconnect=true. (Bug #8868)

  • Stored procedures with same name in different databases confuse the driver when it tries to determine parameter counts/types. (Bug #9319)

  • DBMD.supportsMixedCase*Identifiers() returns wrong value on servers running on case-sensitive file systems. (Bug #8800)

D.5.3.9. Changes in MySQL Connector/J 3.1.7 (2005-02-18)

Bugs Fixed

  • 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)

  • Added support for BIT type in MySQL-5.0.3. The driver will treat BIT(1-8) as the JDBC standard BIT type (which maps to java.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 as VARBINARY, and will return byte[] when getObject() is called. (Bug #8424)

  • Added useLocalSessionState configuration property, when set to true the JDBC driver trusts that the application is well-behaved and only sets autocommit and transaction isolation levels using the methods provided on java.sql.Connection, and therefore can manipulate these values in many cases without incurring round-trips to the database server. (Bug #8424)

  • Fixed synchronization issue with ServerPreparedStatement.serverPrepare() that could cause deadlocks/crashes if connection was shared between threads. (Bug #8096)

  • Added holdResultsOpenOverStatementClose property (default is false), that keeps result sets open over statement.close() or new execution on same statement (suggested by Kevin Burton). (Bug #7715)

  • Removed dontUnpackBinaryResults functionality, the driver now always stores results from server-side prepared statements as is from the server and unpacks them on demand. (Bug #7952)

  • Detect new sql_mode variable in string form (it used to be integer) and adjust quoting method for strings appropriately. (Bug #7715)

  • Choose correct direction to apply time adjustments when both client and server are in GMT time zone when using ResultSet.get(..., cal) and PreparedStatement.set(...., cal). (Bug #4718)

  • Fixed duplicated code in configureClientCharset() that prevented useOldUTF8Behavior=true from working properly. (Bug #7952)

  • Remove _binary introducer from parameters used as in/out parameters in CallableStatement. (Bug #4718)

  • Always return byte[]s for output parameters registered as *BINARY. (Bug #4718)

  • Timestamps converted incorrectly to strings with server-side prepared statements and updatable result sets. (Bug #7715)

  • 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 passing emulateUnsupportedPstmts=false in your JDBC URL. (Bug #4718)

  • Emulated locators corrupt binary data when using server-side prepared statements. (Bug #8096)

  • Added enableStreamingResults() to Statement for connection pool implementations that check Statement.setFetchSize() for specification-compliant values. Call Statement.setFetchSize(>=0) to disable the streaming results for that statement. (Bug #8424)

  • Added dontTrackOpenResources option (default is false, to be JDBC compliant), which helps with memory use for nonwell-behaved apps (that is, applications that don't close Statement objects when they should). (Bug #4718)

  • Fixed NPE in ResultSet.realClose() when using usage advisor and result set was already closed. (Bug #8428)

  • ResultSet.getBigDecimal() throws exception when rounding would need to occur to set scale. The driver now chooses a rounding mode of half up if nonrounding BigDecimal.setScale() fails. (Bug #8424)

  • Send correct value for boolean true to server for PreparedStatement.setObject(n, "true", Types.BIT). (Bug #4718)

  • Timestamp key column data needed _binary stripped for UpdatableResultSet.refreshRow(). (Bug #7686)

  • PreparedStatements not creating streaming result sets. (Bug #8487)

  • ResultSet.getString() doesn't maintain format stored on server, bug fix only enabled when noDatetimeStringSync property is set to true (the default is false). (Bug #8428)

  • Fixed bug with Connection not caching statements from prepareStatement() when the statement wasn't a server-side prepared statement. (Bug #4718)

  • Don't pass NULL to String.valueOf() in ResultSet.getNativeConvertToString(), as it stringifies it (that is, returns null), which is not correct for the method in question. (Bug #8487)

D.5.3.10. Changes in MySQL Connector/J 3.1.6 (2004-12-23)

Bugs Fixed

  • DBMD.getProcedures() doesn't respect catalog parameter. (Bug #7026)

  • Fixed hang on SocketInputStream.read() with Statement.setMaxRows() and multiple result sets when driver has to truncate result set directly, rather than tacking a LIMIT n on the end of it.

D.5.3.11. Changes in MySQL Connector/J 3.1.5 (2004-12-02)

Bugs Fixed

  • Removed unwanted new Throwable() in ResultSet constructor 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)

  • Use 1MB packet for sending file for LOAD DATA LOCAL INFILE if that is < max_allowed_packet on server. (Bug #6537)

  • Use our own implementation of buffered input streams to get around blocking behavior of java.io.BufferedInputStream. Disable this with useReadAheadInput=false. (Bug #6399)

  • 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 to false by default). For some usecase/jvm combinations, this is friendlier on the garbage collector. (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)

  • Make auto-deserialization of java.lang.Objects stored in BLOB columns configurable using autoDeserialize property (defaults to false). (Bug #6399)

  • Don't throw exceptions for Connection.releaseSavepoint(). (Bug #5706)

  • ServerSidePreparedStatement allocating short-lived objects unnecessarily. (Bug #6225)

  • Inefficient detection of pre-existing string instances in ResultSet.getNativeString(). (Bug #5706)

  • UNSIGNED BIGINT unpacked incorrectly from server-side prepared statement result sets. (Bug #5729)

  • Use null-safe-equals for key comparisons in updatable result sets. (Bug #6225)

  • Fix comparisons made between string constants and dynamic strings that are converted with either toUpperCase() or toLowerCase() to use Locale.ENGLISH, as some locales override case rules for English. Also use StringUtils.indexOfIgnoreCase() instead of .toUpperCase().indexOf(), avoids creating a very short-lived transient String instance.

  • 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() a socket.connect(). (Bug #6348)

  • ResultSetMetaData.getColumnDisplaySize() returns incorrect values for multi-byte charsets. (Bug #6399)

  • SUM() on DECIMAL with server-side prepared statement ignores scale if zero-padding is needed (this ends up being due to conversion to DOUBLE by server, which when converted to a string to parse into BigDecimal, loses all padding zeros). (Bug #6537)

  • Use a per-session Calendar instance by default when decoding dates from ServerPreparedStatements (set to old, less performant behavior by setting property dynamicCalendars=true). (Bug #5706)

  • Handle case when string representation of timestamp contains trailing . with no numbers following it. (Bug #5235)

  • Use DatabaseMetaData.getIdentifierQuoteString() when building DBMD queries. (Bug #6537)

  • Re-work Field.isOpaqueBinary() to detect CHAR(n) CHARACTER SET BINARY to support fixed-length binary fields for ResultSet.getObject(). (Bug #6399)

  • Server-side prepared statements did not honor zeroDateTimeBehavior property, and would cause class-cast exceptions when using ResultSet.getObject(), as the all-zero string was always returned. (Bug #5235)

  • Fixed too-early creation of StringBuffer in EscapeProcessor.escapeSQL(), also return String when escaping not needed (to avoid unnecessary object allocations). Found while profiling for Bug #6359. (Bug #6225)

D.5.3.12. Changes in MySQL Connector/J 3.1.4 (2004-09-04)

Bugs Fixed

  • Fixed ServerPreparedStatement to read prepared statement metadata off the wire, even though it is currently a placeholder instead of using MysqlIO.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 with ServerPreparedStatements throwing ArrayIndexOutOfBoundExceptions. (Bug #5032)

  • Optimized integer number parsing, enable old slower integer parsing using JDK classes using useFastIntParsing=false property. (Bug #4642)

  • 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 previous null was returned. (Bug #4689)

  • Added three ways to deal with all-zero datetimes when reading them from a ResultSet: exception (the default), which throws an SQLException with an SQLState of S1009; convertToNull, which returns NULL instead of the date; and round, which rounds the date to the nearest closest value which is '0001-01-01'. (Bug #5032)

  • Added useOnlyServerErrorMessages property, 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 to true by default. (Bug #4642)

  • The driver is more strict about truncation of numerics on ResultSet.get*(), and will throw an SQLException when truncation is detected. You can disable this by setting jdbcCompliantTruncation to false (it is enabled by default, as this functionality is required for JDBC compliance). (Bug #5032)

  • ResultSet.getObject() returns wrong type for strings when using prepared statements. (Bug #4482)

  • ServerPreparedStatements dealing with return of DECIMAL type don't work. (Bug #5012)

  • Calling MysqlPooledConnection.close() twice (even though an application error), caused NPE. Fixed. (Bug #4482)

  • 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)

  • You can now use URLs in LOAD DATA LOCAL INFILE statements, 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 the allowUrlInLocalInfile connection property to true. (Bug #5032)

  • Added support in DatabaseMetaData.getTables() and getTableTypes() for views, which are now available in MySQL server 5.0.x. (Bug #4510)

  • ServerPreparedStatement.execute*() sometimes threw ArrayIndexOutOfBoundsException when unpacking field metadata. (Bug #4642)

  • ResultSet.getObject() doesn't return type Boolean for pseudo-bit types from prepared statements on 4.1.x (shortcut for avoiding extra type conversion when using binary-encoded result sets obscured test in getObject() 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)

D.5.3.13. Changes in MySQL Connector/J 3.1.3 (2004-07-07)

Bugs Fixed

  • Externalized more messages (on-going effort). (Bug #4119)

  • Support new time zone variables in MySQL-4.1.3 when useTimezone=true. (Bug #4311)

  • Added support for INOUT parameters in CallableStatements.

  • 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 enablePacketDebug property documentation). (Bug #4119)

  • Error in retrieval of mediumint column with prepared statements and binary protocol. (Bug #4311)

  • Use SQL Standard SQL states by default, unless useSqlStateCodes property is set to false. (Bug #4119)

  • Support for unsigned numerics as return types from prepared statements. This also causes a change in ResultSet.getObject() for the bigint unsigned type, which used to return BigDecimal instances, it now returns instances of java.lang.BigInteger. (Bug #4311)

  • Mangle output parameter names for CallableStatements so they will not clash with user variable names.

D.5.3.14. Changes in MySQL Connector/J 3.1.2 (2004-06-09)

Bugs Fixed

  • Fixed DatabaseMetaData.getProcedures() when run on MySQL-5.0.0 (output of SHOW PROCEDURE STATUS changed between 5.0.0 and 5.0.1. (Bug #3520)

  • 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.

  • Correctly map output parameters to position given in prepareCall() versus. order implied during registerOutParameter(). (Bug #3146)

  • Added connectionCollation property to cause driver to issue set collation_connection=... query on connection init if default collation for given charset is not appropriate. (Bug #3520)

  • ServerPreparedStatements weren't actually de-allocating server-side resources when .close() was called.

  • 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)

  • getProcedures() does not return any procedures in result set. (Bug #3539)

  • Fixed stored procedure parameter parsing info when size was specified for a parameter (for example, char(), varchar()).

  • Removed wrapping of exceptions in MysqlIO.changeUser().

  • getWarnings() returns SQLWarning instead of DataTruncation. (Bug #3804)

  • 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 logSlowQueries property, along with slowQueriesThresholdMillis property to control when a query should be considered slow.

  • Added .toString() functionality to ServerPreparedStatement, which should help if you're trying to debug a query that is a prepared statement (it shows SQL as the server would process).

  • Fixed sending of split packets for large queries, enabled nio ability to send large packets as well.

  • Enabled callable statement caching using cacheCallableStmts property.

  • Fixed case when no parameters could cause a NullPointerException in CallableStatement.setOutputParameters().

  • Added gatherPerformanceMetrics property, along with properties to control when/where this info gets logged (see docs for more info).

  • DBMD.getSQLStateType() returns incorrect value. (Bug #3520)

  • getProcedureColumns() doesn't work with wildcards for procedure name. (Bug #3540)

D.5.3.15. Changes in MySQL Connector/J 3.1.1 (2004-02-14, alpha)

Bugs Fixed

  • Fixed charset conversion issue in getTables(). (Bug #2502)

  • Fixed ConnectionProperties that weren't properly exposed through accessors, cleaned up ConnectionProperties code. (Bug #2623)

  • Prepared Statements will be re-prepared on auto-reconnect. Any errors encountered are postponed until first attempt to re-execute the re-prepared statement.

  • Reduced number of methods called in average query to be more efficient.

  • Refactored how connection properties are set and exposed as DriverPropertyInfo as well as Connection and DataSource properties.

  • Fixed stack overflow in Connection.prepareCall() (bad merge).

  • Enabled streaming of result sets from server-side prepared statements. (Bug #2606)

  • Allow contents of PreparedStatement.setBlob() to be retained between calls to .execute*().

  • Fixed IllegalAccessError to Calendar.getTimeInMillis() in DateTimeValue (for JDK < 1.4).

  • Default result set type changed to TYPE_FORWARD_ONLY (JDBC compliance).

  • Fixed bug with UpdatableResultSets not using client-side prepared statements.

  • Class-cast exception when using scrolling result sets and server-side prepared statements. (Bug #2623)

  • 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)

  • Centralized setting of result set type and concurrency.

  • Implemented Connection.prepareCall(), and DatabaseMetaData. getProcedures() and getProcedureColumns(). (Bug #2359)

  • Implemented multiple result sets returned from a statement or stored procedure. (Bug #2502)

  • Fixed NullPointerException in ServerPreparedStatement.setTimestamp(), as well as year and month discrepencies in ServerPreparedStatement.setTimestamp(), setDate(). (Bug #1673)

  • 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).

  • Support old profileSql capitalization in ConnectionProperties. This property is deprecated, you should use profileSQL if possible.

  • Added ability to have multiple database/JVM targets for compliance and regression/unit tests in build.xml. (Bug #1673)

  • Support for transaction savepoints (MySQL >= 4.0.14 or 4.1.1).

  • Check for closed connection on delete/update/insert row operations in UpdatableResultSet.

  • Support for NIO. Use useNIO=true on platforms that support NIO.

  • Fixed sending of queries larger than 16M. (Bug #1673)

  • Use DocBook version of docs for shipped versions of drivers. (Bug #2671)

  • Merged fix of data type mapping from MySQL type FLOAT to java.sql.Types.REAL from 3.0 branch. (Bug #1673)

  • Merged prepared statement caching, and .getMetaData() support from 3.0 branch. (Bug #2359)

  • Fixed NPE and year/month bad conversions when accessing some datetime functionality in ServerPreparedStatements and their resultant result sets. (Bug #1673)

  • Removed useFastDates connection property.

  • Added named and indexed input/output parameter support to CallableStatement. MySQL-5.0.x or newer. (Bug #1673)

  • Fixed off-by-1900 error in some cases for years in TimeUtil.fastDate/TimeCreate() when unpacking results from server-side prepared statements. (Bug #2359)

  • Support for mysql_change_user(). See the changeUser() method in com.mysql.jdbc.Connection.

  • DatabaseMetaData now reports supportsStoredProcedures() for MySQL versions >= 5.0.0

  • Deal with 0-length tokens in EscapeProcessor (caused by callable statement escape syntax).

  • Reset long binary parameters in ServerPreparedStatement when clearParameters() is called, by sending COM_RESET_STMT to the server. (Bug #2359)

  • Server-side prepared statements were not returning data type YEAR correctly. (Bug #2606)

  • NULL fields were not being encoded correctly in all cases in server-side prepared statements. (Bug #2671)

  • Implemented long data (Blobs, Clobs, InputStreams, Readers) for server prepared statements.

  • Correctly initialize datasource properties from JNDI Refs, including explicitly specified URLs.

  • Ensure that warnings are cleared before executing queries on prepared statements, as-per JDBC spec (now that we support warnings).

  • Implemented Statement.getWarnings() for MySQL-4.1 and newer (using SHOW WARNINGS).

  • Unpack unknown data types from server prepared statements as Strings.

  • NULL values for numeric types in binary encoded result sets causing NullPointerExceptions. (Bug #2359)

  • CommunicationsException implemented, that tries to determine why communications was lost with a server, and displays possible reasons when .getMessage() is called. (Bug #1673)

  • Fixed rare buffer underflow when writing numbers into buffers for sending prepared statement execution requests. (Bug #2671)

  • Fix support for table aliases when checking for all primary keys in UpdatableResultSet.

  • Optimized Buffer.readLenByteArray() to return shared empty byte array when length is 0.

  • Detect collation of column for RSMD.isCaseSensitive(). (Bug #1673)

  • Merged unbuffered input code from 3.0. (Bug #2623)

D.5.3.16. Changes in MySQL Connector/J 3.1.0 (2003-02-18, alpha)

Bugs Fixed

  • Track open Statements, close all when Connection.close() is called (JDBC compliance).

  • Added requireSSL property.

  • Added useServerPrepStmts property (default false). The driver will use server-side prepared statements when the server version supports them (4.1 and newer) when this property is set to true. It is currently set to false by default until all bind/fetch functionality has been implemented. Currently only DML prepared statements are implemented for 4.1 server-side prepared statements.

D.5.4. Changes in MySQL Connector/J 3.0

D.5.4.1. Changes in MySQL Connector/J 3.0.17 (2005-06-23)

Bugs Fixed

  • PreparedStatement.fixDecimalExponent() adding extra +, making number unparseable by MySQL server. (Bug #7061)

  • Workaround for server Bug #9098: Default values of CURRENT_* for DATE, TIME, DATETIME, and TIMESTAMP columns can't be distinguished from string values, so UpdatableResultSet.moveToInsertRow() generates bad SQL for inserting default values. (Bug #8812)

  • Handle streaming result sets with more than 2 billion rows properly by fixing wraparound of row number counter. (Bug #7601)

  • Fixed duplicated code in configureClientCharset() that prevented useOldUTF8Behavior=true from working properly. (Bug #7952)

  • Statements created from a pooled connection were returning physical connection instead of logical connection when getConnection() was called. (Bug #7316)

  • MS932, SHIFT_JIS, and Windows_31J not recognized as aliases for sjis. (Bug #7607)

  • EUCKR charset is sent as SET NAMES euc_kr which MySQL-4.1 and newer doesn't understand. (Bug #8629)

  • Support new protocol type MYSQL_TYPE_VARCHAR. (Bug #7081)

  • Connections starting up failed-over (due to down master) never retry master. (Bug #6966)

  • PreparedStatements don't encode Big5 (and other multi-byte) character sets correctly in static SQL strings. (Bug #7033)

  • PreparedStatement.fixDecimalExponent() adding extra +, making number unparseable by MySQL server. (Bug #7601)

  • Backported SQLState codes mapping from Connector/J 3.1, enable with useSqlStateCodes=true as a connection property, it defaults to false in this release, so that we don't break legacy applications (it defaults to true starting with Connector/J 3.1). (Bug #7686)

  • Added useOldUTF8Behavior' configuration property, which causes JDBC driver to act like it did with MySQL-4.0.x and earlier when the character encoding is utf-8 when connected to MySQL-4.1 or newer. (Bug #7081)

  • Escape sequence {fn convert(..., type)} now supports ODBC-style types that are prepended by SQL_. (Bug #7601)

  • Added support for the EUC_JP_Solaris character encoding, which maps to a MySQL encoding of eucjpms (backported from 3.1 branch). This only works on servers that support eucjpms, namely 5.0.3 or later. (Bug #8629)

  • NON_UNIQUE column from DBMD.getIndexInfo() returned inverted value. (Bug #8812)

  • Use hex escapes for PreparedStatement.setBytes() for double-byte charsets including aliases Windows-31J, CP934, MS932. (Bug #8629)

  • Timestamp key column data needed _binary stripped for UpdatableResultSet.refreshRow(). (Bug #7686)

  • DatabaseMetaData.getIndexInfo() ignored unique parameter. (Bug #7081)

  • 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)

  • Timestamp/Time conversion goes in the wrong direction when useTimeZone=true and server time zone differs from client time zone. (Bug #5874)

  • Adding CP943 to aliases for sjis. (Bug #6549, Bug #7607)

D.5.4.2. Changes in MySQL Connector/J 3.0.16 (2004-11-15)

Bugs Fixed

  • Made TINYINT(1) -> BIT/Boolean conversion configurable using tinyInt1isBit property (default true to be JDBC compliant out of the box). (Bug #5664)

  • Re-issue character set configuration commands when re-using pooled connections or Connection.changeUser() when connected to MySQL-4.1 or newer.

  • Off-by-one bug in Buffer.readString(string). (Bug #5664)

  • ResultSet.updateByte() when on insert row throws ArrayOutOfBoundsException. (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.

  • Fixed regression where useUnbufferedInput was defaulting to false. (Bug #5664)

  • ResultSet.getTimestamp() on a column with TIME in it fails. (Bug #5664)

  • Fixed DatabaseMetaData.getTypes() returning incorrect (this is, nonnegative) scale for the NUMERIC type. (Bug #5664)

  • Only set character_set_results during connection establishment if server version >= 4.1.1. (Bug #5664)

D.5.4.3. Changes in MySQL Connector/J 3.0.15 (2004-09-04)

Bugs Fixed

  • Calling .close() twice on a PooledConnection causes NPE. (Bug #4808)

  • Production is now GA (General Availability) in naming scheme of distributions. (Bug #4860, Bug #4138)

  • DOUBLE mapped twice in DBMD.getTypeInfo(). (Bug #4742)

  • StringUtils.escapeEasternUnicodeByteStream was still broken for GBK. (Bug #4010)

  • Removed redundant calls to checkRowPos() in ResultSet. (Bug #4334)

  • DBMD.getColumns() returns incorrect JDBC type for unsigned columns. This affects type mappings for all numeric types in the RSMD.getColumnType() and RSMD.getColumnTypeNames() methods as well, to ensure that like types from DBMD.getColumns() match up with what RSMD.getColumnType() and getColumnTypeNames() return. (Bug #4860, Bug #4138)

  • ResultSet.getMetaData() should not return incorrectly initialized metadata if the result set has been closed, but should instead throw an SQLException. Also fixed for getRow() and getWarnings() and traversal methods by calling checkClosed() before operating on instance-level fields that are nullified during .close(). (Bug #5069)

  • 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 of RSMD.getColumnType() and RSMD.getColumnTypeName() for the BLOB types based on the length sent from the server (the server doesn't distinguish between TINYBLOB, BLOB, MEDIUMBLOB or LONGBLOB at the network protocol level). (Bug #4880)

  • Added FLOSS license exemption. (Bug #4742)

  • ResultSet should release Field[] instance in .close(). (Bug #5022)

  • Failover for autoReconnect not using port numbers for any hosts, and not retrying all hosts.

    Warning

    This required a change to the SocketFactory connect() method signature, which is now public 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)

  • Use _binary introducer for PreparedStatement.setBytes() and set*Stream() when connected to MySQL-4.1.x or newer to avoid misinterpretation during character conversion. (Bug #5069)

  • Logical connections created by MysqlConnectionPoolDataSource will now issue a rollback() when they are closed and sent back to the pool. If your application server/connection pool already does this for you, you can set the rollbackOnPooledClose property to false to avoid the overhead of an extra rollback(). (Bug #4334)

  • Parse new time zone variables from 4.1.x servers. (Bug #5069)

D.5.4.4. Changes in MySQL Connector/J 3.0.14 (2004-05-28)

Bugs Fixed

  • Fixed URL parsing error.

D.5.4.5. Changes in MySQL Connector/J 3.0.13 (2004-05-27)

Bugs Fixed

  • Using a MySQLDatasource without server name fails. (Bug #3848)

  • PreparedStatement.getGeneratedKeys() method returns only 1 result for batched insertions. (Bug #3873)

  • No Database Selected when using MysqlConnectionPoolDataSource. (Bug #3920)

D.5.4.6. Changes in MySQL Connector/J 3.0.12 (2004-05-18)

Bugs Fixed

  • Backported change user and reset server state functionality from 3.1 branch, to enable clients of MysqlConnectionPoolDataSource to reset server state on getConnection() on a pooled connection.

  • Made StringRegressionTest 4.1-unicode aware. (Bug #3520)

  • Use SET character_set_results during initialization to enable any charset to be returned to the driver for result sets. (Bug #2670)

  • Fixed regression in PreparedStatement.setString() and eastern character encodings. (Bug #3520)

  • Don't truncate BLOB or CLOB values when using setBytes() and setBinary/CharacterStream(). (Bug #2670)

  • Map duplicate key and foreign key errors to SQLState of 23000.

  • Allow java.util.Date to be sent in as parameter to PreparedStatement.setObject(), converting it to a Timestamp to maintain full precision. . (Bug #103)

  • Add unsigned attribute to DatabaseMetaData.getColumns() output in the TYPE_NAME column.

  • Not specifying database in URL caused MalformedURL exception. (Bug #3554)

  • Added failOverReadOnly property, to enable the user to configure the state of the connection (read-only/writable) when failed over.

  • Dynamically configure character set mappings for field-level character sets on MySQL-4.1.0 and newer using SHOW COLLATION when connecting. (Bug #2670)

  • Map binary character set to US-ASCII to support DATETIME charset recognition for servers >= 4.1.2. (Bug #2670)

  • 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)

  • Auto-convert MySQL encoding names to Java encoding names if used for characterEncoding property. (Bug #3554)

  • Backport documentation tooling from 3.1 branch.

  • Use junit.textui.TestRunner for all unit tests (to enable them to be run from the command line outside of Ant or Eclipse). (Bug #3554)

  • Renamed StringUtils.escapeSJISByteStream() to more appropriate escapeEasternUnicodeByteStream(). (Bug #3511)

  • Use charsetnr returned during connect to encode queries before issuing SET NAMES on MySQL >= 4.1.0. (Bug #2670)

  • StringUtils.escapeSJISByteStream() not covering all eastern double-byte charsets correctly. (Bug #3511)

  • DBMD.getSQLStateType() returns incorrect value. (Bug #3520)

  • Add helper methods to ResultSetMetaData (getColumnCharacterEncoding() and getColumnCharacterSet()) to permit end users to see what charset the driver thinks it should be using for the column. (Bug #2670)

  • Don't escape SJIS/GBK/BIG5 when using MySQL-4.1 or newer.

  • Added encoding names that are recognized on some JVMs to fix case where they were reverse-mapped to MySQL encoding names incorrectly. (Bug #3554)

  • Only set character_set_results for MySQL >= 4.1.0. (Bug #2670)

  • Return creating statement for ResultSets created by getGeneratedKeys(). (Bug #2957)

  • UpdatableResultSet not picking up default values for moveToInsertRow(). (Bug #3557)

  • Allow url parameter for MysqlDataSource and MysqlConnectionPool DataSource so that passing of other properties is possible from inside appservers.

D.5.4.7. Changes in MySQL Connector/J 3.0.11 (2004-02-19)

Bugs Fixed

  • Return java.lang.Integer for TINYINT and SMALLINT types from ResultSetMetaData.getColumnClassName(). (Bug #2852)

  • Return java.lang.Double for FLOAT type from ResultSetMetaData.getColumnClassName(). (Bug #2855)

  • Added useUnbufferedInput parameter, and now use it by default (due to JVM issue http://developer.java.sun.com/developer/bugParade/bugs/4401235.html) (Bug #2578)

  • AutoReconnect time was growing faster than exponentially. (Bug #2447)

  • Fixed failover always going to last host in list. (Bug #2578)

  • Detect on/off or 1, 2, 3 form of lower_case_table_names value on server. (Bug #2578)

  • Return [B instead of java.lang.Object for BINARY, VARBINARY and LONGVARBINARY types from ResultSetMetaData.getColumnClassName() (JDBC compliance). (Bug #2855)

  • Issue connection events on all instances created from a ConnectionPoolDataSource. (Bug #2855)

  • Trigger a SET NAMES utf8 when encoding is forced to utf8 or utf-8 using the characterEncoding property. Previously, only the Java-style encoding name of utf-8 would trigger this.

D.5.4.8. Changes in MySQL Connector/J 3.0.10 (2004-01-13)

Bugs Fixed

  • Fixed regression of Statement.getGeneratedKeys() and REPLACE statements. (Bug #1576)

  • Implement ResultSet.updateClob(). (Bug #1913)

  • Enable caching of the parsing stage of prepared statements using the cachePrepStmts, prepStmtCacheSize, and prepStmtCacheSqlLimit properties (disabled by default). (Bug #2006)

  • Foreign Keys column sequence is not consistent in DatabaseMetaData.getImported/Exported/CrossReference(). (Bug #1731)

  • Subsequent call to ResultSet.updateFoo() causes NPE if result set is not updatable. (Bug #1630)

  • Backported fix for aliased tables and UpdatableResultSets in checkUpdatability() method from 3.1 branch. (Bug #1534)

  • Fixed security exception when used in Applets (applets can't read the system property file.encoding which is needed for LOAD DATA LOCAL INFILE). (Bug #2006)

  • Speed up parsing of PreparedStatements, try to use one-pass whenever possible. (Bug #2006)

  • Support escape sequence {fn convert ... }. (Bug #1914)

  • Autoreconnect code didn't set catalog upon reconnect if it had been changed. (Bug #1913)

  • 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)

  • ResultSet.getObject() on TINYINT and SMALLINT columns should return Java type Integer. (Bug #1913)

  • ArrayIndexOutOfBounds when parameter number == number of parameters + 1. (Bug #1958)

  • Added more descriptive error message Server Configuration Denies Access to DataSource, as well as retrieval of message from server. (Bug #1913)

  • Friendlier exception message for PacketTooLargeException. (Bug #1534)

  • Don't count quoted IDs when inside a 'string' in PreparedStatement parsing. (Bug #1511)

  • 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 in SELECT query (JDBC-compliance). (Bug #2006)

  • maxRows property 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)

  • Barge blobs and split packets not being read correctly. (Bug #1576)

  • ResultSetMetaData.isCaseSensitive() returned wrong value for CHAR/VARCHAR columns. (Bug #1913)

  • DatabaseMetaData.getSystemFunction() returning bad function VResultsSion. (Bug #1775)

  • Use constants for SQLStates. (Bug #2006)

  • 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)

  • Statements being created too many times in DBMD.extractForeignKeyFromCreateTable(). (Bug #1925)

  • Map charset ko18_ru to ko18r when connected to MySQL-4.1.0 or newer. (Bug #2006)

  • Fix for ArrayIndexOutOfBounds exception when using Statement.setMaxRows(). (Bug #1695)

  • Connection property maxRows not honored. (Bug #1933)

  • Added alwaysClearStream connection property, which causes the driver to always empty any remaining data on the input stream before each query. (Bug #1913)

  • DatabaseMetaData.getColumns() should return Types.LONGVARCHAR for MySQL LONGTEXT type. (Bug #1592)

  • Ensure that Buffer.writeString() saves room for the \0. (Bug #2006)

D.5.4.9. Changes in MySQL Connector/J 3.0.9 (2003-10-07)

Bugs Fixed

  • Issue exception on ResultSet.getXXX() on empty result set (wasn't caught in some cases). (Bug #848)

  • Made databaseName, portNumber, and serverName optional parameters for MysqlDataSourceFactory. (Bug #1246)

  • ResultSet.get/setString mashing char 127. (Bug #1247)

  • Double-escaping of '\' when charset is SJIS or GBK and '\' appears in nonescaped input. (Bug #879)

  • Don't hide messages from exceptions thrown in I/O layers. (Bug #848)

  • Support InnoDB constraint names when extracting foreign key information in DatabaseMetaData (implementing ideas from Parwinder Sekhon). (Bug #664, Bug #517)

  • Fixed CLOB.truncate(). (Bug #1130)

  • Fixed ResultSet.previous() behavior to move current position to before result set when on first row of result set. (Bug #496)

  • 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)

  • Fixed Statement and PreparedStatement issuing bogus queries when setMaxRows() had been used and a LIMIT clause was present in the query. (Bug #496)

  • Added property to clobber streaming results, by setting the clobberStreamingResults property to true (the default is false). This will cause a streaming ResultSet to 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)

  • 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)

  • Fixed deadlock issue with Statement.setMaxRows(). (Bug #1099)

  • Don't wrap SQLExceptions in RowDataDynamic. (Bug #688)

  • Added com.mysql.jdbc.util.BaseBugReport to help creation of testcases for bug reports. (Bug #1247)

  • 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 try and reset isolation level on reconnect if MySQL doesn't support them. (Bug #688)

  • DatabaseMetaData.getColumns() getting confused about the keyword set in character columns. (Bug #1099)

  • Fixed regression in large split-packet handling. (Bug #848)

  • Fixed test for end of buffer in Buffer.readString().

  • The insertRow in an UpdatableResultSet is now loaded with the default column values when moveToInsertRow() is called. (Bug #688)

  • Better diagnostic error messages in exceptions for streaming result sets. (Bug #848)

  • Backported authentication changes for 4.1.1 and newer from 3.1 branch. (Bug #1247)

  • DatabaseMetaData.getColumns() wasn't returning NULL for default values that are specified as NULL. (Bug #688)

  • Don't change timestamp TZ twice if useTimezone==true. (Bug #774)

  • refreshRow didn't work when primary key values contained values that needed to be escaped (they ended up being doubly escaped). (Bug #661)

  • Fix UpdatableResultSet to return values for getXXX() when on insert row. (Bug #675)

  • Don't fire connection closed events when closing pooled connections, or on PooledConnection.getConnection() with already open connections. (Bug #884)

  • Change default statement type/concurrency to TYPE_FORWARD_ONLY and CONCUR_READ_ONLY (spec compliance). (Bug #688)

  • Faster date handling code in ResultSet and PreparedStatement (no longer uses Date methods that synchronize on static calendars).

  • Optimized CLOB.setChracterStream(). (Bug #1131)

D.5.4.10. Changes in MySQL Connector/J 3.0.8 (2003-05-23)

Bugs Fixed

  • Fixed SJIS encoding bug, thanks to Naoto Sato. (Bug #378)

  • Allow bogus URLs in Driver.getPropertyInfo().

  • 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 REPLACE statements. (Bug #378)

  • Unicode character 0xFFFF in a string would cause the driver to throw an ArrayOutOfBoundsException. . (Bug #378)

  • Return list of generated keys when using multi-value INSERTS with Statement.getGeneratedKeys().

  • Fixed result set not getting set for Statement.executeUpdate(), which affected getGeneratedKeys() and getUpdateCount() in some cases.

  • Changed Ant target compile-core to compile-driver, and made testsuite compilation a separate target.

  • Fix infinite loop with Connection.cleanup().

  • Fix row data decoding error when using very large packets. (Bug #378)

  • Optimized row data decoding. (Bug #378)

  • Use JVM charset with file names and LOAD DATA [LOCAL] INFILE.

  • Issue exception when operating on an already closed prepared statement. (Bug #378)

  • Optimized usage of EscapeProcessor. (Bug #378)

D.5.4.11. Changes in MySQL Connector/J 3.0.7 (2003-04-08)

Bugs Fixed

  • Throw SQLExceptions when trying to do operations on a forcefully closed Connection (that is, when a communication link failure occurs).

  • Fixed ResultSet.getTimestamp() when underlying field is of type DATE.

  • Fixed escaping of 0x5c ('\') character for GBK and Big5 charsets.

  • Don't reset Connection.isReadOnly() when autoReconnecting.

  • Ensure that packet size from alignPacketSize() does not exceed max_allowed_packet (JVM bug)

  • Don't pick up indexes that start with pri as primary keys for DBMD.getPrimaryKeys().

  • Fixed LOAD DATA LOCAL INFILE bug when file > max_allowed_packet.

  • Updatable ResultSets can now be created for aliased tables/columns when connected to MySQL-4.1 or newer.

  • Fixed missing conversion for YEAR type in ResultSetMetaData.getColumnTypeName().

  • Remove synchronization from Driver.connect() and Driver.acceptsUrl().

  • IOExceptions during a transaction now cause the Connection to be closed.

  • Fixed StringIndexOutOfBoundsException in PreparedStatement.setClob().

  • Fixed MysqlPooledConnection.close() calling wrong event type.

  • 4.1 Column Metadata fixes.

  • You can now toggle profiling on/off using Connection.setProfileSql(boolean).

  • Fixed charset issues with database metadata (charset was not getting set correctly).

D.5.4.12. Changes in MySQL Connector/J 3.0.6 (2003-02-18)

Bugs Fixed

  • Add window of different NULL sorting behavior to DBMD.nullsAreSortedAtStart (4.0.2 to 4.0.10, true; otherwise, no).

  • Implemented Blob.setBytes(). You still need to pass the resultant Blob back into an updatable ResultSet or PreparedStatement to persist the changes, because MySQL does not support locators.

  • More checks added in ResultSet traversal method to catch when in closed state.

  • Fixed ResultSetMetaData.isWritable() to return correct value.

  • Clean up Statement query/method mismatch tests (that is, INSERT not permitted with .executeQuery()).

  • Allow ignoring of warning for non transactional tables during rollback (compliance/usability) by setting ignoreNonTxTables property to true.

  • Fixed ResultSetMetaData to return "" when catalog not known. Fixes NullPointerExceptions with Sun's CachedRowSet.

  • Fixed SQLExceptions getting swallowed on initial connect.

  • Fixed DBMD.getTypeInfo() and DBMD.getColumns() returning different value for precision in TEXT and BLOB types.

  • Fixed Statement.setMaxRows() to stop sending LIMIT type queries when not needed (performance).

  • Backported 4.1 charset field info changes from Connector/J 3.1.

D.5.4.13. Changes in MySQL Connector/J 3.0.5 (2003-01-22)

Bugs Fixed

  • Greatly reduce memory required for setBinaryStream() in PreparedStatements.

  • Retrieve TX_ISOLATION from database for Connection.getTransactionIsolation() when the MySQL version supports it, instead of an instance variable.

  • Quote table names in DatabaseMetaData.getColumns(), getPrimaryKeys(), getIndexInfo(), getBestRowIdentifier().

  • Fixed Buffer.fastSkipLenString() causing ArrayIndexOutOfBounds exceptions with some queries when unpacking fields.

  • Added update options for foreign key metadata.

  • Implemented an empty TypeMap for Connection.getTypeMap() so that some third-party apps work with MySQL (IBM WebSphere 5.0 Connection pool).

  • Added missing LONGTEXT type to DBMD.getColumns().

  • Fixed ResultSet.isBeforeFirst() for empty result sets.

D.5.4.14. Changes in MySQL Connector/J 3.0.4 (2003-01-06)

Bugs Fixed

  • Added support for quoted identifiers in PreparedStatement parser.

  • Added strictUpdates property to enable control of amount of checking for correctness of updatable result sets. Set this to false if you want faster updatable result sets and you know that you create them from SELECT statements on tables with primary keys and that you have selected all primary keys in your query.

  • Reduce memory footprint of PreparedStatements by sharing outbound packet with MysqlIO.

  • Added support for 4.0.8-style large packets.

  • Added quoted identifiers to database names for Connection.setCatalog.

  • Fixed PreparedStatement.executeBatch() parameter overwriting.

  • Streamlined character conversion and byte[] handling in PreparedStatements for setByte().

D.5.4.15. Changes in MySQL Connector/J 3.0.3 (2002-12-17)

Bugs Fixed

  • Changed SingleByteCharConverter to use lazy initialization of each converter.

  • Fixed ResultSetMetaData.getPrecision() returning incorrect values for some floating-point types.

  • Check for connection closed in more Connection methods (createStatement, prepareStatement, setTransactionIsolation, setAutoCommit).

  • Some MySQL-4.1 protocol support (extended field info from selects).

  • More robust implementation of updatable result sets. Checks that all primary keys of the table have been selected.

  • DBMD.getImported/ExportedKeys() now handles multiple foreign keys per table.

  • Honor lower_case_table_names when enabled in the server when doing table name comparisons in DatabaseMetaData methods.

  • Added CLIENT_LONG_FLAG to be able to get more column flags (isAutoIncrement() being the most important).

  • Substitute '?' for unknown character conversions in single-byte character sets instead of '\0'.

  • Because of above, implemented ResultSetMetaData.isAutoIncrement() to use Field.isAutoIncrement().

  • Fixed charset handling in Fields.java.

  • Fixed ResultSetMetaData.getColumnTypeName() returning BLOB for TEXT and TEXT for BLOB types.

  • Implemented Connection.nativeSQL().

  • LOAD DATA LOCAL INFILE ... now works, if your server is configured to permit it. Can be turned off with the allowLoadLocalInfile property (see the README).

  • Use nonaliased table/column names and database names to fully qualify tables and columns in UpdatableResultSet (requires MySQL-4.1 or newer).

  • Changed charsToByte in SingleByteCharConverter to be nonstatic.

  • NamedPipeSocketFactory now works (only intended for Windows), see README for instructions.

  • Fixed Buffer.isLastDataPacket() for 4.1 and newer servers.

  • More robust escape tokenizer: Recognize -- comments, and permit nested escape sequences (see testsuite.EscapeProcessingTest).

  • Allow user to alter behavior of Statement/ PreparedStatement.executeBatch() using continueBatchOnError property (defaults to true).

D.5.4.16. Changes in MySQL Connector/J 3.0.2 (2002-11-08)

Bugs Fixed

  • Implemented Clob.truncate().

  • Properly restore connection properties when autoReconnecting or failing-over, including autoCommit state, and isolation level.

  • Fixed issue when calling Statement.setFetchSize() when using arbitrary values.

  • Added queriesBeforeRetryMaster property that specifies how many queries to issue when failed over before attempting to reconnect to the master (defaults to 50).

  • Fixed ResultSet.setFetchDirection(FETCH_UNKNOWN).

  • Added driver property useHostsInPrivileges. Defaults to true. Affects whether or not @hostname will be used in DBMD.getColumn/TablePrivileges.

  • Fixed ResultSet.isLast() for empty result sets (should return false).

  • Fixed various non-ASCII character encoding issues.

  • Added connectTimeout parameter that enables users of JDK-1.4 and newer to specify a maximum time to wait to establish a connection.

  • Fixed start position off-by-1 error in Clob.getSubString().

  • Fixed issue with updatable result sets and PreparedStatements not working.

  • PreparedStatement now honors stream lengths in setBinary/Ascii/Character Stream() unless you set the connection property useStreamLengthsInPrepStmts to false.

  • Escape 0x5c character in strings for the SJIS charset.

  • Removed some not-needed temporary object creation by smarter use of Strings in EscapeProcessor, Connection and DatabaseMetaData classes.

  • Implemented ResultSet.updateBlob().

  • Fixed incorrect conversion in ResultSet.getLong().

  • Fixed UnsupportedEncodingException thrown when forcing a character encoding using properties.

  • Removed duplicate code from UpdatableResultSet (it can be inherited from ResultSet, the extra code for each method to handle updatability I thought might someday be necessary has not been needed).

  • Implemented Clob.setAsciiStream().

  • Fixed DBMD.supportsResultSetConcurrency() so that it returns true for ResultSet.TYPE_SCROLL_INSENSITIVE and ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE.

  • Failover and autoReconnect work only when the connection is in an autoCommit(false) state, to stay transaction-safe.

  • Implemented Clob.setCharacterStream().

  • Use SHOW CREATE TABLE when possible for determining foreign key information for DatabaseMetaData. Also enables cascade options for DELETE information to be returned.

  • All DBMD result set columns describing schemas now return NULL to be more compliant with the behavior of other JDBC drivers for other database systems (MySQL does not support schemas).

  • Added SSL support. See README for information on how to use it.

  • Added com.mysql.jdbc.MiniAdmin class, which enables you to send shutdown command to MySQL server. This is intended to be used when embedding Java and MySQL server together in an end-user application.

  • Implemented Clob.setString().

D.5.4.17. Changes in MySQL Connector/J 3.0.1 (2002-09-21)

Bugs Fixed

  • Added paranoid parameter, 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.

  • Added LOCAL TEMPORARY to table types in DatabaseMetaData.getTableTypes().

  • Added socketTimeout parameter to URL.

  • Connection.close() issues rollback() when getAutoCommit() is false.

  • Connection.isClosed() no longer pings the server.

  • Added limited Clob functionality (ResultSet.getClob(), PreparedStatement.setClob(), PreparedStatement.setObject(Clob).

  • Implemented ResultSet.getCharacterStream().

  • Massive code clean-up to follow Java coding conventions (the time had come).

  • Fixed ResultSet.getRow() off-by-one bug.

  • Fixed RowDataStatic.getAt() off-by-one bug.

  • Fixed ResultSetMetaData.isSigned() for TINYINT and BIGINT.

  • Charsets now automatically detected. Optimized code for single-byte character set conversion.

D.5.4.18. Changes in MySQL Connector/J 3.0.0 (2002-07-31)

Bugs Fixed

  • Performance enhancements: Driver is now 50–100% faster in most situations, and creates fewer temporary objects.

  • !!! LICENSE CHANGE !!! The driver is now GPL.

  • Overall speed improvements using controlling transient object creation in MysqlIO class when reading packets.

  • JDBC-3.0 functionality including Statement/PreparedStatement.getGeneratedKeys() and ResultSet.getURL().

  • Performance improvements in string handling and field metadata creation (lazily instantiated) contributed by Alex Twisleton-Wykeham-Fiennes.

  • Better checking for closed connections in Statement and PreparedStatement.

  • Support for large packets (new addition to MySQL-4.0 protocol), see README for more information.

  • Repackaging: New driver name is com.mysql.jdbc.Driver, old name still works, though (the driver is now provided by MySQL-AB).

  • Added multi-host failover support (see README).

  • ResultSet.getDate/Time/Timestamp now recognizes all forms of invalid values that have been set to all zeros by MySQL (SF bug 586058).

  • JDBC Compliance: Passes all tests besides stored procedure tests.

  • Testsuite now uses Junit (which you can get from http://www.junit.org.

  • Support for streaming (row-by-row) result sets (see README) Thanks to Doron.

  • Float types now reported as java.sql.Types.FLOAT (SF bug 579573).

  • ResultSet.getTimestamp() now works for DATE types (SF bug 559134).

  • Fix and sort primary key names in DBMetaData (SF bugs 582086 and 582086).

  • The driver now only works with JDK-1.2 or newer.

  • General source-code cleanup.

D.5.5. Changes in MySQL Connector/J 2.0

D.5.5.1. Changes in MySQL Connector/J 2.0.14 (2002-05-16)

Bugs Fixed

  • Quoted identifiers not used if server version does not support them. Also, if server started with --ansi or --sql-mode=ANSI_QUOTES, " will be used as an identifier quote character, otherwise ' will be used.

  • More code cleanup.

  • PreparedStatement now releases resources on .close(). (SF bug 553268)

  • Added SQL profiling (to STDERR). Set profileSql=true in your JDBC URL. See README for more information.

  • LogicalHandle.isClosed() calls through to physical connection.

  • Fixed typo for relaxAutoCommit parameter.

  • ResultSet.getDouble() now uses code built into JDK to be more precise (but slower).

D.5.5.2. Changes in MySQL Connector/J 2.0.13 (2002-04-24)

Bugs Fixed

  • ResultSetMetaData.getColumnClassName() now implemented.

  • DBMetaData.getIndexInfo() - bad PAGES fixed. (SF BUG 542201)

  • 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).

  • More code cleanup.

  • PreparedStatement.toString() fixed. (SF bug 534026)

  • Added set/getPortNumber() to DataSource(s). (SF bug 548167)

  • Added setURL() to MySQLXADataSource. (SF bug 546019)

  • Faster blob escaping for PrepStmt.

  • Fixed unicode chars being read incorrectly. (SF bug 541088)

D.5.5.3. Changes in MySQL Connector/J 2.0.12 (2002-04-07)

Bugs Fixed

  • General code cleanup.

  • Fixed getRow() bug (527165) in ResultSet.

  • ResultSet.refreshRow() implemented.

  • Added getIdleFor() method to Connection and MysqlLogicalHandle.

  • Added getTable/ColumnPrivileges() to DBMD (fixes 484502).

  • ResultSet: Fixed updatability (values being set to null if not updated).

  • Fixes for ResultSet updatability in PreparedStatement.

  • Added support for YEAR type (533556).

  • DataSources - fixed setUrl bug (511614, 525565), wrong datasource class name (532816, 528767).

  • Relaxed synchronization in all classes, should fix 520615 and 520393.

  • 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.

  • Added support for BIT types (51870) to PreparedStatement.

  • Added identifier quoting to all DatabaseMetaData methods that need them (should fix 518108).

  • Fixed time zone off-by-1-hour bug in PreparedStatement (538286, 528785).

  • Added new types to getTypeInfo(), fixed existing types thanks to Al Davis and Kid Kalanon.

  • Fixed testsuite.Traversal afterLast() bug, thanks to Igor Lastric.

D.5.5.4. Changes in MySQL Connector/J 2.0.11 (2002-01-27)

Bugs Fixed

  • More changes to fix Unexpected end of input stream errors when reading BLOB values. This should be the last fix.

  • Fixed missing DELETE_RULE value in DBMD.getImported/ExportedKeys() and getCrossReference().

  • Full synchronization of Statement.java.

D.5.5.5. Changes in MySQL Connector/J 2.0.10 (2002-01-24)

Bugs Fixed

  • Fixed spurious Unexpected end of input stream errors in MysqlIO (bug 507456).

  • Fixed null-pointer-exceptions when using MysqlConnectionPoolDataSource with Websphere 4 (bug 505839).

D.5.5.6. Changes in MySQL Connector/J 2.0.9 (2002-01-13)

Bugs Fixed

  • 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).

  • Fixed off-by-one-hour error in PreparedStatement.setTimestamp() (bug 491577).

  • Implementation of DatabaseMetaData.getExported/ImportedKeys() and getCrossReference().

  • Report batch update support through DatabaseMetaData (bug 495101).

  • Ant build was corrupting included jar files, fixed (bug 487669).

  • 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 --ansi flag to use the || operator as concatenation (bug 491680).

  • Fixed quoting error with escape processor (bug 486265).

  • DataSource implementations moved to org.gjt.mm.mysql.jdbc2.optional package, and (initial) implementations of PooledConnectionDataSource and XADataSource are in place (thanks to Todd Wolff for the implementation and testing of PooledConnectionDataSource with IBM WebSphere 4).

  • Fixed casting bug in PreparedStatement (bug 488663).

  • Added detection of network connection being closed when reading packets (thanks to Todd Lizambri).

  • Fixed extra memory allocation in MysqlIO.readPacket() (bug 488663).

D.5.5.7. Changes in MySQL Connector/J 2.0.8 (2001-11-25)

Bugs Fixed

  • PreparedStatement.setAnyNumericType() now handles positive exponents correctly (adds + so MySQL can understand it).

  • Batch updates now supported (thanks to some inspiration from Daniel Rall).

  • DatabaseMetaData.getPrimaryKeys() and getBestRowIdentifier() are now more robust in identifying primary keys (matches regardless of case or abbreviation/full spelling of Primary Key in Key_type column).

  • XADataSource/ConnectionPoolDataSource code (experimental)

D.5.5.8. Changes in MySQL Connector/J 2.0.7 (2001-10-24)

Bugs Fixed

  • Fixed ResultSet.isAfterLast() always returning false.

  • PreparedStatement.setBoolean() will use 1/0 for values if your MySQL version is 3.21.23 or higher.

  • Updatable result sets now correctly handle NULL values in fields.

  • Fixed DatabaseMetaData.supportsTransactions(), and supportsTransactionIsolationLevel() and getTypeInfo() SQL_DATETIME_SUB and SQL_DATA_TYPE fields not being readable.

  • PreparedStatement.setDouble() now uses full-precision doubles (reverting a fix made earlier to truncate them).

  • Fixed time zone issue in PreparedStatement.setTimestamp(). (thanks to Erik Olofsson)

  • Fixed dangling socket problem when in high availability (autoReconnect=true) mode, and finalizer for Connection will close any dangling sockets on GC.

  • Fixed ResultSetMetaData.getPrecision() returning one less than actual on newer versions of MySQL.

  • ResultSet.getBlob() now returns null if column value was null.

  • Capitalize type names when capitalizeTypeNames=true is passed in URL or properties (for WebObjects. (thanks to Anjo Krank)

  • PreparedStatement.setCharacterStream() now implemented

  • Fixed PreparedStatement generating SQL that would end up with syntax errors for some queries.

  • Initial transaction isolation level read from database (if available). (thanks to Dmitry Vereshchagin)

  • Character sets read from database if useUnicode=true and characterEncoding is not set. (thanks to Dmitry Vereshchagin)

D.5.5.9. Changes in MySQL Connector/J 2.0.6 (2001-06-16)

Bugs Fixed

  • Fixed case-sensitive column names in ResultSet.java.

  • Fixed PreparedStatement parameter checking.

D.5.5.10. Changes in MySQL Connector/J 2.0.5 (2001-06-13)

Bugs Fixed

  • Fixed ResultSet.getBlob() ArrayIndex out-of-bounds.

  • Fixed NPE on PreparedStatement.executeUpdate() when all columns have not been set.

  • Fixed ArrayIndexOutOfBounds when sending large BLOB queries. (Max size packet was not being set)

  • Fixed ResultSetMetaData.getColumnTypeName for TEXT/BLOB.

  • getObject() on ResultSet correctly does TINYINT->Byte and SMALLINT->Short.

  • ResultSet has +/-Inf/inf support.

  • ResultSet.getBoolean() now recognizes -1 as true.

  • DataBaseMetaData.getCrossReference() no longer ArrayIndexOOB.

  • Added ISOLATION level support to Connection.setIsolationLevel()

  • Fixed data parsing of TIMESTAMP values with 2-digit years.

  • Added Byte to PreparedStatement.setObject().

  • ResultSet.insertRow() works now, even if not all columns are set (they will be set to NULL).

D.5.5.11. Changes in MySQL Connector/J 2.0.3 (2000-12-03)

Bugs Fixed

  • Implemented getBigDecimal() without scale component for JDBC2.

  • Added ultraDevHack URL parameter, set to true to enable (broken) Macromedia UltraDev to use the driver.

  • Added detection of -/+INF for doubles.

  • Fixed incorrect detection of MAX_ALLOWED_PACKET, so sending large blobs should work now.

  • Fixed off-by-one error in java.sql.Blob implementation code.

  • Faster ASCII string operations.

  • Fixed composite key problem with updatable result sets.

D.5.5.12. Changes in MySQL Connector/J 2.0.1 (2000-04-06)

Bugs Fixed

  • Fixed some issues with updatability support in ResultSet when using multiple primary keys.

  • No escape processing is done on PreparedStatements anymore per JDBC spec.

  • 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.

  • DatabaseMetaData.getPrimaryKeys() now works correctly with respect to key_seq. Thanks to Brian Slesinsky.

  • Fixed RSMD.isWritable() returning wrong value. Thanks to Moritz Maass.

  • Cleaned up exception handling when driver connects.

  • Columns that are of type TEXT now return as Strings when you use getObject().

D.5.5.13. Changes in MySQL Connector/J 2.0.0pre5 (21 February 2000)

  • Fixed Bad Handshake problem.

D.5.5.14. Changes in MySQL Connector/J 2.0.0pre4 (10 January 2000)

  • 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.

D.5.5.15. Changes in MySQL Connector/J 2.0.0pre (17 August 1999)

  • 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. Changes in MySQL Connector/J 1.2 and lower

D.5.6.1. Changes in MySQL Connector/J 1.2b (04 July 1999)

  • 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.

D.5.6.2. Changes in MySQL Connector/J 1.2a (14 April 1999)

  • 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)

D.5.6.3. Changes in MySQL Connector/J 1.1i (24 March 1999)

  • Fixed Timestamps for PreparedStatements

  • Fixed null pointer exceptions in RSMD and RS

  • Re-compiled with jikes for valid class files (thanks ms!)

D.5.6.4. Changes in MySQL Connector/J 1.1h (08 March 1999)

  • 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)

D.5.6.5. Changes in MySQL Connector/J 1.1g (19 February 1999)

  • 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().

D.5.6.6. Changes in MySQL Connector/J 1.1f (31 December 1998)

  • 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)

D.5.6.7. Changes in MySQL Connector/J 1.1b (03 November 1998)

  • 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.

D.5.6.8. Changes in MySQL Connector/J 1.1 (02 September 1998)

  • 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.

D.5.6.9. Changes in MySQL Connector/J 1.0 (24 August 1998)

  • 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).

D.5.6.10. Changes in MySQL Connector/J 0.9d (04 August 1998)

  • 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.

D.5.6.11. Changes in MySQL Connector/J 0.9 (28 July 1998)

  • 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.

D.5.6.12. Changes in MySQL Connector/J 0.8 (06 July 1998)

  • 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 <[email protected]> for pointing out the problem and working on a fix with me.

D.5.6.13. Changes in MySQL Connector/J 0.7 (01 July 1998)

  • Fixed DatabaseMetadata problems in getColumns() and bug in switch statement in the Field constructor. Thanks to Costin Manolache <[email protected]> for pointing these out.

D.5.6.14. Changes in MySQL Connector/J 0.6 (21 May 1998)

  • Incorporated efficiency changes from Richard Swift <[email protected]> in MysqlIO.java and ResultSet.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. MySQL Connector/C++ Change History

D.6.1. Changes in MySQL Connector/C++ 1.1

D.6.1.1. Changes in MySQL Connector/CPP 1.1.1 (2012-08-07, Generally Available)

This fixes bugs since the 1.1.0 release.

Functionality Added or Changed

  • Added MySQL_Connection::getLastStatementInfo() which returns back the value of the mysql_info() function of the MySQL Client Library (libmysql).

  • Added new method ResultSetMetaData::isNumeric() and implemented it in all classes that subclass from it.

  • URI format has been extended to better fit IPv6 addresses. You can now use [] to separate the host part of the URI.

  • Built against libmysql 5.5.27, enabling support of authentification plugins and IPv6.

Bugs Fixed

  • Compiling with Visual Studio 2010 could fail with compilation errors if the source contained a #include <stdint.h> line. The errors were typically of the form cannot convert from 'type1' to 'type2'. (Bug #14113387, Bug #60307)

  • DatabaseMetaData::getSQLKeywords() updated to match MySQL 5.5. Note that Connector/C++, just like Connector/J, returns the same list for every MySQL database version.

  • A statement that did not raise any warning could return warnings from a previously executed statement.

  • Fixed stores(Lower|Mixed)Case(Quoted)Identifiers methods.

D.6.1.2. Changes in MySQL Connector/CPP 1.1.0 (2010-09-13, Generally Available)

This fixes bugs since the first GA release 1.0.5 and introduces new features.

Functionality Added or Changed

  • Incompatible Change: API incompatible change: ConnectPropertyVal is no longer a struct by a typedef that uses boost::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);
  • Connection::getClientOption(const sql::SQLString & optionName, void * optionValue) now accepts the optionName values metadataUseInfoSchema, defaultStatementResultType, defaultPreparedStatementResultType, and characterSetResults. In the previous version only metadataUseInfoSchema was permitted. The same options are available for Connection::setClientOption().

  • 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 with LoadLibrary or dlopen. If you do not use CMake for building the source code you will need to define mysqlcppconn_EXPORTS if you are loading dynamically and want to use the get_driver_instance() entry point.

  • Connection map property OPT_RECONNECT was changed to be of type boolean from long long.

  • LDFLAGS, CXXFLAGS and CPPFLAGS are now checked from the environment for every binary generated.

  • Instances of std::auto_ptr have been changed to boost::scoped_ptr. Scoped array instances now use boost::scoped_array. Further, boost::shared_ptr and boost::weak_ptr are now used for guarding access around result sets.

Bugs Fixed

  • Using Prepared Statements caused corruption of the heap. (Bug #45048)

  • 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)

  • 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 bug in ResultSetMetaData for statements and prepared statements, getScale and getPrecision returned incorrect results.

  • Fixed a Prepared Statements performance issue. Reading large result sets was slow.

D.6.2. Changes in MySQL Connector/C++ 1.0

D.6.2.1. Changes in MySQL Connector/CPP 1.0.5 (2009-04-21)

This is the first Generally Available (GA) release.

Functionality Added or Changed

  • Added better support for named pipes, on Windows. Use pipe:// and add the path to the pipe. Shared memory connections are currently not supported.

  • Enabled tracing functionality when building with Microsoft Visual C++ 8 and later, which corresponds to Microsoft Visual Studio 2005 and later.

  • Added Result::getType(). Implemented for the three result set classes.

  • Added the option defaultStatementResultType to MySQL_Connection::setClientOption(). Also, the method now returns sql::Connection *.

  • Implemented getResultSetType() for PreparedStatement. The setter is not implemented because currently PreparedStatement cannot do refetching. Storing the result means the bind buffers will be correct.

  • Implemented getResultSetType() and setResultSetType() for Statement. Uses TYPE_FORWARD_ONLY, which means unbuffered result set and TYPE_SCROLL_INSENSITIVE, which means buffered result set.

  • Changed the return type of sql::SQLException::getSQLState() from std::string to const char * to be consistent with std::exception::what().

  • Changed the interface of sql::Driver and sql::Connection so they accept the options map by alias instead of by value.

  • Improved memory management. Potential memory leak situations are handled more robustly.

  • The interface of sql::ConnectionMetaData, sql::ResultSetMetaData and sql::ParameterMetaData was 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().

Bugs Fixed

  • A bug was fixed in MySQL_Connection::setSessionVariable(), which had been causing exceptions to be thrown.

D.6.2.2. Changes in MySQL Connector/CPP 1.0.4 (2009-03-31, beta)

Functionality Added or Changed

  • Introduced ResultSetMetaData::isZerofill(), which is not in the JDBC specification.

  • Added support for MySQL Connector/C.

  • Implemented MySQL_ConnectionMetaData::supportsConvert(from, to).

  • metadataUseInfoSchema was added to the connection property map, which enables control of the INFORMATION_SCHEMA for metadata.

  • Minimum CMake version required was changed from 2.4.2 to 2.6.2. The latest version is required for building on Windows.

  • An installer was added for the Windows operating system.

Bugs Fixed

  • A leak was fixed in MySQL_PreparedResultSet, which occurred when the result contained a BLOB column.

  • A bug was fixed in all implementations of ResultSet::relative() which was giving a wrong return value although positioning was working correctly.

D.6.2.3. Changes in MySQL Connector/CPP 1.0.3 (2009-03-02, alpha)

Functionality Added or Changed

  • Implemented MySQL_DatabaseMetaData::getCrossReference().

  • Implemented MySQL_DatabaseMetaData::getExportedKeys().

  • Improved the implementation for ResultSetMetaData::isReadOnly(). Values generated from views are read only. These generated values don't have db in MYSQL_FIELD set, while all normal columns do have.

  • Introduced ResultSet::getUInt() and ResultSet::getUInt64().

  • Renamed ResultSet::getLong() to ResultSet::getInt64(). resultset.h includes typdefs for Windows to be able to use int64_t.

  • Introduced, internally, sql::mysql::MyVal which has implicit constructors. Used in mysql_metadata.cpp to create result sets with native data instead of always string (varchar).

  • Changed the implementation of MySQL_ConstructedResultSet to 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.

  • Re-added getTypeInfo() with information about all types supported by MySQL and the sql::DataType.

  • make package_source now packs with bzip2.

  • Implemented MySQL_ConnectionMetaData::getProcedureColumns().

  • Implementation for MySQL_DatabaseMetaData::getImportedKeys() for MySQL versions before 5.1.16 using SHOW, and above using INFORMATION_SCHEMA.

  • cppconn/datatype.h has changed and is now used again. Reimplemented the type subsystem to be more usable - more types for binary and nonbinary strings.

  • Implemented MySQL_DatabaseMetaData::getColumnPrivileges().

  • Implemented MySQL_Connection::setSessionVariable() for setting variables like sql_mode.

  • Fixed MySQL_DatabaseMetaData::getTablePrivileges(). Test cases were added in the first unit testing framework.

  • Implemented ResultSet::getBlob() which returns std::stream.

  • New BLOB implementation. sql::Blob was removed in favor of std::istream. C++'s IOStream library is very powerful, similar to PHP's streams. It makes no sense to reinvent the wheel. For example, you can pass a std::istringstream object to setBlob() if the data is in memory, or just open a file std::fstream and let it stream to the DB, or write its own stream. This is also true for getBlob() where you can just copy data (if a buffered result set), or stream data (if implemented).

  • 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), and Connection::Connection(map).

  • Experimental support for STLPort. This feature may be removed again at any time later without prior warning! Type cmake -L for configuration instructions.

  • Addition of test/unit/README with instructions for writing bug and regression tests.

  • Major performance improvements due to new buffered ResultSet implementation.

  • MySQL_Driver::getPatchVersion introduced.

  • New data types added to the list returned by DatabaseMetaData::getTypeInfo() are FLOAT 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().

  • 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 in test/CJUnitPort.

Bugs Fixed

  • Fixed handling of numeric columns in ResultSetMetaData::isCaseSensitive to return false.

  • Corrected handling of unsigned server types. Now returning correct values.

  • 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.

D.6.2.4. Changes in MySQL Connector/CPP 1.0.2 (2008-12-19, alpha)

Functionality Added or Changed

  • Added test/unit as a basis for general unit tests using the new test framework, see test/unit/example for basic usage examples.

  • Added new unit test framework for JDBC compliance and regression testing.

  • Implemented MySQL_ResultSetMetaData::getPrecision() and MySQL_Prepared_ResultSetMetaData::getPrecision(), updating example.

  • Added PHP script examples/cpp_trace_analyzer.php to filter the output of the debug trace. Please see the inline comments for documentation. This script is unsupported.

  • Implemented MySQL_PreparedStatement::clearParameters().

  • Implemented MySQL_PreparedStatement::setNull().

  • Reverted implementation of MySQL_DatabaseMetaData::getTypeInfo(). Now unimplemented. In addition, removed cppconn/datatype.h for now, until a more robust implementation of the types can be developed.

  • DATE, DATETIME and TIME are now being handled when calling the MySQL_PreparedResultSet methods getString(), getDouble(), getInt(), getLong(), getBoolean().

  • Changed ResultSetMetaData methods getColumnDisplaySize(), getPrecision(), getScale() to return unsigned int instead of signed int.

  • Implemented getScale(), getPrecision() and getColumnDisplaySize() for MySQL_ResultSetMetaData and MySQL_Prepared_ResultSetMetaData.

Bugs Fixed

  • Fixed MySQL_PreparedStatement::setBlob(). In the tests there is a simple example of a class implementing sql::Blob.

  • Fixed bug in FLOAT handling.

  • Fixed a bug in getString(). getString() is now binary safe. A new example was also added.

  • Fixed bugs in the MySQL_PreparedStatements methods setBigInt() and setDatetime(). 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 bugs in MySQL_DatabaseMetaData. All supportsCatalogXXXXX methods were incorrectly returning true and all supportsSchemaXXXX methods were incorrectly returning false. Now supportsCatalogXXXXX returns false and supportsSchemaXXXXX returns true.

  • Fixed a bug in MySQL_ConnectionMetaData::getColumns() which was performing a cartesian product of the columns in the table times the columns matching columnNamePattern. The example example/connection_meta_schemaobj.cpp was extended to cover the function.

  • 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 MySQL_PreparedStatementResultSet::getDouble() to return the correct value when the underlying type is MYSQL_TYPE_FLOAT.

D.6.2.5. Changes in MySQL Connector/CPP 1.0.1 (2008-12-01, alpha)

Functionality Added or Changed

  • New directory layout.

  • MySQL Workbench 5.1 changed to use MySQL Connector/C++ for its database connectivity.

  • Converted Connector/J tests added.

  • Changed sql::DbcException to implement the interface of JDBC's SQLException. Renamed to sql::SQLException.

  • Renamed sql::DbcInvalidArgument to sql::InvalidArgumentException

  • Renamed sql::DbcMethodNotImplemented to sql::MethodNotImplementedException

  • All tests changed to create TAP compliant output.

  • Introduced experimental CPack support, see make help.

  • Changed metadata column name TABLE_CATALOG to TABLE_CAT and TABLE_SCHEMA to TABLE_SCHEM to ensure JDBC compliance.

  • Renamed ConnectionMetaData::getImportedKeys(): PKTABLE_CATALOG to PKTABLE_CAT, PKTABLE_SCHEMA to PKTABLE_SCHEM, FKTABLE_CATALOG to FKTABLE_CAT, FKTABLE_SCHEMA to FKTABLE_SCHEM.

  • Renamed ConnectionMetaData::getPrimaryKeys(): COLUMN to COLUMN_NAME, SEQUENCE to KEY_SEQ, and INDEX_NAME to PK_NAME.

  • Renamed ConnectionMetaData::getProcedures: PROCEDURE_SCHEMA to PROCEDURE_SCHEM.

  • Renamed ConnectionMetaData::getTables: TABLE_COMMENT to REMARKS.

  • All 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
  • Added experimental GCov support, cmake -DMYSQLCPPCONN_GCOV_ENABLE:BOOL=1

  • ConnectionMetaData::getCatalogTerm() returns not applicable, there is no counterpart to catalog in MySQL Connector/C++.

  • Added ConnectionMetaData::getSchemas() and Connection::setSchema().

  • Driver Manager was removed.

  • 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 a MySQL_Connection object. This makes your code portable when using the common interface.

      mysql_connection.h, use this if you intend to link directly to the MySQL_Connection class and use its specifics not found in sql::Connection.

      However, you can make your application fully abstract by using the generic interface rather than these two headers.

  • sql::mysql::MySQL_SQLException was 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.

D.7. MySQL Proxy Change History

D.7.1. Changes in MySQL Proxy 0.8.3 (2012-08-20)

Functionality Added or Changed

  • Added timeouts for connect, read, and write operations through --proxy-connect-timeout, --proxy-read-timeout, and --proxy-write-timeout options.

  • Added support for making connections to backends and clients using IPv6 addresses.

  • Added initial support for the Windows authentication plugin.

  • Added support for extracting pluggable authentication protocol information. In the Lua API, added these values: con.client.challenge.auth_plugin_name, con.client.response.auth_plugin_name.

Bugs Fixed

  • Fixed handling of capability flags in the client authentication response. In the C API, network_mysqld_auth_response_new() needs the server-side capabilities. In the Lua API, added these values: con.client.challenge (mirrors con.server.challenge), con.client.response.server_capabilties, con.server.challenge.server_capabilities.

  • Fixed the length of auth-plugin-data in the client authentication response packet.

  • Fixed crash if the configfile value contained invalid characters. In the C API, added chassis_keyfile_to_options_with_error() and deprecated chassis_keyfile_to_options().

  • Fixed a crash if the --max-open-files value was invalid on Win32.

  • Fixed the default plugin_dir value for 64-bit Unix systems (lib64/ versus lib/).

  • Fixed a crash if COM_BINLOG_DUMP was used with rw-splitting.lua.

  • Fixed handling of a missing trailing \0 in MySQL 5.5.7 through MySQL 5.5.10 in the auth-method name.

  • Fixed abort() in COM_CHANGE_USER+auth-method-switch.

  • Fixed excessive buffering of LOAD DATA LOCAL INFILE data.

  • Fixed a lockup under very high load.

D.7.2. Changes in MySQL Proxy 0.8.2 (2011-08-18)

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?id=26368
    

    (Bug #12836100)

Functionality Added or Changed

  • Added support for binary log checksums.

  • Added support for decoding all data types of the row-based replication protocol.

  • Added support for OUT parameters in prepared statements in stored procedures with MySQL 5.5.

  • Removed the admin plugin from the list of default plugins, as it requires configuration since 0.8.1.

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-file option 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)

  • Fixed handling of used columns with row-based replication.

  • A crash could occur if run under Valgrind.

  • A bogus timestamp log was produced if state tracking was not compiled in.

D.7.3. Changes in MySQL Proxy 0.8.1 (2010-09-13)

Functionality Added or Changed

  • con->in_load_data_local has been removed.

  • Shutdown hooks were added to free the global memory of third-party libraries such as openssl.

  • chassis_set_fdlimit() has been deprecated in favor of chassis_fdlimit_set().

  • The unused network_mysqld_com_query_result_track_state() function has been deprecated.

  • Allow interception of LOAD DATA INFILE and SHOW ERRORS statements.

Bugs Fixed

  • The --proxy-read-only-backend-addresses option did not work. (Bug #38341, Bug #11749171)

  • If MySQL Proxy used a UNIX socket, it did not remove the socket file at termination time. (Bug #38415)

  • network_address_set_address()->network_address_set_address_ip() called gethostbyname() which was not reentrant. This meant that a MySQL Proxy plugin needed to guard all calls to network_address_set_address() with a mutex. network_address_set_address() has been modified to be thread safe. (Bug #49099)

  • The admin plugin had an undocumented default value for --admin-password. (Bug #53429)

  • 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)

  • 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)

  • Use of LOAD DATA LOCAL INFILE caused the connection between the client and MySQL Proxy to abort. (Bug #51864)

  • When running configure to build, the error message relating to the lua libraries could be misleading. The wording and build advice have been updated.

D.7.4. Changes in MySQL Proxy 0.8.0 (2010-01-21)

Functionality Added or Changed

  • The --no-daemon has been renamed to The --daemon. By default, MySQL Proxy now starts in foreground mode. Use the --daemon option to override this and start in daemon mode.

Bugs Fixed

  • 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)

  • A memory leak occurred in MySQL Proxy if clients older than MySQL 4.1 connected to it. (Bug #50993)

  • Logging to syslog with the --log-use-syslog option did not work. (Bug #36431)

  • A segmentation fault occurred in MySQL Proxy if clients older than MySQL 4.1 connected to it. (Bug #48641)

  • Several supplied scripts were updated to account for flag and structure changes:

    • active-transactions.lua was updated to use the resultset_is_needed flag.

    • ro-balance.lua was updated to use the resultset_is_needed flag and updated proxy.connection.dst.name structure.

    • rw-splitting.lua was updated to use the resultset_is_needed flag and updated proxy.connections structure.

    (Bug #47349, Bug #45408, Bug #47345, Bug #43424, Bug #42841, Bug #46141)

  • MySQL Proxy accepted more than one address in the value of the --proxy-backend-addresses option. You should specify one --proxy-backend-addresses option for each backend address. (Bug #47273)

  • MySQL Proxy raised an error when processing query packets larger than 16MB. (Bug #35202)

  • MySQL Proxy returned the wrong version string internally from the proxy.PROXY_VERSION constant. (Bug #45996)

  • 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_USER commands 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.

  • The line numbers provided in stack traces were off by one. (Bug #47348)

  • Due to a memory leak, memory usage for each new connection to the proxy increased, leading to very high consumption. (Bug #45272)

  • MySQL Proxy could incorrectly insert NULL values into the returned result set, even though non-NULL values were returned in the original query. (Bug #35729)

  • 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)

D.7.5. Changes in MySQL Proxy 0.7.2 (2009-06-30)

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 with plugin-. (Bug #45833)

D.7.6. Changes in MySQL Proxy 0.7.1 (2009-05-15)

Bugs Fixed

  • When using the rw-splitting.lua script, 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)

  • MySQL Proxy was unable to increase its own maximum number of open files according to the limit specified by the --max-open-files option, 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)

  • When using MySQL Proxy with multiple backends, failure of one backend caused Proxy to disconnect all backends and stop routing requests. (Bug #34793)

  • Due to a memory leak, memory usage for each new connection to the proxy increased, leading to very high consumption. (Bug #45272)

  • MySQL Proxy crashed when connecting to a MySQL 4.0 server. Now it generates an error message instead. (Bug #38601)

  • Result sets with more than 250 fields could cause MySQL Proxy to crash. (Bug #43078)

  • The port number was reported incorrectly in proxy.connection.client.address. (Bug #43313)

D.7.7. Changes in MySQL Proxy 0.7.0 (Not Released)

Functionality Added or Changed

  • A 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:port structure 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 .address item, you now have these items: name (the combined ip:port), address (the IP address), and port (port number). In addition, all addresses now supply both the src (source) and dst (destination) socket information for both ends of connections.

      Some familiar structures have been updated to accommodate this information:

      • proxy.connection.client.address is proxy.connection.client.src.name

      • proxy.connection.server.address is proxy.connection.server.dst.name

    • proxy.backends is now in proxy.global.backends The .address field of each backend is an address-object as described earlier. For example, proxy.backends[1].address is proxy.global.backends[1].dst.name.

    • The read_auth() and read_handshake() functions no longer receive an auth parameter. Instead, all the data is available in the connection tables.

      In read_handshake(), you access the information through the global proxy.connection table:

      0.60.7
      auth.thread_id proxy.connection.server.thread_id
      auth.mysqld_version proxy.connection.server.mysqld_version
      auth.server_addr proxy.connection.server.dst.name
      auth.client_addr proxy.connection.client.src.name
      auth.scramble proxy.connection.server.scramble_buffer

      In read_auth(), you can use the following:

      0.60.7
      auth.username proxy.connection.client.username
      auth.password proxy.connection.client.scrambled_password
      auth.default_db proxy.connection.client.default_db
      auth.server_addr proxy.connection.server.dst.name
      auth.client_addr proxy.connection.client.src.name
    • In 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 the read_query_result() hook, you must set the resultset_is_needed flag:

      proxy.queries:append( 1, ..., { resultset_is_needed = true } )

      For more information, see proxy.queries.

    • proxy.backends is now in proxy.global.backends.

D.7.8. Changes in MySQL Proxy 0.6.1 (2008-02-06)

Functionality Added or Changed

  • Added new features to run-tests.lua.

  • Fixed error handling for socket functions on Windows.

  • Fixed sending fake server-greetings in connect_server().

  • Fixed assertions on write errors.

D.7.9. Changes in MySQL Proxy 0.6.0 (2007-09-11)

Functionality Added or Changed

  • Added connection pooling.

  • Added a global Lua-scope proxy.global.*.

  • Added support for listening UNIX sockets.

  • When using read/write splitting and the rw-splitting.lua example script, connecting a second user to the proxy returns an error message. (Bug #30867)

  • Added --no-proxy to disable the proxy.

  • Added test cases.

  • Added support for proxy.response.packets.

  • Added handling of proxy.connection.backend_ndx in connect_server() and read_query() to support read/write splitting.

  • Added hooks for read_auth(), read_handshake() and read_auth_result().

  • By default, MySQL Proxy now starts in daemon mode. Use the new --no-daemon option to override this. Added the --pid-file option for writing the process ID to a file after becoming a daemon.

  • Added support in read_query_result() to overwrite the result set.

Bugs Fixed

  • Fixed a memory leak when proxy.response.* is used.

  • Fixed handling of (SQL) NULL in result sets.

  • Fixed inj.resultset.affected_rows on SELECT queries.

  • Fixed decoding of length-encoded ints for 3-byte notation.

  • Fixed an assertion when connecting to MySQL 6.0.1.

  • Fixed an assertion that MySQL Proxy raised at login time if a client specified no password and no default database. (Bug #29719)

  • Fixed compilation on win32.

  • Fixed length encoding on proxy.resultsets.

  • Fixed an assertion on result-packets like [field-len | fields | EOF | ERR]. (Bug #29732)

  • Fixed connection stalling if read_query_result() raised an assertion.

  • Fixed an assertion on COM_BINLOG_DUMP. (Bug #29764)

  • Fixed an assertion at connect time when all backends are down.

  • Fixed an assertion at COM_SHUTDOWN. (Bug #29719)

  • Fixed the glib2 check to require at least glib2 2.6.0.

  • Fixed a crash if proxy.connection is used in connect_server().

D.7.10. Changes in MySQL Proxy 0.5.1 (2007-06-30)

Functionality Added or Changed

  • Added protection against duplicate result sets from a script.

  • Added support for UNIX sockets.

  • Added proxy.VERSION.

  • Added script examples for rewriting and injection.

  • Added support for pre-4.1 passwords in a 4.1 connection.

  • Added inj.query_time and inj.response_time into the Lua scripts.

  • Added missing dependency to libmysqlclient-dev to the INSTALL file.

  • Changed --proxy.profiling to --proxy-skip-profiling.

  • Added resultset.affected_rows and resultset.insert_id.

Bugs Fixed

  • Fixed an assertion when read_query_result() is not provided when PROXY_SEND_QUERY is used.

  • Fixed an assertion when an error occurs at initial script exec time.

  • Fixed a warning if connect_server() is not provided.

  • Fixed a crash on fields longer than 250 bytes when the result set is inspected.

  • Fixed a compile error with MySQL 4.1.x on missing COM_STMT_*.

  • Fixed handling of duplicate ERR on COM_CHANGE_USER in MySQL 5.1.18+.

  • Fixed mysql check in configure to die when mysql.h isn't detected.

D.7.11. Changes in MySQL Proxy 0.5.0 (2007-06-19)

This is the first beta release.

Bugs Fixed

  • Added CMake support.

  • Added automake/autoconf support.

D.8. MySQL for Excel Change History

Changes in MySQL for Excel 1.1.0 (2012-09-30)

This section documents all changes and bug fixes applied to MySQL for Excel since the release of 1.0.7.

This adds the Edit MySQL Data feature.

Functionality Added or Changed

  • Added the Edit MySQL Data feature. MySQL data can now be edited directly from the MySQL server in Microsoft Excel.

  • Added two new Append Data advanced options: "Automatically store the column mapping for the given table" and "Reload stored column mapping for the selected table automatically".

  • Added a new Export Data advanced option: "Remove columns that contain no data, otherwise just flag them as 'Excluded'."

  • The Installer will now check if MySQL for Excel is already installed. It will abort if a newer version of MySQL for Excel is already installed, or uninstall an older version of MySQL for Excel.

Bugs Fixed

  • On Microsoft Windows 7, MySQL for Excel would not load when the "Display settings" configuration setting was set to Adjust to Best Performance. (Bug #14521405)

  • The Revert Data, Refresh Data from DB sequence would not clear colored cells of data that was already committed. Only cells with data that was not committed would be altered. (Bug #14350321)

  • Stopping the connected MySQL Server while in edit mode would generate an error upon commit, but it would also display a success message along with displaying a bogus query. It will now only show a proper error message. (Bug #14349256)

  • A commit could return a success message if a commit failed while editing a primary key. (Bug #14349192)

  • When Auto-Commit is enabled, an information dialogue will now notify the user if a commit generates warnings and/or errors. (Bug #14349284)

  • The Revert/Commit window would remain on top of all other windows. It will now only be shown on top of MySQL for Excel windows. (Bug #14349218)

  • It was difficult to determine which operations succeeded and failed due to how the optimistic locking strategy was implemented. Transactions are now used that will revert the entire operation if an error occurs. (Bug #14356054)

  • It was possible for the query confirmation window to differ from the general query log. The two are now synchronized and identical. (Bug #14355970)

  • Append Data would emit the error "Index was outside the bounds of the array" and not function if a "Stored Column Mapping" contained unmapped columns.

  • The Import Data preview grid did not refresh after pressing Call to execute a routine.

  • Connections are now refreshed after they are migrated from MySQL for Excel to MySQL Workbench.

  • A change after the Append Data automatic mapping is performed will now reset the mapping status to "manual mapping."

  • The Show Details button now toggles and reads as Hide Details after it is pressed, and while the details panel is open.

Changes in MySQL for Excel 1.0.7 (2012-08-10)

This section documents all changes and bug fixes applied to MySQL for Excel since the release of 1.0.6.

Bugs Fixed

  • The Export button is now disabled if the table name is empty. (Bug #14389853)

  • Connections created from within MySQL for Excel were not usable by MySQL Workbench. They are now usable by MySQL Workbench 5.2.42 and above. (Bug #14368158)

  • The Export Data dialogue's preview grid would truncate a column name if it was altered after the initial load. (Bug #14350168)

  • Controls would overlap when resizing the MySQL for Excel window to a small size (to a height of less than 500px).

    And the Excel window could not be resized if Excel with MySQL for Excel enabled would open with a small window size. (Bug #14369568, Bug #14406412)

  • Auto mapping did not function properly while appending to "enum" or "set" data types.

    Also, while toggling the First Row Contains Column Names configuration option, the column names would update on the Source grid but not on the mapped headers of the Target grid. (Bug #14370049)

Changes in MySQL for Excel 1.0.6 (2012-07-25)

Initial public release of MySQL for Excel.

Bugs Fixed

  • The {AppData}/Oracle/MySQL For Excel/ directory is now created when Microsoft Excel is first opened with the MySQL for Excel plugin enabled. (Bug #14366579)

  • The MySQL Notifier version is now displayed within the Microsoft Windows Add/Remove programs listing. (Bug #14357291)

  • Altering a column in the Export Data grid would refresh the Use existing column configuration option even though the column properties did not change. (Bug #14350299)

  • Exporting and appending data would generate a single INSERT statement under all conditions. Large queries would result in max_allowed_packet related errors, and fail to execute the query. Multiple INSERT queries are now generated. (Bug #14362783)

  • The Append Excel Data to Table option would not function nor warn the user if the primary key could not be mapped. (Bug #14350536)

  • Uninstalling the MySQL for Excel plugin would cause Microsoft Excel to generate an error titled "Installing Office customization." (Bug #14350751)

  • Added support for SSL connections that were created in MySQL Workbench. And if a connection using SSL is detected but will not connect, then an a warning dialog is now displayed within the Show Details section. And the plugin will attempt to connect without using the SSL parameters. (Bug #14368116)

  • Toggling the First Row Contains Column Names option after changing a primary key column name from the auto-suggested value would revert the name change back to the initial auto-suggested value. (Bug #14366393)

  • The defined Advanced Options were not used when opening a new connection. (Bug #14350361)

  • It was not possible to re-enter an incorrectly entered password. (Bug #14350983)

  • Changing the column on the combo box next to the Use existing column radio button in the Export Data dialog would not set the focus to the column in the grid, nor refresh the column property controls. (Bug #14350288)

  • It was not possible to create a New Connection unless MySQL Workbench was installed. (Bug #14368155)

  • The Export Data and Append Data preview panels can now be configured to limit the number of rows for preview. Before it would display all rows, which would stall MySQL for Excel when large data sets are being exported. The default value is 100 rows. (Bug #14362781, Bug #14366469, Bug #14362780)

  • Stored procedure results containing many rows (10,000+) would cause the input form to hang while attempting to change result sets. Also, a warning is now displayed when the number of imported rows exceeds the Excel limit (65,535) that explains why the data will be truncated. (Bug #14351468, Bug #14368490)

  • While using the Export Excel Data to New Table wizard, toggling the First Row Contains Names checkbox would reset and disable the Use Existing Column configuration option. (Bug #14350275)

  • Schema and database objects had their names grayed out, which made them appear disabled. (Bug #14366416)

  • Windows Authentication plugin support was added. (Bug #14351296)

  • Incorrect service information could be displayed in the new connection dialog while using Test connection. It's now automatically refreshed. (Bug #14356149)

Changes in MySQL for Excel 1.0.5 (Not released)

Developmental release of MySQL for Excel.

Bugs Fixed

  • The following operations now generate errors if the connection is lost before execution:

    • Selecting, refreshing, or filtering a schema

    • Refreshing and filtering database objects

    • Appending data

    • Importing data from a table, stored procedure, or view

    (Bug #14349309)

  • Strings that are too long to fit in a window are now truncated with an ellipses, and a tooltip now exists to show the full text. (Bug #14350205)

  • The date data types were not being imported/exported. They are now imported, and treated as follows:

    For importing data: NULL is imported as a "blank" cell. Zero date values are imported as DateTime.MinValue (which displays as "12:00:00 am" in Excel) to prevent losing the Date formatting in Excel

    For exporting/appending data: blank cells, "0000-00-00 00:00:00", "000-00-00", and "00-00-00" are exported as NULL if the DATETIME column allows NULL, otherwise a zero date is inserted into the column. (Bug #14350058)

Changes in MySQL for Excel 1.0.4 (Not released)

Developmental release of MySQL for Excel.

Bugs Fixed

  • Mapping a column from the "Source Table" to several columns in the "Target Table" in the Append Data dialog would prompt to replace existing mapping when there was nothing to replace in the "Target Table."

    Also, when choosing to overwrite the existing mapping, only the last column was mapped. (Bug #14350802)

  • Text could be truncated when doing so was not required. (Bug #14350220)

  • Errors were not being logged. The following log file now exists: {AppData}/Oracle/MySQL For Excel/MySQLForExcel.log (Bug #14351349)

  • User settings were being saved in the Microsoft Office folder instead of the MySQL for Excel folder. They are now saved here: {AppData}/Roaming/Oracle/MySQL For Excel/settings.config (Bug #14350837)

  • Editing a table would not release the table (for editing elsewhere) even after the table worksheet was deleted. Now, it is released when either the table worksheet is deleted, or the user explicitly exits edit mode. (Bug #14350827)

  • A dialog now exists that notifies the user that connections created from within MySQL for Excel are not saved if MySQL Workbench is also open. (Bug #14350739)

  • Exporting Excel data to a new table to a schema with a ' (single quote) in the schema name would create the table but the data would not be exported. (Bug #14350765)

  • The Export Excel Data data type drop down is now disabled when the field is a primary key, because it should not change from being an INTEGER. (Bug #14350795)

  • The Edit MySQL Data option would edit the incorrect row. (Bug #14350550)

  • Deleting rows would not be detected while editing a table, thus causing the Commit button to be disabled. (Bug #14350817)

  • It was not possible to delete a MySQL Server connection. (Bug #14350516)

  • The Information Dialog window that is displayed after confirming an operation against MySQL (append, edit, or export) was not resizable. It can now be resized after the Show Details button is clicked. (Bug #14350330)

  • Adding a new table via the MySQL for Excel plugin would corrupt the table listing. (Bug #14349362)

  • While testing a MySQL Server connection, the user would sometimes not be prompted for a password, and instead it would use the previously set user/pass combination. (Bug #14351001)

  • Revert Data, Refresh from DB would refresh and display all columns instead of the limited ones. (Bug #14350582)

  • Schemas and objects can now be refreshed by right-clicking and selecting the Refresh option. (Bug #14349606)

  • The connection details in the Connection Password window did not correctly display the information, as some field were either empty or missing. (Bug #14350974)

Changes in MySQL for Excel 1.0.3 (Not released)

Developmental release of MySQL for Excel.

Bugs Fixed

  • The SSH Connection option was removed because Connector/NET does not support SSH. (Bug #14350996)

D.9. MySQL Installer Change History

D.9.1. Changes in MySQL Installer 1.1.5 (2012-09-30)

A release that includes MySQL Server 5.5.28 and 5.6.6 m9.

Bugs Fixed

  • Setting up the Windows Service to use a Custom User will no longer proceed to the next step until after the custom user has rights to log on as a service. (Bug #14666804)

  • The MySQLInstallerConsole command would sometimes return 0 if the command failed. It will now only return 0 on success. (Bug #14698363)

  • The Installer would not upgrade the community version of MySQL Server 5.5 to a commercial version of MySQL Server 5.6. (Bug #14395130)

  • The copyright year would display 2011 instead of 2012. (Bug #14005334)

  • The MySQLInstallerConsole --help content was incomplete, and the Installer text contained typographical errors. (Bug #13963477, Bug #14702055)

  • The Remove Server Data option was only available after the MySQL Server was removed. It is now available after any MySQL product is removed. (Bug #13856677)

  • The MySQL 5.x Command Line Client shortcut did not function. (Bug #13331360)

  • The no-beep option is now enabled by default in the bundled my.ini configuration file. (Bug #11745551, Bug #17088)

D.9.2. Changes in MySQL Installer 1.1.4 (2012-08-08)

A release that includes MySQL Server 5.5.27 and 5.6.6 m9.

Functionality Added or Changed

  • Bumped the bundled MySQL Server versions to 5.5.27 and 5.6.6 m9.

  • While creating a user, the Installer will now warn the user if a username exceeds 16 characters in length.

Bugs Fixed

  • Pressing Execute on the Requirements page would attempt to download and install Microsoft Excel 2007 if the MySQL for Excel plugin was checked, and if Microsoft Excel was not already installed. The requirement is now removed after pressing Execute, and the plugin will not installed. (Bug #14400072)

  • The Check for Updates option would sometimes fail to function. (Bug #13627586)

  • The Windows Installer now adds full permissions for the user executing the Installer to files that are created by the Installer, which includes my.ini. Before, only those with administrative rights would have these privileges. (Bug #11753720)

D.9.3. Changes in MySQL Installer 1.1.0 (2012-07-25)

Developmental release of the MySQL Installer.

Functionality Added or Changed

  • Added the new MySQL Notifier for Microsoft Windows product, which is now installed by MySQL Installer

  • Added the new MySQL for Excel for Microsoft Windows product, which is now installed by MySQL Installer

  • Added an advanced configure option, which allows the definition of multiple log files.

  • Added the ability to run MySQL as a new local user.

  • Added the ability to create user accounts.

Bugs Fixed

  • MySQL Installer would fail to upgrade MySQL Server if the previous installation of MySQL Server was not installed by MySQL Installer, and if MySQL Installer was auto-launched during its installation.

    A workaround is to close the initial instance of MySQL Installer, and then launch MySQL Installer from the Start Menu. (Bug #14277765)

  • Fixed several typos in the MySQL Installer help dialogue, including grammar and URL updates. (Bug #64095, Bug #13639253)

  • Connector/Net was added to the MySQL Installer. (Bug #60861, Bug #12401368)

  • The MySQL Server 5.5.25a release is displayed as version 5.5.26. This is due to a MSI limitation.