Apéndice C. Historial de cambios de MySQL
Anterior |  | Siguiente

## Apéndice C. Historial de cambios de MySQL

This appendix lists the changes in the MySQL source code for version 5.1.0 and later releases. For information about changes in previous versions of the MySQL database software, see the Manual de referencia de MySQL 4.1, which provides coverage of the 3.22, 3.23, 4.0, and 4.1 series of releases.

We are working actively on MySQL 5.0 and 5.1, and provide only critical bugfixes for MySQL 4.1, 4.0, and MySQL 3.23. We update this section as we add new features, so that everybody can follow the development.

Note that we tend to update the manual at the same time we make changes to MySQL. If you find a recent version of MySQL listed here that you can't find on our download page (http://dev.mysql.com/downloads/), it means that the version has not yet been released.

The date mentioned with a release version is the date of the last BitKeeper 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.

## C.1. Cambios en la entrega 5.0.x (Desarrollo)

The following changelog shows what has been done in the 5.0 tree:

- Basic support for read-only server side cursors.

- Basic support for (updatable) views. See, for example, Sección 21.2, “Sintaxis de `CREATE VIEW`”.

- Basic support for stored procedures (SQL:2003 style). See Capítulo 19, Procedimientos almacenados y funciones.

- Initial support for rudimentary triggers.

- Added `SELECT INTO `list_of_vars``, which can be of mixed (that is, global and local) types. See Sección 19.2.9.3, “La sentencia `SELECT ... INTO`”.

- Removed the update log. It is fully replaced by the binary log. If the MySQL server is started with `--log-update`, it is translated to `--log-bin` (or ignored if the server is explicitly started with `--log-bin`), and a warning message is written to the error log. Setting `SQL_LOG_UPDATE` silently sets `SQL_LOG_BIN` instead (or do nothing if the server is explicitly started with `--log-bin`).

- Support for the `ISAM` storage engine has been removed. If you have `ISAM` tables, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”.

- Support for `RAID` options in `MyISAM` tables has been removed. If you have tables that use these options, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”.

- User variable names are now case insensitive: If you do `SET @a=10;` then `SELECT @A;` now returns `10`. Case sensitivity of a variable's value depends on the collation of the value.

- Strict mode, which in essence means that you get an error instead of a warning when inserting an incorrect value into a column. See Sección 5.3.2, “El modo SQL del servidor”.

- `VARCHAR` and `VARBINARY` columns remember end space. A `VARCHAR()` or `VARBINARY` column can contain up to 65,535 characters or bytes, respectively.

- `MEMORY` (`HEAP`) tables can have `VARCHAR()` columns.

- When using a constant string or a function that generate a string result in `CREATE ... SELECT`, MySQL creates the result field based on the max_length of the string/expression:

  max_length | Column type
  = 0 | `CHAR(0)`
  < 512 | `VARCHAR(max_length)`
  >= 512 | `TEXT`

For a full list of changes, please refer to the changelog sections for each individual 5.0.x release.

### C.1.1. Cambios en la entrega 5.0.11 (todavía no liberada)

Functionality added or changed:

- mysqldump now dumps triggers for each dumped table. This can be suppressed with the `--skip-triggers` option. (Bug#10431)

- Added new `ER_STACK_OVERRUN_NEED_MORE` error message to indicate that, while the stack is not completly full, more stack space is required. (Bug#11213)

- `NDB`: Improved handling of the configuration variables `NoOfPagesToDiskDuringRestartACC`, `NoOfPagesToDiskAfterRestartACC`, `NoOfPagesToDiskDuringRestartTUP`, and `NoOfPagesToDiskAfterRestartTUP` should result in noticeably faster startup times for MySQL Cluster. (Bug#12149)

- Added support of where clause for queries with `FROM DUAL`. (Bug#11745)

Bugs fixed:

- Multiple `SELECT SQL_CACHE` queries in a stored procedure causes error and client hang. (Bug#6897)

- Added checks to prevent error when allocating memory when there was insufficient memory available. (Bug#7003)

- Character data truncated when GBK characters `0xA3A0` and `0xA1` are present. (Bug#11987)

- Comparisons like `SELECT "A\\" LIKE "A\\";` fail when using `SET NAMES utf8;`. (Bug#11754)

- Corrected inaccurate error message when inserting out of range data under `TRADITIONAL` SQL mode. (Bug#11546)

- When used in a `SELECT` query against a view, the `GROUP_CONCAT()` function returned only a single row. (Bug#11412)

- Calling the C API function `mysql_stmt_fetch()` after all rows of a result set were exhausted would return an error instead of `MYSQL_NO_DATA`. (Bug#11037)

- Information about a trigger was not displayed in the output of `SELECT ... FROM INFORMATION_SCHEMA.TRIGGERS` when the selected database was `INFORMATION_SCHEMA`, prior to the trigger's first invocation. (Bug#12127)

- Issuing successive `FLUSH TABLES WITH READ LOCK` would cause the `mysql` client to hang. (Bug#11934)

- In stored procedures, a cursor that fetched an empty string into a variable would set the variable to `NULL` instead. (Bug#8692)

- A trigger dependent on a feature of one `SQL_MODE` setting would cause an error when invoked after the `SQL_MODE` was changed. (Bug#5891)

- A delayed insert that would duplicate an existing record crashed the server instead. (Bug#12226)

- `ALTER TABLE` when `SQL_MODE = 'TRADITIONAL'` gave rise to an invalid error message. (Bug#11964)

- On AMD64, attempting to repair a `MyISAM` table with a full-text index would crash the server. (Bug#11684)

- The MySQL Cluster backup log was invalid where the number of Cluster nodes was not equal to a power of 2. (Bug#11675)

- `GROUP_CONCAT()` sometimes returned a result with a different collation that that of its arguments. (Bug#10201)

- The `LPAD()` and `RPAD()` functions returned the wrong length to `mysql_fetch_fields()`. (Bug#11311)

- A `UNIQUE VARCHAR` column would be mis-identified as `MUL` in table descriptions. (Bug#11227)

- Incorrect error message displayed if user attempted to create a table in a non-existing database using `CREATE `database_name`.`table_name`` syntax. (Bug#10407)

- `InnoDB`: Do not flush after each write, not even before setting up the doublewrite buffer. Flushing can be extremely slow on some systems. (Bug#12125)

- `InnoDB`: True `VARCHAR`: Return `NULL` columns in the format expected by MySQL. (Bug#12186)

### C.1.2. Cambios en la entrega 5.0.10 (todavía no liberada)

Functionality added or changed:

- Security improvement: Applied a patch that addresses a `zlib` data vulnerability that could result in a buffer overflow and code execution. (CAN-2005-2096) (Bug#11844)

- The viewing of triggers and trigger metadata has been enhanced as follows:

  - An extension to the `SHOW` command has been added: `SHOW TRIGGERS` can be used to view a listing of triggers. See Sección 13.5.4.20, “Sintaxis de `SHOW TRIGGERS`” for details.

  - The `INFORMATION_SCHEMA` database now includes a `TRIGGERS` table. See Sección 22.1.16, “La tabla `INFORMATION_SCHEMA TRIGGERS`” for details. (Bug#9586)

- Triggers can now reference tables by name. See Sección 20.1, “Sintaxis de `CREATE TRIGGER`” for more information.

- The output of `perror --help` now displays the `--ndb` option. (Bug#11999)

- On Windows, the search path used by MySQL applications for `my.ini` now includes `..\my.ini` (that is, the application's parent directory, and hence, the installation directory). (Bug#10419)

- Added `mysql_get_character_set_info()` C API function for obtaining information about the default character set of the current connection.

- The bundled version of the `readline` library was upgraded to version 5.0.

- It is no longer necessary to issue an explicit `LOCK TABLES` for any tables accessed by a trigger prior to executing any statements that might invoke the trigger. (Bug#9581, Bug#8406)

- `MySQL Cluster`: A new `-p` option is available for use with the ndb_mgmd client. When called with this option, ndb_mgmd prints all configuration data to `stdout`, then exits.

- The namespace for triggers has changed. Previously, trigger names had to be unique per table. Now they must be unique within the schema (database). An implication of this change is that `DROP TRIGGER` syntax now uses a schema name instead of a table name (schema name is optional and, if omitted, the current schema will be used).

  Note: When upgrading from a previous version of MySQL 5 to MySQL 5.0.10 or newer, you must drop all triggers before upgrading and re-create them after or `DROP TRIGGER` will not work after the upgrade. (Bug#5892)

Bugs fixed:

- `NDB`: Attempting to create or drop tables during a backup would cause the cluster to shut down. (Bug#11942)

- When attempting to drop a table with a broken unique index, `NDB` failed to drop the table and erroneously report that the table was unknown. (Bug#11355)

- `SELECT ... NOT IN()` gave unexpected results when only static value present between the `()`. (Bug#11885)

- Fixed compile error when using GCC4 on AMD64. (Bug#12040)

- `NDB` ignored the `Hostname` option in the `NDBD DEFAULT` section of the Cluster configuration file. (Bug#12028)

- `SHOW PROCEDURE/FUNCTION STATUS` didn't work for users with limited access. (Bug#11577)

- MySQL server would crash is a fetch was performed after a `ROLLBACK` when cursors were involved. (Bug#10760)

- The temporary tables created by an `ALTER TABLE` on a cluster table were visible to all MySQL servers. (Bug#12055)

- `NDB_MGMD` was leaking file descriptors. (Bug#11898)

- IP addresses not shown in `ndb_mgm SHOW` command on second ndb_mgmd (or on ndb_mgmd restart). (Bug#11596)

- Functions that evaluate to constants (such as `NOW()` and `CURRENT_USER()` were being evaluated in the definition of a `VIEW` rather than included verbatim. (Bug#4663)

- Execution of `SHOW TABLES` failed to increment the `Com_show_tables` status variable. (Bug#11685)

- For execution of a stored procedure that refers to a view, changes to the view definition were not seen. The procedure continued to see the old contents of the view. (Bug#6120)

- For prepared statements, the SQL parser did not disallow ‘`?`’ parameter markers immediately adjacent to other tokens, which could result in malformed statements in the binary log. (For example, `SELECT * FROM t WHERE? = 1` could become `SELECT * FROM t WHERE0 = 1`.) (Bug#11299)

- When two threads compete for the same table, a deadlock could occur if one thread has also a lock on another table through `LOCK TABLES` and the thread is attempting to remove the table in some manner and the other thread want locks on both tables. (Bug#10600)

- Aliasing the column names in a `VIEW` did not work when executing a `SELECT` query on the `VIEW`. (Bug#11399)

- Performing an `ORDER BY` on a `SELECT` from a `VIEW` produced unexpected results when `VIEW` and underlying table had the same column name on different columns. Bug#11709)

- The C API function `mysql_statement_reset()` did not clear error information. (Bug#11183)

- When used within a subquery, `SUBSTRING()` returned an empty string. (Bug#10269)

- Multiple-table `UPDATE` queries using `CONVERT_TZ()` would fail with an error. (Bug#9979)

- `mysql_fetch_fields()` returned incorrect length information for `MEDIUM` and `LONG` `TEXT` and `BLOB` columns. (Bug#9735)

- `mysqlbinlog` was failing the test suite on Windows due to `BOOL` being incorrectly cast to `INT`. (Bug#11567)

- `NDBCLuster`: Server left core files following shutdown if data nodes had failed. (Bug#11516)

- Creating a trigger in one database that references a table in another database was being allowed without generating errors. (Bug#8751)

- Duplicate trigger names were allowed within a single schema. (Bug#6182)

- Server did not accept some fully-qualified trigger names. (Bug#8758)

- The `traditional` SQL mode accepted invalid dates if the date value provided was the result of an implicit type conversion. (Bug#5906)

- The MySQL server had issues with certain combinations of basedir and datadir. (Bug#7249)

- `INFORMATION_SCHEMA.COLUMNS` had some inaccurate values for some data types. (Bug#11057)

- LIKE pattern matching using prefix index didn't return correct result. (Bug#11650)

- For several character sets, MySQL incorrectly converted the character code for the division sign to the `eucjpms` character set. (Bug#11717)

- When invoked within a view, `SUBTIME()` returned incorrect values. (Bug#11760)

- `SHOW BINARY LOGS` displayed a file size of 0 for all log files but the current one if the files were not located in the data directory. (Bug#12004)

- Server-side prepared statements failed for columns with a character set of `ucs2`. (Bug#9442)

- References to system variables in an SQL statement prepared with `PREPARE` were evaluated during `EXECUTE` to their values at prepare time, not to their values at execution time. (Bug#9359)

- For server shutdown on Windows, error messages of the form `Forcing close of thread `n` user: '`name`'` were being written to the error log. Now connections are closed more gracefully without generating error messages. (Bug#7403)

- Increased the version number of the `libmysqlclient` shared library from 14 to 15 because it is binary incompatible with the MySQL 4.1 client library. (Bug#11893)

- A recent optimizer change caused `DELETE … WHERE … NOT LIKE` and `DELETE … WHERE … NOT BETWEEN` to not properly identify the rows to be deleted. (Bug#11853)

- Within a stored procedure that selects from a table, invoking another procedure that requires a write lock for the table caused that procedure to fail with a message that the table was read-locked. (Bug#9565)

- Within a stored procedure, selecting from a table through a view caused subsequent updates to the table to fail with a message that the table was read-locked. (Bug#9597)

- For a stored procedure defined with `SQL SECURITY DEFINER` characteristic, `CURRENT_USER()` incorrectly reported the use invoking the procedure, not the user who defined it. (Bug#7291)

- Creating a table with a `SET` or `ENUM` column with the `DEFAULT 0` clause caused a server crash if the table's character set was `utf8`. (Bug#11819)

- With strict SQL mode enabled, `ALTER TABLE` reported spurious “Invalid default value” messages for columns that had no `DEFAULT` clause. (Bug#9881)

- In SQL prepared statements, comparisons could fail for values not equally space-padded. For example, `SELECT 'a' = 'a ';` returns 1, but `PREPARE s FROM 'SELECT ?=?'; SET @a = 'a', @b = 'a '; PREPARE s FROM 'SELECT ?=?'; EXECUTE s USING @a, @b;` incorrectly returned 0. (Bug#9379)

- Labels in stored routines did not work if the character set was not `latin1`. (Bug#7088)

- Invoking the `DES_ENCRYPT()` function could cause a server crash if the server was started without the `--des-key-file` option. (Bug#11643)

- The server crashed upon execution of a statement that used a stored function indirectly (via a view) if the function was not yet in the connection-specific stored routine cache and the statement would update a `Handler_`xxx`` status variable. This fix allows the use of stored routines under `LOCK TABLES` without explicitly locking the `mysql.lock` table. However, you cannot use `mysql.proc` in statements that will combine locking of it with modifications for other tables. (Bug#11554)

- The server crashed when dropping a trigger that invoked a stored procedure, if the procedure was not yet in the connection-specific stored routine cache. (Bug#11889)

- Selecting the result of an aggregate function for an `ENUM` or `SET` column within a subquery could result in a server crash. (Bug#11821)

- Incorrect column values could be retrieved from views defined using statements of the form `SELECT * FROM `tbl_name``. (Bug#11771)

- The `mysql.proc` table was not being created properly with the proper `utf8` character set and collation, causing server crashes for stored procedure operations if the server was using a multi-byte character set. To take advantage of the bug fix, mysql_fix_privileges_tables should be run to correct the structure of the `mysql.proc` table. (Bug#11365)

- Execution of a prepared statement that invoked a non-existent or dropped stored routine would crash the server. (Bug#11834)

- Executing a statement that invoked a trigger would cause problems unless a `LOCK TABLES` was first issued for any tables accessed by the trigger. Note: The exact nature of the problem depended upon the MySQL 5.0 release being used: prior to 5.0.3, this resulted in a crash; from 5.0.3 to 5.0.7, MySQL would issue a warning; in 5.0.9, the server would issue an error. (Bug#8406)

  The same issue caused `LOCK TABLES` to fail following `UNLOCK TABLES` if triggers were involved. (Bug#9581)

- In a shared Windows environment, MySQL could not find its configuration file unless the file was in the `C:\` directory. (Bug#5354)

### C.1.3. Cambios en la entrega 5.0.9 (15 julio 2005)

Functionality added or changed:

- An attempt to create a `TIMESTAMP` column with a display width (for example, `TIMESTAMP(6)`) now results in a warning. Display widths have not been supported for `TIMESTAMP` since MySQL 4.1. (Bug#10466)

- `InnoDB`: When creating or extending an InnoDB data file, at most one megabyte at a time is allocated for initializing the file. Previously, InnoDB allocated and initialized 1 or 8 megabytes of memory, even if only a few 16-kilobyte pages were to be written. This improves the performance of `CREATE TABLE` in `innodb_file_per_table` mode.

- `InnoDB`: Various optimizations. Removed unreachable debug code from non-debug builds. Added hints for the branch predictor in gcc. Made assertions occupy less space.

- `InnoDB`: Make `innodb_thread_concurrency=20` by default. Bypass the concurrency checking if the setting is greater than or equal to 20.

- `InnoDB`: Make `CHECK TABLE` killable. (Bug#9730)

- Recursion in stored routines is now disabled because it was crashing the server. We plan to modify stored routines to allow this to operate safely in a future release. (Bug#11394)

- The handling of `BIT` columns has been improved, and should now be much more reliable in a number of cases. (Bug#10617, Bug#11091, Bug#11572)

Bugs fixed:

- `SHOW CREATE VIEW` did not take the `ANSI MODE` into account when quoting identifiers. (Bug#6903)

- The `mysql_config` script did not handle symbolic linking properly. (Bug#10986)

- Incorrect results when using `GROUP BY ... WITH ROLLUP` on a `VIEW`. (Bug#11639)

- Instances of the `VAR_SAMP()` function in view definitions were converted to `VARIANCE()`. This is incorrect because `VARIANCE()` is the same as `VAR_POP()`, not `VAR_SAMP()`. (Bug#10651)

- mysqldump failed when reloading a view if the view was defined in terms of a different view that had not yet been reloaded. mysqldump now creates a dummy table to handle this case. (Bug#10927)

- mysqldump could crash for illegal or nonexistent table names. (Bug#9358)

- The `--no-data` option for mysqldump was being ignored if table names were given after the database name. (Bug#9558)

- The `--master-data` option for mysqldump resulted in no error if the binary log was not enabled. Now an error occurs unless the `--force` option is given. (Bug#11678)

- `DES_ENCRYPT()` and `DES_DECRYPT()` require SSL support to be enabled, but were not checking for it. Checking for incorrect arguments or resource exhaustion was also improved for these functions. (Bug#10589)

- When used in joins, `SUBSTRING()` failed to truncate to zero any string values that could not be converted to numbers. (Bug#10124)

- `mysqldump --xml` did not format `NULL` column values correctly. (Bug#9657)

- There was a compression algorithm issue with `myisampack` for very large datasets (where the total size of of all records in a single column was on the order of 3 GB or more) on 64-bit platforms. (A fix for other platforms was made in MySQL 5.0.6.) (Bug#8321)

- Temporary tables were created in the data directory instead of `tmpdir`. (Bug#11440)

- MySQL would not compile correctly on QNX due to missing `rint()` function. (Bug#11544)

- A `SELECT DISTINCT `col_name`` would work correctly with a `MyISAM` table only when there was an index on `col_name`. (Bug#11484)

- The server would lose table-level `CREATE VIEW` and `SHOW VIEW` privileges following a `FLUSH PRIVILEGES` or server restart. (Bug#9795)

- In strict mode, an `INSERT` into a view that did not include a value for a `NOT NULL` column but that did include a `WHERE` test on the same column would succeed, This happened even though the `INSERT` should have been prevented due to the failure to supply a value for the `NOT NULL` column. (Bug#6443)

- Running a `CHECK TABLES` on multiple views crashed the server. (Bug#11337)

- When a table had a primary key containing a `BLOB` column, creation of another index failed with the error `BLOB/TEXT column used in key specification without keylength`, even when the new index did not contain a `BLOB` column. (Bug#11657)

- NDB Cluster: When trying to open a table that could not be discovered or unpacked, cluster would return error codes which the MySQL server falsely interpreted as operating system errors. (Bug#103651)

- Manually inserting a row with `host=''` into `mysql.tables_priv` and performing a `FLUSH PRIVILEGES` would cause the server to crash. (Bug#11330)

- A cursor using a query with a filter on a `DATE` or `DATETIME` column would cause the server to crash server after the data was fetched. (Bug#11172)

- Closing a cursor that was already closed would cause MySQL to hang. (Bug#9814)

- Using `CONCAT_WS` on a column set `NOT NULL` caused incorrect results when used in a `LEFT JOIN`. (Bug#11469)

- Signed `BIGINT` would not accept `-9223372036854775808` as a `DEFAULT` value. (Bug#11215)

- Views did not use indexes on all appropriate queries. (Bug#10031)

- For `MEMORY` tables, it was possible for for updates to be performed using outdated key statistics when the updates involved only very small changes in a very few rows. This resulted in the random failures of queries such as `UPDATE t SET col = col + 1 WHERE col_key = 2;` where the same query with no `WHERE` clause would succeed. (Bug#10178)

- Optimizer performed range check when comparing unsigned integers to negative constants, could cause errors. (Bug#11185)

- Wrong comparison method used in `VIEW` when relaxed date syntax used (i.e. `2005.06.10`). (Bug#11325)

- The `ENCRYPT()` and `SUBSTRING_INDEX()` functions would cause errors when used with a `VIEW`. (Bug#7024)

- Clients would hang following some errors with stored procedures. (Bug#9503)

- Combining cursors and subselects could cause server crash or memory leaks. (Bug#10736)

- If a prepared statement cursor is opened but not completely fetched, attempting to open a cursor for a second prepared statement will fail. (Bug#10794)

### C.1.4. Cambios en la entrega 5.0.8 (not released)

Note: Starting with version 5.0.8, changes for MySQL Cluster can be found in the combined Change History.

Functionality added or changed:

- `MEMORY` tables now support indexes of up to 500 bytes. See Sección 14.3, “El motor de almacenamiento `MEMORY` (`HEAP`)”. (Bug#10566)

- New `SQL_MODE` - `NO_ENGINE_SUBSTITUTION` Prevents automatic substitution of storage engine when the requested storage engine is disabled or not compiled in. (Bug#6877)

- The statements `CREATE TABLE`, `TRUNCATE TABLE`, `DROP DATABASE`, and `CREATE DATABASE` cause an implicit commit. (Bug#6883)

- Expanded on information provided in general log and slow query log for prepared statements. (Bug#8367, Bug#9334)

- Where a `GROUP BY` query uses a grouping column from the query's `SELECT` clause, MySQL now issues a warning. This is because the SQL standard states that any grouping column must unambiguously reference a column of the table resulting from the query's `FROM` clause, and allowing columns from the `SELECT` clause to be used as grouping columns is a MySQL extension to the standard.

  By way of example, consider the following table:

      CREATE TABLE users (
        userid INT NOT NULL PRIMARY KEY,
        username VARCHAR(25),
        usergroupid INT NOT NULL
      );

  MySQL allows you to use the alias in this query:

      SELECT usergroupid AS id, COUNT(userid) AS number_of_users
      FROM users
      GROUP BY id;

  However, the SQL standard requires that the column name be used, as shown here:

      SELECT usergroupid AS id, COUNT(userid) AS number_of_users
      FROM users
      GROUP BY usergroupid;

  Queries such as the first of the two shown above will continue to be supported in MySQL; however, beginning with MySQL 5.0.8, using a column alias in this fashion will generate a warning. Note that in the event of a collision between column names and/or aliases used in joins, MySQL attempts to resolve the conflict by giving preference to columns arising from tables named in the query's `FROM` clause. (Bug#11211)

- The granting or revocation of privileges on a stored routine is no longer performed when running the server with `--skip-grant-tables` even after the statement `SET @@global.automatic_sp_privileges=1;` has been executed. (Bug#9993)

- Added support for `B'10'` syntax for bit literal. (Bug#10650)

Bugs fixed:

- Security fix: On Windows systems, a user with any of the following privileges

  - `REFERENCES`

  - `CREATE TEMPORARY TABLES`

  - `GRANT OPTION`

  - `CREATE`

  - `SELECT`

  on `*.*` could crash `mysqld` by issuing a `USE LPT1;` or `USE PRN;` command. In addition, any of the commands `USE NUL;`, `USE CON;`, `USE COM1;`, or `USE AUX;` would report success even though the database was not in fact changed. Note: Although this bug was thought to be fixed previously, it was later discovered to be present in the MySQL 5.0.7-beta release for Windows. (Bug#9148, CAN-2005-0799

- A `CREATE TABLE `db_name`.`tbl_name` LIKE ...` statement would crash the server when no database was selected. (Bug#11028)

- `SELECT DISTINCT` queries or `GROUP BY` queries without `MIN()` or `MAX()` could return inconsistent results for indexed columns. (Bug#11044)

- The `SHOW INSTANCE OPTIONS` command in MySQL Instance Manager displayed option values incorrectly for options for which no value had been given. (Bug#11200)

- An outer join with an empty derived table (a result from a subquery) returned no result. (Bug#11284)

- An outer join with an `ON` condition that evaluated to false could return an incorrect result. (Bug#11285)

- `mysqld_safe` would sometimes fail to remove the pid file for the old `mysql` process after a crash. As a result, the server would fail to start due to a false `A mysqld process already exists...` error. (Bug#11122)

- `CAST( ... AS DECIMAL) didn't work for strings. (Bug#11283)`

- `NULLIF()` function could produce incorrect results if first argument is `NULL`. (Bug#11142)

- Setting `@@SQL_MODE = NULL` caused an erroneous error message. (Bug#10732)

- Converting a `VARCHAR` column having an index to a different type (such as `TINYTEXT`) gave rise to an incorrect error message. (Bug#10543)

  Note that this bugfix induces a slight change in the behaviour of indexes: If an index is defined to be the same length as a field (or is left to default to that field's length), and the length of the field is later changed, then the index will adopt the new length of the field. Previously, the size of the index did not change for some field types (such as `VARCHAR`) when the field type was changed.

- `sql_data_access` column of `routines` table of `INFORMATION_SCHEMA` was empty. (Bug#11055)

- A `CAST()` value could not be included in a `VIEW`. (Bug#11387)

- Server crashed when using `GROUP BY` on the result of a `DIV` operation on a `DATETIME` value. (Bug#11385)

- Possible `NULL` values in `BLOB` columns could crash the server when a `BLOB` was used in a `GROUP BY` query. (Bug#11295)

- Fixed 64 bit compiler warning for packet length in replication. (Bug#11064)

- Multiple range accesses in a subquery cause server crash. (Bug#11487)

- An issue with index merging could cause suboptimal index merge plans to be chosen when searching by indexes created on `DATE` columns. The same issue caused the InnoDB storage engine to issue the warning `using a partial-field key prefix in search`. (Bug#8441)

- The `mysqlhotcopy` script was not parsing the output of `SHOW SLAVE STATUS` correctly when called with the `--record_log_pos` option. (Bug#7967)

- `SELECT * FROM `table`` returned incorrect results when called from a stored procedure, where `table` had a primary key. (Bug#10136)

- When used in defining a view, the `TIME_FORMAT()` function failed with calculated values, for example, when passed the value returned by `SEC_TO_TIME()`. (Bug#7521)

- `SELECT DISTINCT ... GROUP BY `constant`` returned multiple rows (it should return a single row). (Bug#8614)

- `INSERT INTO SELECT FROM `view`` produced incorrect result when using `ORDER BY`. (Bug#11298)

- Fixed hang/crash with Boolean full-text search where a query contained more query terms that one-third of the query length (it could be achieved with truncation operator: 'a*b*c*d*'). (Bug#7858)

- Fixed column name generation in `VIEW` creation to ensure there are no duplicate column names. (Bug#7448)

- An `ORDER BY` clause sometimes had no effect on the ordering of a result when selecting specific columns (as opposed to using `SELECT *`) from a view. (Bug#7422)

- Some data definition statements (`CREATE TABLE` where the table was not a temporary table, `TRUNCATE TABLE`, `DROP DATABASE`, and `CREATE DATABASE`) were not being written to the binary log after a `ROLLBACK`. This also caused problems with replication. (Bug#6883)

- Calling a stored procedure that made use of an `INSERT ... SELECT ... UNION SELECT ...` query caused a server crash. (Bug#11060)

- Selecting from a view defined using `SELECT SUM(DISTINCT ...)` caused an error; attempting to execute a `SELECT * FROM INFORMATION_SCHEMA.TABLES` query after defining such a view crashed the server. (Bug#7015)

- The mysql client would output a prompt twice following input of very long strings, because it incorrectly assumed that a call to the _cgets() function would clear the input buffer. (Bug#10840)

- A three byte buffer overflow in the client functions caused improper exiting of the client when reading a command from the user. (Bug#10841)

- Fixed a problem where a stored procedure caused a server crash if the query cache was enabled. (Bug#9715)

- `SHOW CREATE DATABASE INFORMATION_SCHEMA` returned an “unknown database” error. (Bug#9434)

- Corrected a problem with `IFNULL()` returning an incorrect result on 64-bit systems. (Bug#11235)

- Fixed a problem resolving table names with `lower_case_table_names=2` when the table name lettercase differed in the `FROM` and `WHERE` clauses. (Bug#9500)

- Fixed server crash due to some internal functions not taking into account that for multi-byte character sets, `CHAR` columns could exceed 255 bytes and `VARCHAR` columns could exceed 65,535 bytes. (Bug#11167)

- Fixed locking problems for multiple-statement `DELETE` statements performed within a stored routine, such as incorrectly locking a to-be-modified table with a read lock rather than a write lock. (Bug#11158)

- Fixed a portability problem testing for `crypt()` support that caused compilation problems when using OpenSSL/yaSSL on HP-UX and Mac OS X. (Bug#10675, Bug#11150)

- The hostname cache was not working. (Bug#10931)

- On Windows, `mysqlshow` did not interpret wildcard characters properly if they were given in the table name argument. (Bug#10947)

- Using `PREPARE` to prepare a statement that invoked a stored routine that deallocated the prepared statement caused a server crash. This is prevented by disabling dynamic SQL within stored routines. (Bug#10975)

- Default hostname for MySQL server was always `mysql`. (Bug#11174)

- Using `PREPARE` to prepare a statement that invoked a stored routine that executed the prepared statement caused a `Packets out of order` error the second time the routine was invoked. This is prevented by disabling dynamic SQL within stored routines. (Bug#7115)

- Using prepared statements within a stored routine (`PREPARE`, `EXECUTE`, `DEALLOCATE`) could cause the client connection to be dropped after the routine returned. This is prevented by disabling dynamic SQL within stored routines. (Bug#10605)

- When using a cursor with a prepared statement, the first execution returned the correct result but was not cleaned up properly, causing subsequent executions to return incorrect results. (Bug#10729)

- MySQL Cluster: Connections between data nodes and management nodes were not being closed following shutdown of `ndb_mgmd`. (Bug#11132)

- MySQL Cluster: `mysqld` processes would not reconnect to cluster following restart of `ndb_mgmd`. (Bug#11221)

- MySQL Cluster: Fixed problem whereby data nodes would fail to restart on 64-bit Solaris (Bug#9025)

- MySQL Cluster: Calling `ndb_select_count()` crashed the cluster when running on Red Hat Enterprise 4/64-bit/Opteron. (Bug#10058)

- MySQL Cluster: Insert records were incorrectly applied by `ndb_restore`, thus making restoration from backup inconsistent if the binlog contained inserts. (Bug#11166)

- MySQL Cluster: Cluster would time out and crash after first query on 64-bit Solaris 9. (Bug#8918)

- MySQL Cluster: `ndb_mgm` client `show` command displayed incorrect output after master data node failure. (Bug#11050)

- MySQL Cluster: A delete performed as part of a transaction caused an erroneous result. (Bug#11133)

- MySQL Cluster: Not allowing sufficient parallelism in cluster configuration (e.g. `NoOfTransactions` too small) caused `ndb_restore` to fail without providing any error messages. (Bug#10294)

- MySQL Cluster: When using dynamically allocated ports on Linux, cluster would hang on initial startup. (Bug#10893)

- MySQL Cluster: Setting TransactionInactiveTimeout= 0 did not result in an infinite timeout. (Bug#11290)

- `InnoDB`: Enforce maximum `CHAR_LENGTH()` of UTF-8 data in `ON UPDATE CASCADE`. (Bug#10409)

- `InnoDB`: Pad UTF-8 variable-length `CHAR` columns with `0x20`. Pad UCS2 `CHAR` columns with `0x0020`. (Bug#10511)

### C.1.5. Cambios en la entrega 5.0.7 (10 June 2005)

Functionality added or changed:

- Added `mysql_set_character_set()` C API function for setting the default character set of the current connection. This allows clients to affect the character set used by `mysql_real_escape_string()`. (Bug#8317)

- The behaviour of the `Last_query_cost` system variable has been changed. The default value is now 0 (rather than -1) and it now has session-level scope (rather than being global). See Sección 5.3.4, “Variables de estado del servidor” for additional information.

- All characters occuring on the same line following the `DELIMITER` keyword will be set as delimiter. For example, `DELIMITER :;` will set `:;` as the delimiter. This behavior is now consistent between MySQL 5.1 and MySQL 5.0. (Bug#9879)

- The `table`, `type`, and `rows` columns of `EXPLAIN` output can now be `NULL`. This is required for using `EXPLAIN` on `SELECT` queries that use no tables (i.e. `EXPLAIN SELECT 1`). (Bug#9899)

- Placeholders now can be used for `LIMIT` in prepared statements. (Bug#7306)

- `SHOW BINARY LOGS` now displays a `File_size` column that indicates the size of each file.

- The `--delayed-insert` option for mysqldump has been disabled to avoid causing problems with storage engines that do not support `INSERT DELAYED`. (Bug#7815)

- Improved the optimizer to be able to use indexes for expressions of the form ``indexed_col` NOT IN (`val1`, `val2`, ...)` and ``indexed_col` NOT BETWEEN `val1` AND `val2``.. (Bug#10561)

- Removed `mysqlshutdown.exe` and `mysqlwatch.exe` from the Windows “No Installer” distribution (they had already been removed from the “With Installer” distribution before). Removed those programs from the source distribution.

- Removed `WinMySQLAdmin` from the source distribution and from the “No Installer” Windows distribution (it had already been removed from the “With Installer” distribution before).

- `InnoDB`: In stored procedures and functions, `InnoDB` no longer takes full explicit table locks for every involved table. Only `intention' locks are taken, similar to those in the execution of an ordinary SQL statement. This greatly reduces the number of deadlocks.

Bugs fixed:

- Security update: A user with limited privileges could obtain information about the privileges of other users by querying objects in the `INFORMATION_SCHEMA` database for which that user did not have the requisite privileges. (Bug#10964)

- Triggers with dropped functions caused crashes. (Bug#5893)

- Failure of a `BEFORE` trigger did not prevent the triggering statement from performing its operation on the row for which the trigger error occurred. Now the triggering statement fails as described in Sección 20.3, “Utilización de disparadores”. (Bug#10902)

- Issuing a write lock for a table from one client prevented other clients from accessing the table's metadata. For example, if one client issued a `LOCK TABLES `mydb`.`mytable` WRITE`, then a second client attempting to execute a `USE `mydb`;` would hang. (Bug#9998)

- The `LAST_DAY()` failed to return `NULL` when supplied with an invalid argument. See Sección 12.5, “Funciones de fecha y hora”. (Bug#10568)

- The functions `COALESCE()`, `IF()`, and `IFNULL()` performed incorrect conversions of their arguments. (Bug#9939)

- The `TIME_FORMAT()` function returned incorrect results with some format specifiers. See Sección 12.5, “Funciones de fecha y hora”. (Bug#10590)

- Dropping stored routines when the MySQL server had been started with `--skip-grant-tables` generated extraneous warnings. (Bug#9993)

- A problem with the `my_global.h` file caused compilation of MySQL to fail on single-processor Linux systems running 2.6 kernels. (Bug#10364)

- The ucs2_turkish_ci collation failed with upper('i'). UPPER/LOWER now can return a string with different length. (Bug#8610)

- OPTIMIZE of InnoDB table does not return 'Table is full' if out of tablespace. (Bug#8135)

- GROUP BY queries with ROLLUP returned wrong results for expressions containing group by columns. (Bug#7894)

- Fixed bug in `FIELD()` function where value list contains `NULL`. (Bug#10944)

- Corrected a problem where an incorrect column type was returned in the result set metadata when using a prepared `SELECT DISTINCT` statement to select from a view. (Bug#11111)

- Fixed bug in the MySQL Instance manager that caused the version to always be `unknown` when `SHOW INSTANCE STATUS` was issued. (Bug#10229)

- Using `ORDER BY` to sort the results of an `IF()` that contained a `FROM_UNIXTIME()` expression returned incorrect results due to integer overflow. (Bug#9669)

- Fixed a server crash resulting from accessing `InnoDB` tables within stored functions. This is handled by prohibiting statements that do an explicit or explicit commit or rollback within stored functions or triggers. (Bug#10015)

- Fixed a server crash resulting from the second invocation of a stored procedure that selected from a view defined as a join that used `ON` in the join conditions. (Bug#6866)

- Using `ALTER TABLE` for a table that had a trigger caused a crash when executing a statement that activated the trigger, and also a crash later with `USE `db_name`` for the database containing the table. (Bug#5894)

- Fixed a server crash resulting from an attempt to allocate too much memory when `GROUP BY `blob_col`` and `COUNT(DISTINCT)` were used. (Bug#11088)

- Fixed a portability problem for compiling on Windows with Visual Studio 6. (Bug#11153)

- The incorrect sequence of statements `HANDLER `tbl_name` READ `index_name` NEXT` without a preceding `HANDLER `tbl_name` READ `index_name` = (`value_list`)` for an `InnoDB` table resulted in a server crash rather than an error. (Bug#5373)

- On Windows, with `lower_case_table_names` set to 2, using `ALTER TABLE` to alter a `MEMORY` or `InnoDB` table that had a mixed-case name also improperly changed the name to lowercase. (Bug#9660)

- The server timed out SSL connections too quickly on Windows. (Bug#8572)

- Executing `LOAD INDEX INTO CACHE` for a table while other threads where selecting from the table caused a deadlock. (Bug#10602)

- Fixed a server crash resulting from `CREATE TABLE ... SELECT` that selected from a table being altered by `ALTER TABLE`. (Bug#10224)

- The `FEDERATED` storage engine properly handled outer joins, but not inner joins. (Bug#10848)

- Consistently report `INFORMATION_SCHEMA` table names in uppercase in `SHOW TABLE STATUS` output. (Bug#10059)

- Fixed a failure of `WITH ROLLUP` to sum values properly. (Bug#10982)

- Triggers were not being activated for multiple-table `UPDATE` or `DELETE` statements. (Bug#5860)

- `INSERT BEFORE` triggers were not being activated for `INSERT ... SELECT` statements. (Bug#6812)

- `INSERT BEFORE` triggers were not being activated for implicit inserts (`LOAD DATA`). (Bug#8755)

- If a stored function contained a `FLUSH` statement, the function crashed when invoked. `FLUSH` now is disallowed within stored functions. (Bug#8409)

- Multiple-row `REPLACE` could fail on a duplicate-key error when having one `AUTO_INCREMENT` key and one unique key. (Bug#11080)

- Fixed a server crash resulting from invalid string pointer when inserting into the `mysql.host` table. (Bug#10181)

- Multiple-table `DELETE` did always delete on the fly from the first table that was to be deleted from. In some cases, when using many tables and it was necessary to access the same row twice in the first table, we could miss some rows-to-be-deleted from other tables. This is now fixed.

- The `mysql_next_result()` function could hang if you were executing many statements in a `mysql_real_query()` call and one of those statements raised an error. (Bug#9992)

- The combination of `COUNT()`, `DISTINCT`, and `CONCAT()` sometimes triggered a memory deallocation bug on Windows resulting in a server crash. (Bug#9593)

- `InnoDB`: Do very fast shutdown only if `innodb_fast_shutdown=2`, but wait for threads to exit and release allocated memory if `innodb_fast_shutdown=1`. Starting with MySQL/InnoDB 5.0.5, InnoDB would do brutal shutdown also when `innodb_fast_shutdown=1`. (Bug#9673)

- `InnoDB`: Fixed `InnoDB: Error: stored_select_lock_type is 0 inside ::start_stmt()!` in a stored procedure call if `innodb_locks_unsafe_for_binlog` was set in `my.cnf`. (Bug#10746)

- `InnoDB`: Fixed a duplicate key error that occurred with `REPLACE` in a table with an `AUTO-INC` column. (Bug#11005)

- Fixed that MySQL would pass a wrong key length to storage engines in `MIN()`. This could cause warnings `InnoDB: Warning: using a partial-field key prefix in search.` in the `.err` log. (Bug#11039)

- Fixed a server crash for `INSERT` or `UPDATE` when the `WHERE` clause contained a correlated subquery that referred to a column of the table being modified. (Bug#6384)

- Fixed a problem causing an incorrect result for columns that include an aggregate function as part of an expression when `WITH ROLLUP` is added to `GROUP BY`. (Bug#7914)

- Fixed a problem with returning an incorrect result from a view that selected a `COALESCE()` expression from the result of an outer join. (Bug#9938)

- MySQL was adding a `DEFAULT` clause to `ENUM` columns that included no explicit `DEFAULT` and were defined as `NOT NULL`. (This is supposed to happen only for columns that are `NULL`.) (Bug#6267)

- Corrected inappropriate error messages that were displayed when attempting to set the read-only `warning_count` and `error_count` system variables. (Bug#10339)

### C.1.6. Cambios en la entrega 5.0.6 (26 May 2005)

Functionality added or changed:

- Incompatible change: `MyISAM` and `InnoDB` tables created with `DECIMAL` columns in MySQL 5.0.3 to 5.0.5 will appear corrupt after an upgrade to MySQL 5.0.6. Dump such tables with mysqldump before upgrading, and then reload them after upgrading. (The same incompatibility will occur for these tables created in MySQL 5.0.6 after a downgrade to MySQL 5.0.3 to 5.0.5.) (Bug#10465, Bug#10625)

- Added the `div_precision_increment` system variable, which indicates the number of digits of precision by which to increase the result of division operations performed with the `/` operator.

- Added the `log_bin_trust_routine_creators` system variable, which applies when binary logging is enabled. It controls whether stored routine creators can be trusted not to create stored routines that will cause unsafe events to be written to the binary log.

- Added the `--log-bin-trust-routine-creators` server option for setting the `log_bin_trust_routine_creators` system variable from the command line.

- Implemented the `STMT_ATTR_PREFETCH_ROWS` option for the `mysql_stmt_attr_set()` C API function. This sets how many rows to fetch at a time when using cursors with prepared statements.

- The `GRANT` and `REVOKE` statements now support an `object_type` clause to be used for disambiguating whether the grant object is a table, a stored function, or a stored procedure. Use of this clause requires that you upgrade your grant tables. See Sección 2.10.2, “Aumentar la versión de las tablas de privilegios”. (Bug#10246)

- Added `REFERENCED_TABLE_SCHEMA`, `REFERENCED_TABLE_NAME`, and `REFERENCED_COLUMN_NAME` columns to the `KEY_COLUMN_USAGE` table of `INFORMATION_SCHEMA`. (Bug#9587)

- Added a `--show-warnings` option to mysql to cause warnings to be shown after each statement if there are any. This option applies to interactive and batch mode. In interactive mode, `\w` and `\W` may be used to enable and disable warning display. (Bug#8684)

- Removed a limitation that prevented use of FIFOs as logging targets (such as for the general query log). This modification does not apply to the binary log and the relay log. (Bug#8271)

- Added a `--debug` option to my_print_defaults.

- When the server cannot read a table because it cannot read the `.frm` file, print a message that the table was created with a different version of MySQL. (This can happen if you create tables that use new features and then downgrade to an older version of MySQL.) (Bug#10435)

- `SHOW VARIABLES` now shows the `slave_compressed_protocol`, `slave_load_tmpdir` and `slave_skip_errors` system variables. (Bug#7800)

- Removed unused system variable `myisam_max_extra_sort_file_size`.

- Changed default value of `myisam_data_pointer_size` from 4 to 6. This allows us to avoid `table is full` errors for most cases.

- The variable `concurrent_insert` now takes 3 values. Setting this to 2 changes MyISAM to do concurrent inserts to end of table if table is in use by another thread.

- New `/*>` prompt for mysql. This prompt indicates that a `/* ... */` comment was begun on an earlier line and the closing `*/` sequence has not yet been seen. (Bug#9186)

- If strict SQL mode is enabled, `VARCHAR` and `VARBINARY` columns with a length greater than 65,535 no longer are silently converted to `TEXT` or `BLOB` columns. Instead, an error occurs. (Bug#8295, Bug#8296)

- The `INFORMATION_SCHEMA.SCHEMATA` table now has a `DEFAULT_COLLATION_NAME` column. (Bug#8998)

- `InnoDB`: When the maximum length of `SHOW INNODB STATUS` output would be exceeded, truncate the beginning of the list of active transactions, instead of truncating the end of the output. (Bug#5436)

- `InnoDB`: If `innodb_locks_unsafe_for_binlog` option is set and the isolation level of the transaction is not set to serializable then `InnoDB` uses a consistent read for select in clauses like `INSERT INTO ... SELECT` and `UPDATE ... (SELECT)` that do not specify `FOR UPDATE` or `IN SHARE MODE`. Thus no locks are set to rows read from selected table.

- Updated version of `libedit` to 2.9. (Bug#2596)

- Removed `mysqlshutdown.exe` and `mysqlwatch.exe` from the Windows “With Installer” distribution.

Bugs fixed:

- An error in the implementation of the `MyISAM` compression algorithm caused `myisampack` to fail with very large sets of data (total size of all the records in a single column needed to be >= 3 GB in order to trigger this issue). (Bug#8321)

- Statements that create and use stored routines were not being written to the binary log, which affects replication and data recovery options. (Bug#2610) Stored routine-related statements now are logged, subject to the issues and limitations discussed in Sección 19.3, “Registro binario de procedimientos almacenados y disparadores”

- Disabled binary logging within stored routines to avoid writing spurious extra statements to the binary log. For example, if a routine `p()` executes an `INSERT` statement, then for `CALL p()`, the `CALL` statement appears in the binary log, but not the `INSERT` statement. (Bug#9100)

- Statements that create and drop triggers were not being written to the binary log, which affects replication and data recovery options. (Bug#10417) Trigger-related statements now are logged, subject to the issues and limitations discussed in Sección 19.3, “Registro binario de procedimientos almacenados y disparadores”

- The `mysql_stmt_execute()` and `mysql_stmt_reset()` C API functions now close any cursor that is open for the statement, which prevents a server crash. (Bug#9478)

- The `mysql_stmt_attr_set()` C API function now returns an error for option values that are defined in `mysql.h` but not yet implemented, such as `CURSOR_TYPE_SCROLLABLE`. (Bug#9643)

- `MERGE` tables could fail on Windows due to incorrect interpretation of pathname separator characters for filenames in the `.MRG` file. (Bug#10687)

- Fixed a server crash for `INSERT ... ON DUPLICATE KEY UPDATE` with `MERGE` tables, which do not have unique indexes. (Bug#10400)

- Fix `FORMAT()` to do better rounding for double values (for example, `FORMAT(4.55,1)` returns `4.6`, not `4.5`). (Bug#9060)

- Disallow use of `SESSION` or `GLOBAL` for user variables or local variables in stored routines. (Bug#9286)

- Fixed a server crash when using `GROUP BY ... WITH ROLLUP` on an indexed column in an `InnoDB` table. (Bug#9798)

- In strict SQL mode, some assignments to numeric columns that should have been rejected were not (such as the result of an arithmetic expression or an explicit `CAST()` operation). (Bug#6961)

- `CREATE TABLE t AS SELECT UUID()` created a `VARCHAR(12)` column, which is too small to hold the 36-character result from `UUID()`. (Bug#9535)

- Fixed a server crash in the `BLACKHOLE` storage engine. (Bug#10175)

- Fixed a server crash resulting from repeated calls to `ABS()` when the argument evaluated to `NULL`. (Bug#10599)

- For a user-defined function invoked from within a prepared statement, the UDF's initialization routine was invoked for each execution of the statement, but the deinitialization routine was not. (It was invoked only when the statement was closed.) Similarly, when invoking a UDF from within a trigger, the initialization routine was invoked but the deinitialization routine was not. For UDFs that have an expensive deinit function (such as `myperl`, this bugfix will have negative performance consequences. (Bug#9913)

- Portability fix for Cygwin: Don't use `#pragma interface` in source files. (Bug#10241)

- Fix `CREATE TABLE ... LIKE` to work when `lower_case_table_names` is set on a case-sensitive filesystem and the source table name is not given in lowercase. (Bug#9761)

- Fixed a server crash resulting from a `CHECK TABLE` statement where the arguments were a view name followed by a table name. (Bug#9897)

- Within a stored procedure, attempting to update a view defined as an inner join failed with a `Table '`tbl_name`' was locked with a READ lock and can't be updated` error. (Bug#9481)

- Fixed a problem with `INFORMATION_SCHEMA` tables being inaccessible depending on lettercase used to refer to them. (Bug#10018)

- my_print_defaults was ignoring the `--defaults-extra-file` option or crashing when the option was given. (Bug#9136, Bug#9851)

- The `INFORMATION_SCHEMA.COLUMNS` table was missing columns of views for which the user has access. (Bug#9838)

- Fixed a mysqldump crash that occurred with the `--complete-insert` option when dumping tables with a large number of long column names. (Bug#10286)

- Corrected a problem where `DEFAULT` values where not assigned properly to `BIT(1)` or `CHAR(1)` columns if certain other columns preceded them in the table definition. (Bug#10179)

- For `MERGE` tables, avoid writing absolute pathnames in the `.MRG` file for the names of the constituent `MyISAM` tables so that if the data directory is moved, `MERGE` tables will not break. For mysqld, write just the `MyISAM` table name if it is in the same database as the `MERGE` table, and a path relative to the data directory otherwise. For the embedded servers, absolute pathnames may still be used. (Bug#5964)

- Corrected a problem resolving outer column references in correlated subqueries when using the prepared statements. (Bug#10041)

- Corrected the error message for exceeding the `MAX_CONNECTIONS_PER_HOUR` limit to say `max_connections_per_hour` instead of `max_connections`. (Bug#9947)

- Fixed incorrect memory block allocation for the query cache in the embedded server. (Bug#9549)

- Corrected an inability to select from a view within a stored procedure. (Bug#9758)

- Fixed a server crash resulting from use of `AVG(DISTINCT)` with `GROUP BY ... WITH ROLLUP`. (Bug#9799)

- Fixed a server crash resulting from use of `DISTINCT AVG()` with `GROUP BY ... WITH ROLLUP`. (Bug#9800)

- Fixed a server crash resulting from use of a `CHAR` or `VARCHAR` column with `MIN()` or `MAX()` and `GROUP BY ... WITH ROLLUP`. (Bug#9820)

- Fixed a server crash resulting from use of `SELECT DISTINCT` with a prepared statement that uses a cursor. (Bug#9520)

- Fixed server crash resulting from multiple calls to a stored procedure that assigned the result of a subquery to a variable or compared it to a value with `IN`. (Bug#5963)

- Selecting from a single-table view defined on multiple-table views caused a server crash. (Bug#8528)

- If the file named by a `--defaults-extra-file` option does not exist or is otherwise inaccessible, an error now occurs. (Bug#5056)

- `net_read_timeout` and `net_write_timeout` were not being respected on Windows. (Bug#9721)

- `SELECT` from `INFORMATION_SCHEMA` tables failed if the statement has a `GROUP BY` clause and an aggregate function in the select list. (Bug#9404)

- Corrected some failures of prepared statements for SQL (`PREPARE` plus `EXECUTE`) to return all rows for some `SELECT` statements. (Bug#9096, Bug#9777)

- Remove extra slashes in `--tmpdir` value (for example, convert `/var//tmp` to `/var/tmp`, because they caused various errors. (Bug#8497)

- Added `Create_routine_priv`, `Alter_routine_priv`, and `Execute_priv` privileges to the `mysql.host` privilege table. (They had been added to `mysql.db` in MySQL 5.0.3 but not to the `host` table.) (Bug#8166)

- Fixed configure to properly recognize whether NTPL is available on Linux. (Bug#2173)

- Incomplete results were returned from `INFORMATION_SCHEMA.COLUMNS` for `INFORMATION_SCHEMA` tables for non-`root` users. (Bug#10261)

- Fixed a portability problem in compiling `mysql.cc` with VC++ on Windows. (Bug#10245)

- `SELECT 0/0` returned `0` rather than `NULL`. (Bug#10404)

- `MAX()` for an `INT UNSIGNED` (unsigned 4-byte integer) column could return negative values if the column contained values larger than 2^31. (Bug#9298)

- `SHOW CREATE VIEW` got confused and could not find the view if there was a temporary table with the same name as the view. (Bug#8921)

- Fixed a deadlock resulting from use of `FLUSH TABLES WITH READ LOCK` while an `INSERT DELAYED` statement is in progress. (Bug#7823)

- The optimizer was choosing suboptimal execution plans for certain outer joins where the right table of a left join (or left table of a right join) had both `ON` and `WHERE` conditions. (Bug#10162)

- `RENAME TABLE` for an `ARCHIVE` table failed if the `.arn` file was not present. (Bug#9911)

- Invoking a stored function that executed a `SHOW` statement resulted in a server crash. (Bug#8408)

- Fixed problems with static variables and do not link with `libsupc++` to allow building on FreeBSD 5.3. (Bug#9714)

- Fixed some awk script portability problems in cmd-line-utils/libedit/makelist.sh. (Bug#9954)

- Fixed a problem with mishandling of `NULL` key parts in hash indexes on `VARCHAR` columns, resulting in incorrect query results. (Bug#9489, Bug#10176)

- `InnoDB`: Fixed a critical bug in InnoDB `AUTO_INCREMENT`: it could assign the same value for several rows. (Bug#10359) `InnoDB`: All InnoDB bug fixes from 4.1.12 and earlier versions, and also the fixes to bugs #10335 and #10607 listed in the 4.1.13 change notes.

### C.1.7. Cambios en la entrega 5.0.5 (not released)

No public release of MySQL 5.0.5 was made. The changes described in this section are available in MySQL 5.0.6.

Functionality added or changed:

- Added support for the `BIT` data type to the `MEMORY`, `InnoDB`, and `BDB` storage engines.

- `SHOW VARIABLES` no longer displays the deprecated `log_update` system variable. (Bug#9738)

- The behavior controlled by the `--innodb-fast-shutdown` option now can be changed at runtime by setting the value of the global `innodb_fast_shutdown` system variable. It now accepts values 0, 1 and 2 (except on Netware where 2 is disabled). If set to 2, then when the MySQL server shuts down, `InnoDB` will just flush its logs and shut down brutally (and quickly) as if a MySQL crash had occurred; no committed transaction will be lost, but a crash recovery will be done at next startup.

Bugs fixed:

- Security fix: If mysqld was started with `--user=`non_existent_user``, it would run using the privileges of the account it was invoked from, even if that was `root`. (Bug#9833)

- Corrected a failure to resolve a column reference correctly for a `LEFT JOIN` that compared a join column to an `IN` subquery. (Bug#9338)

- Fixed a problem where, after an internal temporary table in memory became too large and had to be converted to an on-disk table, the error indicator was not cleared and the query failed with error 1023 (`Can't find record in ''`). (Bug#9703)

- Multiple-table updates could produce spurious data-truncation warnings if they used a join across columns that are indexed using a column prefix. (Bug#9103)

- Fixed a string-length comparison problem that caused mysql to fail loading dump files containing certain '`\`'-sequences. (Bug#9756)

- Fixed a failure to resolve a column reference properly when an outer join involving a view contained a subquery and the column was used in the subquery and the outer query. (Bug#6106, Bug#6107)

- Use of a subquery that used `WITH ROLLUP` in the `FROM` clause of the main query sometimes resulted in a `Column cannot be null` error. (Bug#9681)

- Fixed a memory leak that occurred when selecting from a view that contained a subquery. (Bug#10107)

- Fixed an optimizer bug in computing the union of two ranges for the `OR` operator. (Bug#9348)

- Fixed a segmentation fault in mysqlcheck that occurred when the last table checked in `--auto-repair` mode returned an error (such as the table being a `MERGE` table). (Bug#9492)

- `SET @var= CAST(NULL AS [INTEGER|CHAR])` now sets the result type of the variable to `INTEGER`/`CHAR`. (Bug#6598)

- Incorrect results were returned for queries of the form `SELECT ... LEFT JOIN ... WHERE EXISTS (`subquery`)`, where the subquery selected rows based on an `IS NULL` condition. (Bug#9516)

- Executing `LOCK TABLES` and then calling a stored procedure caused an error and resulting in the server thinking that no stored procedures exist. (Bug#9566)

- Selecting from a view containing a subquery caused the server to hang. (Bug#8490)

- Within a stored procedure, attempting to execute a multiple-table `UPDATE` failed with a `Table '`tbl_name`' was locked with a READ lock and can't be updated` error. (Bug#9486)

- Starting mysqld with the `--skip-innodb` and `--default-storage-engine=innodb` (or `--default-table-type=innodb` caused a server crash. (Bug#9815)

- Queries containing `CURRENT_USER()` incorrectly were registered in the query cache. (Bug#9796)

- Setting the `storage_engine` system variable to `MEMORY` succeeded, but retrieving the variable resulted in a value of `HEAP` (the old name for the `MEMORY` storage engine) rather than `MEMORY`. (Bug#10039)

- mysqlshow displayed an incorrect row count for tables. (Bug#9391)

- The server died with signal 11 if a non-existent location was specified for the location of the binary log. Now the server exits after printing an appropriate error messsage. (Bug#9542)

- Fixed a problem in the client/server protocol where the server closed the connection before sending the final error message. The problem could show up as a `Lost connection to MySQL server during query` when attempting to connect to access a non-existent database. (Bug#6387, Bug#9455)

- Fixed a `readline`-related crash in mysql when the user pressed Control-R. (Bug#9568)

- For stored functions that should return a `YEAR` value, corrected a failure of the value to be in `YEAR` format. (Bug#8861)

- Fixed a server crash resulting from invocation of a stored function that returned a value having an `ENUM` or `SET` data type. (Bug#9775)

- Fixed a server crash resulting from invocation of a stored function that returned a value having a `BLOB` data type. (Bug#9102)

- Fixed a server crash resulting from invocation of a stored function that returned a value having a `BIT` data type. (Bug#7648)

- `TIMEDIFF()` with a negative time first argument and postive time second argument produced incorrect results. (Bug#8068)

- Fixed a problem with `OPTIMIZE TABLE` for `InnoDB` tables being written twice to the binary log. (Bug#9149)

- `InnoDB`: Prevent `ALTER TABLE` from changing the storage engine if there are foreign key constraints on the table. (Bug#5574, Bug#5670)

- `InnoDB`: Fixed a bug where next-key locking doesn't allow the insert which does not produce a phantom. (Bug#9354) If the range is of type `'a' <= uniquecolumn`, `InnoDB` lock only the RECORD, if the record with the column value `'a'` exists in a CLUSTERED index. This allows inserts before a range.

- `InnoDB`: When `FOREIGN_KEY_CHECKS=0`, `ALTER TABLE` and `RENAME TABLE` will ignore any type incompatibilities between referencing and referenced columns. Thus, it will be possible to convert the character sets of columns that participate in a foreign key. Be sure to convert all tables before modifying any data! (Bug#9802)

- Provide more informative error messages in clustered setting when a query is issued against a table that has been modified by another `mysqld` server. (Bug#6762)

### C.1.8. Cambios en la entrega 5.0.4 (16 Apr 2005)

Functionality added or changed:

- Added `ENGINE=MyISAM` table option when creating `mysql.proc` table in mysql_create_system_tables script to make sure the table is created as a `MyISAM` table even if the default storage engine has been changed. (Bug#9496)

- `SHOW CREATE TABLE` for an `INFORMATION_SCHEMA` table no longer prints a `MAX_ROWS` value because the value has no meaning. (Bug#8941)

- Invalid `DEFAULT` values for `CREATE TABLE` now generate errors. (Bug#5902)

- Added `--show-table-type` option to mysqlshow, to display a column indicating the table type, as in `SHOW FULL TABLES`. (Bug#5036)

- The way the time zone information is stored into the binary log was changed, so that it's now possible to have a replication master and slave running with different global time zones. A drawback is that replication from 5.0.4 masters to pre-5.0.4 slaves is impossible.

- Added `--with-big-tables` compilation option to configure. (Previously it was necessary to pass `-DBIG_TABLES` to the compiler manually in order to enable large table support.) See Sección 2.8.2, “Opciones típicas de configure” for details.

- New configuration directives `!include` and `!includedir` implemented for including option files and searching directories for option files. See Sección 4.3.2, “Usar ficheros de opciones” for usage.

Bugs fixed:

- The use of `XOR` together with `NOT ISNULL()` erroneously resulted in some outer joins being converted to inner joins by the optimizer. (Bug#9017)

- Fixed an optimizer problem where extraneous comparisons between `NULL` values in indexed columns were being done for operators such as `=` that are never true for `NULL`. (Bug#8877)

- Fixed the client/server protocol for prepared statements so that reconnection works properly when the connection is killed while reconnect is enabled. (Bug#8866)

- A server installed as a Windows service and started with `--shared-memory` could not be stopped. (Bug#9665)

- Fixed a server crash resulting from multiple executions of a prepared statement involving a join of an `INFORMATION_SCHEMA` table with another table. (Bug#9383)

- Fixed `utf8_spanish2_ci` and `ucs2_spanish2_ci` collations to not consider '`r`' equal to '`rr`'. If you upgrade to this version from an earlier version, you should rebuild the indexes of affected tables. (Bug#9269)

- mysqldump dumped core when invoked with `--tmp` and `--single-transaction` options and a non-existent table name. (Bug#9175)

- Allow extra HKSCS and cp950 characters (`big5` extension characters) to be accepted in `big5` columns. (Bug#9357)

- mysql.server no longer uses non-portable alias command or LSB functions. (Bug#9852)

- Fixed a server crash resulting from `GROUP BY` on a decimal expression. (Bug#9210)

- In prepared statements, subqueries containing parameters were erroneously treated as `const` tables during preparation, resulting in a server crash. (Bug#8807)

- InnoDB: `ENUM` and `SET` columns were treated incorrectly as character strings. This bug did not manifest itself with `latin1` collations if there were less than about 100 elements in an `ENUM`, but it caused malfunction with `UTF-8`. Old tables will continue to work. In new tables, `ENUM` and `SET` will be internally stored as unsigned integers. (Bug#9526)

- InnoDB: Avoid test suite failures caused by a locking conflict between two server instances at server shutdown/startup. This conflict on advisory locks appears to be the result of a bug in the operating system; these locks should be released when the files are closed, but somehow that does not always happen immediately in Linux. (Bug#9381)

- InnoDB: True `VARCHAR`: InnoDB stored the 'position' of a row wrong in a column prefix primary key index; this could cause MySQL to complain `ERROR 1032: Can't find record …` in an update of the primary key, and also some `ORDER BY` or `DISTINCT` queries. (Bug#9314)

- InnoDB: Fix bug in MySQL/InnoDB 5.0.3: SQL statements were not rolled back on error. (Bug#8650)

- Fixed a `Commands out of sync` error when two prepared statements for single-row result sets were open simultaneously. (Bug#8880)

- Fixed a server crash after a call to `mysql_stmt_close()` for single-row result set. (Bug#9159)

- Fixed server crashes for `CREATE TABLE ... SELECT` or `INSERT INTO ... SELECT` when selecting from multiple-table view. (Bug#8703, Bug#9398)

- `TRADITIONAL` SQL mode should prevent inserts where a column with no default value is omitted or set to a value of `DEFAULT`. Fixed cases where this restriction was not enforced. (Bug#5986)

- Fixed a server crash when creating a `PRIMARY KEY` for a table, if the table contained a `BIT` column. (Bug#9571)

- Warning message from `GROUP_CONCAT()` did not always indicate correct number of lines. (Bug#8681)

- The commit count cache for `NDB` was not properly invalidated when deleting a record using a cursor. (Bug#8585)

- Fixed option-parsing code for the embedded server to understand `K`, `M`, and `G` suffixes for the `net_buffer_length` and `max_allowed_packet` options. (Bug#9472)

- Selecting a `BIT` column failed if the binary client/server protocol was used. (Bug#9608)

- Fixed a permissions problem whereby information in `INFORMATION_SCHEMA` could be exposed to a user with insufficient privileges. (Bug#7214)

- An error now occurs if you try to insert an invalid value via a stored procedure in `STRICT` mode. (Bug#5907)

- Link with `libsupc++` on Fedora Core 3 to get language support functions. (Bug#6554)

- The value of the `CHARACTER_MAXIMUM_LENGTH` and `CHARACTER_OCTET_LENGTH` columns of the `INFORMATION_SCHEMA.COLUMNS` table must be `NULL` for numeric columns, but were not. (Bug#9344)

- `DROP TABLE` did not drop triggers that were defined for the table. `DROP DATABASE` did not drop triggers in the database. (Bug#5859, Bug#6559)

- `CREATE OR REPLACE VIEW` and `ALTER VIEW` now require the `CREATE VIEW` and `DROP` privileges, not `CREATE VIEW` and `DELETE`. (`DELETE` is a row-level privilege, not a table-level privilege.) (Bug#9260)

- Some user variables were not being handled with “implicit” coercibility. (Bug#9425)

- Setting the `max_error_count` system variable to 0 resulted in a setting of 1. (Bug#9072)

- Fixed a collation coercibility problem that caused a union between binary and non-binary columns to fail. (Bug#6519)

- Fixed a bug in division of floating point numbers. It could cause nine zeroes (`000000000`) to be inserted in the middle of the quotient. (Bug#9501)

- `INFORMATION_SCHEMA` tables had an implicit upper limit for the number of rows. As a result, not all data could be returned for some queries. (Bug#9317)

- Fixed a problem with the `tee` command in mysql that resulted in mysql crashing. (Bug#8499)

- `CAST()` now produces warnings when casting incorrect `INTEGER` and `CHAR` values. This also applies to implicit `string` to `number` casts. (Bug#5912)

- `ALTER TABLE` now fails in `STRICT` mode if the alteration generates warnings.

- Using `CONVERT('0000-00-00',date)` or `CAST('0000-00-00' as date)` in `TRADITIONAL` SQL mode now produces a warning. (Bug#6145)

- Inserting a zero date in a `DATE`, `DATETIME` or `TIMESTAMP` column during `TRADITIONAL` mode now produces an error. (Bug#5933)

- Inserting a zero date into a `DATETIME` column in `TRADITIONAL` mode now produces an error.

- `STR_TO_DATE()` now produces errors in strict mode (and warnings otherwise) when given an illegal argument. (Bug#5902)

- Fixed a problem with `ORDER BY` that sometimes caused incorrect sorting of `utf8` data. (Bug#9309)

- Fixed server crash resulting from queries that combined `SELECT DISTINCT`, `SUM()`, and `ROLLUP`. (Bug#8615)

- Incorrect results were returned from queries that combined `SELECT DISTINCT`, `GROUP BY` , and `ROLLUP`. (Bug#8616)

- Too many rows were returned from queries that combined `ROLLUP` and `LIMIT` if `SQL_CALC_FOUND_ROWS` was given. (Bug#8617)

- If on replication master a `LOAD DATA INFILE` is interrupted in the middle (integrity constraint violation, killed connection...), the slave used to skip this `LOAD DATA INFILE` entirely, thus missing some changes if this command permanently inserted/updated some table records before being interrupted. This is now fixed. (Bug#3247)

### C.1.9. Cambios en la entrega 5.0.3 (23 Mar 2005: Beta)

Note: This Beta release, as any other pre-production release, should not be installed on “production” level systems or systems with critical data. It is good practice to back up your data before installing any new version of software. Although MySQL has done its best to ensure a high level of quality, protect your data by making a backup as you would for any software beta release.

Functionality added or changed:

- New privilege `CREATE USER` was added.

- Security improvement: The server creates `.frm`, `.MYD`, `.MYI`, `.MRG`, `.ISD`, and `.ISM` table files only if a file with the same name does not already exist. Thanks to Stefano Di Paola `<stefano.dipaola@wisec.it>` for finding and informing us about this issue. (CAN-2005-0711)

- Security improvement: User-defined functions should have at least one symbol defined in addition to the `xxx` symbol that corresponds to the main `xxx()` function. These auxiliary symbols correspond to the `xxx_init()`, `xxx_deinit()`, `xxx_reset()`, `xxx_clear()`, and `xxx_add()` functions. mysqld by default no longer loads UDFs unless they have at least one auxiliary symbol defined in addition to the main symbol. The `--allow-suspicious-udfs` option controls whether UDFs that have only an `xxx` symbol can be loaded. By default, the option is off. `mysqld` also checks UDF filenames when it reads them from the `mysql.func` table and rejects those that contain directory pathname separator characters. (It already checked names as given in `CREATE FUNCTION` statements.) See Sección 27.2.3.1, “Secuencias de llamada UDF para funciones simples”, Sección 27.2.3.2, “Secuencias de llamada UDF para funciones agregadas”, and Sección 27.2.3.6, “Precauciones de seguridad en funciones definidas por usuarios”. Thanks to Stefano Di Paola `<stefano.dipaola@wisec.it>` for finding and informing us about this issue. (CAN-2005-0709, CAN-2005-0710)

- `my.cnf` in the compile-time datadir (usually `/usr/local/mysql/data/` in the binary tarball distributions) is not being read anymore. The value of the environment variable `MYSQL_HOME` is used instead of the hard-coded path.

- Support for the `ISAM` storage engine has been removed. If you have `ISAM` tables, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”.

- Support for `RAID` options in `MyISAM` tables has been removed. If you have tables that use these options, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”.

- Added support for `AVG(DISTINCT)`.

- `ONLY_FULL_GROUP_BY` no longer is included in the `ANSI` composite SQL mode. (Bug#8510)

- mysqld_safe will create the directory where the UNIX socket file is to be located if the directory does not exist. This applies only to the last component of the directory pathname. (Bug#8513)

- The coercibility for the return value of functions such as `USER()` or `VERSION()` now is “system constant” rather than “implicit.” This makes these functions more coercible than column values so that comparisons of the two do not result in `Illegal mix of collations` errors. `COERCIBILITY()` was modified to accommodate this new coercibility value. See Sección 12.9.3, “Funciones de información”.

- User variable coercibility has been changed from “coercible” to “implicit.” That is, user variables have the same coercibility as column values.

- Boolean full-text phrase searching now requires only that matches contain exactly the same words as the phrase and in the same order. Non-word characters no longer need match exactly.

- `CHECKSUM TABLE` returns a warning for non-existing tables. The checksum value remains `NULL` as before. (Bug#8256)

- The server now includes a timestamp in the `Ready for connections` message that is written to the error log at startup. (Bug#8444)

- Added `SQL_NOTES` session variable to cause `Note`-level warnings not to be recorded. (Bug#6662)

- Allowed the service-installation command for Windows servers to specify a single option other than `--defaults-file` following the service name. This is for compatibility with MySQL 4.1. (Bug#7856)

- InnoDB: Upgrading from 4.1: The sorting order for end-space in `TEXT` columns for InnoDB tables has changed. Starting from 5.0.3, InnoDB compares `TEXT` columns as space-padded at the end. If you have a non-unique index on a `TEXT` column, you should run `CHECK TABLE` on it, and run `OPTIMIZE TABLE` if the check reports errors. If you have a `UNIQUE INDEX` on a `TEXT` column, you should rebuild the table with `OPTIMIZE TABLE`.

- `InnoDB`: Commit after every 10,000 copied rows when executing `ALTER TABLE`, `CREATE INDEX`, `DROP INDEX` or `OPTIMIZE TABLE`. This makes it much faster to recover from an aborted operation.

- Added `VAR_POP()` and `STDDEV_POP()` as standard SQL aliases for the `VARIANCE()` and `STDDEV()` functions that compute population variance and standard deviation. Added new `VAR_SAMP()` and `STDDEV_SAMP()` functions to compute sample variance and standard deviation. (Bug#3190)

- Fixed a problem with out-of-order packets being sent (`ERROR` after `OK` or `EOF`) following a `KILL QUERY` statement. (Bug#6804)

- Retrieving from a view defined as a `SELECT` that mixed `UNION ALL` and `UNION DISTINCT` resulted in a different result than retrieving from the original `SELECT`. (Bug#6565)

- Fixed a problem with non-optimal `index_merge` query execution plans being chosen on IRIX. (Bug#8578)

- `BIT` in column definitions now is a distinct data type; it no longer is treated as a synonym for `TINYINT(1)`.

- Bit-field values can be written using `b'`value`'` notation. `value` is a binary value written using 0s and 1s.

- From the Windows distribution, predefined accounts without passwords for remote users ("root@%", "@%") were removed (other distributions never had them).

- Added `mysql_library_init()` and `mysql_library_end()` as synonyms for the `mysql_server_init()` and `mysql_server_end()` C API functions. `mysql_library_init()` and `mysql_library_end()` are `#define` symbols, but the names more clearly indicate that they should be called when beginning and ending use of a MySQL C API library no matter whether the application uses `libmysqlclient` or `libmysqld`. (Bug#6149)

- `SHOW COLUMNS` now displays `NO` rather than blank in the `Null` output column if the corresponding table column cannot be `NULL`.

- Changed XML format for mysql from `<`col_name`>`col_value`</`col_name`>` to `<field name="`col_name`">`col_value`</field>` to allow for proper encoding of column names that are not legal as element names. (Bug#7811)

- Added `--innodb-checksums` and `--innodb-doublewrite` options for mysqld.

- Added `--large-pages` option for mysqld.

- Added `multi_read_range` system variable.

- `SHOW DATABASES`, `SHOW TABLES`, `SHOW COLUMNS`, and so forth display information about the `INFORMATION_SCHEMA` database. Also, several `SHOW` statements now accept a `WHERE` clause specifying which output rows to display. See Capítulo 22, La base de datos de información `INFORMATION_SCHEMA`.

- Added the `CREATE ROUTINE` and `ALTER ROUTINE` privileges, and made the `EXECUTE` privilege operational.

- InnoDB: Corrected a bug in the crash recovery of `ROW_FORMAT=COMPACT` tables that caused corruption. (Bug#7973) There may still be bugs in the crash recovery, especially in `COMPACT` tables.

- When the `MyISAM` storage engine detects corruption of a `MyISAM` table, a message describing the problem now is written to the error log.

- InnoDB: When MySQL/InnoDB is compiled on Mac OS X 10.2 or earlier, detect the operating system version at run time and use the `fcntl()` file flush method on Mac OS X versions 10.3 and later. In Mac OS X, `fsync()` does not flush the write cache in the disk drive, but the special `fcntl()` does; however, the flush request is ignored by some external devices. Failure to flush the buffers may cause severe database corruption at power outages.

- InnoDB: Implemented fast `TRUNCATE TABLE`. The old approach (deleting rows one by one) may be used if the table is being referenced by foreign keys. (Bug#7150)

- Added `cp932` (SJIS for Windows Japanese) and `eucjpms` (UJIS for Windows Japanese) character sets.

- Added several `InnoDB` status variables. See Sección 5.3.4, “Variables de estado del servidor”.

- Added the `FEDERATED` storage engine. See Sección 14.6, “El motor de almacenamiento `FEDERATED`”.

- `SHOW CREATE TABLE` now uses `USING `index_type`` rather than `TYPE `index_type`` to specify an index type. (Bug#7233)

- InnoDB now supports a fast `TRUNCATE TABLE`. One visible change from this is that auto-increment values for this table are reset on `TRUNCATE`.

- Added an `error` member to the `MYSQL_BIND` data structure that is used in the C API for prepared statements. This member is used for reporting data truncation errors. Truncation reporting is enabled via the new `MYSQL_REPORT_DATA_TRUNCATION` option for the `mysql_options()` C API function.

- API change: the `reconnect` flag in the `MYSQL` structure is now set to 0 by `mysql_real_connect()`. Only those client programs which didn't explicitly set this flag to 0 or 1 after `mysql_real_connect()` experience a change. Having automatic reconnection enabled by default was considered too dangerous (after reconnection, table locks, temporary tables, user and session variables are lost).

- `FLUSH TABLES WITH READ LOCK` is now killable while it's waiting for running `COMMIT` statements to finish.

- `MEMORY` (`HEAP`) can have `VARCHAR()` fields.

- `VARCHAR` columns now remember end space. A `VARCHAR()` column can now contain up to 65535 bytes. For more details, see Sección C.1, “Cambios en la entrega 5.0.x (Desarrollo)”. If the table handler doesn't support the new `VARCHAR` type, then it's converted to a `CHAR` column. Currently this happens for `NDB` tables.

- InnoDB: Introduced a compact record format that does not store the number of columns or the lengths of fixed-size columns. The old format can be requested by specifying `ROW_FORMAT=REDUNDANT`. The new format (`ROW_FORMAT=COMPACT`) is the default. The new format typically saves 20 % of disk space and memory.

- InnoDB: Setting the initial `AUTO_INCREMENT` value for an `InnoDB` table using `CREATE TABLE ... AUTO_INCREMENT = `n`` now works, and `ALTER TABLE ... AUTO_INCREMENT = `n`` resets the current value.

- `Seconds_Behind_Master` is `NULL` (which means “unknown”) if the slave SQL thread is not running, or if the slave I/O thread is not running or not connected to master. It is zero if the SQL thread has caught up to the I/O thread. It no longer grows indefinitely if the master is idle.

- The MySQL server aborts immediately instead of simply issuing a warning if it is started with the `--log-bin` option but cannot initialize the binary log at startup (that is, an error occurs when writing to the binary log file or binary log index file).

- The binary log file and binary log index file now are handled the same way as `MyISAM` tables when there is a “disk full” or “quota exceeded” error. See Sección A.4.3, “Cómo se comporta MySQL ante un disco lleno”.

- The MySQL server now aborts when started with option `--log-bin-index` and without `--log-bin`, and when started with `--log-slave-updates` and without `--log-bin`.

- If the MySQL server is started without an argument to `--log-bin` and without `--log-bin-index`, thus not providing a name for the binary log index file, a warning is issued because MySQL falls back to using the hostname for that name, and this is prone to replication issues if the server's hostname's gets changed later. See Sección A.8.4, “Cuestiones abiertas en MySQL”.

- Added account-specific `MAX_USER_CONNECTIONS` limit, which allows you to specify the maximum number of concurrent connections for the account. Also, all limited resources now are counted per account (instead of being counted per user + host pair as it was before). Use the `--old-style-user-limits` option to get the old behavior.

- InnoDB: A shared record lock (`LOCK_REC_NOT_GAP`) is now taken for a matching record in the foreign key check because inserts can be allowed into gaps.

- InnoDB: Relaxed locking in `INSERT…SELECT`, single table `UPDATE…SELECT` and single table `DELETE…SELECT` clauses when `innodb_locks_unsafe_for_binlog` is used and isolation level of the transaction is not serializable. `InnoDB` uses consistent read in these cases for a selected table.

- Added a new global system variable `slave_transaction_retries`: if the replication slave SQL thread fails to execute a transaction because of an `InnoDB` deadlock or exceeded InnoDB's `innodb_lock_wait_timeout` or NDBCluster's `TransactionDeadlockDetectionTimeout` or `TransactionInactiveTimeout`, it automatically retries `slave_transaction_retries` times before stopping with an error. The default is 10. (Bug#8325)

- When a client releases a user-level lock, `DO RELEASE_LOCK()` will not be written to the binary log anymore (this makes the binary log smaller); as a counterpart, the slave does not actually take the lock when it executes `GET_LOCK()`. This is mainly an optimization and should not affect existing setups. (Bug#7998)

- The way the character set information is stored into the binary log was changed, so that it's now possible to have a replication master and slave running with different global character sets. A drawback is that replication from 5.0.3 masters to pre-5.0.3 slaves is impossible.

- The `LOAD DATA` statement was extended to support user variables in the target column list, and an optional `SET` clause. Now one can perform some transformations on data after they have been read and before they are inserted into the table. For example:

      LOAD DATA INFILE 'file.txt'
        INTO TABLE t1
        (column1, @var1)
        SET column2 = @var1/100;

  Also, replication of `LOAD DATA` was changed, so you can't replicate such statements from a 5.0.3 master to pre-5.0.3 slaves.

Bugs fixed:

- If a `MyISAM` table on Windows had `INDEX DIRECTORY` or `DATA DIRECTORY` table options, mysqldump dumped the directory pathnames with single-backslash pathname separators. This would cause syntax errors when importing the dump file. mysqldump now changes '`\`' to '`/`' in the pathnames on Windows. (Bug#6660)

- `mysql_fix_privilege_tables` now fixes that the `mysql` privilege tables can be used in MySQL 4.1. This allows one to easily downgrade to 4.1 or run MySQL 5.0 and 4.1 with the same privilege files for testing purposes.

- Fixed bug creating user with GRANT fails with password but works without, (Bug#7905)

- mysqldump misinterpreted '`_`' and '`%`' characters in the names of tables to be dumped as wildcard characters. (Bug#9123)

- The definition of the enumeration-valued `sql_mode` column of the `mysql.proc` table was missing some of the current allowable SQL modes, so stored routines would not necessarily execute with the SQL mode in effect at the time of routine definition. (Bug#8902)

- `REPAIR TABLE` did not invalidate query results in the query cache that were generated from the table. (Bug#8480)

- In strict or traditional SQL mode, too-long string values assigned to string columns (`CHAR`, `VARCHAR`, `BINARY`, `VARBINARY`, `TEXT`, or `BLOB`) were correctly truncated, but the server returned an SQLSTATE value of `01000` (should be `22001`). (Bug#6999, Bug#9029)

- Stored functions that used cursors could return incorrect results. (Bug#8386)

- `AES_DECRYPT(`col_name`,`key`)` could fail to return `NULL` for invalid values in `col_name`, if `col_name` was declared as `NOT NULL`. (Bug#8669)

- Ordering by unsigned expression (more complex than a column reference) was treating the value as signed, producing incorrectly sorted results. (Bug#7425)

- `HAVING` was treating unsigned columns as signed. (Bug#7425)

- Fixed a problem with boolean full-text searches on `utf8` columns where a double quote in the search string caused a server crash. (Bug#8351)

- For a query with both `GROUP BY` and `COUNT(DISTINCT)` clauses and a `FROM` clause with a subquery, `NULL` was returned for any `VARCHAR` column selected by the subquery. (Bug#8218)

- Fixed a bug in `TRUNCATE`, which did not work within stored procedures. A workaround has been made so that within stored procedures, `TRUNCATE` is executed like `DELETE`. This was necessary because `TRUNCATE` is implicitly locking tables. (Bug#8850)

- Fixed an optimizer bug that caused incorrectly ordered result from a query that used a `FULLTEXT` index to retrieve rows and there was another index that was usable for `ORDER BY`. For such a query, `EXPLAIN` showed `fulltext` join type, but regular (not `FULLTEXT`) index in the `Key` column. (Bug#6635)

- If `SELECT DISTINCT` named an index column multiple times in the select list, the server tried to access different key fields for each instance of the column, which could result in a crash. (Bug#8532)

- For a stored function that refers to a given table, invoking the function while selecting from the same table resulted in a server crash. (Bug#8405)

- Comparison of a `DECIMAL` column containing `NULL` to a subquery that produced `DECIMAL` values resulted in a server crash. (Bug#8397)

- The `--set-character-set` option for myisamchk was changed to `--set-collation`. The value needed for specifying how to sort indexes is a collation name, not a character set name. (Bug#8349)

- Hostname matching didn't work if a netmask was specified for table-specific privileges. (Bug#3309)

- Corruption of `MyISAM` table indexes could occur with `TRUNCATE TABLE` if the table had already been opened. For example, this was possible if the table had been opened implicitly by selecting from a `MERGE` table that mapped to the `MyISAM` table. The server now issues an error message for `TRUNCATE TABLE` under these conditions. (Bug#8306)

- Setting the connection collation to a value different from the server collation followed by a `CREATE TABLE` statement that included a quoted default value resulted in a server crash. (Bug#8235)

- Fixed handling of table-name matching in mysqlhotcopy to accommodate `DBD::mysql` 2.9003 and up (which implement identifier quoting). (Bug#8136)

- Selecting from a view defined as a join caused a server crash if the query cache was enabled. (Bug#8054)

- Results in the query cache generated from a view were not properly invalidated after `ALTER VIEW` or `DROP VIEW` on that view. (Bug#8050)

- `FOUND_ROWS()` returned an incorrect value after a `SELECT SQL_CALC_FOUND_ROWS DISTINCT` statement that selected constants and included `GROUP BY` and `LIMIT` clauses. (Bug#7945)

- Selecting from an `INFORMATION_SCHEMA` table combined with a subselect on an `INFORMATION_SCHEMA` table caused an error with the message `Table `tbl_name` is corrupted`. (Bug#8164)

- Fixed a problem with equality propagation optimization for prepared statements and stored procedures that caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug#8115, Bug#8849)

- `LEFT OUTER JOIN` between an empty base table and a view on an empty base table caused a server crash. (Bug#7433)

- Use of `GROUP_CONCAT()` in the select list when selecting from a view caused a server crash. (Bug#7116)

- Use of a view in a correlated subquery that contains `HAVING` but no `GROUP BY` caused a server crash. (Bug#6894)

- Handling by `mysql_list_fields()` of references to stored functions within views was incorrect and could result in a server crash. (Bug#6814)

- mysqldump now avoids writing `SET NAMES` to the dump output if the server is older than version 4.1 and would not understand that statement. (Bug#7997)

- Fixed problems when selecting from a view that had an `EXISTS` or `NOT EXISTS` subquery. Selecting columns by name caused a server crash. With `SELECT *`, a crash did not occur, but columns in outer query were not resolved properly. (Bug#6394)

- DDL statements for views were not being written to the binary log (and thus not subject to replication). (Bug#4838)

- The `CHAR()` function was not ignoring `NULL` arguments, contrary to the documentation. (Bug#6317)

- Creating a table using a name containing a character that is illegal in `character_set_client` resulted in the character being stripped from the name and no error. The character now is considered an error. (Bug#8041)

- Fixed a problem with the Cyrillic letters I and SHORT I being treated the same by the `utf8_general_ci` collation. (Bug#8385)

- Some `INFORMATION_SCHEMA` columns that contained catalog identifiers were of type `LONGTEXT`. These were changed to `VARCHAR(`N``, where `N` is the appropriate maximum identifier length. (Bug#7215)

- Some `INFORMATION_SCHEMA` columns that contained timestamp values were of type `VARBINARY`. These were changed to `TIMESTAMP`. (Bug#7217)

- An expression that tested a case-insensitive character column against string constants that differed in lettercase could fail because the constants were treated as having a binary collation. (For example, `WHERE city='London' AND city='london'` could fail.) (Bug#7098, Bug#8690)

- The output of the `STATUS` (`\s`) command in mysql had the values for the server and client character sets reversed. (Bug#7571)

- If the slave was running with `--replicate-*-table` options which excluded one temporary table and included another, and the two tables were used in a single `DROP TEMPORARY TABLE IF EXISTS` statement, as the ones the master automatically writes to its binary log upon client's disconnection when client has not explicitly dropped these, the slave could forget to delete the included replicated temporary table. Only the slave needs to be upgraded. (Bug#8055)

- When setting integer system variables to a negative value with `SET VARIABLES`, the value was treated as a positive value modulo 2^32. (Bug#6958)

- Corrected a problem with references to `DUAL` where statements such as `SELECT 1 AS a FROM DUAL` would succeed but statements such as `SELECT 1 AS a FROM DUAL LIMIT 1` would fail. (Bug#8023)

- Fixed a server crash caused by `DELETE FROM `tbl_name` ... WHERE ... ORDER BY `tbl_name`.`col_name`` when the `ORDER BY` column was qualified with the table name. (Bug#8392)

- Fixed a bug in `MATCH ... AGAINST` in natural language mode that could cause a server crash if the `FULLTEXT` index was not used in a join (`EXPLAIN` did not show `fulltext` join mode) and the search query matched no rows in the table (Bug#8522).

- `InnoDB`: Honor the `--tmpdir` startup option when creating temporary files. Previously, `InnoDB` temporary files were always created in the temporary directory of the operating system. On Netware, `InnoDB` will continue to ignore `--tmpdir`. (Bug#5822)

- Platform and architecture information in version information produced for `--version` option on Windows was always `Win95/Win98 (i32)`. More accurately determine platform as `Win32` or `Win64` for 32-bit or 64-bit Windows, and architecture as `ia32` for x86, `ia64` for Itanium, and `axp` for Alpha. (Bug#4445)

- If multiple semicolon-separated statements were received in a single packet, they were written to the binary log as a single event rather than as separate per-statement events. For a server serving as a replication master, this caused replication to fail when the event was sent to slave servers. (Bug#8436)

- Fixed `LOAD INDEX` statement to actually load index in memory. (Bug#8452)

- Fixed a failure of multiple-table updates to replicate properly on slave servers when `--replicate-*-table` options had been specified. (Bug#7011)

- Fixed failure of `CREATE TABLE ... LIKE` Windows when the source or destination table was located in a symlinked database directory. (Bug#6607)

- With `lower_case_table_names` set to 1, mysqldump on Windows could write the same table name in different lettercase for different SQL statements. Fixed so that consistent lettercase is used. (Bug#5185)

- mysqld_safe now understands the `--help` option. Previously, it ignored the option and attempted to start the server anyway. (Bug#7931)

- Fixed problem in `NO_BACKSLASH_ESCAPES` SQL mode for strings that contained both the string quoting character and backslash. (Bug#6368)

- Fixed some portability issues with overflow in floating point values.

- Prepared statements now gives warnings on prepare.

- Fixed bug in prepared statements with `SUM(DISTINCT...)`.

- Fixed bug in prepared statements with `OUTER JOIN`.

- Fixed a bug in `CONV()` function returning unsigned `BIGINT` number (third argument is positive, and return value does not fit in 32 bits). (Bug#7751)

- Fixed a failure of the `IN()` operator to return correct result if all values in the list were constants and some of them were using substring functions, for example, `LEFT()`, `RIGHT()`, or `MID()`. (Bug#7716)

- Fixed a crash in `CONVERT_TZ()` function when its second or third argument was from a `const` table (see Sección 7.2.1, “Sintaxis de `EXPLAIN` (Obtener información acerca de un `SELECT`)”). (Bug#7705)

- Fixed a problem with calculation of number of columns in row comparison against subquery. (Bug#8020)

- Fixed erroneous output resulting from `SELECT DISTINCT` combined with a subquery and `GROUP BY`. (Bug#7946)

- Fixed server crash in comparing a nested row expression (for example `row(1,(2,3))`) with a subquery. (Bug#8022)

- Fixed server crash resulting from certain correlated subqueries with forward references (references to an alias defined later in the outer query). (Bug#8025)

- Fixed server crash resulting from re-execution of prepared statements containing subqueries. (Bug#8125)

- Fixed a bug where `ALTER TABLE` improperly would accept an index on a `TIMESTAMP` column that `CREATE TABLE` would reject. (Bug#7884)

- `SHOW CREATE TABLE` now reports `ENGINE=MEMORY` rather than `ENGINE=HEAP` for a `MEMORY` table (unless the `MYSQL323` SQL mode is enabled). (Bug#6659)

- Fixed a bug where the use of `GROUP_CONCAT()` with `HAVING` caused a server crash. (Bug#7769)

- Fixed a bug where comparing the result of a subquery to a non-existent column caused a server crash on Windows. (Bug#7885)

- Fixed a bug in a combination of `-not` and `trunc*` operators of full-text search. Using more than one truncated negative search term, was causing empty result set.

- InnoDB: Corrected the handling of trailing spaces in the `ucs2` character set. (Bug#7350, Bug#8771)

- InnoDB: Use native `tmpfile()` function on Netware. All InnoDB temporary files are created under `sys:\tmp`. Previously, InnoDB temporary files were never deleted on Netware.

- Fixed a bug in `max_heap_table_size` handling, that resulted in `Table is full` error when the table was still smaller than the limit. (Bug#7791).

- Fixed a symlink vulnerability in the mysqlaccess script. Reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. (CAN-2005-0004)

- Fixed a bug that caused server crash if some error occured during filling of temporary table created for derived table or view handling. (Bug#7413)

- Fixed a bug which caused server crash if query containing `CONVERT_TZ()` function with constant arguments was prepared. (Bug#6849)

- Prevent adding `CREATE TABLE .. SELECT` query to the binary log when the insertion of new records partially failed. (Bug#6682)

- Fixed a bug which caused a crash when only the slave I/O thread was stopped and started. (Bug#6148)

- Giving mysqld a `SIGHUP` caused it to crash.

- Changed semantics of `CREATE/ALTER/DROP DATABASE` statements so that replication of `CREATE DATABASE` is possible when using `--binlog-do-db` and `--binlog-ignore-db`. (Bug#6391)

- A sequence of `BEGIN` (or `SET AUTOCOMMIT=0`), `FLUSH TABLES WITH READ LOCK`, transactional update, `COMMIT`, `FLUSH TABLES WITH READ LOCK` could hang the connection forever and possibly the MySQL server itself. This happened for example when running the `innobackup` script several times. (Bug#6732)

- mysqlbinlog did not print `SET PSEUDO_THREAD_ID` statements in front of `LOAD DATA INFILE` statements inserting into temporary tables, thus causing potential problems when rolling forward these statements after restoring a backup. (Bug#6671)

- InnoDB: Fixed a bug no error message for ALTER with InnoDB and AUTO_INCREMENT (Bug#7061). `InnoDB` now supports `ALTER TABLE...AUTO_INCREMENT = x` query to set auto increment value for a table.

- Made the MySQL server accept executing `SHOW CREATE DATABASE` even if the connection has an open transaction or locked tables; refusing it made mysqldump --single-transaction sometimes fail to print a complete `CREATE DATABASE` statement for some dumped databases. (Bug#7358)

- Fixed that, when encountering a “disk full” or “quota exceeded” write error, `MyISAM` sometimes didn't sleep and retry the write, thus resulting in a corrupted table. (Bug#7714)

- Fixed that `--expire-log-days` was not honored if using only transactions. (Bug#7236)

- Fixed that a slave could crash after replicating many `ANALYZE TABLE`, `OPTIMIZE TABLE`, or `REPAIR TABLE` statements from the master. (Bug#6461, Bug#7658)

- mysqlbinlog forgot to add backquotes around the collation of user variables (causing later parsing problems as `BINARY` is a reserved word). (Bug#7793)

- Ensured that mysqldump --single-transaction sets its transaction isolation level to `REPEATABLE READ` before proceeding (otherwise if the MySQL server was configured to run with a default isolation level lower than `REPEATABLE READ` it could give an inconsistent dump). (Bug#7850)

- Fixed that when using the `RPAD()` function (or any function adding spaces to the right) in a query that had to be resolved by using a temporary table, all resulting strings had rightmost spaces removed (i.e. `RPAD()` did not work) (Bug#4048)

- Fixed that a 5.0.3 slave can connect to a master < 3.23.50 without hanging (the reason for the hang is a bug in these quite old masters -- `SELECT @@unknown_var` hangs them -- which was fixed in MySQL 3.23.50). (Bug#7965)

- InnoDB: Fixed a deadlock without any locking, simple select and update (Bug#7975). `InnoDB` now takes an exclusive lock when `INSERT ON DUPLICATE KEY UPDATE` is checking duplicate keys.

- Fixed a bug where MySQL was allowing concurrent updates (inserts, deletes) to a table if binary logging is enabled. Changed to ensure that all updates are executed in a serialized fashion, because they are executed serialized when binlog is replayed. (Bug#7879)

- Fixed a rare race condition which could lead to `FLUSH TABLES WITH READ LOCK` hanging. (Bug#8682)

- Fixed a bug that caused the slave to stop on statements that produced an error on the master. (Bug#8412)

### C.1.10. Cambios en la entrega 5.0.2 (01 Dec 2004)

Functionality added or changed:

- Warning: Incompatible change! The precedence of `NOT` operator has changed so that expressions such as `NOT a BETWEEN b AND c` are parsed correctly as `NOT (a BETWEEN b AND c)` rather than as `(NOT a) BETWEEN b AND c`. The pre-5.0 higher-precedence behavior can be obtained by enabling the new `HIGH_NOT_PRECEDENCE` SQL mode.

- `SHOW STATUS` now shows the thread specific status variables and `SHOW GLOBAL STATUS` shows the status variables for the whole server.

- Added support for the `INFORMATION_SCHEMA` “information database” that provides database metadata. See Capítulo 22, La base de datos de información `INFORMATION_SCHEMA`.

- A `HAVING` clause in a `SELECT` statement now can refer to columns in the `GROUP BY` clause, as required by standard SQL.

- Added the `CREATE USER` and `RENAME USER` statements.

- Modify `DROP USER` so that it drops the account, including all its privileges. Formerly, it removed the account record only for an account that had had all privileges revoked.

- Added `IS [NOT] `boolean_value`` syntax, where `boolean_value` is `TRUE`, `FALSE`, or `UNKNOWN`.

- Added several `InnoDB` status variables. See Sección 5.3.4, “Variables de estado del servidor”.

- Implemented the `WITH CHECK OPTION` clause for `CREATE VIEW`.

- `CHECK TABLE` now works for views.

- The `SCHEMA` and `SCHEMAS` keywords are now accepted as synonyms for `DATABASE` and `DATABASES`.

- Added initial support for rudimentary triggers (the `CREATE TRIGGER` and `DROP TRIGGER` statements).

- Added basic support for read-only server side cursors.

- mysqldump --single-transaction --master-data is now able to take an online (non-blocking) dump of InnoDB and report the corresponding binary log coordinates, which makes a backup suitable for point-in-time recovery, roll-forward or replication slave creation. See Sección 8.7, “El programa de copia de seguridad de base de datos mysqldump”.

- Added `--start-datetime`, `--stop-datetime`, `--start-position`, `--stop-position` options to mysqlbinlog (makes point-in-time recovery easier).

- Made the MySQL server not react to signals `SIGHUP` and `SIGQUIT` on Mac OS X 10.3. This is needed because under this OS, the MySQL server receives lots of these signals (reported as Bug#2030).

- New `--auto-increment-increment` and `--auto-increment-offset` startup options. These allow you to set up a server to generate auto-increment values that don't conflict with another server.

- MySQL now by default checks dates and in strict mode allows only fully correct dates. If you want MySQL to behave as before, you should enable the new `ALLOW_INVALID_DATES` SQL mode.

- Added `STRICT_TRANS_TABLES`, `STRICT_ALL_TABLES`, `NO_ZERO_IN_DATE`, `NO_ZERO_DATE`, `ERROR_FOR_DIVISION_BY_ZERO`, and `TRADITIONAL` SQL modes. The `TRADITIONAL` mode is shorthand for all the preceding modes. When using mode `TRADITIONAL`, MySQL generates an error if you try to insert a wrong value in a column. It does not adjust the value to the closest possible legal value.

- MySQL now remembers which columns were declared to have default values. In `STRICT_TRANS_TABLES`/`STRICT_ALL_TABLES` mode, you now get an error if you do an `INSERT` without specifying all columns that don't have a default value. A side effect of this is that when you do `SHOW CREATE` for a new table, you no longer see a `DEFAULT` value for a column for which you didn't specify a default value.

- The compilation flag `DONT_USE_DEFAULT_FIELDS` was removed because you can get the same behavior by setting the `sql_mode` system variable to `STRICT_TRANS_TABLES`.

- Added `NO_AUTO_CREATE_USER` SQL mode to prevent `GRANT` from automatically creating new users if it would otherwise do so, unless a password also is specified.

- We now detect too-large floating point numbers during statement parsing and generate an error messages for them.

- Renamed the `sql_updatable_view_key` system variable to `updatable_views_with_limit`. This variable now can have only two values:

  - `1` or `YES`: Don't issue an error message (warning only) if a VIEW without presence of a key in the underlying table is used in queries with a `LIMIT` clause for updating. (This is the default value.)

  - `0` or `NO`: Prohibit update of a VIEW, which does not contain a key in the underlying table and the query uses a `LIMIT` clause (usually get from GUI tools).

- Reverted output format of `SHOW TABLES` to old pre-5.0.1 format that did not include a table type column. To get the additional column that lists the table type, use `SHOW FULL TABLES` now.

- The mysql_fix_privilege_tables script now initializes the global `CREATE VIEW` and `SHOW VIEW` privileges in the `user` table to the value of the `CREATE` privilege in that table.

- If the server finds that the `user` table has not been upgraded to include the view-related privilege columns, it treats each account as having view privileges that are the same as its `CREATE` privilege.

- InnoDB: If you specify the option `innodb_locks_unsafe_for_binlog` in `my.cnf`, InnoDB in an `UPDATE` or a `DELETE` only locks the rows that it updates or deletes. This greatly reduces the probability of deadlocks.

- A connection doing a rollback now displays "Rolling back" in the `State` column of `SHOW PROCESSLIST`.

- mysqlbinlog now prints an informative commented line (thread id, timestamp, server id, etc) before each `LOAD DATA INFILE`, like it does for other queries; unless `--short-form` is used.

- Two new server system variables were introduced. `auto_increment_increment` and `auto_increment_offset` can be set locally or globally, and are intended for use in controlling the behaviour of `AUTO_INCREMENT` columns in master-to-master replication. Note that these variables are not intended to take the place of sequences. See Sección 5.3.3, “Variables de sistema del servidor”.

Bugs fixed:

- Fixed that mysqlbinlog --read-from-remote-server sometimes couldn't accept two binary logfiles on the command line. (Bug#4507)

- Fixed that mysqlbinlog --position --read-from-remote-server had incorrect `# at` lines. (Bug#4506)

- Fixed that `CREATE TABLE ... TYPE=HEAP ... AS SELECT...` caused replication slave to stop. (Bug#4971)

- Fixed that `mysql_options(...,MYSQL_OPT_LOCAL_INFILE,...)` failed to disable `LOAD DATA LOCAL INFILE`. (Bug#5038)

- Fixed that `disable-local-infile` option had no effect if client read it from a configuration file using `mysql_options(...,MYSQL_READ_DEFAULT,...)`. (Bug#5073)

- Fixed that `SET GLOBAL SYNC_BINLOG` did not work on some platforms (Mac OS X). (Bug#5064)

- Fixed that mysql-test-run failed on the `rpl_trunc_binlog` test if running test from the installed (the target of 'make install') directory. (Bug#5050)

- Fixed that mysql-test-run failed on the `grant_cache` test when run as Unix user 'root'. (Bug#4678)

- Fixed an unlikely deadlock which could happen when using `KILL`. (Bug#4810)

- Fixed a crash when one connection got `KILL`ed while it was doing `START SLAVE`. (Bug#4827)

- Made `FLUSH TABLES WITH READ LOCK` block `COMMIT` if server is running with binary logging; this ensures that the binary log position can be trusted when doing a full backup of tables and the binary log. (Bug#4953)

- Fixed that the counter of an `auto_increment` column was not reset by `TRUNCATE TABLE` is the table was a temporary one. (Bug#5033)

- Fixed slave SQL thread so that the `SET COLLATION_SERVER...` statements it replicates don't advance its position (so that if it gets interrupted before the actual update query, it later redoes the `SET`). (Bug#5705)

- Fixed that if the slave SQL thread found a syntax error in a query (which should be rare, as the master parsed it successfully), it stops. (Bug#5711)

- Fixed that if a write to a MyISAM table fails because of a full disk or an exceeded disk quota, it prints a message to the error log every 10 minutes, and waits until disk becomes free. (Bug#3248)

- Fixed problem introduced in 4.0.21 where a connection starting a transaction, doing updates, then `FLUSH TABLES WITH READ LOCK`, then `COMMIT`, would cause replication slaves to stop (complaining about error 1223). Bug surfaced when using the InnoDB `innobackup` script. (Bug#5949)

- `OPTIMIZE TABLE`, `REPAIR TABLE`, and `ANALYZE TABLE` are now replicated without any error code in the binary log. (Bug#5551)

- If a connection had an open transaction but had done no updates to transactional tables (for example if had just done a `SELECT FOR UPDATE` then executed a non-transactional update, that update automatically committed the transaction (thus releasing InnoDB's row-level locks etc). (Bug#5714)

- If a connection was interrupted by a network error and did a rollback, the network error code got stored into the `BEGIN` and `ROLLBACK` binary log events; that caused superfluous slave stops. (Bug#6522)

- Fixed a bug which prevented mysqlbinlog from being able to read from `stdin`, for example, when piping the output from zcat to mysqlbinlog. (Bug#7853)

### C.1.11. Cambios en la entrega 5.0.1 (27 Jul 2004)

Note: This build passes our test suite and fixes a lot of reported bugs found in the previous 5.0.0 release. However, please be aware that this is not a “standard MySQL build” in the sense that there are still some open critical bugs in our bugs database at http://bugs.mysql.com/ that affect this release as well. We are actively fixing these and will make a new release where these are fixed as soon as possible. However, this binary should be a good candidate for testing new MySQL 5.0 features for future products.

Functionality added or changed:

- Warning: Incompatible change! C API change: `mysql_shutdown()` now requires a second argument. This is a source-level incompatibility that affects how you compile client programs; it does not affect the ability of compiled clients to communicate with older servers. See Sección 24.3.3.56, “`mysql_shutdown()`”.

- When installing a MySQL server as a Windows service, the installation command can include a `--local-service` option following the service name to cause the server to run using the `LocalService` Windows account that has limited privileges. This is in addition to the `--defaults-file` option that also can be given following the service name.

- Added support for read-only and updatable views based on a single table or other updatable views. View use requires that you upgrade your grant tables to add the view-related privileges. See Sección 2.10.2, “Aumentar la versión de las tablas de privilegios”.

- Implemented a new “greedy search” optimizer that can significantly reduce the time spent on query optimization for some many-table joins. (You are affected if not only some particular `SELECT` is slow, but even using `EXPLAIN` for it takes a noticeable amount of time.) Two new system variables, `optimizer_search_depth` and `optimizer_prune_level`, can be used to fine-tune optimizer behavior.

- A stored procedure is no longer “global.” That is, it now belongs to a specific database:

  - When a database is dropped, all routines belonging to that database are also dropped.

  - Procedure names may be qualified, for example, `db.p()`

  - When executed from another database, an implicit `USE `db_name`` is in effect.

  - Explicit `USE `db_name`` statements no longer are allowed in a stored procedure.

  See Capítulo 19, Procedimientos almacenados y funciones.

- Fixed `SHOW TABLES` output field name and values according to standard. Field name changed from `Type` to `table_type`, values are `BASE TABLE`, `VIEW` and `ERROR`. (Bug#4603)

- Added the `sql_updatable_view_key` system variable.

- Added the `--replicate-same-server-id` server option.

- Added `Last_query_cost` status variable that reports optimizer cost for last compiled query.

- Added the `--to-last-log` option to mysqlbinlog, for use in conjunction with `--read-from-remote-server`.

- Added the `--innodb-safe-binlog` server option, which adds consistency guarantees between the content of `InnoDB` tables and the binary log. See Sección 5.10.3, “El registro binario (Binary Log)”.

- `OPTIMIZE TABLE` for `InnoDB` tables is now mapped to `ALTER TABLE` instead of `ANALYZE TABLE`. This rebuilds the table, which updates index statistics and frees space in the clustered index.

- `sync_frm` is now a settable global variable (not only a startup option).

- For replication of `MEMORY` (`HEAP`) tables: Made the master automatically write a `DELETE FROM` statement to its binary log when a `MEMORY` table is opened for the first time since master's startup. This is for the case where the slave has replicated a non-empty `MEMORY` table, then the master is shut down and restarted: the table is now empty on master; the `DELETE FROM` empties it on slave too. Note that even with this fix, between the master's restart and the first use of the table on master, the slave still has out-of-date data in the table. But if you use the `--init-file` option to populate the `MEMORY` table on the master at startup, it ensures that the failing time interval is zero. (Bug#2477)

- When a session having open temporary tables terminates, the statement automatically written to the binary log is now `DROP TEMPORARY TABLE IF EXISTS` instead of `DROP TEMPORARY TABLE`, for more robustness.

- The MySQL server now returns an error if `SET SQL_LOG_BIN` is issued by a user without the `SUPER` privilege (in previous versions it just silently ignored the statement in this case).

- Changed that when the MySQL server has binary logging disabled (that is, no `--log-bin` option was used), then no transaction binary log cache is allocated for connections. This should save `binlog_cache_size` bytes of memory (32KB by default) for every connection.

- Added the `sync_binlog=N` global variable and startup option, which makes the MySQL server synchronize its binary log to disk (`fdatasync()`) after every Nth write to the binary log.

- Changed the slave SQL thread to print less useless error messages (no more message duplication; no more messages when an error is skipped because of `slave-skip-errors`).

- `DROP DATABASE IF EXISTS`, `DROP TABLE IF EXISTS`, single-table `DELETE`, and single-table `UPDATE` now are written to the binary log even if they changed nothing on the master (for example, even if a `DELETE` matched no rows). The old behavior sometimes caused bad surprises in replication setups.

- Replication and mysqlbinlog now have better support for the case that the session character set and collation variables are changed within a given session. See Sección 6.7, “Características de la replicación y problemas conocidos”.

- Killing a `CHECK TABLE` statement does not result in the table being marked as “corrupted” any more; the table remains as if `CHECK TABLE` had not even started. See Sección 13.5.5.3, “Sintaxis de `KILL`”.

Bugs fixed:

- Strange results with index (x, y) ... `WHERE x=`val_1` AND y>=`val_2` ORDER BY `pk`;` (Bug#3155)

- Subquery and order by (Bug#3118)

- `ALTER DATABASE` caused the client to hang if the database did not exist. (Bug#2333)

- `SLAVE START` (which is a deprecated syntax, `START SLAVE` should be used instead) could crash the slave. (Bug#2516)

- Multiple-table `DELETE` statements were never replicated by the slave if there were any `--replicate-*-table` options. (Bug#2527)

- The MySQL server did not report any error if a statement (submitted through `mysql_real_query()` or `mysql_stmt_prepare()`) was terminated by garbage characters. This can happen if you pass a wrong `length` parameter to these functions. The result was that the garbage characters were written into the binary log. (Bug#2703)

- Replication: If a client connects to a slave server and issues an administrative statement for a table (for example, `OPTIMIZE TABLE` or `REPAIR TABLE`), this could sometimes stop the slave SQL thread. This does not lead to any corruption, but you must use `START SLAVE` to get replication going again. (Bug#1858)

- Made clearer the error message that one gets when an update is refused because of the `--read-only` option. (Bug#2757)

- Fixed that `--replicate-wild-*-table` rules apply to `ALTER DATABASE` when the table pattern is `%`, as is the case for `CREATE DATABASE` and `DROP DATABASE`. (Bug#3000)

- Fixed that when a `Rotate` event is found by the slave SQL thread in the middle of a transaction, the value of `Relay_Log_Pos` in `SHOW SLAVE STATUS` remains correct. (Bug#3017)

- Corrected the master's binary log position that `InnoDB` reports when it is doing a crash recovery on a slave server. (Bug#3015)

- Changed the column `Seconds_Behind_Master` in `SHOW SLAVE STATUS` to never show a value of -1. (Bug#2826)

- Changed that when a `DROP TEMPORARY TABLE` statement is automatically written to the binary log when a session ends, the statement is recorded with an error code of value zero (this ensures that killing a `SELECT` on the master does not result in a superfluous error on the slave). (Bug#3063)

- Changed that when a thread handling `INSERT DELAYED` (also known as a `delayed_insert` thread) is killed, its statements are recorded with an error code of value zero (killing such a thread does not endanger replication, so we thus avoid a superfluous error on the slave). (Bug#3081)

- Fixed deadlock when two `START SLAVE` commands were run at the same time. (Bug#2921)

- Fixed that a statement never triggers a superfluous error on the slave, if it must be excluded given the `--replicate-*` options. The bug was that if the statement had been killed on the master, the slave would stop. (Bug#2983)

- The `--local-load` option of mysqlbinlog now requires an argument.

- Fixed a segmentation fault when running `LOAD DATA FROM MASTER` after `RESET SLAVE`. (Bug#2922)

- mysqlbinlog --read-from-remote-server read all binary logs following the one that was requested. It now stops at the end of the requested file, the same as it does when reading a local binary log. There is an option `--to-last-log` to get the old behavior. (Bug#3204)

- Fixed mysqlbinlog --read-from-remote-server to print the exact positions of events in the "at #" lines. (Bug#3214)

- Fixed a rare error condition that caused the slave SQL thread spuriously to print the message `Binlog has bad magic number` and stop when it was not necessary to do so. (Bug#3401)

- Fixed mysqlbinlog not to forget to print a `USE` statement under rare circumstances where the binary log contained a `LOAD DATA INFILE` statement. (Bug#3415)

- Fixed a memory corruption when replicating a `LOAD DATA INFILE` when the master had version 3.23. (Bug#3422)

- Multiple-table `DELETE` statements were always replicated by the slave if there were some `--replicate-*-ignore-table` options and no `--replicate-*-do-table` options. (Bug#3461)

- Fixed a crash of the MySQL slave server when it was built with `--with-debug` and replicating itself. (Bug#3568)

- Fixed that in some replication error messages, a very long query caused the rest of the message to be invisible (truncated), by putting the query last in the message. (Bug#3357)

- If `server-id` was not set using startup options but with `SET GLOBAL`, the replication slave still complained that it was not set. (Bug#3829)

- mysql_fix_privilege_tables didn't correctly handle the argument of its `--password=#` option. (Bug#4240)

- Fixed potential memory overrun in `mysql_real_connect()` (which required a compromised DNS server and certain operating systems). (Bug#4017, CAN-2004-0836)

- During the installation process of the server RPM on Linux, mysqld was run as the `root` system user, and if you had `--log-bin=`somewhere_out_of_var_lib_mysql`` it created binary log files owned by `root` in this directory, which remained owned by `root` after the installation. This is now fixed by starting mysqld as the `mysql` system user instead. (Bug#4038)

- Made `DROP DATABASE` honor the value of `lower_case_table_names`. (Bug#4066)

- The slave SQL thread refused to replicate `INSERT ... SELECT` if it examined more than 4 billion rows. (Bug#3871)

- mysqlbinlog didn't escape the string content of user variables, and did not deal well when these variables were in non-ASCII character sets; this is now fixed by always printing the string content of user variables in hexadecimal. The character set and collation of the string is now also printed. (Bug#3875)

- Fixed incorrect destruction of expression that led to a server crash on complex `AND`/`OR` expressions if query was ignored (either by a replication server because of `--replicate-*-table` rules, or by any MySQL server because of a syntax error). (Bug#3969, Bug#4494)

- If `CREATE TEMPORARY TABLE t SELECT` failed while loading the data, the temporary table was not dropped. (Bug#4551)

- Fixed that when a multiple-table `DROP TABLE` failed to drop a table on the master server, the error code was not written to the binary log. (Bug#4553)

- When the slave SQL thread was replicating a `LOAD DATA INFILE` statement, it didn't show the statement in the output of `SHOW PROCESSLIST`. (Bug#4326)

### C.1.12. Cambios en la entrega 5.0.0 (22 Dec 2003: Alpha)

Functionality added or changed:

- Important note: If you upgrade to MySQL 4.1.1 or higher, it is difficult to downgrade back to 4.0 or 4.1.0! That is because, for earlier versions, `InnoDB` is not aware of multiple tablespaces.

- Added support for `SUM(DISTINCT)`, `MIN(DISTINCT)`, and `MAX(DISTINCT)`.

- The `KILL` statement now takes `CONNECTION` and `QUERY` modifiers. The first is the same as `KILL` with no modifier (it kills a given connection thread). The second kills only the statement currently being executed by the connection.

- Added `TIMESTAMPADD()` and `TIMESTAMPDIFF()` functions.

- Added `WEEK` and `QUARTER` values as `INTERVAL` arguments for the `DATE_ADD()` and `DATE_SUB()` functions.

- New binary log format that enables replication of these session variables: `sql_mode`, `SQL_AUTO_IS_NULL`, `FOREIGN_KEY_CHECKS` (which was replicated since 4.0.14, but here it's done more efficiently and takes less space in the binary logs), `UNIQUE_CHECKS`. Other variables (like character sets, `SQL_SELECT_LIMIT`, ...) will be replicated in upcoming 5.0.x releases.

- Implemented Index Merge optimization for `OR` clauses. See Sección 7.2.6, “Index Merge Optimization”.

- Basic support for stored procedures (SQL:2003 style). See Capítulo 19, Procedimientos almacenados y funciones.

- Added `SELECT INTO `list_of_vars``, which can be of mixed (that is, global and local) types. See Sección 19.2.9.3, “La sentencia `SELECT ... INTO`”.

- Easier replication upgrade (5.0.0 masters can read older binary logs and 5.0.0 slaves can read older relay logs). See Sección 6.5, “Compatibilidad entre versiones de MySQL con respecto a la replicación” for more details). The format of the binary log and relay log is changed compared to that of MySQL 4.1 and older.

Bugs fixed:

## C.2. Cambios en MySQL Connector/ODBC (MyODBC)

### C.2.1. Changes in Connector/ODBC 5.0.10 (14 December 2006)

Connector/ODBC 5.0.10 is the sixth BETA release.

Functionality added or changed:

- Added wide-string type info for `SQLGetTypeInfo()`.

- Added loose handling of retrieving some diagnostic data. (Bug#15782)

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

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

Bugs fixed:

- String query parameters are new escaped correctly. (Bug#19078)

- Editing DSN no longer crashes ODBC data source administrator. (Bug#24675)

### C.2.2. Changes in Connector/ODBC 5.0.9 (22 November 2006)

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_NUMBERIC_STRUCT.

Bugs fixed:

- Fixed wildcard handling of and listing of catalogs and tables in `SQLTables`.

- Catch use of `SQL_ATTR_PARAMSET_SIZE` and report error until we fully support.

- Corrected retrieval multiple field types bit and blob/text.

- Fixed buffer length return for SQLDriverConnect.

- Added limit of display size when requested via `SQLColAttribute`/`SQL_DESC_DISPLAY_SIZE`.

- Fixed statistics to fail if it couldn't be completed.

- Fixed SQLGetData to clear the NULL indicator correctly during multiple calls.

- ODBC v2 behaviour in driver now supports ODBC v3 date/time types (since DriverManager maps them).

### C.2.3. Changes in Connector/ODBC 5.0.8 (17 November 2006)

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:

- Made distinction between `CHAR`/`BINARY` (and VAR versions).

- Wildcards now support escaped chars and underscore matching (needed to link tables with underscores in access).

- Also made `SQL_DESC_NAME` only fill in the name if there was a data pointer given, otherwise just the length.

- Fixed display size to be length if max length isn’t available.

Bugs fixed:

- Length now used when handling bind parameter (needed in particular for `SQL_WCHAR`) - this enables updating char data in MS Access.

- Fixed string length to chars, not bytes, returned by SQLGetDiagRec.

- Fixed using wrong pointer for `SQL_MAX_DRIVER_CONNECTIONS` in `SQLGetInfo`.

- Fixed binding using `SQL_C_LONG`.

- Allow SQLDescribeCol to be called to retrieve the length of the column name, but not the name itself.

- Fix size return from `SQLDescribeCol`.

- Fixed hanlding of numeric pointers in SQLColAttribute.

- Fixed type returned for `MYSQL_TYPE_LONG` to `SQL_INTEGER` instead of `SQL_TINYINT`.

- Fixed MDiagnostic to use correct v2/v3 error codes.

- Set default return to `SQL_SUCCESS` if nothing is done for `SQLSpecialColumns`.

- Updated retrieval of descriptor fields to use the right pointer types.

### C.2.4. Changes in Connector/ODBC 5.0.7 (08 November 2006)

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.

- SQLBindParameter now handles `SQL_C_DEFAULT`.

- Corrected incorrect column index within `SQLStatistics`. Many more tables can now be linked into MS Access.

### C.2.5. Changes in Connector/ODBC 5.0.6 (03 November 2006)

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 Connector/ODBC 3.51 installed before installing this version.

- Installation is provided in the form of a standard Microsoft System Installer (MSI).

- Connector/ODBC supports both `User` and `System` DSNs.

### C.2.6. Changes in Connector/ODBC 5.0.5 (17 October 2006)

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.

Features, limitations and notes on this release:

- You no longer have to have Connector/ODBC 3.51 installed before installing this version.

### C.2.7. 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`

### C.2.8. Changes in Connector/ODBC 5.0.2 (Never released)

Connector/ODBC 5.0.2 was an internal implementation and testing release.

### C.2.9. 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`

### C.2.10. Changes in Connector/ODBC 3.51.13 (Not yet released)

Functionality added or changed:

- Added support for the `HENV` handlers in `SQLEndTran()`.

- Added auto-reconnect option to Connector/ODBC option parameters.

- Added auto is null option to Connector/ODBC option parameters. (Bug#10910)

Bugs fixed:

- Using `DataAdapter`, Connector/ODBC may continually consume memory when reading the same records within a loop (Windows Server 2003 SP1/SP2 only). (Bug#20459)

- Connector/ODBC may insert the wrong parameter values when using prepared statements under 64-bit Linux. (Bug#22446)

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

- The `SQLDriverConnect()` ODBC method did not work with recent Connector/ODBC releases. (Bug#12393)

### C.2.11. Cambios en MyODBC 3.51.12

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)

### C.2.12. Cambios en MyODBC 3.51.11

Functionality added or changed: No changes.

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)

## C.3. Connector/NET Change History

### C.3.1. Changes in MySQL Connector/NET Version 5.0.4 (Not yet released)

Bugs fixed:

- Incorrect values/formats would be applied when the `OldSyntax` connection string option was used. (Bug#25950)

- Registry would be incorrectly populated with installation locations. (Bug#25928)

- Filling a table schema through a stored procedure triggers a runtime error. (Bug#25609)

- `MySqlConnection` throws an exception when connecting to MySQL v4.1.7. (Bug#25726)

- Returned data types of a `DataTypes` collection do not contain the right correctl CLR Datatype. (Bug#25907)

- `GetSchema` and `DataTypes` would throw an exception due to an incorrect table name. (Bug#25906)

- Times with negative values would be returned incorrectly. (Bug#25912)

- `SELECT` did not work correctly when using a `WHERE` clause containing a UTF-8 string. (Bug#25651)

- When closing and then re-opening a connection to a database, the character set specification is lost. (Bug#25614)

- When connecting to a MySQL Server earlier than version 4.1, the connection would hang when reading data. (Bug#25458)

- When connecting to a server, the return code from the connection could be zero, even though the hostname was incorrect. (Bug#24802)

- Using `ExecuteScalar()` with more than one query, where one query fails, will hang the connection. (Bug#25443)

### C.3.2. Changes in MySQL Connector/NET Version 5.0.3 (05 January 2007)

Functionality added or changed:

- SSL support has been updated.

- The `ViewColumns` `GetSchema` collection has been updated.

- The `CommandBuilder.DeriveParameters` function has been updated to the procedure cache.

- Improved speed and performance by re-architecting certain sectionsof the code.

- Usage Advisor has been implemented. The Usage Advisor checks your queries and will report if you are usiing the connection inefficiently.

- The `MySqlCommand` object now supports asynchronous query methods. This is implemented useg the `BeginExecuteNonQuery` and `EndExecuteNonQuery` methods.

- Metadata from storaed procedures and stored function execution are cached.

- PerfMon hooks have been added to monitor the stored procedure cache hits and misses.

- 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.

Bugs fixed:

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

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

- Additional text added to error message (Bug#25178)

- Stored procedure executions are not thread safe. (Bug#23905)

- Using `Driver.IsTooOld()` would return the wrong value. (Bug#24661)

- Deleting a connection to a disconnected server when using the Visual Studio Plugin would cause an assertion failure. (Bug#23687)

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

### C.3.3. Changes in MySQL Connector/NET Version 5.0.2 (06 November 2006)

Important change: Due to a number of issues with the use of server-side prepared statements, Connector/NET 5.0.2 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.

To enable server-side prepared statements you must add the following configuration property to your connector string properties:

    ignore prepare=false

The default value of this property is true.

Bugs fixed:

- Creating a connection through the Server Explorer when using the Visual Studio Plugin would fail. The installer for the Visual Studio Plugin has been updated to ensure that Connector/NET 5.0.2 must be installed. (Bug#23071)

- Within Mono, using the `PreparedStatement` interface could result in an error due to a `BitArray` copying error. (Bug#18186)

- Using Windows Vista (RC2) as a non-privileged user would raise a `Registry key 'Global' access denied`. (Bug#22882)

- One system where IPv6 was enabled, Connector/NET would incorrectly resolve hostnames. (Bug#23758)

- Column names with accented characters were not parsed properly causing malformed column names in result sets. (Bug#23657)

- Connector/NET did not work as a data source for the `SqlDataSource` object used by ASP.NET 2.0. (Bug#16126)

- A `System.FormatException` exception would be raised when invoking a stored procedure with an `ENUM` input parameter. (Bug#23268)

- During installation, an antivirus error message would be raised (indicating a malicious script problem). (Bug#23245)

- An exception would be thrown when calling `GetSchemaTable` and `fields` was null. (Bug#23538)

### C.3.4. Changes in MySQL Connector/NET Version 5.0.1 (01 October 2006)

Bugs fixed:

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

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

- Incorrect field/data lengths could be returned for `VARCHAR` UTF8 columns. Bug (#14592)

- Submitting an empty string to a command object through `prepare` raises an `System.IndexOutOfRangeException`, rather than a Connector/Net exception. (Bug#18391)

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

- Connector/NET on a Tukish operating system, may fail to execute certain SQL statements correctly. (Bug#22452)

- You can now install the Connector/NET MSI package from the command line using the `/passive`, `/quiet`, `/q` options. (Bug#19994)

- The `MySqlexception` class is now derived from the `DbException` class. (Bug#21874)

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

- The `#` would not be accepted within column/table names, even though it was valid. (Bug#21521)

### C.3.5. Changes in MySQL Connector/NET Version 5.0.0 (08 August 2006)

This is a new Alpha development release, fixing recently discovered bugs.

NOTE: This Alpha release, as any other pre-production release, should not be installed on production level systems or systems with critical data. It is good practice to back up your data before installing any new version of software. Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any software beta release. Please refer to our bug database at http://bugs.mysql.com/ for more details about the individual bugs fixed in this version.

Bugs fixed:

- CommandText: Question mark in comment line is being parsed as a parameter. (Bug#6214)

Functionality added or changed:

- Implemented Usage Advisor.

- Added Async query methods.

- Reimplemented PacketReader/PacketWriter support into `MySqlStream` class.

- Added internal implemention of SHA1 so we don't have to distribute the OpenNetCF on mobile devices.

- Added usage advisor warnings for requesting column values by the wrong type.

- Reworked connection string classes to be simpler and faster.

- Added procedure metadata caching.

- Added perfmon hooks for stored procedure cache hits and misses.

- Implemented `MySqlConnectionBuilder` class.

- Implemented `MySqlClientFactory` class.

- Implemented classes and interfaces for ADO.Net 2.0 support.

- Replaced use of ICSharpCode with .NET 2.0 internal deflate support.

- Refactored test suite to test all protocols in a single pass.

- Completely refactored how column values are handled to avoid boxing in some cases.

### C.3.6. Changes in MySQL Connector/NET Version 1.0.9 (Not yet released)

Important change: Due to a number of issues with the use of server-side prepared statements, Connector/NET 5.0.2 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.

To enable server-side prepared statements you must add the following configuration property to your connector string properties:

    ignore prepare=false

The default value of this property is true.

Bugs fixed:

- Trying to fill a table schema through a stored procedure triggers a runtime error. (Bug#25609)

- `MySqlConnection` throws an exception when connecting to MySQL v4.1.7. (Bug#25726)

- `SELECT` did not work correctly when using a `WHERE` clause containing a UTF-8 string. (Bug#25651)

- Times with negative values would be returned incorrectly. (Bug#25912)

- When closing and then re-opening a connection to a database, the character set specification is lost. (Bug#25614)

- When connecting to a server, the return code from the connection could be zero, even though the hostname was incorrect. (Bug#24802)

- Using `ExecuteScalar()` with more than one query, where one query fails, will hang the connection. (Bug#25443)

- Nested transactions 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)

- Additional text added to error message. (Bug#25178)

- The `CommandBuilder` would mistakenly add insert parameters for a table column with auto incrementation enabled. (Bug#23862)

- Stored procedure executions are not thread safe. (Bug#23905)

- Using `Driver.IsTooOld()` would return the wrong value. (Bug#24661)

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

- One system where IPv6 was enabled, Connector/NET would incorrectly resolve hostnames. (Bug#23758)

- An `System.OverflowException` would be raised when accessing a varchar field over 255 bytes. Bug (#23749)

### C.3.7. Changes in MySQL Connector/NET Version 1.0.8 (20 October 2006)

Bugs fixed:

- 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 `MySqlDateTime` class did not contain constructors. (Bug#15112)

- `DataReader` would show the value of the previous row (or last row with non-null data) if the current row contained a `datetime` field with a null value. (Bug#16884)

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

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

- Incorrect field/data lengths could be returned for `VARCHAR` UTF8 columns. Bug (#14592)

- Submitting an empty string to a command object through `prepare` raises an `System.IndexOutOfRangeException`, rather than a Connector/Net exception. (Bug#18391)

- Connector/NET on a Tukish operating system, may fail to execute certain SQL statements correctly. (Bug#22452)

- You can now install the Connector/NET MSI package from the command line using the `/passive`, `/quiet`, `/q` options. (Bug#19994)

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

- Called `MySqlCommandBuilder.DeriveParameters` for a stored procedure that has no paramers would cause an application crash. (Bug#15077)

- A `SELECT` query on a table with a date with a value of `'0000-00-00'` would hang the application. (Bug#17736)

- The `#` would not be accepted within column/table names, even though it was valid. (Bug#21521)

- Calling `Close` on a connection after calling a stored procedure would trigger a `NullReferenceException`. (Bug#20581)

- `IDataRecord.GetString` would raise `NullPointerException` for null values in returned rows. Method now throws `SqlNullValueException`. (Bug#19294)

- An exception would be raised when using an output parameter to a `System.String` value. (Bug#17814)

- The DiscoverParameters function would fail when a stored procedure used a `NUMERIC` parameter type. (Bug#19515)

- When running a query that included a date comparison, a DateReader error would be raised. (Bug#19481)

- Parameter substitution in queries where the order of parameters and table fields did not match would substitute incorrect values. (Bug#19261)

- When working with multiple threads, character set initialization would generate errors. (Bug#17106)

- When using an unsigned 64-bit integer in a stored procedure, the unsigned bit would be lost stored. (Bug#16934)

- The connection string parser did not allow single or double quotes in the password. (Bug#16659)

- The CommandBuilder ignored Unsigned flag at Parameter creation. (Bug#17375)

- CHAR type added to MySqlDbType. (Bug#17749)

- Unsigned data types were not properly supported. (Bug#16788)

Functionality added or changed:

- Stored procedures are now cached.

- The method for retrieving stored procedured metadata has been changed so that users without `SELECT` privileges on the `mysql.proc` table can use a stored procedure.

### C.3.8. Changes in MySQL Connector/NET Version 1.0.7 (21 November 2005)

- Unsigned `tinyint` (NET byte) would lead to and incorrectly determined parameter type from the parameter value. (Bug#18570)

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

- A `#42000Query was empty` exception occurred when executing a query built with `MySqlCommandBuilder`, if the query string ended with a semicolon. (Bug#14631)

- Implemented the `MySqlCommandBuilder.DeriveParameters` method that is used to discover the parameters for a stored procedure. (Bug#13632)

- Added support for the `cp932` character set. (Bug#13806)

- 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 statement that contained multiple references to the same parameter could not be prepared. (Bug#13541)

- The `Ping()` method did not update the `State` property of the `Connection` object. (Bug#13658)

### C.3.9. Changes in MySQL Connector/NET Version 1.0.6 (03 October 2005)

- The `nant` build sequence had problems. (Bug#12978)

- Serializing a parameter failed if the first value passed in was `NULL`. (Bug#13276)

- Field names that contained the following characters caused errors: `()%<>/` (Bug#13036)

- The Connector/NET 1.0.5 installer would not install alongside Connector/NET 1.0.4. (Bug#12835)

- Connector/NET 1.0.5 could not connect on Mono. (Bug#13345)

### C.3.10. Changes in MySQL Connector/NET Version 1.0.5 (29 August 2005)

- With multiple hosts in the connection string, Connector/NET would not connect to the last host in the list. (Bug#12628)

- Connector/NET interpreted the new decimal data type as a byte array. (Bug#11294)

- The `cp1250` character set was not supported. (Bug#11621)

- Connection could fail when .NET thread pool had no available worker threads. (Bug#10637)

- Decimal parameters caused syntax errors. (Bug#11550, Bug#10486, Bug#10152)

- A call to a stored procedure caused an exception if the stored procedure had no parameters. (Bug#11542)

- Certain malformed queries would trigger a `Connection must be valid and open` error message. (Bug#11490)

- The `MySqlCommandBuilder` class could not handle queries that referenced tables in a database other than the default database. (Bug#8382)

- Connector/NET could not work properly with certain regional settings. (WL#8228)

- Trying to use a stored procedure when `Connection.Database` was not populated generated an exception. (Bug#11450)

- Trying to read a `TIMESTAMP` column generated an exception. (Bug#7951)

- Parameters were not recognized when they were separated by linefeeds. (Bug#9722)

- Calling `MySqlConnection.clone` when a connection string had not yet been set on the original connection would generate an error. (Bug#10281)

- Added support to call a stored function from Connector/NET. (Bug#10644)

- Connector/NET could not connect to MySQL 4.1.14. (Bug#12771)

- The `ConnectionString` property could not be set when a `MySqlConnection` object was added with the designer. (Bug#12551, Bug#8724)

### C.3.11. Changes in MySQL Connector/NET Version 1.0.4 (20 January 2005)

- Calling prepare causing exception. (Bug#7243)

- Fixed another small problem with prepared statements.

- `MySqlCommand.Connection` returns an IDbConnection. (Bug#7258)

- `MySqlAdapter.Fill` method throws error message `Non-negative number required`. (Bug#7345)

- Clone method bug in `MySqlCommand`. (Bug#7478)

- `MySqlDataReader.GetString(index)` returns non-Null value when field is `Null`. (Bug#7612)

- `MySqlReader.GetInt32` throws exception if column is unsigned. (Bug#7755)

- GetBytes is working no more. (Bug#7704).

- Quote character \222 not quoted in `EscapeString`. (Bug#7724)

- Fixed problem that causes named pipes to not work with some blob functionality.

- Fixed problem with shared memory connections.

- Problem with Multiple resultsets. (Bug#7436)

- Added or filled out several more topics in the API reference documentation.

### C.3.12. Changes in MySQL Connector/NET Version 1.0.3-gamma (12 October 2004)

- Made MySQL the default named pipe name.

- Now `SHOW COLLATION` is used upon connection to retrieve the full list of charset ids.

- Fixed Invalid character set index: 200. (Bug#6547)

- Installer now includes options to install into GAC and create Start Menu items.

- Int64 Support in `MySqlCommand` Parameters. (Bug#6863)

- Connections now do not have to give a database on the connection string.

- `MySqlDataReader.GetChar(int i)` throws `IndexOutOfRange` exception. (Bug#6770)

- Fixed problem where multiple resultsets having different numbers of columns would cause a problem.

- Exception stack trace lost when re-throwing exceptions. (Bug#6983)

- Fixed major problem with detecting null values when using prepared statements.

- Errors in parsing stored procedure parameters. (Bug#6902)

- Integer "out" parameter from stored procedure returned as string. (Bug#6668)

- `MySqlDateTime` in Datatables sorting by Text, not Date. (Bug#7032)

- Invalid query string when using inout parameters (Bug#7133)

- Test suite fails with MySQL 4.0 because of case sensitivity of table names. (Bug#6831)

- Inserting `DateTime` causes `System.InvalidCastException` to be thrown. (Bug#7132)

- InvalidCast when using `DATE_ADD`-function. (Bug#6879)

- An Open Connection has been Closed by the Host System. (Bug#6634)

- Added `ServerThread` property to `MySqlConnection` to expose server thread id.

- Added Ping method to `MySqlConnection`.

- Changed the name of the test suite to `MySql.Data.Tests.dll`.

### C.3.13. Changes in MySQL Connector/NET Version 1.0.2-gamma (15 November 2004)

- Fixed problem with MySqlBinary where string values could not be used to update extended text columns

- Fixed Installation directory ignored using custom installation (Bug#6329)

- Fixed problem where setting command text leaves the command in a prepared state

- Fixed double type handling in MySqlParameter(string parameterName, object value) (Bug#6428)

- Fixed Zero date "0000-00-00" is returned wrong when filling Dataset (Bug#6429)

- Fixed problem where calling stored procedures might cause an "Illegal mix of collations" problem.

- Added charset connection string option

- Fixed #HY000 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ (Bug#6322)

- Added the TableEditor CS and VB sample

- Fixed Charset-map for UCS-2 (Bug#6541)

- Updated the installer to include the new samples

- Fixed Long inserts take very long time (Bu #5453)

- Fixed Objects not being disposed (Bug#6649)

- Provider is now using character set specified by server as default

### C.3.14. Changes in MySQL Connector/NET Version 1.0.1-beta2 (27 October 2004)

- Fixed Bug#5602 Possible bug in MySqlParameter(string, object) constructor

- Fixed Bug#5458 Calling GetChars on a longtext column throws an exception

- Fixed Bug#5474 cannot run a stored procedure populating mysqlcommand.parameters

- Fixed Bug#5469 Setting DbType throws NullReferenceException

- Fixed problem where connector was not issuing a CMD_QUIT before closing the socket

- Fixed Bug#5392 MySqlCommand sees "?" as parameters in string literals

- Fixed problem with ConnectionInternal where a key might be added more than once

- CP1252 is now used for Latin1 only when the server is 4.1.2 and later

- Fixed Bug#5388 DataReader reports all rows as NULL if one row is NULL

- Virtualized driver subsystem so future releases could easily support client or embedded server support

- Field buffers being reused to decrease memory allocations and increase speed

- Fixed problem where using old syntax while using the interfaces caused problems

- Using PacketWriter instead of Packet for writing to streams

- Refactored compression code into CompressedStream to clean up NativeDriver

- Added test case for resetting the command text on a prepared command

- Fixed problem where MySqlParameterCollection.Add() would throw unclear exception when given a null value (Bug#5621)

- Fixed construtor initialize problems in MySqlCommand() (Bug#5613)

- Fixed Parsing the ';' char (Bug#5876)

- Fixed missing Reference in DbType setter (Bug#5897)

- Fixed System.OverflowException when using YEAR datatype (Bug#6036)

- Added Aggregate function test (wasn't really a bug)

- Fixed serializing of floating point parameters (double, numeric, single, decimal) (Bug#5900)

- IsNullable error (Bug#5796)

- Fixed problem where connection lifetime on the connect string was not being respected

- Fixed problem where Min Pool Size was not being respected

- Fixed MySqlDataReader and 'show tables from ...' behavior (Bug#5256)

- Implemented SequentialAccess

- Fixed MySqlDateTime sets IsZero property on all subseq.records after first zero found (Bug#6006)

- Fixed Can't display Chinese correctly (Bug#5288)

- Fixed Russian character support as well

- Fixed Method TokenizeSql() uses only a limited set of valid characters for parameters (Bug#6217)

- Fixed NET Connector source missing resx files (Bug#6216)

- Fixed DBNull Values causing problems with retrieving/updating queries. (Bug#5798)

- Fixed Yet Another "object reference not set to an instance of an object" (Bug#5496)

- Fixed problem in PacketReader where it could try to allocate the wrong buffer size in EnsureCapacity

- Fixed GetBoolean returns wrong values (Bug#6227)

- Fixed IndexOutOfBounds when reading BLOB with DataReader with GetString(index) (Bug#6230)

### C.3.15. Changes in MySQL Connector/NET Version 1.0.0 (01 September 2004)

- Thai encoding not correctly supported. (Bug#3889)

- Updated many of the test cases.

- Fixed problem with using compression.

- Bumped version number to 1.0.0 for beta 1 release.

- Added `COPYING.rtf` file for use in installer.

- Removed all of the XML comment warnings.

- Removed some last references to ByteFX.

### C.3.16. 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 throw 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 don't 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 allow 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` don't works 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".

- Allow 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 alwasy 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 accesss.

- 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 `DataAdatper` updates from working right (thanks Michael King).

- Fixed a misspelling in `MySqlHelper.cs` (thanks Patrick Kristiansen).

### C.3.17. 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 allow 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 alive.

- Moved toolbox bitmaps into resource folder.

- Changed `field.cs` to allow 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 infinitly (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).

### C.3.18. Changes in MySQL Connector/NET Version 0.75

- Enum values now supported as parameter values (thanks Philipp Sumi).

- Year datatype 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 username 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).

### C.3.19. 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 command throws an exception (thanks Burkhard Perkens-Golomb).

- Fixed `ExecuteScalar` bug introduced with restructure.

- Restructure to allow for `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!).

### C.3.20. 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).

### C.3.21. 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` datatype 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 quotes 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 usigned 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 allows 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.

### C.3.22. 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 like ä 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).

### C.3.23. 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.

### C.3.24. 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.

### C.3.25. 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.

## C.4. MySQL Visual Studio Plugin Change History

### C.4.1. Changes in MySQL Visual Studio Plugin 1.0.2 (Not yet released)

Bugs fixed:

- Creating a connection through the Server Explorer when using the Visual Studio Plugin would fail. The installer for the Visual Studio Plugin has been updated to ensure that Connector/NET 5.0.2 must be installed. (Bug#23071)

- The Add Connection dialog of the Server Explorer would freeze when accessing databases with capitalized characters in their name. (Bug#24875)

### C.4.2. Changes in MySQL Visual Studio Plugin 1.0.1 (4 October 2006)

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"/>

### C.4.3. Changes in MySQL Visual Studio Plugin 1.0.0 (4 October 2006)

This is the first beta release.

Features in this release:

- DDEX (Data Designer Extensibility) compatibility.

- Ability to work with MySQL objects (tables, views, stored procedures, etc) from within Server Explorer.

## C.5. MySQL Connector/J Change History

### C.5.1. Changes in MySQL Connector/J 5.1.x

#### C.5.1.1. Changes in MySQL Connector/J 5.1.0 (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 (i.e. Connector/J does not use server-side prepared statements).

### C.5.2. Changes in MySQL Connector/J 5.0.x

#### C.5.2.1. Changes in MySQL Connector/J 5.0.5 (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 (i.e. Connector/J does not use server-side prepared statements).

Bugs fixed:

- Comments auomatically generated by the Hibernate framework could cause problems in the parser when using batched inserts. (Bug#25025)

#### C.5.2.2. Changes in MySQL Connector/J 5.0.4 (20 October 2006)

Bugs fixed:

- 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-1 mappings between findColumn() and rsmd.getColumnName(), usually manifests itself as "Can't find column ('')" exceptions. (Bug#21379)

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

- Newlines causing whitespace to span confuse procedure parser when getting parameter metadata for stored procedures. (Bug#22024)

- Driver was using milliseconds for Statement.setQueryTimeout() when specification says argument is to be in seconds. (Bug#22359)

- Workaround for server crash when calling stored procedures via a server-side prepared statement (driver now detects prepare(stored procedure) and substitutes client-side prepared statement). (Bug#22297)

- Added new _ci collations to CharsetMapping - utf8_unicode_ci not working. (Bug#22456)

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

- DBMD.getColumns() does not return expected COLUMN_SIZE for the SET type, now returns length of largest possible set disregarding whitespace or the "," delimitters to be consistent with the ODBC driver. (Bug#22613)

Other changes:

- Fixed configuration property `jdbcCompliantTruncation` was not being used for reads of result set values.

- Driver now supports `{call sp}` (without "()" if procedure has no arguments).

- Driver now sends numeric 1 or 0 for client-prepared statement `setBoolean()` calls instead of '1' or '0'.

- DatabaseMetaData correctly reports true for `supportsCatalog*()` methods.

#### C.5.2.3. Changes in MySQL Connector/J 5.0.3 (26 July 2006)

- Fixed `Statement.cancel()` causes `NullPointerException` if underlying connection has been closed due to server failure. (Bug#20650)

- 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 via `SHOW CREATE PROCEDURE` or selecting from `mysql.proc` instead of throwing an exception. The default value for this option is `false`

Bugs fixed:

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

#### C.5.2.4. Changes in MySQL Connector/J 5.0.2-beta (11 July 2006)

- Fixed can't use `XAConnection` for local transactions when no global transaction is in progress. (Bug#17401)

- 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` systtem variable to the character set that is used for error messages. (Bug#18086)

- Fixed `ConnectionProperties` (and thus some subclasses) are not serializable, even though some J2EE containers expect them to be. (Bug#19169)

- Fixed `MysqlValidConnectionChecker` for JBoss doesn't work with `MySQLXADataSources`. (Bug#20242)

- Better caching of character set converters (per-connection) to remove a bottleneck for multibyte character sets.

- 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 allows 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).

- `MysqlXaConnection.recover(int flags)` now allows 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.

#### C.5.2.5. Changes in MySQL Connector/J 5.0.1-beta (Not Released)

Not released due to a packaging error

#### C.5.2.6. Changes in MySQL Connector/J 5.0.0-beta (22 December 2005)

- `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.

- `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.

- Attempt detection of the MySQL type `BINARY` (it's an alias, so this isn't always reliable), and use the `java.sql.Types.BINARY` type mapping for it.

- Moved `-bin-g.jar` file into separate `debug` subdirectory to avoid confusion.

- Don't allow `.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 original column name for `RSMD.getColumnName()` if the column was aliased, alias name for `.getColumnLabel()` (if aliased), and original table name for `.getTableName()`. Note this only works for MySQL-4.1 and newer, as older servers don't make this information available to clients.

- Setting `useJDBCCompliantTimezoneShift=true` (it's 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.

- 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 unit tests for `XADatasource`, as well as friendlier exceptions for XA failures compared to the "stock" `XAException` (which has no messages).

- Idle timeouts cause `XAConnections` to whine about rolling themselves back. (Bug#14729)

- Added support for Connector/MXJ integration via url subprotocol `jdbc:mysql:mxj://...`.

- Moved all `SQLException` constructor usage to a factory in `SQLError` (ground-work for JDBC-4.0 `SQLState`-based exception classes).

- Removed Java5-specific calls to `BigDecimal` constructor (when result set value is `''`, `(int)0` was being used as an argument indirectly via method return value. This signature doesn't exist prior to Java5.)

- Added service-provider entry to `META-INF/services/java.sql.Driver` for JDBC-4.0 support.

- Return "[VAR]BINARY" for `RSMD.getColumnTypeName()` when that is actually the type, and it can be distinguished (MySQL-4.1 and newer).

- When fix for Bug#14562 was merged from 3.1.12, added functionality for `CallableStatement`'s parameter metadata to return correct information for `.getParameterClassName()`.

- Fuller synchronization of `Connection` to avoid deadlocks when using multithreaded frameworks that multithread a single connection (usually not recommended, but the JDBC spec allows it anyways), part of fix to Bug#14972).

- 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.

### C.5.3. Changes in MySQL Connector/J 3.1.x

#### C.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 (i.e. Connector/J does not use server-side prepared statements).

#### C.5.3.2. Changes in MySQL Connector/J 3.1.14 (10-19-2006)

- Fixed updatable result set throws ClassCastException when there is row data and moveToInsertRow() is called. (Fixes Bug#20479)

- Fixed Updatable result set that contains a BIT column fails when server-side prepared statements are used. (Fixes Bug#20485)

- Fixed memory leak with profileSQL=true. (Fixes Bug#16987)

- Connection fails to localhost when using timeout and IPv6 is configured. (Fixes Bug#19726)

- Fixed NullPointerException in MysqlDataSourceFactory due to Reference containing RefAddrs with null content. (Fixes Bug#16791)

- Fixed ResultSet.getShort() for UNSIGNED TINYINT returns incorrect values when using server-side prepared statements. (Fixes Bug#20306)

- Fixed can't pool server-side prepared statements, exception raised when re-using them. (Fixes Bug#20687)

- Fixed Bug#21062 - ResultSet.getSomeInteger() doesn't work for BIT(>1).

- Fixed Bug#18880 - ResultSet.getFloatFromString() can't retrieve values near Float.MIN/MAX_VALUE.

- Fixed Bug#20888 - escape of quotes 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 (i.e. '' or "").

- Fixed Bug#19993 - ReplicationDriver does not always round-robin load balance depending on URL used for slaves list.

- Fixed calling toString() on ResultSetMetaData for driver-generated (i.e. from DatabaseMetaData method calls, or from getGeneratedKeys()) result sets would raise a NullPointerException.

- Fixed Bug#21207 - Driver throws NPE when tracing prepared statements that have been closed (in asSQL()).

- Removed logger autodectection altogether, must now specify logger explicitly if you want to use a logger other than one that logs to STDERR.

- Fixed 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).

- Driver now sends numeric 1 or 0 for client-prepared statement setBoolean() calls instead of '1' or '0'.

- Fixed bug where driver would not advance to next host if roundRobinLoadBalance=true and the last host in the list is down.

- Fixed Bug#18258 - DatabaseMetaData.getTables(), columns() with bad catalog parameter threw exception rather than return empty result set (as required by spec).

- 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's required to check this property.

- 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").

#### C.5.3.3. Changes in MySQL Connector/J 3.1.13 (26 May 2006)

- `INOUT` parameter does not store `IN` value. (Bug#15464)

- Exception thrown for new decimal type when using updatable result sets. (Bug#14609)

- No "dos" character set in MySQL > 4.1.0. (Bug#15544)

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

- `ResultSet.getShort()` for `UNSIGNED TINYINT` returned wrong values. (Bug#11874)

- `lib-nodist` directory missing from package breaks out-of-box build. (Bug#15676)

- `DBMD.getColumns()` returns wrong type for `BIT`. (Bug#15854)

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

- 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 `Statement.getGeneratedKeys()` throws `NullPointerException` when no query has been processed. (Bug#17099)

- 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 presense of log4j, too many different incompatible versions out there in the wild to do this reliably. (Bug#13469)

  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.

- Added support for Apache Commons logging, use "com.mysql.jdbc.log.CommonsLogger" as the value for the "logger" configuration property.

- LogFactory now prepends "com.mysql.jdbc.log" to log class name if it can't be found as-specified. This allows you to use "short names" for the built-in log factories, for example "logger=CommonsLogger" instead of "logger=com.mysql.jdbc.log.CommonsLogger".

- Fixed issue with `ReplicationConnection` incorrectly copying state, doesn't transfer connection context correctly when transitioning between the same read-only states. (Bug#15570)

- Fixed issue where server-side prepared statements don't cause truncation exceptions to be thrown when truncation happens. (Bug#18041)

- 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.

- 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 calling `clearParameters()` on a closed prepared statement causes NPE. (Bug#17587)

- Map "latin1" on MySQL server to CP1252 for MySQL > 4.1.0.

- Added additional accessor and mutator methods on ConnectionProperties so that DataSource users can use same naming as regular URL properties.

- Fixed data truncation and `getWarnings()` only returns last warning in set. (Bug#18740)

- 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. Fixes Bug#18496 for `BigDecimals`.

- Fixed aliased column names where length of name > 251 are corrupted. (Bug#18554)

- Fixed `ResultSet.wasNull()` not always reset correctly for booleans when done via conversion for server-side prepared statements. (Bug#17450)

- Fixed invalid classname returned for `ResultSetMetaData.getColumnClassName()` for `BIGINT type`. (Bug#19282)

- Fixed case where driver wasn't reading server status correctly when fetching server-side prepared statement rows, which in some cases could cause warning counts to be off, or multiple result sets to not be read off the wire.

- Driver now aware of fix for `BIT` type metadata that went into MySQL-5.0.21 for server not reporting length consistently (Bug#13601).

- `Fixed PreparedStatement.setObject(int, Object, int)` doesn't respect scale of BigDecimals. (Bug#19615)

- Fixed `ResultSet.wasNull()` returns incorrect value when extracting native string from server-side prepared statement generated result set. (Bug#19282)

#### C.5.3.4. Changes in MySQL Connector/J 3.1.12 (30 November 2005)

- Fixed client-side prepared statement bug with embedded `?` characters inside quoted identifiers (it was recognized as a placeholder, when it was not).

- Don't allow `executeBatch()` for `CallableStatements` with registered `OUT`/`INOUT` parameters (JDBC compliance).

- Fall back to platform-encoding for `URLDecoder.decode()` when parsing driver URL properties if the platform doesn't have a two-argument version of this method.

- Java type conversion may be incorrect for `MEDIUMINT`. (Bug#14562)

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

- 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`

- `DatabaseMetaData.getColumns()` doesn't return `TABLE_NAME` correctly. (Bug#14815)

- Escape processor replaces quote character in quoted string with string delimiter. (Bug#14909)

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

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

- Unable to initialize character set mapping tables (due to J2EE classloader differences). (Bug#14938)

- Deadlock while closing server-side prepared statements from multiple threads sharing one connection. (Bug#14972)

- `logSlowQueries` should give better info. (Bug#12230)

- Extraneous sleep on `autoReconnect`. (Bug#13775)

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

- `maxQuerySizeToLog` is not respected. Added logging of bound values for `execute()` phase of server-side prepared statements when `profileSQL=true` as well. (Bug#13048)

- Usage advisor complains about unreferenced columns, even though they've been referenced. (Bug#15065)

- Don't increase timeout for failover/reconnect. (Bug#6577)

- Process escape tokens in `Connection.prepareStatement(...)`. (Bug#15141) You can disable this behavior by setting the JDBC URL configuration property `processEscapeCodesForPrepStmts` to `false`.

- Reconnect during middle of `executeBatch()` should not occur if `autoReconnect` is enabled. (Bug#13255)

#### C.5.3.5. Changes in MySQL Connector/J 3.1.11-stable (07 October 2005)

- Spurious `!` on console when character encoding is `utf8`. (Bug#11629)

- Fixed statements generated for testcases missing `;` for “plain” statements.

- Incorrect generation of testcase scripts for server-side prepared statements. (Bug#11663)

- 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.

- Moved source code to Subversion repository.

- Escape tokenizer doesn't respect stacked single quotes for escapes. (Bug#11797)

- `GEOMETRY` type not recognized when using server-side prepared statements.

- `ReplicationConnection` won't switch to slave, throws “Catalog can't be null” exception. (Bug#11879)

- Properties shared between master and slave with replication connection. (Bug#12218)

- `Statement.getWarnings()` fails with NPE if statement has been closed. (Bug#10630)

- Only get `char[]` from SQL in `PreparedStatement.ParseInfo()` when needed.

- Geometry types not handled with server-side prepared statements. (Bug#12104)

- `StringUtils.getBytes()` doesn't work when using multi-byte character encodings and a length in characters is specified. (Bug#11614)

- `Pstmt.setObject(...., Types.BOOLEAN)` throws exception. (Bug#11798)

- `maxPerformance.properties` mis-spells “elideSetAutoCommits”. (Bug#11976)

- `DBMD.storesLower/Mixed/UpperIdentifiers()` reports incorrect values for servers deployed on Windows. (Bug#11575)

- `ResultSet.moveToCurrentRow()` fails to work when preceded by a call to `ResultSet.moveToInsertRow()`. (Bug#11190)

- `VARBINARY` data corrupted when using server-side prepared statements and `.setBytes()`. (Bug#11115)

- `explainSlowQueries` hangs with server-side prepared statements. (Bug#12229)

- Escape processor didn't honor strings demarcated with double quotes. (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).

- Reworked `Field` class, `*Buffer`, and `MysqlIO` to be aware of field lengths > `Integer.MAX_VALUE`.

- Updated `DBMD.supportsCorrelatedQueries()` to return `true` for versions > 4.1, `supportsGroupByUnrelated()` to return `true` and `getResultSetHoldability()` to return `HOLD_CURSORS_OVER_COMMIT`.

- Handling of catalog argument in `DatabaseMetaData.getIndexInfo()`, which also means changes to the following methods in `DatabaseMetaData`: (Bug#12541)

  - `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's 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).

- 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.

- Tokenizer for `=` in URL properties was causing `sessionVariables=....` to be parameterized incorrectly. (Bug#12753)

- Foreign key information that is quoted is parsed incorrectly when `DatabaseMetaData` methods use that information. (Bug#11781)

- 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.

- `CallableStatement.clearParameters()` now clears resources associated with `INOUT`/`OUTPUT` parameters as well as `INPUT` parameters.

- `Connection.prepareCall()` is database name case-sensitive (on Windows systems). (Bug#12417)

- `cp1251` incorrectly mapped to `win1251` for servers newer than 4.0.x. (Bug#12752)

- `java.sql.Types.OTHER` returned for `BINARY` and `VARBINARY` columns when using `DatabaseMetaData.getColumns()`. (Bug#12970)

- `ServerPreparedStatement.getBinding()` now checks if the statement is closed before attempting to reference the list of parameter bindings, to avoid throwing a `NullPointerException`.

- `ResultSetMetaData` from `Statement.getGeneratedKeys()` caused a `NullPointerException` to be thrown whenever a method that required a connection reference was called. (Bug#13277)

- 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.

- Fixed `NullPointerException` when converting `catalog` parameter in many `DatabaseMetaDataMethods` to `byte[]`s (for the result set) when the parameter is `null`. (`null` isn't technically allowed by the JDBC specification, but we've historically allowed it).

- Backport of `VAR[BINARY|CHAR] [BINARY]` types detection from 5.0 branch.

- Read response in `MysqlIO.sendFileToServer()`, even if the local file can't be opened, otherwise next query issued will fail, because it's reading the response to the empty `LOAD DATA INFILE` packet sent to the server.

- 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 via `.getStatement()` (the default is `false`, to be JDBC-compliant and to reduce the chance that code using JDBC leaks `Statement` instances).

- URL configuration parameters don't allow ‘`&`’ 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). (Bug#13453)

  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.

- The configuration property `sessionVariables` now allows you to specify variables that start with the ‘`@`’ sign.

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

#### C.5.3.6. Changes in MySQL Connector/J 3.1.10-stable (23 June 2005)

- 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.

#### C.5.3.7. Changes in MySQL Connector/J 3.1.9-stable (22 June 2005)

- Overhaul of character set configuration, everything now lives in a properties file.

- 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.

- `com.mysql.jdbc.PreparedStatement.ParseInfo` does unnecessary call to `toCharArray()`. (Bug#9064)

- Memory leak in `ServerPreparedStatement` if `serverPrepare()` fails. (Bug#10144)

- Actually write manifest file to correct place so it ends up in the binary jar file.

- 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.

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

- Double quotes not recognized when parsing client-side prepared statements. (Bug#10155)

- Made `enableStreamingResults()` visible on `com.mysql.jdbc.jdbc2.optional.StatementWrapper`.

- Made `ServerPreparedStatement.asSql()` work correctly so auto-explain functionality would work with server-side prepared statements.

- Made JDBC2-compliant wrappers public in order to allow access to vendor extensions.

- 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.

- `DatabaseMetaData.supportsMultipleOpenResults()` now returns `true`. The driver has supported this for some time, DBMD just missed that fact.

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

- `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 `SHORT`s. (Bug#10485)

- The datatype 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`.

- `SQLException` is thrown when using property `characterSetResults` with `cp932` or `eucjpms`. (Bug#10496)

- 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`.

- Added support/bug hunting feature that generates `.sql` test scripts to `STDERR` when `autoGenerateTestcaseScript` is set to `true`.

- 0-length streams not sent to server when using server-side prepared statements. (Bug#10850)

- 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.

- 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.

- Don't send `COM_RESET_STMT` for each execution of a server-side prepared statement if it isn't required.

- 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.

- `VARBINARY` data corrupted when using server-side prepared statements and `ResultSet.getBytes()`. (Bug#11115)

- `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.

- Added the following configuration bundles, use one or many via 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

- 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.

- `autoReconnect` ping causes exception on connection startup. (Bug#11259)

- Connector/J dumping query into `SQLException` twice. (Bug#11360)

- Fixed `PreparedStatement.setClob()` not accepting `null` as a parameter.

- Production package doesn't include JBoss integration classes. (Bug#11411)

- Removed nonsensical “costly type conversion” warnings when using usage advisor.

#### C.5.3.8. Changes in MySQL Connector/J 3.1.8-stable (14 April 2005)

- Fixed `DatabaseMetaData.getTables()` returning views when they were not asked for as one of the requested table types.

- Added support for new precision-math `DECIMAL` type in MySQL 5.0.3 and up.

- Fixed `ResultSet.getTime()` on a `NULL` value for server-side prepared statements throws NPE.

- Made `Connection.ping()` a public method.

- `DATE_FORMAT()` queries returned as `BLOB`s from `getObject()`. (Bug#8868)

- `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).

- `BlobFromLocator` now uses correct identifier quoting when generating prepared statements.

- Server-side session variables can be preset at connection time by passing them as a comma-delimited list for the connection property `sessionVariables`.

- Fixed regression in `ping()` for users using `autoReconnect=true`.

- `PreparedStatement.addBatch()` doesn't work with server-side prepared statements and streaming `BINARY` data. (Bug#9040)

- `DBMD.supportsMixedCase*Identifiers()` returns wrong value on servers running on case-sensitive filesystems. (Bug#8800)

- Cannot use `UTF-8` for characterSetResults configuration property. (Bug#9206)

- A continuation of Bug#8868, where functions used in queries that should return non-string 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)

- `DBMD.supportsResultSetConcurrency()` not returning `true` for forward-only/read-only result sets (we obviously support this). (Bug#8792)

- `DATA_TYPE` column from `DBMD.getBestRowIdentifier()` causes `ArrayIndexOutOfBoundsException` when accessed (and in fact, didn't return any value). (Bug#8803)

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

- `PreparedStatement.getMetaData()` inserts blank row in database under certain conditions when not using server-side prepared statements. (Bug#9320)

- `Connection.canHandleAsPreparedStatement()` now makes “best effort” to distinguish `LIMIT` clauses with placeholders in them from ones without in order to have fewer false positives when generating work-arounds for statements the server cannot currently handle as server-side prepared statements.

- Fixed `build.xml` to not compile `log4j` logging if `log4j` not available.

- 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`.

- 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.

- Stored procedures with same name in different databases confuse the driver when it tries to determine parameter counts/types. (Bug#9319)

- 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.

- Stored procedures with `DECIMAL` parameters with storage specifications that contained ‘`,`’ in them would fail. (Bug#9682)

- `PreparedStatement.setObject(int, Object, int type, int scale)` now uses scale value for `BigDecimal` instances.

- `Statement.getMoreResults()` could throw NPE when existing result set was `.close()`d. (Bug#9704)

- The performance metrics feature now gathers information about number of tables referenced in a SELECT.

- The logging system is now automatically configured. If the value has been set by the user, via 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's available,

  2. Then JDK1.4 logging,

  3. Then fallback to our `STDERR` logging.

- `DBMD.getTables()` shouldn't return tables if views are asked for, even if the database version doesn't support views. (Bug#9778)

- Fixed driver not returning `true` for `-1` when `ResultSet.getBoolean()` was called on result sets returned from server-side prepared statements.

- Added a `Manifest.MF` file with implementation information to the `.jar` file.

- 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.

- Should accept `null` for catalog (meaning use current) in DBMD methods, even though it's 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)

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

#### C.5.3.9. Changes in MySQL Connector/J 3.1.7-stable (18 February 2005)

- Timestamp key column data needed `_binary` stripped for `UpdatableResultSet.refreshRow()`. (Bug#7686)

- Timestamps converted incorrectly to strings with server-side prepared statements and updatable result sets. (Bug#7715)

- Detect new `sql_mode` variable in string form (it used to be integer) and adjust quoting method for strings appropriately.

- Added `holdResultsOpenOverStatementClose` property (default is `false`), that keeps result sets open over statement.close() or new execution on same statement (suggested by Kevin Burton).

- 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.

- Fixed duplicated code in `configureClientCharset()` that prevented `useOldUTF8Behavior=true` from working properly.

- Removed `dontUnpackBinaryResults` functionality, the driver now always stores results from server-side prepared statements as is from the server and unpacks them on demand.

- Emulated locators corrupt binary data when using server-side prepared statements. (Bug#8096)

- Fixed synchronization issue with `ServerPreparedStatement.serverPrepare()` that could cause deadlocks/crashes if connection was shared between threads.

- By default, the driver now scans SQL you are preparing via 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)

- Remove `_binary` introducer from parameters used as in/out parameters in `CallableStatement`.

- Always return `byte[]`s for output parameters registered as `*BINARY`.

- Send correct value for “boolean” `true` to server for `PreparedStatement.setObject(n, "true", Types.BIT)`.

- Fixed bug with Connection not caching statements from `prepareStatement()` when the statement wasn't a server-side prepared statement.

- 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)`.

- Added `dontTrackOpenResources` option (default is `false`, to be JDBC compliant), which helps with memory use for non-well-behaved apps (that is, applications that don't close `Statement` objects when they should).

- `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 NPE in `ResultSet.realClose()` when using usage advisor and result set was already closed.

- `PreparedStatements` not creating streaming result sets. (Bug#8487)

- 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.

- `ResultSet.getBigDecimal()` throws exception when rounding would need to occur to set scale. The driver now chooses a rounding mode of “half up” if non-rounding `BigDecimal.setScale()` fails. (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.

- 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.

- 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.

#### C.5.3.10. Changes in MySQL Connector/J 3.1.6-stable (23 December 2004)

- 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.

- `DBMD.getProcedures()` doesn't respect catalog parameter. (Bug#7026)

#### C.5.3.11. Changes in MySQL Connector/J 3.1.5-gamma (02 December 2004)

- 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.

- 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 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()”.

- Handle case when string representation of timestamp contains trailing ‘`.`’ with no numbers following it.

- Inefficient detection of pre-existing string instances in `ResultSet.getNativeString()`. (Bug#5706)

- Don't throw exceptions for `Connection.releaseSavepoint()`.

- Use a per-session `Calendar` instance by default when decoding dates from `ServerPreparedStatements` (set to old, less performant behavior by setting property `dynamicCalendars=true`).

- Added experimental configuration property `dontUnpackBinaryResults`, which delays unpacking binary result set values until they're asked for, and only creates object instances for non-numerical values (it is set to `false` by default). For some usecase/jvm combinations, this is friendlier on the garbage collector.

- `UNSIGNED BIGINT` unpacked incorrectly from server-side prepared statement result sets. (Bug#5729)

- `ServerSidePreparedStatement` allocating short-lived objects unnecessarily. (Bug#6225)

- 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.

- 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.

- Use null-safe-equals for key comparisons in updatable result sets.

- `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 `DatabaseMetaData.getIdentifierQuoteString()` when building DBMD queries.

- Use 1MB packet for sending file for `LOAD DATA LOCAL INFILE` if that is < `max_allowed_packet` on server.

- `ResultSetMetaData.getColumnDisplaySize()` returns incorrect values for multi-byte charsets. (Bug#6399)

- Make auto-deserialization of `java.lang.Objects` stored in `BLOB` columns configurable via `autoDeserialize` property (defaults to `false`).

- Re-work `Field.isOpaqueBinary()` to detect `CHAR(`n`) CHARACTER SET BINARY` to support fixed-length binary fields for `ResultSet.getObject()`.

- Use our own implementation of buffered input streams to get around blocking behavior of `java.io.BufferedInputStream`. Disable this with `useReadAheadInput=false`.

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

#### C.5.3.12. Changes in MySQL Connector/J 3.1.4-beta (04 September 2004)

- Connector/J 3.1.3 beta does not handle integers correctly (caused by changes to support unsigned reads in `Buffer.readInt()` -> `Buffer.readShort()`). (Bug#4510)

- Added support in `DatabaseMetaData.getTables()` and `getTableTypes()` for views, which are now available in MySQL server 5.0.x.

- `ServerPreparedStatement.execute*()` sometimes threw `ArrayIndexOutOfBoundsException` when unpacking field metadata. (Bug#4642)

- Optimized integer number parsing, enable “old” slower integer parsing using JDK classes via `useFastIntParsing=false` property.

- 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.

- `ResultSet.wasNull()` does not work for primatives if a previous `null` was returned. (Bug#4689)

- Track packet sequence numbers if `enablePacketDebug=true`, and throw an exception if packets received out-of-order.

- `ResultSet.getObject()` returns wrong type for strings when using prepared statements. (Bug#4482)

- Calling `MysqlPooledConnection.close()` twice (even though an application error), caused NPE. Fixed.

- `ServerPreparedStatements` dealing with return of `DECIMAL` type don't work. (Bug#5012)

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

- You can now use URLs in `LOAD DATA LOCAL INFILE` statements, and the driver will use Java's built-in handlers for retreiving the data and sending it to the server. This feature is not enabled by default, you must set the `allowUrlInLocalInfile` connection property to `true`.

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

- 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'`.

- Fixed `ServerPreparedStatement` to read prepared statement metadata off the wire, even though it's 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`.

- 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.

#### C.5.3.13. Changes in MySQL Connector/J 3.1.3-beta (07 July 2004)

- Mangle output parameter names for `CallableStatements` so they will not clash with user variable names.

- Added support for `INOUT` parameters in `CallableStatements`.

- Null bitmask sent for server-side prepared statements was incorrect. (Bug#4119)

- Use SQL Standard SQL states by default, unless `useSqlStateCodes` property is set to `false`.

- Added packet debuging code (see the `enablePacketDebug` property documentation).

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

- Externalized more messages (on-going effort).

- Error in retrieval of `mediumint` column with prepared statements and binary protocol. (Bug#4311)

- Support new time zone variables in MySQL-4.1.3 when `useTimezone=true`.

- 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`.

#### C.5.3.14. Changes in MySQL Connector/J 3.1.2-alpha (09 June 2004)

- Fixed stored procedure parameter parsing info when size was specified for a parameter (for example, `char()`, `varchar()`).

- Enabled callable statement caching via `cacheCallableStmts` property.

- 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.

- Fixed case when no parameters could cause a `NullPointerException` in `CallableStatement.setOutputParameters()`.

- Removed wrapping of exceptions in `MysqlIO.changeUser()`.

- Fixed sending of split packets for large queries, enabled nio ability to send large packets as well.

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

- Added `gatherPerformanceMetrics` property, along with properties to control when/where this info gets logged (see docs for more info).

- `ServerPreparedStatements` weren't actually de-allocating server-side resources when `.close()` was called.

- Added `logSlowQueries` property, along with `slowQueriesThresholdMillis` property to control when a query should be considered “slow.”

- Correctly map output parameters to position given in `prepareCall()` versus. order implied during `registerOutParameter()`. (Bug#3146)

- Correctly detect initial character set for servers >= 4.1.0.

- Cleaned up detection of server properties.

- Support placeholder for parameter metadata for server >= 4.1.2.

- `getProcedures()` does not return any procedures in result set. (Bug#3539)

- `getProcedureColumns()` doesn't work with wildcards for procedure name. (Bug#3540)

- `DBMD.getSQLStateType()` returns incorrect value. (Bug#3520)

- Added `connectionCollation` property to cause driver to issue `set collation_connection=...` query on connection init if default collation for given charset is not appropriate.

- Fixed `DatabaseMetaData.getProcedures()` when run on MySQL-5.0.0 (output of `SHOW PROCEDURE STATUS` changed between 5.0.0 and 5.0.1.

- `getWarnings()` returns `SQLWarning` instead of `DataTruncation`. (Bug#3804)

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

#### C.5.3.15. Changes in MySQL Connector/J 3.1.1-alpha (14 February 2004)

- Fixed bug with `UpdatableResultSets` not using client-side prepared statements.

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

- Unpack “unknown” data types from server prepared statements as `Strings`.

- Implemented long data (Blobs, Clobs, InputStreams, Readers) for server prepared statements.

- Implemented `Statement.getWarnings()` for MySQL-4.1 and newer (using `SHOW WARNINGS`).

- Default result set type changed to `TYPE_FORWARD_ONLY` (JDBC compliance).

- Centralized setting of result set type and concurrency.

- Refactored how connection properties are set and exposed as `DriverPropertyInfo` as well as `Connection` and `DataSource` properties.

- Support for NIO. Use `useNIO=true` on platforms that support NIO.

- Support for transaction savepoints (MySQL >= 4.0.14 or 4.1.1).

- Support for `mysql_change_user()`. See the `changeUser()` method in `com.mysql.jdbc.Connection`.

- Reduced number of methods called in average query to be more efficient.

- Prepared `Statements` will be re-prepared on auto-reconnect. Any errors encountered are postponed until first attempt to re-execute the re-prepared statement.

- Ensure that warnings are cleared before executing queries on prepared statements, as-per JDBC spec (now that we support warnings).

- Support “old” `profileSql` capitalization in `ConnectionProperties`. This property is deprecated, you should use `profileSQL` if possible.

- Optimized `Buffer.readLenByteArray()` to return shared empty byte array when length is 0.

- Allow contents of `PreparedStatement.setBlob()` to be retained between calls to `.execute*()`.

- Deal with 0-length tokens in `EscapeProcessor` (caused by callable statement escape syntax).

- Check for closed connection on delete/update/insert row operations in `UpdatableResultSet`.

- Fix support for table aliases when checking for all primary keys in `UpdatableResultSet`.

- Removed `useFastDates` connection property.

- Correctly initialize datasource properties from JNDI Refs, including explicitly specified URLs.

- `DatabaseMetaData` now reports `supportsStoredProcedures()` for MySQL versions >= 5.0.0

- Fixed stack overflow in `Connection.prepareCall()` (bad merge).

- Fixed `IllegalAccessError` to `Calendar.getTimeInMillis()` in `DateTimeValue` (for JDK < 1.4).

- `DatabaseMetaData.getColumns()` is not returning correct column ordinal info for non-`'%'` column name patterns. (Bug#1673)

- Merged fix of datatype mapping from MySQL type `FLOAT` to `java.sql.Types.REAL` from 3.0 branch.

- Detect collation of column for `RSMD.isCaseSensitive()`.

- Fixed sending of queries larger than 16M.

- Added named and indexed input/output parameter support to `CallableStatement`. MySQL-5.0.x or newer.

- Fixed `NullPointerException` in `ServerPreparedStatement.setTimestamp()`, as well as year and month descrepencies in `ServerPreparedStatement.setTimestamp()`, `setDate()`.

- Added ability to have multiple database/JVM targets for compliance and regression/unit tests in `build.xml`.

- Fixed NPE and year/month bad conversions when accessing some datetime functionality in `ServerPreparedStatements` and their resultant result sets.

- Display where/why a connection was implicitly closed (to aid debugging).

- `CommunicationsException` implemented, that tries to determine why communications was lost with a server, and displays possible reasons when `.getMessage()` is called.

- `NULL` values for numeric types in binary encoded result sets causing `NullPointerExceptions`. (Bug#2359)

- Implemented `Connection.prepareCall()`, and `DatabaseMetaData`. `getProcedures()` and `getProcedureColumns()`.

- Reset `long binary` parameters in `ServerPreparedStatement` when `clearParameters()` is called, by sending `COM_RESET_STMT` to the server.

- Merged prepared statement caching, and `.getMetaData()` support from 3.0 branch.

- Fixed off-by-1900 error in some cases for years in `TimeUtil.fastDate`/`TimeCreate()` when unpacking results from server-side prepared statements.

- Fixed charset conversion issue in `getTables()`. (Bug#2502)

- Implemented multiple result sets returned from a statement or stored procedure.

- Server-side prepared statements were not returning datatype `YEAR` correctly. (Bug#2606)

- Enabled streaming of result sets from server-side prepared statements.

- Class-cast exception when using scrolling result sets and server-side prepared statements. (Bug#2623)

- Merged unbuffered input code from 3.0.

- Fixed `ConnectionProperties` that weren't properly exposed via accessors, cleaned up `ConnectionProperties` code.

- `NULL` fields were not being encoded correctly in all cases in server-side prepared statements. (Bug#2671)

- Fixed rare buffer underflow when writing numbers into buffers for sending prepared statement execution requests.

- Use DocBook version of docs for shipped versions of drivers.

#### C.5.3.16. Changes in MySQL Connector/J 3.1.0-alpha (18 February 2003)

- 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.

- Track open `Statements`, close all when `Connection.close()` is called (JDBC compliance).

### C.5.4. Changes in MySQL Connector/J 3.0.x

#### C.5.4.1. Changes in MySQL Connector/J 3.0.17-ga (23 June 2005)

- `Timestamp`/`Time` conversion goes in the wrong “direction” when `useTimeZone=true` and server time zone differs from client time zone. (Bug#5874)

- `DatabaseMetaData.getIndexInfo()` ignored `unique` parameter. (Bug#7081)

- Support new protocol type `MYSQL_TYPE_VARCHAR`.

- 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.

- Statements created from a pooled connection were returning physical connection instead of logical connection when `getConnection()` was called. (Bug#7316)

- `PreparedStatements` don't encode Big5 (and other multi-byte) character sets correctly in static SQL strings. (Bug#7033)

- Connections starting up failed-over (due to down master) never retry master. (Bug#6966)

- `PreparedStatement.fixDecimalExponent()` adding extra `+`, making number unparseable by MySQL server. (Bug#7061)

- Timestamp key column data needed `_binary` stripped for `UpdatableResultSet.refreshRow()`. (Bug#7686)

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

- `PreparedStatement.fixDecimalExponent()` adding extra `+`, making number unparseable by MySQL server. (Bug#7601)

- Escape sequence {fn convert(..., type)} now supports ODBC-style types that are prepended by `SQL_`.

- Fixed duplicated code in `configureClientCharset()` that prevented `useOldUTF8Behavior=true` from working properly.

- Handle streaming result sets with more than 2 billion rows properly by fixing wraparound of row number counter.

- `MS932`, `SHIFT_JIS`, and `Windows_31J` not recognized as aliases for `sjis`. (Bug#7607)

- Adding `CP943` to aliases for `sjis`. (Bug#6549, fixed while fixing Bug#7607)

- Which requires hex escaping of binary data when using multi-byte charsets with prepared statements. (Bug#8064)

- `NON_UNIQUE` column from `DBMD.getIndexInfo()` returned inverted value. (Bug#8812)

- 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.

- `EUCKR` charset is sent as `SET NAMES euc_kr` which MySQL-4.1 and newer doesn't understand. (Bug#8629)

- `DatabaseMetaData.supportsSelectForUpdate()` returns correct value based on server version.

- Use hex escapes for `PreparedStatement.setBytes()` for double-byte charsets including “aliases” `Windows-31J`, `CP934`, `MS932`.

- 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.

#### C.5.4.2. Changes in MySQL Connector/J 3.0.16-ga (15 November 2004)

- Re-issue character set configuration commands when re-using pooled connections and/or `Connection.changeUser()` when connected to MySQL-4.1 or newer.

- Fixed `ResultSetMetaData.isReadOnly()` to detect non-writable columns when connected to MySQL-4.1 or newer, based on existence of “original” table and column names.

- `ResultSet.updateByte()` when on insert row throws `ArrayOutOfBoundsException`. (Bug#5664)

- Fixed `DatabaseMetaData.getTypes()` returning incorrect (this is, non-negative) scale for the `NUMERIC` type.

- Off-by-one bug in `Buffer.readString(`string`)`. (Bug#5664)

- Made `TINYINT(1)` -> `BIT`/`Boolean` conversion configurable via `tinyInt1isBit` property (default `true` to be JDBC compliant out of the box).

- Only set `character_set_results` during connection establishment if server version >= 4.1.1.

- Fixed regression where `useUnbufferedInput` was defaulting to `false`.

- `ResultSet.getTimestamp()` on a column with `TIME` in it fails. (Bug#5664)

#### C.5.4.3. Changes in MySQL Connector/J 3.0.15-production (04 September 2004)

- `StringUtils.escapeEasternUnicodeByteStream` was still broken for GBK. (Bug#4010)

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

- 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()`.

- Removed redundant calls to `checkRowPos()` in `ResultSet`.

- `DOUBLE` mapped twice in `DBMD.getTypeInfo()`. (Bug#4742)

- Added FLOSS license exemption.

- Calling `.close()` twice on a `PooledConnection` causes NPE. (Bug#4808)

- `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#4138, Bug#4860)

- “Production” is now “GA” (General Availability) in naming scheme of distributions.

- `RSMD.getPrecision()` returning 0 for non-numeric types (should return max length in chars for non-binary 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)

- `ResultSet` should release `Field[]` instance in `.close()`. (Bug#5022)

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

- Parse new time zone variables from 4.1.x servers.

- Use `_binary` introducer for `PreparedStatement.setBytes()` and `set*Stream()` when connected to MySQL-4.1.x or newer to avoid misinterpretation during character conversion.

#### C.5.4.4. Changes in MySQL Connector/J 3.0.14-production (28 May 2004)

- Fixed URL parsing error.

#### C.5.4.5. Changes in MySQL Connector/J 3.0.13-production (27 May 2004)

- Using a `MySQLDatasource` without server name fails. (Bug#3848)

- `No Database Selected` when using `MysqlConnectionPoolDataSource`. (Bug#3920)

- `PreparedStatement.getGeneratedKeys()` method returns only 1 result for batched insertions. (Bug#3873)

#### C.5.4.6. Changes in MySQL Connector/J 3.0.12-production (18 May 2004)

- Add unsigned attribute to `DatabaseMetaData.getColumns()` output in the `TYPE_NAME` column.

- Added `failOverReadOnly` property, to allow end-user to configure state of connection (read-only/writable) when failed over.

- Backported “change user” and “reset server state” functionality from 3.1 branch, to allow clients of `MysqlConnectionPoolDataSource` to reset server state on `getConnection()` on a pooled connection.

- Don't escape SJIS/GBK/BIG5 when using MySQL-4.1 or newer.

- Allow `url` parameter for `MysqlDataSource` and `MysqlConnectionPool` `DataSource` so that passing of other properties is possible from inside appservers.

- Map duplicate key and foreign key errors to SQLState of `23000`.

- Backport documentation tooling from 3.1 branch.

- Return creating statement for `ResultSets` created by `getGeneratedKeys()`. (Bug#2957)

- Allow `java.util.Date` to be sent in as parameter to `PreparedStatement.setObject()`, converting it to a `Timestamp` to maintain full precision. (Bug#103).

- Don't truncate `BLOB` or `CLOB` values when using `setBytes()` and/or `setBinary/CharacterStream()`. (Bug#2670).

- Dynamically configure character set mappings for field-level character sets on MySQL-4.1.0 and newer using `SHOW COLLATION` when connecting.

- Map `binary` character set to `US-ASCII` to support `DATETIME` charset recognition for servers >= 4.1.2.

- Use `SET character_set_results` during initialization to allow any charset to be returned to the driver for result sets.

- Use `charsetnr` returned during connect to encode queries before issuing `SET NAMES` on MySQL >= 4.1.0.

- Add helper methods to `ResultSetMetaData` (`getColumnCharacterEncoding()` and `getColumnCharacterSet()`) to allow end-users to see what charset the driver thinks it should be using for the column.

- Only set `character_set_results` for MySQL >= 4.1.0.

- `StringUtils.escapeSJISByteStream()` not covering all eastern double-byte charsets correctly. (Bug#3511)

- Renamed `StringUtils.escapeSJISByteStream()` to more appropriate `escapeEasternUnicodeByteStream()`.

- Not specifying database in URL caused `MalformedURL` exception. (Bug#3554)

- Auto-convert MySQL encoding names to Java encoding names if used for `characterEncoding` property.

- Added encoding names that are recognized on some JVMs to fix case where they were reverse-mapped to MySQL encoding names incorrectly.

- Use `junit.textui.TestRunner` for all unit tests (to allow them to be run from the command line outside of Ant or Eclipse).

- `UpdatableResultSet` not picking up default values for `moveToInsertRow()`. (Bug#3557)

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

- `DBMD.getSQLStateType()` returns incorrect value. (Bug#3520)

- Fixed regression in `PreparedStatement.setString()` and eastern character encodings.

- Made `StringRegressionTest` 4.1-unicode aware.

#### C.5.4.7. Changes in MySQL Connector/J 3.0.11-stable (19 February 2004)

- Trigger a `SET NAMES utf8` when encoding is forced to `utf8` or `utf-8` via the `characterEncoding` property. Previously, only the Java-style encoding name of `utf-8` would trigger this.

- `AutoReconnect` time was growing faster than exponentially. (Bug#2447)

- Fixed failover always going to last host in list. (Bug#2578)

- Added `useUnbufferedInput` parameter, and now use it by default (due to JVM issue http://developer.java.sun.com/developer/bugParade/bugs/4401235.html)

- Detect `on`/`off` or `1`, `2`, `3` form of `lower_case_table_names` value on server.

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

- Return `[B` instead of `java.lang.Object` for `BINARY`, `VARBINARY` and `LONGVARBINARY` types from `ResultSetMetaData.getColumnClassName()` (JDBC compliance).

- Issue connection events on all instances created from a `ConnectionPoolDataSource`.

#### C.5.4.8. Changes in MySQL Connector/J 3.0.10-stable (13 January 2004)

- Don't count quoted IDs when inside a 'string' in `PreparedStatement` parsing. (Bug#1511)

- “Friendlier” exception message for `PacketTooLargeException`. (Bug#1534)

- Backported fix for aliased tables and `UpdatableResultSets` in `checkUpdatability()` method from 3.1 branch.

- Fix for `ArrayIndexOutOfBounds` exception when using `Statement.setMaxRows()`. (Bug#1695)

- Barge blobs and split packets not being read correctly. (Bug#1576)

- Fixed regression of `Statement.getGeneratedKeys()` and `REPLACE` statements.

- Subsequent call to `ResultSet.updateFoo()` causes NPE if result set is not updatable. (Bug#1630)

- Fix for 4.1.1-style authentication with no password.

- Foreign Keys column sequence is not consistent in `DatabaseMetaData.getImported/Exported/CrossReference()`. (Bug#1731)

- `DatabaseMetaData.getSystemFunction()` returning bad function `VResultsSion`. (Bug#1775)

- Cross-database updatable result sets are not checked for updatability correctly. (Bug#1592)

- `DatabaseMetaData.getColumns()` should return `Types.LONGVARCHAR` for MySQL `LONGTEXT` type.

- `ResultSet.getObject()` on `TINYINT` and `SMALLINT` columns should return Java type `Integer`. (Bug#1913)

- Added `alwaysClearStream` connection property, which causes the driver to always empty any remaining data on the input stream before each query.

- Added more descriptive error message `Server Configuration Denies Access to DataSource`, as well as retrieval of message from server.

- Autoreconnect code didn't set catalog upon reconnect if it had been changed.

- Implement `ResultSet.updateClob()`.

- `ResultSetMetaData.isCaseSensitive()` returned wrong value for `CHAR`/`VARCHAR` columns.

- Connection property `maxRows` not honored. (Bug#1933)

- Statements being created too many times in `DBMD.extractForeignKeyFromCreateTable()`. (Bug#1925)

- Support escape sequence {fn convert ... }. (Bug#1914)

- `ArrayIndexOutOfBounds` when parameter number == number of parameters + 1. (Bug#1958)

- `ResultSet.findColumn()` should use first matching column name when there are duplicate column names in `SELECT` query (JDBC-compliance). (Bug#2006)

- Removed static synchronization bottleneck from `PreparedStatement.setTimestamp()`.

- Removed static synchronization bottleneck from instance factory method of `SingleByteCharsetConverter`.

- Enable caching of the parsing stage of prepared statements via the `cachePrepStmts`, `prepStmtCacheSize`, and `prepStmtCacheSqlLimit` properties (disabled by default).

- Speed up parsing of `PreparedStatements`, try to use one-pass whenever possible.

- Fixed security exception when used in Applets (applets can't read the system property `file.encoding` which is needed for `LOAD DATA LOCAL INFILE`).

- Use constants for SQLStates.

- Map charset `ko18_ru` to `ko18r` when connected to MySQL-4.1.0 or newer.

- Ensure that `Buffer.writeString()` saves room for the `\0`.

- Fixed exception `Unknown character set 'danish'` on connect with JDK-1.4.0

- Fixed mappings in SQLError to report deadlocks with SQLStates of `41000`.

- `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.

#### C.5.4.9. Changes in MySQL Connector/J 3.0.9-stable (07 October 2003)

- Faster date handling code in `ResultSet` and `PreparedStatement` (no longer uses `Date` methods that synchronize on static calendars).

- Fixed test for end of buffer in `Buffer.readString()`.

- Fixed `ResultSet.previous()` behavior to move current position to before result set when on first row of result set. (Bug#496)

- Fixed `Statement` and `PreparedStatement` issuing bogus queries when `setMaxRows()` had been used and a `LIMIT` clause was present in the query.

- `refreshRow` didn't work when primary key values contained values that needed to be escaped (they ended up being doubly escaped). (Bug#661)

- Support `InnoDB` contraint names when extracting foreign key information in `DatabaseMetaData` (implementing ideas from Parwinder Sekhon). (Bug#517, Bug#664)

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

- Fix `UpdatableResultSet` to return values for `get`XXX`()` when on insert row. (Bug#675)

- The `insertRow` in an `UpdatableResultSet` is now loaded with the default column values when `moveToInsertRow()` is called. (Bug#688)

- `DatabaseMetaData.getColumns()` wasn't returning `NULL` for default values that are specified as `NULL`.

- Change default statement type/concurrency to `TYPE_FORWARD_ONLY` and `CONCUR_READ_ONLY` (spec compliance).

- Don't try and reset isolation level on reconnect if MySQL doesn't support them.

- Don't wrap `SQLExceptions` in `RowDataDynamic`.

- Don't change timestamp TZ twice if `useTimezone==true`. (Bug#774)

- Fixed regression in large split-packet handling. (Bug#848)

- Better diagnostic error messages in exceptions for “streaming” result sets.

- Issue exception on `ResultSet.get`XXX`()` on empty result set (wasn't caught in some cases).

- Don't hide messages from exceptions thrown in I/O layers.

- Don't fire connection closed events when closing pooled connections, or on `PooledConnection.getConnection()` with already open connections. (Bug#884)

- 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.

- Double-escaping of `'\'` when charset is SJIS or GBK and `'\'` appears in non-escaped input. (Bug#879)

- When emptying input stream of unused rows for “streaming” result sets, have the current thread `yield()` every 100 rows in order to not monopolize CPU time.

- `DatabaseMetaData.getColumns()` getting confused about the keyword “set” in character columns. (Bug#1099)

- Fixed deadlock issue with `Statement.setMaxRows()`.

- Fixed `CLOB.truncate()`. (Bug#1130)

- Optimized `CLOB.setChracterStream()`. (Bug#1131)

- Made `databaseName`, `portNumber`, and `serverName` optional parameters for `MysqlDataSourceFactory`. (Bug#1246)

- `ResultSet.get/setString` mashing char 127. (Bug#1247)

- Backported authentication changes for 4.1.1 and newer from 3.1 branch.

- Added `com.mysql.jdbc.util.BaseBugReport` to help creation of testcases for bug reports.

- 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 oustanding data still streaming from the server to be discarded if another query is executed before all the data has been read from the server.

#### C.5.4.10. Changes in MySQL Connector/J 3.0.8-stable (23 May 2003)

- Allow bogus URLs in `Driver.getPropertyInfo()`.

- Return list of generated keys when using multi-value `INSERTS` with `Statement.getGeneratedKeys()`.

- Use JVM charset with filenames and `LOAD DATA [LOCAL] INFILE`.

- Fix infinite loop with `Connection.cleanup()`.

- Changed Ant target `compile-core` to `compile-driver`, and made testsuite compilation a separate target.

- Fixed result set not getting set for `Statement.executeUpdate()`, which affected `getGeneratedKeys()` and `getUpdateCount()` in some cases.

- Unicode character 0xFFFF in a string would cause the driver to throw an `ArrayOutOfBoundsException`. (Bug#378).

- Return correct number of generated keys when using `REPLACE` statements.

- Fix problem detecting server character set in some cases.

- Fix row data decoding error when using very large packets.

- Optimized row data decoding.

- Issue exception when operating on an already closed prepared statement.

- Fixed SJIS encoding bug, thanks to Naoto Sato.

- Optimized usage of `EscapeProcessor`.

- Allow multiple calls to `Statement.close()`.

#### C.5.4.11. Changes in MySQL Connector/J 3.0.7-stable (08 April 2003)

- Fixed `MysqlPooledConnection.close()` calling wrong event type.

- Fixed `StringIndexOutOfBoundsException` in `PreparedStatement.setClob()`.

- 4.1 Column Metadata fixes.

- Remove synchronization from `Driver.connect()` and `Driver.acceptsUrl()`.

- `IOExceptions` during a transaction now cause the `Connection` to be closed.

- Fixed missing conversion for `YEAR` type in `ResultSetMetaData.getColumnTypeName()`.

- Don't pick up indexes that start with `pri` as primary keys for `DBMD.getPrimaryKeys()`.

- Throw `SQLExceptions` when trying to do operations on a forcefully closed `Connection` (that is, when a communication link failure occurs).

- You can now toggle profiling on/off using `Connection.setProfileSql(boolean)`.

- Fixed charset issues with database metadata (charset was not getting set correctly).

- Updatable `ResultSets` can now be created for aliased tables/columns when connected to MySQL-4.1 or newer.

- Fixed `LOAD DATA LOCAL INFILE` bug when file > `max_allowed_packet`.

- Fixed escaping of 0x5c (`'\'`) character for GBK and Big5 charsets.

- Fixed `ResultSet.getTimestamp()` when underlying field is of type `DATE`.

- Ensure that packet size from `alignPacketSize()` does not exceed `max_allowed_packet` (JVM bug)

- Don't reset `Connection.isReadOnly()` when autoReconnecting.

#### C.5.4.12. Changes in MySQL Connector/J 3.0.6-stable (18 February 2003)

- Fixed `ResultSetMetaData` to return `""` when catalog not known. Fixes `NullPointerExceptions` with Sun's `CachedRowSet`.

- Fixed `DBMD.getTypeInfo()` and `DBMD.getColumns()` returning different value for precision in `TEXT` and `BLOB` types.

- Allow ignoring of warning for “non transactional tables” during rollback (compliance/usability) by setting `ignoreNonTxTables` property to `true`.

- Fixed `SQLExceptions` getting swallowed on initial connect.

- Fixed `Statement.setMaxRows()` to stop sending `LIMIT` type queries when not needed (performance).

- Clean up `Statement` query/method mismatch tests (that is, `INSERT` not allowed with `.executeQuery()`).

- More checks added in `ResultSet` traversal method to catch when in closed state.

- Fixed `ResultSetMetaData.isWritable()` to return correct value.

- 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”.

- Backported 4.1 charset field info changes from Connector/J 3.1.

#### C.5.4.13. Changes in MySQL Connector/J 3.0.5-gamma (22 January 2003)

- Fixed `Buffer.fastSkipLenString()` causing `ArrayIndexOutOfBounds` exceptions with some queries when unpacking fields.

- 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()`.

- 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()`.

- Greatly reduce memory required for `setBinaryStream()` in `PreparedStatements`.

- Fixed `ResultSet.isBeforeFirst()` for empty result sets.

- Added update options for foreign key metadata.

#### C.5.4.14. Changes in MySQL Connector/J 3.0.4-gamma (06 January 2003)

- Added quoted identifiers to database names for `Connection.setCatalog`.

- Added support for quoted identifiers in `PreparedStatement` parser.

- Streamlined character conversion and `byte[]` handling in `PreparedStatements` for `setByte()`.

- Reduce memory footprint of `PreparedStatements` by sharing outbound packet with `MysqlIO`.

- Added `strictUpdates` property to allow 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.

- Added support for 4.0.8-style large packets.

- Fixed `PreparedStatement.executeBatch()` parameter overwriting.

#### C.5.4.15. Changes in MySQL Connector/J 3.0.3-dev (17 December 2002)

- Changed `charsToByte` in `SingleByteCharConverter` to be non-static.

- Changed `SingleByteCharConverter` to use lazy initialization of each converter.

- Fixed charset handling in `Fields.java`.

- Implemented `Connection.nativeSQL()`.

- More robust escape tokenizer: Recognize `--` comments, and allow nested escape sequences (see `testsuite.EscapeProcessingTest`).

- `DBMD.getImported/ExportedKeys()` now handles multiple foreign keys per table.

- Fixed `ResultSetMetaData.getPrecision()` returning incorrect values for some floating-point types.

- Fixed `ResultSetMetaData.getColumnTypeName()` returning `BLOB` for `TEXT` and `TEXT` for `BLOB` types.

- Fixed `Buffer.isLastDataPacket()` for 4.1 and newer servers.

- Added `CLIENT_LONG_FLAG` to be able to get more column flags (`isAutoIncrement()` being the most important).

- Because of above, implemented `ResultSetMetaData.isAutoIncrement()` to use `Field.isAutoIncrement()`.

- Honor `lower_case_table_names` when enabled in the server when doing table name comparisons in `DatabaseMetaData` methods.

- Some MySQL-4.1 protocol support (extended field info from selects).

- Use non-aliased table/column names and database names to fullly qualify tables and columns in `UpdatableResultSet` (requires MySQL-4.1 or newer).

- Allow user to alter behavior of `Statement`/ `PreparedStatement.executeBatch()` via `continueBatchOnError` property (defaults to `true`).

- Check for connection closed in more `Connection` methods (`createStatement`, `prepareStatement`, `setTransactionIsolation`, `setAutoCommit`).

- More robust implementation of updatable result sets. Checks that all primary keys of the table have been selected.

- `LOAD DATA LOCAL INFILE ...` now works, if your server is configured to allow it. Can be turned off with the `allowLoadLocalInfile` property (see the `README`).

- Substitute `'?'` for unknown character conversions in single-byte character sets instead of `'\0'`.

- `NamedPipeSocketFactory` now works (only intended for Windows), see `README` for instructions.

#### C.5.4.16. Changes in MySQL Connector/J 3.0.2-dev (08 November 2002)

- Fixed issue with updatable result sets and `PreparedStatements` not working.

- Fixed `ResultSet.setFetchDirection(FETCH_UNKNOWN)`.

- Fixed issue when calling `Statement.setFetchSize()` when using arbitrary values.

- Fixed incorrect conversion in `ResultSet.getLong()`.

- Implemented `ResultSet.updateBlob()`.

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

- Fixed `UnsupportedEncodingException` thrown when “forcing” a character encoding via properties.

- Fixed various non-ASCII character encoding issues.

- Added driver property `useHostsInPrivileges`. Defaults to true. Affects whether or not `@hostname` will be used in `DBMD.getColumn/TablePrivileges`.

- 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.

- Properly restore connection properties when autoReconnecting or failing-over, including `autoCommit` state, and isolation level.

- Use `SHOW CREATE TABLE` when possible for determining foreign key information for `DatabaseMetaData`. Also allows cascade options for `DELETE` information to be returned.

- Escape `0x5c` character in strings for the SJIS charset.

- Fixed start position off-by-1 error in `Clob.getSubString()`.

- Implemented `Clob.truncate()`.

- Implemented `Clob.setString()`.

- Implemented `Clob.setAsciiStream()`.

- Implemented `Clob.setCharacterStream()`.

- Added `com.mysql.jdbc.MiniAdmin` class, which allows 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.

- Added `connectTimeout` parameter that allows users of JDK-1.4 and newer to specify a maxium time to wait to establish a connection.

- Failover and `autoReconnect` work only when the connection is in an `autoCommit(false)` state, in order to stay transaction-safe.

- Added `queriesBeforeRetryMaster` property that specifies how many queries to issue when failed over before attempting to reconnect to the master (defaults to 50).

- Fixed `DBMD.supportsResultSetConcurrency()` so that it returns true for `ResultSet.TYPE_SCROLL_INSENSITIVE` and `ResultSet.CONCUR_READ_ONLY` or `ResultSet.CONCUR_UPDATABLE`.

- Fixed `ResultSet.isLast()` for empty result sets (should return `false`).

- `PreparedStatement` now honors stream lengths in setBinary/Ascii/Character Stream() unless you set the connection property `useStreamLengthsInPrepStmts` to `false`.

- Removed some not-needed temporary object creation by smarter use of `Strings` in `EscapeProcessor`, `Connection` and `DatabaseMetaData` classes.

#### C.5.4.17. Changes in MySQL Connector/J 3.0.1-dev (21 September 2002)

- Fixed `ResultSet.getRow()` off-by-one bug.

- Fixed `RowDataStatic.getAt()` off-by-one bug.

- Added limited `Clob` functionality (`ResultSet.getClob()`, `PreparedStatemtent.setClob()`, `PreparedStatement.setObject(Clob)`.

- Added `socketTimeout` parameter to URL.

- `Connection.isClosed()` no longer “pings” the server.

- `Connection.close()` issues `rollback()` when `getAutoCommit()` is `false`.

- Added `paranoid` parameter, which sanitizes error messages by removing “sensitive” information from them (such as hostnames, ports, or usernames), as well as clearing “sensitive” data structures when possible.

- Fixed `ResultSetMetaData.isSigned()` for `TINYINT` and `BIGINT`.

- Charsets now automatically detected. Optimized code for single-byte character set conversion.

- Implemented `ResultSet.getCharacterStream()`.

- Added `LOCAL TEMPORARY` to table types in `DatabaseMetaData.getTableTypes()`.

- Massive code clean-up to follow Java coding conventions (the time had come).

#### C.5.4.18. Changes in MySQL Connector/J 3.0.0-dev (31 July 2002)

- !!! LICENSE CHANGE !!! The driver is now GPL. If you need non-GPL licenses, please contact me `<mark@mysql.com>`.

- JDBC-3.0 functionality including `Statement/PreparedStatement.getGeneratedKeys()` and `ResultSet.getURL()`.

- Performance enchancements: Driver is now 50–100% faster in most situations, and creates fewer temporary objects.

- Repackaging: New driver name is `com.mysql.jdbc.Driver`, old name still works, though (the driver is now provided by MySQL-AB).

- Better checking for closed connections in `Statement` and `PreparedStatement`.

- Support for streaming (row-by-row) result sets (see `README`) Thanks to Doron.

- Support for large packets (new addition to MySQL-4.0 protocol), see `README` for more information.

- JDBC Compliance: Passes all tests besides stored procedure tests.

- Fix and sort primary key names in `DBMetaData` (SF bugs 582086 and 582086).

- Float types now reported as `java.sql.Types.FLOAT` (SF bug 579573).

- `ResultSet.getTimestamp()` now works for `DATE` types (SF bug 559134).

- `ResultSet.getDate/Time/Timestamp` now recognizes all forms of invalid values that have been set to all zeros by MySQL (SF bug 586058).

- Testsuite now uses Junit (which you can get from http://www.junit.org.

- The driver now only works with JDK-1.2 or newer.

- Added multi-host failover support (see `README`).

- General source-code cleanup.

- Overall speed improvements via controlling transient object creation in `MysqlIO` class when reading packets.

- Performance improvements in string handling and field metadata creation (lazily instantiated) contributed by Alex Twisleton-Wykeham-Fiennes.

### C.5.5. Changes in MySQL Connector/J 2.0.x

#### C.5.5.1. Changes in MySQL Connector/J 2.0.14 (16 May 2002)

- More code cleanup.

- `PreparedStatement` now releases resources on `.close()`. (SF bug 553268)

- 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.

- `ResultSet.getDouble()` now uses code built into JDK to be more precise (but slower).

- `LogicalHandle.isClosed()` calls through to physical connection.

- Added SQL profiling (to `STDERR`). Set `profileSql=true` in your JDBC URL. See `README` for more information.

- Fixed typo for `relaxAutoCommit` parameter.

#### C.5.5.2. Changes in MySQL Connector/J 2.0.13 (24 April 2002)

- More code cleanup.

- Fixed unicode chars being read incorrectly. (SF bug 541088)

- Faster blob escaping for `PrepStmt`.

- Added `set`/`getPortNumber()` to `DataSource(s)`. (SF bug 548167)

- Added `setURL()` to `MySQLXADataSource`. (SF bug 546019)

- `PreparedStatement.toString()` fixed. (SF bug 534026)

- `ResultSetMetaData.getColumnClassName()` now implemented.

- Rudimentary version of `Statement.getGeneratedKeys()` from JDBC-3.0 now implemented (you need to be using JDK-1.4 for this to work, I believe).

- `DBMetaData.getIndexInfo()` - bad PAGES fixed. (SF BUG 542201)

#### C.5.5.3. Changes in MySQL Connector/J 2.0.12 (07 April 2002)

- General code cleanup.

- Added `getIdleFor()` method to `Connection` and `MysqlLogicalHandle`.

- Relaxed synchronization in all classes, should fix 520615 and 520393.

- Added `getTable/ColumnPrivileges()` to DBMD (fixes 484502).

- Added new types to `getTypeInfo()`, fixed existing types thanks to Al Davis and Kid Kalanon.

- Added support for `BIT` types (51870) to `PreparedStatement`.

- Fixed `getRow()` bug (527165) in `ResultSet`.

- Fixes for `ResultSet` updatability in `PreparedStatement`.

- Fixed time zone off-by-1-hour bug in `PreparedStatement` (538286, 528785).

- `ResultSet`: Fixed updatability (values being set to `null` if not updated).

- `DataSources` - fixed `setUrl` bug (511614, 525565), wrong datasource class name (532816, 528767).

- Added identifier quoting to all `DatabaseMetaData` methods that need them (should fix 518108).

- Added support for `YEAR` type (533556).

- `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.

- `ResultSet.refreshRow()` implemented.

- Fixed `testsuite.Traversal` `afterLast()` bug, thanks to Igor Lastric.

#### C.5.5.4. Changes in MySQL Connector/J 2.0.11 (27 January 2002)

- Fixed missing `DELETE_RULE` value in `DBMD.getImported/ExportedKeys()` and `getCrossReference()`.

- Full synchronization of `Statement.java`.

- More changes to fix `Unexpected end of input stream` errors when reading `BLOB` values. This should be the last fix.

#### C.5.5.5. Changes in MySQL Connector/J 2.0.10 (24 January 2002)

- Fixed spurious `Unexpected end of input stream` errors in `MysqlIO` (bug 507456).

- Fixed null-pointer-exceptions when using `MysqlConnectionPoolDataSource` with Websphere 4 (bug 505839).

#### C.5.5.6. Changes in MySQL Connector/J 2.0.9 (13 January 2002)

- Ant build was corrupting included `jar` files, fixed (bug 487669).

- Fixed extra memory allocation in `MysqlIO.readPacket()` (bug 488663).

- Implementation of `DatabaseMetaData.getExported/ImportedKeys()` and `getCrossReference()`.

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

- `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).

- Added detection of network connection being closed when reading packets (thanks to Todd Lizambri).

- Fixed quoting error with escape processor (bug 486265).

- Report batch update support through `DatabaseMetaData` (bug 495101).

- Fixed off-by-one-hour error in `PreparedStatement.setTimestamp()` (bug 491577).

- 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 casting bug in `PreparedStatement` (bug 488663).

#### C.5.5.7. Changes in MySQL Connector/J 2.0.8 (25 November 2001)

- Batch updates now supported (thanks to some inspiration from Daniel Rall).

- `XADataSource`/`ConnectionPoolDataSource` code (experimental)

- `PreparedStatement.setAnyNumericType()` now handles positive exponents correctly (adds `+` so MySQL can understand it).

- `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).

#### C.5.5.8. Changes in MySQL Connector/J 2.0.7 (24 October 2001)

- `PreparedStatement.setCharacterStream()` now implemented

- 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`.

- Character sets read from database if `useUnicode=true` and `characterEncoding` is not set. (thanks to Dmitry Vereshchagin)

- Initial transaction isolation level read from database (if avaialable). (thanks to Dmitry Vereshchagin)

- Fixed `DatabaseMetaData.supportsTransactions()`, and `supportsTransactionIsolationLevel()` and `getTypeInfo()` `SQL_DATETIME_SUB` and `SQL_DATA_TYPE` fields not being readable.

- Fixed `PreparedStatement` generating SQL that would end up with syntax errors for some queries.

- Fixed `ResultSet.isAfterLast()` always returning `false`.

- Fixed time zone issue in `PreparedStatement.setTimestamp()`. (thanks to Erik Olofsson)

- Captialize type names when `captializeTypeNames=true` is passed in URL or properties (for WebObjects. (thanks to Anjo Krank)

- Updatable result sets now correctly handle `NULL` values in fields.

- PreparedStatement.setDouble() now uses full-precision doubles (reverting a fix made earlier to truncate them).

- PreparedStatement.setBoolean() will use 1/0 for values if your MySQL version is 3.21.23 or higher.

#### C.5.5.9. Changes in MySQL Connector/J 2.0.6 (16 June 2001)

- Fixed `PreparedStatement` parameter checking.

- Fixed case-sensitive column names in `ResultSet.java`.

#### C.5.5.10. Changes in MySQL Connector/J 2.0.5 (13 June 2001)

- Fixed `ResultSet.getBlob()` `ArrayIndex` out-of-bounds.

- Fixed `ResultSetMetaData.getColumnTypeName` for `TEXT`/`BLOB`.

- Fixed `ArrayIndexOutOfBounds` when sending large `BLOB` queries. (Max size packet was not being set)

- Added `ISOLATION` level support to `Connection.setIsolationLevel()`

- Fixed NPE on `PreparedStatement.executeUpdate()` when all columns have not been set.

- Fixed data parsing of `TIMESTAMP` values with 2-digit years.

- Added `Byte` to `PreparedStatement.setObject()`.

- `ResultSet.getBoolean()` now recognizes `-1` as `true`.

- `ResultSet` has +/-Inf/inf support.

- `ResultSet.insertRow()` works now, even if not all columns are set (they will be set to `NULL`).

- `DataBaseMetaData.getCrossReference()` no longer `ArrayIndexOOB`.

- `getObject()` on `ResultSet` correctly does `TINYINT`->`Byte` and `SMALLINT`->`Short`.

#### C.5.5.11. Changes in MySQL Connector/J 2.0.3 (03 December 2000)

- Implemented `getBigDecimal()` without scale component for JDBC2.

- Fixed composite key problem with updatable result sets.

- Added detection of -/+INF for doubles.

- Faster ASCII string operations.

- 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.

- Added `ultraDevHack` URL parameter, set to `true` to allow (broken) Macromedia UltraDev to use the driver.

#### C.5.5.12. Changes in MySQL Connector/J 2.0.1 (06 April 2000)

- 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()`.

- `DatabaseMetaData.getPrimaryKeys()` now works correctly with respect to `key_seq`. Thanks to Brian Slesinsky.

- 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.

- Fixed some issues with updatability support in `ResultSet` when using multiple primary keys.

#### C.5.5.13. Changes in MySQL Connector/J 2.0.0pre5 (21 February 2000)

- Fixed Bad Handshake problem.

#### C.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.

#### C.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)

### C.5.6. Changes in MySQL Connector/J 1.2b (04 July 1999)

- Better Documentation (in progress), in doc/mm.doc/book1.html

- DBMD now allows 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 quotes 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 don't.

- 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 quotes.

### C.5.7. Changes in MySQL Connector/J 1.2.x and lower

#### C.5.7.1. 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)

#### C.5.7.2. 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!)

#### C.5.7.3. 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)

#### C.5.7.4. Changes in MySQL Connector/J 1.1g (19 February 1999)

- Result set rows are now byte arrays. Blobs and Unicode work bidriectonally 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().

#### C.5.7.5. 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 via 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)

#### C.5.7.6. 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.

#### C.5.7.7. 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 via 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 via "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.

#### C.5.7.8. 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 LPGL

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

#### C.5.7.9. 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.

#### C.5.7.10. 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 allows 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.

#### C.5.7.11. 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 <jce@mail.boone.com> for pointing out the problem and working on a fix with me.

#### C.5.7.12. 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 <costin@tdiinc.com> for pointing these out.

#### C.5.7.13. Changes in MySQL Connector/J 0.6 (21 May 1998)

- Incorporated efficiency changes from Richard Swift <Richard.Swift@kanatek.ca> 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()`

Ésta es una traducción del manual de referencia de MySQL, que puede encontrarse en dev.mysql.com. El manual de referencia original de MySQL está escrito en inglés, y esta traducción no necesariamente está tan actualizada como la versión original. Para cualquier sugerencia sobre la traducción y para señalar errores de cualquier tipo, no dude en dirigirse a mysql-es@vespito.com.

Anterior |  | Siguiente
Apéndice B. Credits | Inicio | Apéndice D. Portar a otros sistemas