Commit Briefs

7a2dbaffde Sergey Bronnikov

datetime: test RFC 3339 and ISO 8601 formats (ligurio/gh-xxxx-test-iso8601-rfc3390-formats-3.1)

The commit 3c40366172e3 ("datetime, lua: date parsing functions") introduced a function `datetime.parse()`. The function accepts a datetime format: 'iso8601', 'rfc3339' and a custom datetime format. However, 'iso8601' as well as 'rfc3339' is a set of datetime formats (see [1] and [2]), and `datetime.parse()` supports a subset of these formats. There is a documentation issue [3], where we should describe what formats are supported and what formats are not. The patch adds a tests for most of supported formats. The tests were created using a page about date and time formats in ISO 8601 and RFC 3339 standards [2] and these tests are not exhaustive. More thorough testing can be done with property-based testing and randomization. It will be a subject of the following commits. 1. https://datatracker.ietf.org/doc/html/rfc3339 2. https://ijmacd.github.io/rfc3339-iso8601/ 3. https://github.com/tarantool/doc/issues/3155 Follows up #6731 Needed for tarantool/doc#3155 Co-authored-by: Sergey Kaplun <skaplun@tarantool.org> NO_CHANGELOG=testing NO_DOC=tarantool/doc#3155 (cherry picked from commit dcb196366621db4ab39ef97029ee126d836b77fb)


505d034916 Sergey Kaplun

datetime: support tz field in :totable()

`datetime` module has a function `:totable()` that converts the information from a datetime object into the table format. The commit 43e10ed34949 ("build, lua: built-in module datetime") added `tzoffset` field to the datetime object and to table produced by `:totable()`. The commit 9ee45289e012 ("datetime: datetime.TZ array") added fields `tz` and `tzindex` to the datetime object, but not to the table produced by `:totable()`. The patch fixes that. Note, `tzindex` is not added, because it is an internal field. ``` tarantool> datetime.parse('2004-12-01T00:00 Europe/Moscow'):totable() --- - tz: Europe/Moscow sec: 0 min: 0 yday: 336 day: 1 nsec: 0 isdst: false wday: 4 tzoffset: 180 month: 12 year: 2004 hour: 0 ... ``` Fixes #10331 Follows up #6751 @TarantoolBot document Title: Support of tz field in :totable() In addition to the `tzoffset` in a table produced by `:totable` we added `tz` field. ``` tarantool> datetime.parse('2004-12-01T00:00 Europe/Moscow'):totable() --- - tz: Europe/Moscow sec: 0 min: 0 yday: 336 day: 1 nsec: 0 isdst: false wday: 4 tzoffset: 180 month: 12 year: 2004 hour: 0 ... ``` (cherry picked from commit 90552e55e0921405c43ea086ae418a72c9f000e4)


255c808b4b Alexander Turenko

serializer: remove duplicate of lua serializer

This patch fixes a bug found by the ASAN instrumentation of LuaJIT allocator [1]. The problem is using a Lua serializer object that has been cleaned up by GC. The crash occurs when executing `tarantool> \set output lua`. Failing tests: - ./test/app-luatest/gh_7031_configure_eos_in_lua_console_test.lua - ./test/app-tap/console.test.lua - ./test/box/push.test.lua - ./app-tap/console_lua.test.lua - ./app-luatest/varbinary_test.lua The `serializer_lua` static member is removed from `src/box/lua/serialize_lua.c` along with `serializer_lua_init`, because it is not used by any function other than `serializer_lua_init`, which is not needed now too. [1]: Issue #10231 Closes #10177 (this issue is a duplicate of #7404) NO_TEST=rely on existing tests NO_CHANGELOG=codehealth NO_DOC=codehealth (cherry picked from commit 830f27bbaf94dadcacc66a7f543e0e5feec3988d)


859081df55 Sergey Kaplun

refactor: use Lua C API instead of G(L)

To ensure better encapsulation, maintainability, and portability of the code, it is necessary to replace direct access to the fields of global structures with calls using the Lua C API. Closes #10284 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring (cherry picked from commit f7bb3fc7a1222107753dc420675ecda043b0a5d2)


5e3ed27ca3 Vladimir Davydov

vinyl: do not abort unrelated transactions on DDL

Since commit 8f4be3227635 ("txm: disallow yields after DDL operation in TX"), any DDL operation aborts **all** active transactions, even those that wouldn't be affected by it anyway, see `memtx_engine_prepare()`, `memtx_tx_abort_all_for_ddl()`. Actually, there's no need to do that in Vinyl because it properly handles concurrent DDL operations, see commit d3e123695651 ("vinyl: abort affected transactions when space is removed from cache"). Let's skip Vinyl transactions from consideration by marking the Vinyl engine with a special flag. Closes #10375 NO_DOC=bug fix (cherry picked from commit f5f061d051dc6268949bfcb141d211142282578d)