Commits
- Commit:
df49871cda4bac5f77ccd53f30b3f11b893d85cf
- From:
- Olga Arkhangelskaia <arkholga@tarantool.org>
- Date:
box: fix 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
- Commit:
a6095051537fcd304944f0cf7283add87c85cf39
- From:
- Aleksandr Lyapunov <alyapunov@tarantool.org>
- Via:
- Nikita Pettik <korablev@tarantool.org>
- Date:
txm: introduce dirty tuples (hotfix)
Add forgotten part of the original commit.
Part of #4897
- Commit:
30c57bb3eba94700a49286af2741b2990a5a8887
- From:
- Mergen Imeev <imeevma@gmail.com>
- Via:
- Nikita Pettik <korablev@tarantool.org>
- Date:
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'
...
```
- Commit:
c8c8638765ce0f3f386bdcfbfb7849f0e1737c84
- From:
- Aleksandr Lyapunov <alyapunov@tarantool.org>
- Via:
- Nikita Pettik <korablev@tarantool.org>
- Date:
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
- Commit:
39c13db14b5db6a137e191729194d086795ea317
- From:
- Aleksandr Lyapunov <alyapunov@tarantool.org>
- Via:
- Nikita Pettik <korablev@tarantool.org>
- Date:
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