Skip to content

Releases: amphp/mysql

2.1.2

05 Dec 16:42
d0b9a61
Compare
Choose a tag to compare
  • Fixed a bug when decoding a JSON field (#113)

2.1.1

07 Feb 17:55
f14d62f
Compare
Choose a tag to compare
  • Fixed error handling of initial packet from server (#101)
  • Fixed handling of mysql_native_password authentication with MySQL 8.x (#105)

2.1.0

13 Nov 17:00
03c6954
Compare
Choose a tag to compare
  • Added compatibility with MySQL 8 change in default authentication, specifically caching_sha2_password.
  • Added compatibility with amphp/file@2.x.
  • Made dependency on amphp/file optional.

1.2.1

04 Jan 16:28
Compare
Choose a tag to compare
  • Fixed port being ignored in ConnectionConfig::getConnectionString() (#93)

2.0.0

04 Apr 14:44
Compare
Choose a tag to compare

This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.

  • PHP 7.1+ now required.
  • Duplicate parameter names in prepared statements now require only a single value in the parameter array passed to execute. e.g.: SELECT * FROM test WHERE classId > :id AND nodeId < :id will only require one value set for id instead of an array of values: $statement->execute(['id' => 10]). This behavior mirrors amphp/postgres and the PDO extension. (#90)
  • ConnectionConfig constructor now takes a ConnectContext as the second argument instead of ClientTlsContext. TLS (and other connection) options can be specified using the ConnectContext object.
  • ConnectionConfig::getTlsContext() and ConnectionConfig::withTlsContext() have been replaced with ConnectionConfig::getConnectContext() and ConnectionConfig::withConnectContext().
  • Added CancellableConnector that allows a CancellationToken to be used to cancel the connection request.
  • TimeoutConnector removed. Specify a connection timeout using ConnectContext::withTimeout() as part of ConnectionConfig or with a TimeoutCancellationToken with CancellableConnector.
  • Statement::bindParam() now declares void as a return type.
  • Fixed result value when the column type is JSON and the data was inserted using a cast (#88).

Changes since v2.0.0-RC1:

  • Fixed connection processor state after error (#91)
  • Connection exception now attached as previous exception to pending operations (#92)
  • Fixed connecting using a file path

2.0.0 RC1

30 Oct 16:56
000e0b4
Compare
Choose a tag to compare
2.0.0 RC1 Pre-release
Pre-release

This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.

  • PHP 7.1+ now required.
  • Duplicate parameter names in prepared statements now require only a single value in the parameter array passed to execute. e.g.: SELECT * FROM test WHERE classId > :id AND nodeId < :id will only require one value set for id instead of an array of values: $statement->execute(['id' => 10]). This behavior mirrors amphp/postgres and the PDO extension. (#90)
  • ConnectionConfig constructor now takes a ConnectContext as the second argument instead of ClientTlsContext. TLS (and other connection) options can be specified using the ConnectContext object.
  • ConnectionConfig::getTlsContext() and ConnectionConfig::withTlsContext() have been replaced with ConnectionConfig::getConnectContext() and ConnectionConfig::withConnectContext().
  • Added CancellableConnector that allows a CancellationToken to be used to cancel the connection request.
  • TimeoutConnector removed. Specify a connection timeout using ConnectContext::withTimeout() as part of ConnectionConfig or with a TimeoutCancellationToken with CancellableConnector.
  • Statement::bindParam() now declares void as a return type.
  • Fixed result value when the column type is JSON and the data was inserted using a cast (#88).

1.2.0

30 Oct 16:56
361d93d
Compare
Choose a tag to compare
  • Added support for LOCAL DATA INFILE (#86)
  • Fixed releasing the connection before all results were consumed if multiple queries were executed.
  • Fixed an error occurring with MariaDB where the connection is killed when there is no pending query (#84)
  • Fixed the alias map for connection strings that allows alternative key names in connection strings.
  • Removed a circular reference when destructing of unbuffered result sets that would sometimes delay destruction.

1.1.0

30 Dec 16:37
3b7013d
Compare
Choose a tag to compare
  • Added an optional ClientConnectContext parameter to Connection::connect().
  • Fixed an issue when using this library with amphp/postgres that caused the same Connector object to be returned by the connector() function in both libraries.

1.0.0

14 Oct 16:41
b0abaa8
Compare
Choose a tag to compare

The interface structure of this library changed significantly, however most consumers of this library should be able to upgrade from v0.3.x by only updating the code initializing a connection or pool to use an instance of ConnectionConfig instead of a connection string. Using a connection or pool to perform queries has remained unchanged since v0.3.x, with the exception that transactions are now started with Link::beginTransaction() instead of Link::transaction().

  • The fetch-type parameter has been removed from ResultSet::getCurrent(). All rows are always returned as associate arrays.
  • Common interfaces such as Statement and Pool that are shared with amphp/postgres are now in a separate library, amphp/sql.
  • ConnectionConfig is now built with a list of parameters instead of a connection string. Use ConnectionConfig::fromString() to use a connection string.
  • The Operation interface has been dropped in favor of decorators. This interface was internally used to automatically free resources on destruction.

Please review the interfaces in amphp/sql to ensure no other interface changes or method renames may affect your code.

0.3.1

15 Dec 17:04
1f4a222
Compare
Choose a tag to compare
  • Fixed an issue when a pool reached maximum size but a connection creation request was still pending, another subsequent request would enter an infinite loop waiting for a connection to become available.