Changes.md
This file is a manually maintained list of changes for each release. Feel free to add your changes here when sending pull requests. Also send corrections if you spot any mistakes.
maxVersion and minVersion properties in connection ssl option #2301 #2304bignumber.js to 9.0.2safe-buffer to 5.2.1sqlstring to 2.3.3
Date objects from foreign isolateslocalInfile option to control LOAD DATA LOCAL INFILEconnection.queryconnection.query #2253bignumber.js to 9.0.0readable-stream to 2.3.7bignumber.js to 7.2.1 #2206
connection.threadId missing on handshake failurebignumber.js to 6.0.0bignumber.js to 4.1.0readable-stream to 2.3.6sqlstring to 2.3.1
mysql.raw() to generate pre-escaped values #877 #1821QUIT #1811mysql_native_password auth switch request for Azure #1396 #1729 #1730sqlstring to 2.3.0
.toSqlString() escape overridingescapeIdbignumber.js to 4.0.4sql property to query Error objects #1462 #1628 #1629sqlMessage property to Error objects #1714bignumber.js to 4.0.2readable-stream to 2.3.3safe-buffer for improved Buffer APIacquire and release events to Pool for tracking #1366 #1449 #1528 #1625bignumber.js to 3.1.2dateStrings option #605 #1481query method to PoolNamespace #1256 #1505 #1506
cluster.of(...).query(...)HANDSHAKE_NO_SSL_SUPPORT error message #1534bignumber.js to 2.4.0sqlstring to 2.2.0
escapeIdDate objects as NULLbuffer.toString() through escapingPOOL_CLOSED code to "Pool is closed." errorPOOL_CONNLIMIT code to "No connections available." error #1332bignumber.js to 2.3.0readable-stream to 1.1.14sqlstring module for SQL escaping and formattingbignumber.js to 2.1.4connection.destroy() on pool connection creating sequences #1291HA_ERR_TO_BIG_ROW to be HA_ERR_TOO_BIG_ROWbignumber.js to 2.1.2ciphers property in connection ssl option #1185Date to string for certain times #1045 #1155connect event to Connection #1129timeout for connection.end to 30 seconds #1057conn.changeUser is used #837 #1088.query argument validationcallback argument to .query is not a function #1060Connection.createQuery for no SQL #1058bignumber.js to 2.0.7bignumber.js to 2.0.5 #1037 #1038poolCluster.remove to remove pools from the cluster #1006 #1007poolCluster.endrestoreNodeTimeout option to PoolCluster #880 #906poolCluster.add to throw if PoolCluster has been closedpoolCluster.add to throw if id already definedPoolCluster when MySQL server offline #1033pool.query streaming interface not emitting connection errors #941pool.end race conditions #915pool.getConnection race conditionsPOOL_ENQUEUELIMIT to error reaching queueLimitenqueue event to pool #716enqueue event to protocol and connection #381RowDataPacket #549 #895pool.query to use typeCast configurationpool.query not invoking callback on connection error #872POOL_NOEXIST in PoolCluster error #846acquireTimeout pool option to specify a timeout for acquiring a connection #821 #854connection.escapeIdpool.escapeIdtimeout option to all sequences #855 #863connectTimeout to 10 secondsconn.connectpacket.default to actually be a stringPARSER_* errors to be catchablePROTOCOL_PACKETS_OUT_OF_ORDER error to be catchable #844debugQuery object from pool.query like conn.query #830EventEmitter.listenerCount when possible for faster countingconn.changeUser #833conn.release multiple times #824 #827UTF8 or UTF8MB4) in charset option #808mysql.createPool #811connectTimeout to 2 minutesssl.rejectUnauthorized to override) #816conn.changeUser is released #806pool.query optional like conn.query #585pool.end to handle queued connections #797pool.releaseConnection to keep connection queue flowing #797connection.threadId to get MySQL connection ID #602pool.getConnection retrieves good connections #434 #557 #778SqlString.format #590values in conn.query({...}).on(...) pattern #755pool.query(...) call #715connectTimeout option to specify a timeout for establishing a connection #726sqlState property to Error objects #556LOAD DATA LOCAL INFILE queries (#182).ER_HOST_NOT_PRIVILEGED.utf8\_bin as a String, not Buffer. (#214)CLIENT_INTERACTIVE flag from config. Improves #225.fields argument to query() as well as 'fields' event. This is
similar to what was available in 0.9.x.nestTables option for queries, allows fetching JOIN result sets
with overlapping column names.connect() is called more than once on a connection and provide
the user with a good error message for it (#204).UTF8_GENERAL_CI (previously UTF8_UNICODE_CI) as the default
charset for all connections to avoid strange MySQL performance issues (#200),
and also make the charset user configurable.TINY_BLOB, MEDIUM_BLOB and LONG_BLOB.This release is a rewrite. You should carefully test your application after upgrading to avoid problems. This release features many improvements, most importantly:
Below are a few notes on the upgrade process itself:
The first thing you will run into is that the old Client class is gone and
has been replaced with a less ambitious Connection class. So instead of
mysql.createClient(), you now have to:
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'me',
password : 'secret',
});
connection.query('SELECT 1', function(err, rows) {
if (err) throw err;
console.log('Query result: ', rows);
});
connection.end();
The new Connection class does not try to handle re-connects, please study the
Server disconnects section in the new Readme.
Other than that, the interface has stayed very similar. Here are a few things to check out so:
'row' event on the Query object is now called 'result' and will
also be emitted for queries that produce an OK/Error response.That should be most of it, if you run into anything else, please send a patch or open an issue to improve this document.
mysql.PACKAGE (#104)client.user to rootclient.escape() throwing exceptions on objects. (Nick Payne)These releases were done before maintaining this file: