Tarantool 2.1.2 and earlier | Tarantool
Документация на русском языке
поддерживается сообществом

Tarantool 2.1.2 and earlier

Release: https://github.com/tarantool/tarantool/releases

Версия 2.1.2

Release type: stable. Release date: 2019-04-05.

Release: v. 2.1.2.

This is the first stable release in the 2.x series.

The goal of this release is to significantly extend SQL support and increase stability.

Изменения или добавления функциональности:

  • (SQL) box.sql.execute() replaced with

    box.execute(). 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
      - [1983]
      - [1984]
  • (SQL) Type system was significantly refactored.

  • (SQL) 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.

  • (SQL) Now SQL’s integer type is stored as integer in space’s format.

    It was stored as scalar before, which made comparisons slow.

  • (SQL) 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));
  • (SQL) Syntax for the pragma pragma index_info 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) 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'}})
  • (Server) In case of out of space event, Tarantool is now allowed to delete backup WAL files not needed for recovery from the last checkpoint.

  • (Server) Add support for tarantoolctl rocks pack / unpack subcommands. The subcommands are used to create / deploy binary rock distributions.

  • (Server) string.rstrip and string.lstrip should accept symbols to strip. Add optional „chars“ parameter for specifying the unwanted characters. E.g.:

    local chars = "#\0"
    str = "##Hello world!#"
    print(string.strip(str, chars)) -- "Hello world!"
  • (Server) on_shutdown trigger added.

    It may be set in a way similar to space:on_replace triggers:

    box.ctl.on_shutdown(new_trigger, old_trigger)
  • (Server) on_schema_init trigger added.

    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)
  • (Server) A new option for the snapshot daemon,

    box.cfg.checkpoint_wal_threshold, allows to limit the maximum disk size of maintained WALs. Once the configured threshold is exceeded, the WAL thread notifies the che ckpoint daemon that it’s time to make a new checkpoint and delete old WAL files.

  • (Server) New types of privileges

    to create, alter and drop space – 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")
    i = s:c reate_index("primary") -- success
    s:insert{1} -- fail
    s:select{} -- fail
    s:drop() -- fail

    Notice the 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.

Версия 2.1.1

Release type: beta. Release date: 2018-11-14.

Release: v. 2.1.1.

This release resolves all major bugs since 2.0.4 alpha and extends Tarantool’s SQL feature set.

Версия 2.0.4

Тип версии: альфа. Дата выхода: 2018-02-15.

Release: v. 2.0.4.

This is a successor of the 1.8.x releases. It improves the overall stability of the SQL engine and has some new features.

Изменения или добавления функциональности:

  • Added support for SQL collations by incorporating libICU character set and collation library.
  • IPROTO interface was extended to support SQL queries.
  • net.box subsystem was extended to support SQL queries.
  • Enabled ANALYZE statement to produce correct results, necessary for efficient query plans.
  • Enabled savepoints functionality. SAVEPOINT statement works w/o issues.
  • Enabled ALTER TABLE ... RENAME statement.
  • Improved rules for identifier names: now fully consistent with Lua frontend.
  • Enabled support for triggers; trigger bodies now persist in Tarantool snapshots and survive server restart.
  • Significant performance improvements.
Нашли ответ на свой вопрос?
Обратная связь