Tarantool 2.1.2 stable released

80 views
Skip to first unread message

Кирилл Юхин

unread,
Apr 5, 2019, 11:07:18 AM4/5/19
to tarantool-ru

Date: 2019-04-05

Tag: 2.1.2-0-g5e6821c

Overview

2.1.2 is the first stable version of the 2.1 release series. The label stable means we have all planned features implemented and we see no high-impact issues.

This release resolves roughly 100 issues since the latest beta version. There may be bugs in less common areas, please feel free to file an issue at GitHub.

Compatibility

Tarantool 2.x is backward compatible with Tarantool 1.10.x in binary data layout, client-server protocol and replication protocol.

Please upgrade using the box.schema.upgrade() procedure to unlock all the new features of the 2.x series.

Functionality added or changed

SQL

  • Replace box.sql.execute() with box.execute() gh-3505. It now works just like netbox.execute(): returns result set metadata, row count etc. E.g.:
    box.execute("CREATE TABLE person(id INTEGER PRIMARY KEY, birth_year INT)")
    ---
    - row_count: 1
    ...
    box.execute("SELECT birth_year FROM person")
    ---
    - metadata:
      - name: birth_year
        type: INTEGER
      rows:
      - [1983]
      - [1984]
    ...
    
  • Type system was significantly refactored. Consult with documentation for details.
  • Do not use delete+insert for updates gh-3850. There are cases in SQL when it is possible to do Tarantool’s update operation for UPDATE statement, instead of doing delete + insert. However, there are cases where SQL semantics is too complex. E.g.:
    CREATE TABLE file (id INT PRIMARY KEY, checksum INT);
    INSERT INTO stock VALUES (1, 3),(2, 4),(3,5);
    CREATE UNIQUE INDEX i ON file (checksum);
    SELECT * FROM file;
    [1, 3], [2, 4], [3, 5]
    UPDATE OR REPLACE file SET checksum = checksum + 1;
    SELECT * FROM stock;
    [1, 4], [3, 6]
    
    I.e. [1, 3] tuple is updated as [1, 4] and have replaced tuple [2, 4]. This logic is implemented by preventive tuple deletion from all corresponding indexes in SQL.
  • Improve value comparison of different types. gh-2210. Now SQL’s integer type is stored as integer in space’s format. It was stored as scalar before, which affected performance.
  • Allow constraints to appear along with column definitions gh-3504. It is now possible to define a constraint within column definition. E.g.:
    CREATE TABLE person (id INT PRIMARY KEY, age INT, CHECK (age > 10));
    
    See also corresponding documentation section.
  • Improve pragma index_info syntax gh-3194. Syntax for this pragma is now unified with table_info. E.g. to get information on index age_index of table person you can write:
    pragma index_info(person.age_index);
    

Server

  • Index based on JSON path gh-1012. It is now possible to index a field specified using JSON. E.g.:
    person = box.schema.create_space("person")
    name_idx = person:create_index('name', {parts = {{'[2]fname', 'str'}, {'[2]sname', 'str'}}})
    person:insert({1, {fname='James', sname='Bond'}, {town='London', country='GB', organization='MI6'}})
    
  • In case of ENOSPC delete WALs not needed for recovery from the last checkpoint gh-3822. In case of out of space event, Tarantool is now allowed to delete backup WAL files.
  • Add support for "tarantoolctl rocks pack" subcommand gh-3525. The subcommands are used to create binary rock distributions.
  • string.rstrip and string.lstrip should accept symbols to strip gh-2977. Add optional 'chars' parameter for specifying the unwanted characters. E.g.:
    local chars = "#\0"
    str = "##Hello world!#"
    print(string.strip(str, chars)) -- "Hello world!"
    
  • on shutdown trigger for addedgh-1607. It may be set in a way similar to space:on_replace triggers:
    box.ctl.on_shutdown(new_trigger, old_trigger)
    
  • on_schema_init trigger addedgh-3159. It may be set before the first call to box.cfg() and is fired during box.cfg() before user data recovery start. To set the trigger, say:
    box.ctl.on_schema_init(new_trig, old_trig)
    
  • snapshot daemon: limit the maximum disk size of maintained WALs gh-1082. The new option is called box.cfg.checkpoint_wal_threshold. Once the configured threshold is exceeded, the WAL thread notifies the checkpoint daemon that it's time to make a new checkpoint and delete old WAL files.
  • Permissions to create, alter and drop space gh-945. New types of privileges were introduced. In order to create, drop or alter space or index, you should have a corresponding privilege. E.g.:
    box.schema.user.create("optimizer", { password  = 'secret' })
    box.schema.user.grant("optimizer", "alter", "space")
    person = box.schema.space.create("person")
    box.session.su("optimizer")
    i = s:create_index("primary") -- success
    s:insert{1} -- fail
    s:select{} -- fail
    s:drop() -- fail
    
    Incompatible change: Tarantool 1.10 requires read/write/execute privileges on an object to allow create, drop or alter. These privileges are no longer sufficient in 2.1. To remedy the problem Tarantool 2.1 automatically grants create/drop/alter privileges on an object if a user has read/write/execute privileges on it during schema upgrade. But old scripts may stop working if read/write/execute is granted after schema upgrade. Additionally, create/drop/alter privileges are already supported in 1.10, which also supports the old semantics of read/write/execute. You are encouraged to grant new privileges in 1.10 before upgrade and modify your scripts.

