- Jun 21, 2019
-
-
Mergen Imeev authored
This patch creates tuple_formats for the tuples obtained through the netbox. Closes #2978 @TarantoolBot document Title: Field names for tuples received from net.box It is possible now to access by field name for tuples received from net.box. For example: box.cfg{listen = 3302} box.schema.user.grant('guest','read, write, execute', 'space') box.schema.user.grant('guest', 'create', 'space') box.schema.create_space("named", {format = {{name = "id"}}}) box.space.named:create_index('id', {parts = {{1, 'unsigned'}}}) box.space.named:insert({1}) require('net.box').connect('localhost', 3302).space.named:get(1).id Result: tarantool> require('net.box').connect('localhost', 3302).space.named:get(1).id --- - 1 ...
-
Mergen Imeev authored
This patch defines a new function that parses space format and returns it to Lua as cdata. For this cdata destructor is included. Needed for #2978
-
Mergen Imeev authored
This patch changes the way arguments are passed to functions in the array method_encoder, and saves these arguments in REQUEST. This is necessary to establish a connection between netbox space objects and the tuples obtained through the netbox Needed for #2978
-
- Jun 20, 2019
-
-
Vladislav Shpilevoy authored
-
Mergen Imeev authored
This function is useless in Tarantool and should be removed.
-
Nikita Pettik authored
Function tarantoolsqlEphemeralDrop() always returns 0. Let's make it return void to make code clean.
-
Nikita Pettik authored
Follow-up for #4074
-
Mergen Imeev authored
This function is not used in Tarantool and should be removed.
-
Mergen Imeev authored
Currently, the rc field of the VDBE structure is either 0 or -1. Due to this, it is better to replace this integer field with the boolean field is_aborted.
-
Mergen Imeev authored
This field has become unused and should be removed.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error/status code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing these error codes is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Removing this error/status code is part of getting rid of the SQL error system.
-
Mergen Imeev authored
Since the lookaside system is not currently in use, it must be completely removed.
-
Mergen Imeev authored
These functions are not currently used and should be removed.
-
Mergen Imeev authored
These functions are part of the SQL error system, which is replaced by the Tarantool error system. They are not needed now, so they will be deleted.
-
Mergen Imeev authored
This field has become unused and should be removed.
-
Mergen Imeev authored
This field has become unused and should be removed.
-
Mergen Imeev authored
This field has become unused and should be removed.
-
Georgy Kirichenko authored
Get rid of duplicated fiber on stop logic. Prerequisites: #1254
-
Vladimir Davydov authored
To apply replicated rows in parallel, we need to be able to complete transactions asynchronously, from the tx_prio callback. We can't yield there so we must ensure that on_commit/on_rollback triggers don't yield. The only place where we may yield in a completion trigger is vinyl DDL, which submits vylog records and waits for them to complete. Actually, there's no reason to wait for vylog write to complete, as we can handle missing records on recovery. So this patch reworks vylog to make vy_log_tx_try_commit() and hence on_commit/on_rollback triggers using it non-yielding. To achieve that, we need to: - Use vy_log.latch only to sync log rotation vs writes. Don't protect vylog buffer with it. This makes vy_log_tx_begin() non-yielding. - Use a separate list and buffer for storing vylog records of each transaction. We used to share them among transactions, but without vy_log.latch we can't sync access to them anymore. Since vylog transactions are rare events, this should be fine. - Make vy_log_tx_try_commit() append the transaction to the list of pending transactions and wake up a background fiber to flush all pending transactions. This way it doesn't need to yield. Closes #4218
-
Maria Khaydich authored
Receive function behaved inconsistently for the cases where first we use an integer as a pattern as to tell the function a specific number of elements we want to read, and then perform another receive call using '*a' as a pattern. The latter should have denoted that we want to get all there is to get, but instead it was possible to get only a part of data and also in non-sequential order. Closes #4118
-
- Jun 19, 2019
-
-
Vladislav Shpilevoy authored
URI reconfiguration causes incarnation increment in order to forcefully rewrite old value on remote instances. But that update was not delivered to a user via triggers. The patch fixes that.
-
Alexander Turenko authored
Add 'decimal' to a built-in modules list to preserve package.loaded.decimal when pretest_clean is set in suite.ini. Needed for #692.
-
- Jun 18, 2019
-
-
Alexander Turenko authored
Built-in modules are bundled into tarantool in the following way. A lua file from src/lua or src/box/lua is stored as a string literal in a C file, then built and linked into tarantool. During startup tarantool calls luaL_loadbuffer() on this string. When a Lua source is converted to a C literal, proper escaping is performed. However there is one case, which was not covered: trigraphs. The patch adds escaping of question mark symbols to avoid matching ??X sequences as trigraphs by C preprocessor. The most simple way to check that it works is to apply the following patch: | diff --git a/src/lua/string.lua b/src/lua/string.lua | index 6e12c59ae..2da2dbf4d 100644 | --- a/src/lua/string.lua | +++ b/src/lua/string.lua | @@ -425,3 +425,6 @@ string.fromhex = string_fromhex | string.strip = string_strip | string.lstrip = string_lstrip | string.rstrip = string_rstrip | +string.foo = function() | + return '??(' | +end And call the function like so: | ./src/tarantool -e 'print(string.foo()) os.exit()' If it printfs `??(`, then everything is okay. If it prints `[`, then `??(` was preprocessed as the trigraph. We hit this problem when tried to bundle luarocks-3: it contains "^(.-)(%??)$" regexp, where `??)` was interpreted as `]`. Debug build or a build with -DENABLE_WERROR reports an error in the case, but usual RelWithDebInfo build passes (with -Wtrigraphs warnings) and can show this unexpected behaviour. Fixes #4291.
-
Vladimir Davydov authored
vy_tx_handle_deferred_delete() expects (righteously) that in case a deferred DELETE overwrites a statement in a secondary index write set and the overwritten statement wasn't skipped on commit (i.e. doesn't have txv->is_overwritten flag set), both the old and the new statement must be REPLACEs (see the comment to the corresponding assertions for more details). The problem is we don't set is_overwritten flag in case a statement doesn't have any effect (txv->is_nop is set), even if it was, in fact, overwritten in the primary index write set (see vy_tx_prepare). As a result, we get an assertion failure when we delete such statement in the same transaction, e.g. s = box.schema.space.create('test', {engine = 'vinyl'}) s:create_index('pk', {parts = {1, 'unsigned'}}) s:create_index('sk', {parts = {2, 'unsigned'}}) s:replace{1, 1, 1} box.begin() s:update(1, {{'+', 3, 1}}) -- adds no-op REPLACE to sk write set s:delete(1) -- produces deferred DELETE for sk box.commit() results in vy_tx_handle_deferred_delete: Assertion `vy_stmt_type(stmt) == IPROTO_REPLACE' failed. Fix this by making sure we set is_overwritten for all overwritten statements in a secondary index write set. Closes #4294
-
- Jun 17, 2019
-
-
Serge Petrenko authored
The test used to fail occasionally with a following error: ``` [001] box/net.box.test.lua [ fail ] [001] [001] Test failed! Result content mismatch: [001] —- box/net.box.result Thu Jun 13 06:16:34 2019 [001] +++ box/net.box.reject Fri Jun 14 04:50:55 2019 [001] @@ -3774,23 +3774,23 @@ [001] ... [001] test_run:grep_log('default', 'Got a corrupted row.*') [001] —- [001] — 'Got a corrupted row:' [001] +- null [001] ... [001] test_run:grep_log('default', '00000000:.*') [001] —- [001] — '00000000: A3 02 D6 5A E4 D9 E7 68 A1 53 8D 53 60 5F 20 3F ' [001] +- null [001] ... [001] test_run:grep_log('default', '00000010:.*') [001] —- [001] — '00000010: D8 E2 D6 E2 A3 02 D6 5A E4 D9 E7 68 A1 53 8D 53 ' [001] +- null [001] ... [001] test_run:grep_log('default', '00000020:.*') [001] —- [001] — '00000020: 60 5F 20 3F D8 E2 D6 E2 A3 02 D6 5A E4 D9 E7 68 ' [001] +- null [001] ... [001] test_run:grep_log('default', '00000030:.*') [001] —- [001] — '00000030: A1 53 8D 53 60 5F 20 3F D8 E2 D6 E2 ' [001] +- null [001] ... [001] test_run:grep_log('default', '00000040:.*') [001] —- ``` This happened because we used `grep_log` right after `socket:write`, which should cause the expected log messages. Change to `wait_log`. Follow-up #4273
-