sql: forbid non-integer values in datetime
The patch forbids using non-integer values in datetime's `:set()` for `year`, `month`, `day`, `hour`, `min`, `sec`, `usec`, `msec`, `nsec` and `tzoffset` keys. `timestamp` can be double, and integer values allowed in timestamp if `nsec`, `usec`, or `msecs` provided. An error will be raised when a value of incorrect type is passed. Fixes #10391 @TarantoolBot document Title: Update types of datetime values passed to SQL's `CAST();` `CAST` can accept only integer values for `year`, `month`, `day`, `hour`, `min`, `sec`, `usec`, `msec`, `nsec` and `tzoffset`. `timestamp` can be integer or double. (cherry picked from commit f57be571b5e4cc8d57c7e97c15b52df37ad6f12c)
Showing
- changelogs/unreleased/gh-10391-forbid-non-integers-sql-datetime.md 3 additions, 0 deletions...s/unreleased/gh-10391-forbid-non-integers-sql-datetime.md
- src/lib/core/datetime.c 18 additions, 0 deletionssrc/lib/core/datetime.c
- test/sql-luatest/datetime_test.lua 33 additions, 2 deletionstest/sql-luatest/datetime_test.lua
Loading
Please register or sign in to comment