Commit Briefs

df49871cda Olga Arkhangelskaia

box: fix box.info:memory() (OKriw/gh-4688-box-info-memory)

Fix the return value of box.info:memory(). It used to return the same table as the box.info(). If one removes metatable of the box.info:memory(): tarantool> setmetatable(box.info:memory(), nil) --- - cache: 0 lua: 1855568 data: 37976 index: 1196032 net: 589824 tx: 0 version: 2.5.0-158-g667145aff package: Tarantool When box.info:memory is called, it has box.info table as the first argument (see https://www.lua.org/manual/5.1/manual.html#2.8). While printing the table, lbox_info_memory_call adds box.info.memory's fields to the box.info table. To avoid this effect and return just box.info.memory we put an empty table on the Lua stack at the beginning of the lbox_info_memory_call function. Instead adding fields to box.info table lbox_info_memory_call fills that empty table. Closes #4688


a609505153 Nikita Pettik

txm: introduce dirty tuples (hotfix)

Add forgotten part of the original commit. Part of #4897


30c57bb3eb Nikita Pettik

sql: change implicit cast for assignment

This patch changes implicit cast for assignment. Closes #3809 Needed for #4159 Part of #4230 @TarantoolBot document Title: change implicit cast for comparison After this patch, these rules will apply during the implicit cast: | | STRING | BINARY | BOOLEAN | INTEGER | UNSIGNED | DOUBLE | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | | STRING | A | N | N | N | N | N | | BINARY | N | A | N | N | N | N | | BOOLEAN | N | N | A | N | N | N | | INTEGER | N | N | N | A | S | Aa | | UNSIGNED | N | N | N | A | A | Aa | | DOUBLE | N | N | N | Sa | Sa | A | In this table, the types of the assigned value are on the left, and the types that should be after the assignment are at the top. 'A' - the assignment will be completed. 'N' - the assignment won't be completed. 'S' - the appointment may be unsuccessful. 'a' - after assignment, the resulting value may be approximated. Rules for numeric values are these: 1) Loss of significant digits (overflow) is an error. 2) Loss of insignificant digits is not an error. Example: ``` tarantool> box.execute([[CREATE TABLE t1(i INT PRIMARY KEY);]]) tarantool> box.execute([[INSERT INTO t1 VALUES ('1');]]) --- - null - 'Type mismatch: can not convert 1 to integer' ... tarantool> box.execute('INSERT INTO t1 VALUES (1.2345);') tarantool> box.execute('SELECT * FROM t1;') --- - metadata: - name: I type: integer rows: - [1] ... tarantool> box.execute([[CREATE TABLE t2(t text PRIMARY KEY);]]) tarantool> box.execute([[INSERT INTO t2 VALUES (1);]]) --- - null - 'Type mismatch: can not convert 1 to string' ... ```


c8c8638765 Nikita Pettik

txm: save txn in txn_stmt

There is a lot of places in transaction engine (see futher commits) where it's convenient to store just a pointer to tx statement while having a way to get the transaction itself by this pointer. Let's store a pointer to TX in TX statement for that purpose. Part of #4897


39c13db14b Nikita Pettik

txm: introduce dirty tuples

If the tuple is marked as dirty that usually means that it was somehow affected by a transaction. If a tuple found in index is dirty - we cannot immediately return to user, instead we must clarify it in transaction manager. Part of #4897