Bug fixes:
- Fix compatibility on Elixir < 1.10
Breaking changes:
-
Replace the full list of error codes (which generated thousands of atoms) with just a handful of common ones
Code that matched on
%MyXQL.Error{mysql: %{name: name}}
may break if the name is not in the mapping as it won't match anymore.
Enhancements:
-
Allow users to set their own mapping via setting config
:myxql, extra_error_codes: [...]
-
Accept integers in
:disconnect_on_error_codes
Bug fixes:
- Send
MYSQL_TYPE_BIT
andMYSQL_TYPE_GEOMETRY
as strings. This fixes encoding these types on MariaDB and MySQL 8.0.22.
Bug fixes:
- Fix encoding empty params for prepared statements
Bug fixes:
- Delete ets tables on disconnect
Enhancements:
- Encode
:zero_datetime
and:zero_date
- Consistently use
:supervisor.child_spec/0
- Support Decimal v2.0
Bug fixes:
- Fix typespec for
MyXQL.stream/4
Bug fixes:
- Handle socket errors when closing statements
- Delete cursor ref on deallocate
Enhancements:
- Support receiving packets larger than 16MB
Bug fixes:
-
Require
:ssl
&:public_key
applications -
Enforce prepare names to be unique
-
Do not leak statements on multiple executions of the same name in
prepare_execute
-
Do not leak statements with rebound
:cache_statement
- Close statements after query errors
- Fix bug when decoding invalid json path error
- Improve error messages and docs on unsupported time values
Bug fixes:
- Revert: Re-use repeated prepared statements in
:unnamed
mode
-
Re-use repeated prepared statements in
:unnamed
mode -
Geometry types support
-
Fix
mysql_native_authentication
onauth_switch_request
-
Handle multiple packets on ping
- Add
prepare: :force_named
option
- Fix prepared queries leaks
- Disconnect on handshake errors
- Encode params in MyXQL.Query and gracefully handle encoding errors
-
Decode "zero dates" as
:zero_date
and:zero_datetime
. Note, this only works on specific serversql_mode
settings, it's disabled by default in servers and in general not recommended. -
Support
MYSQL_HOST
andMYSQL_PWD
env variables -
Add
:charset
and:collation
options tostart_link/2
- Fix VARCHAR handling
- Fix TINY, MEDIUM, and LONG BLOBs handling
- Fix dialyzer errors
- Fix encoding large packets
- Consider
""
as empty password - Raise better error messages on "zero" dates
- Add statement cache
- Support BIT data type
- Encode packets larger than
max_packet_size
- Fix selecting nulls in binary protocol
- Raise error when :ssl is required and not started in
child_spec/1
- Default charset to utf8mb4
- Raise error when server does not support required capabilities
- Implement public key exchange for sha auth methods
- Support older MySQL versions (tested against 5.5 and 5.6)
- Change
MyXQL.start_option/0
to use:ssl.tls_client_option/0
type
- Handle error packet on handshake
- Fix documentation and typespec for the
:ssl_opts
option - Hide undocumented
ref
field from theMyXQL.Query.t
type - Fix decoding MEDIUMBLOBs
- Use
DBConnection.ConnectionError
for transport errors and disconnect the connection - Remove
:socket
fromMyXQL.Error
asDBConnection.ConnectionError
is used for that instead - Improve error message on invalid socket path
- Add
:disconnect_on_error_codes
option toMyXQL.start_link/1
- Add
:ping_timeout
option toMyXQL.start_link/1
- Add
:handshake_timeout
option toMyXQL.start_link/1
- Add
:num_warnings
field toMyXQL.Result
- Add
:connection_id
field toMyXQL.Error
- Add
query_type: :binary | :binary_then_text | :text
option toMyXQL.query/4
- Improve handshake socket errors handling
- Raise error when both :username option and USER env are missing
- Add
MARIAEX_COMPATIBILITY.md
page
- Actually disconnect on
ER_MAX_PREPARED_STMT_COUNT_REACHED
- Encode JSON values in binary protocol
- Gracefully error when server does not support
CLIENT_DEPRECATE_EOF
- Use
:connect_timeout
option for connecting to SSL socket
- Use binary protocol by default in
MyXQL.query/4
- Return an additional leading result in
MyXQL.stream/4
. The leading result is of executing the query but not yet fetching data. - Remove
:ssl
from application list
- Raise better error message when a parameter cannot be encoded
- Raise a better error when query to be executed is not prepared
- Raise error on multiple results and point to instead using
MyXQL.stream/4
- Fix streaming inserts
- Fix transaction handling for savepoints
- Disconnect the connection on
ER_MAX_PREPARED_STMT_COUNT_REACHED
error - Add MySQL error code and name to exception message
- Add
:prepare
connection option
- Initial release