Releases: tarantool/mysql
2.1.3
2.1.2
Overview
This release adds functionality to the pool that prevents inappropriate use which can cause exit(1) or segmentation fault.
Breaking changes
There are no breaking changes in the release.
Changes
-
Forbid putting connections back to another pool (PR #68).
local p1 = mysql.pool_create(pool_cfg) local p2 = mysql.pool_create(pool_cfg) local c = p1:get() p2:put(c)
will now result in error throw:
--- - error: 'Trying to put connection from pool table: 0x405b8868 to pool table: 0x40981288' ...
Before this release, overflowing pool with put from other pool could result in application getting forever stuck or Tarantool process exit(1) because of fiber yield on garbage collect.
-
Close connection pool if queue overflowed on gc (PR #68).
Queue overflow results in fiber yield on gc. Yielding in gc is prohibited since Tarantool 2.6.0-138-gd3f1dd720, 2.5.1-105-gc690b3337, 2.4.2-89-g83037df15, 1.10.7-47-g8099cb053. In previous versions yielding in gc resulted in undefined behavior for LuaJit traces compiler and could be the reason for segmentation faults.
Other
- Publish rockspecs with CD on master update and new tags (PR #69).
2.1.1
2.1.0
Overview
This release accumulates changes made since 2019.
Breaking changes
This release should not break existing code.
Bugfixes
-
<connection object>:reset()
now raise an error at failure to change a user
(PR #43).Also this method was missed in the documentation and added now.
-
Fixed connections accounting in the connection pool (#33, PR #42).
<connection object>:close()
on a connection from the pool now returns it to the pool.<pool object>:close()
now closes all connections originated from the pool.Attempt to call
<pool object>:put(<connection object>)
on a connection that is already put in the pool now returns an error.<connection object>:close()
and<pool object>:close()
were missed in the documentation and added now. -
Prevent possible deadlock in the case, when the pool is used from different fibers (#34, PR #55).
-
<connection object>:close()
now returnstrue
instead of1
(PR #42).
New features
-
Added
use_numeric_result = <boolean>
option tomysql.connect()
andmysql.pool_create()
to choose a shape of the<connection object>:execute()
result (PR #25).Default (
false
) is the old behaviour, where rows are<column name> = <value>
mappings. When the option is set totrue
, the rows are just arrays of values and columns metatada is returned separately. -
Added
timeout = <number>
option to<pool object>:get()
(PR #28). -
Added
keep_null = <boolean>
option tomysql.connect()
andmysql.pool_create()
to choose whetherNULL
values will be encoded asnil
orbox.NULL
in a<connection object>:execute()
result (PR #8).Default (
false
) is the old behaviour:nil
. When the option is set totrue
,box.NULL
is used.