Bugs fixed

SQL

  • Ban ANALYZE statement gh-4069incompatible change: system spaces for storing statistics data were removed.
  • Disallow different orders in ORDER BY clause gh-4038
  • Values of type BLOB are encoded as strings gh-4023
  • Cleanup SQL types gh-4019
  • Value does not change with abs(random()) gh-3971
  • Use diag_set() to describe errors in SQL gh-3965
  • Forbid anything except TEXT for LIKE operator gh-3954
  • Result of concatenation has wrong collation gh-3937
  • Wrong number of rows with SELECT DISTINCT, and with HAVING gh-3932
  • Store regular identifiers in case-normal form gh-3931
  • Formats maximum count exceeded on TPC-C gh-3924
  • Spaces created by SQL statements don't inherit global vinyl parameters gh-3912
  • Fix DEFAULTs AST memory leak on alter gh-3908
  • Select fails on vinyl secondary index gh-3907
  • Data of type BOOL is displayed incorrectly gh-3906
  • Assertion fault on VALUES gh-3888
  • Query planner doesn't see indexes created from Lua gh-3886
  • Heap buffer overflow during EXPLAIN пр-3868
  • "PRAGMA collation_list" invokes segmentation fault gh-3857
  • Failed to create VIEW as a constant value gh-3849
  • SQL VDBE leaks gh-3838
  • Some statements do not return column type gh-3832
  • Bind parameters array leaks in iproto thread gh-3828
  • row_count can be 0 gh-3816
  • Dropping a table that has a VIEW gh-3815
  • RANDOM() results are not sorted gh-3783
  • Segmentation fault with two users changing the same SQL table gh-3780
  • strikes back gh-3746
  • Operation implicitly changes INTEGER to REAL gh-3735
  • Remove useless or obsolete pragmas gh-3733
  • Remove support of binding variables from trigger definition gh-3653
  • Foreign key update fails with "set null" gh-3645
  • Foreign key update fails with "unicode_ci" gh-3644
  • Foreign key mismatch error for an integer gh-3621
  • Wrong result for indexed char in sub subquery gh-3616
  • LIKE & GLOB operators issues gh-3572
  • Wrong types on concatenation w/ RANDOMBLOB() gh-3544
  • LTRIM(X'004100',X'00') does not trim X'00' gh-3543
  • LIKE/LENGTH do not scan if '\0' is encountered gh-3542
  • Duplicate key error for an index that is not unique gh-3537
  • Some triggers cause error messages and/or half-finished updates gh-3536
  • Validate sqlite3ReleaseTempRange usages gh-3533
  • The LIKE() function is rejected because like is a reserved word gh-3523
  • <DELETE FROM ...> doesn't check on table existence gh-3511
  • Foreign keys can be declared with CASCADE gh-3475
  • Prohibit negative values under gh-3467
  • Trailing word after SELECT statement is omitted gh-3447
  • Raise an error message on CHECK constraint with ON CONFLICT REPLACE gh-3345
  • LIKE '%x' gives the wrong results gh-3334
  • Tarantool process hangs after the certain sequencing gh-3251
  • Segfault when trying to do SQL begin after Lua begin gh-3237
  • Rework VDBE prologue gh-3231
  • Pull space/index pointer in call stack gh-3222
  • Evict open cursor opcodes from VDBE gh-3182
  • Improve error reporting in SQ gh-3036
  • Make foreign key mismatch error more informative gh-3033
  • skip-scan optimization doesn't work gh-2860
  • Optimize delete vdbe machine code gh-2735
  • Remove ORDER BY and LIMIT from DELETE statement gh-2172
  • Issues with POSITION() function gh-3933
  • CREATE INDEX stmt on space created from Lua fails gh-3914
  • sql.execute() arg substitution (parameter binding) gh-3401

Server

  • Remove digest.sha_hex() from the code gh-4028
  • os.exit() hangs gh-3966
  • Assertion failed on log.log_format("json") gh-3946
  • xlog/checkpoint_daemon: wrong fiber woken gh-3878
  • box.cfg fails gh-3814
  • module_reload() without box.cfg{} leads to segfault gh-3770
  • utf8.lower cannot handle an empty string gh-3709
  • fio.pathjoin fails with non-informative error message gh-3580
  • Strength in the _collation space gh-3573
  • Incorrect cast to number of strings with ULL gh-3431
  • Alternative delimiter doesn't work on admin port connection gh-2027
  • Update built-in help links gh-3362

Replication

  • Replica forgets skipped rows after restart gh-3977
  • Replica sync fails if there is a gap at the end of the master's WAL gh-3830

Build

  • Debug mode isn't applied to src/box/sql.c gh-3727

Other

  • http:client cut long header gh-3959
  • tarantoolctl cat --to= can't find existing lsn in xlog (replication) gh-3827

The full list of issues added or fixed is available at
https://github.com/tarantool/tarantool/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A2.1.2+is%3Aclosed+-label%3Aregression+

Assets2


Reply all
Reply to author
Forward
0 new messages