- Jul 11, 2017
-
-
Konstantin Osipov authored
-
Vladislav Shpilevoy authored
Add iproto_execute command to get not only sql rows as the result, but also sql meta data about each result column. Make SQLITE_LIMIT_VARIABLE_NUMBER be static SQLITE_LIMIT_VARIABLE_NUMBER is the run time limit of the variable count in the query. The Tarantool doesn't support dynamic limits for such things. Let's make this limit be enum instead of value in the limits array (struct sqlite3.aLimit). Part of #2285.
-
Vladislav Shpilevoy authored
Add `sqlite3BitvecBuiltinTest` to exported symbols to expose it to ffi. Bug #2590 submitted to remove it from exports.
-
Vladislav Shpilevoy authored
Raise syntax error in a case of empty requests. Update sql-tokenizer to support exising tests.
-
khatskevich authored
Test alias.test.lua is fully disabled, see #2582 Part of #2381
-
Konstantin Osipov authored
-
- Jul 10, 2017
-
-
Vladimir Davydov authored
Instead introduce vy_run_env_enable_coio(), which starts reader threads, and make vy_run_iterator automatically switch to coio if reader threads are running. With this patch, vy_read_iterator doesn't need a pointer to vy_env to add a run as a source, only vy_run_env. While we are at it, cleanup vy_conf a bit. Needed for #1906
-
Vladimir Davydov authored
vy_run_write_page() doesn't take a reference to last_stmt, because it assumes that the write iterator guarantees it won't be deleted until 'next' is called again. The iterator does pin a statement if it is read from a run file - see vy_write_iterator_set_tuple() - however there's a case when the last returned statement can go away under us. This will happen if the iterator is used for major compaction and the last source statement is a DELETE. In this case the iterator will unreference the last statement it returned to the caller, take a reference to the DELETE instead, but won't return the DELETE - see vy_write_iterator_next(). As a result, the caller, i.e. vy_run_write_page(), will hit use-after-free on an attempt to read last_stmt. To fix this bug, let's make vy_run_write_page() take a reference to last_stmt as it used to before the write iterator was reworked. A test case will be added later, after all iterator-related issues have been fixed. Closes #2578
-
Georgy Kirichenko authored
Iconv is a library to convert a sequence of characters in one character encoding to a sequence of characters in another character encoding. Example below converts utf-16 big endian string into utf-8 string: convertor = require('iconv').new('UTF-16BE', 'UTF-8') converted_string = convertor(source_string) Closes #2587
-
Vladimir Davydov authored
vy_task_dump_new() deletes empty in-memory trees right away, but doesn't increment vy_index->mem_list_version, which may result in a read iterator crash accessing a deleted vy_mem.
-
alyapunov authored
Now open MP sort is used for any size of an array. For small arrays it's an overkill and even can cause overhead due to thread pool creation. Invoke open MP sort only for big arrays and use old good single-thread qsort for small arrays. Fix #2431
-
Roman Tsisyk authored
Print original uri as is if it doesn't contain sensitive information. Closes #2292
-
- Jul 09, 2017
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Vladimir Davydov authored
Currently, quota (and some global stats) are adjusted in vy_index_commit_upsert(), vy_tx_prepare(), and vy_tx_commit(), which entails dependency of vy_index and tx_manager on vy_env. Let's move this code to the upper level, i.e. to vy_prepare() and vy_commit(). Needed for #1906
-
Konstantin Osipov authored
-
Vladimir Davydov authored
Remove box.info.vinyl().performance.{tx_rlb,tx_conflict}. Instead add 'tx' section to box.info.vinyl() with the following counters: - 'active': number of active transactions - 'commit': number of committed transactions - 'rollback': number of rolled back transactions - 'conflict': number of transactions aborted on conflict Apart from improving vinyl statistics, this patch also pursues one more goal: removing dependency of vy_tx and tx_manager on vy_env, which is needed to move them to a separate source file. Needed for #1662 #1906
-
Vladimir Davydov authored
It belongs there, really.
-
Vladimir Davydov authored
Currently, during local recovery, an index is added to the scheduler from vy_index_recover(), which makes this function depend on index->env->scheduler. Let's postpone addition to vy_index_commit_create() as we do when vinyl is online. Needed for #1906
-
- Jul 08, 2017
-
-
Vladimir Davydov authored
Needed to remove dependency of vy_index on struct txv. Needed for #1906
-
Konstantin Osipov authored
-
Georgy Kirichenko authored
Before this patch, the new space, created by alter specification, would be put into space cache only after successful WAL write. This behaviour is not linearizable: on a replica, the WAL is played sequentially, and the order of events could differ from the master. Besides, it could crash, as demonstrated in gh-2074 test case. Since we use a cascading rollback for all transactions on WAL write error, it's OK to put a space into space cache before WAL write, so that the new transactions apply to the new space. This patch does exactly that. All subsequent requests are executed against the new space. This patch also removes on_replace trigger in the old space, since all checks against the new tuple format are performed using the new space. Fixes #2074.
-
- Jul 07, 2017
-
-
Bulat Niatshin authored
* UTF-16 support removed * Tests with UTF-16* cases removed Closes #2295
-
Konstantin Osipov authored
-
Konstantin Osipov authored
Do not leak input buffer references on an incorrect packet. Before this patch, in case of incorrect packet, in->rpos was never advanced, creating an eternal request and blocked input buffer. A follow up on gh-1654.
-
Eugine Blikh authored
closes gh-2576
-
- Jul 06, 2017
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
* update comments * add a test case for altering a primary key on the fly * rename AddIndex to CreateIndex * factor out common code into a function
-
Georgy Kirichenko authored
MoveIndex operation is used to move an existing index from the old space to the new one. Semantically it's a no-op. RebuildIndex is introduced for case when essential index properties are changed, so it is necessary to drop the old index and create a new one in its place in the new space. AlterSpaceOp::prepare() is removed: all checks are moved to on_replace trigger in _index system space from it. All checks are done before any alter operation is created. Necessary for gh-2074 and gh-1796.
-
alyapunov authored
Move the check which decides on an alter strategy whenever a row in _index space is changed, from AlterSpaceOp::preapre() to on_replace trigger on _index space. The check chooses between two options: a heavy-weight index rebuild, invoked when index definition, such as key parts, is changed, vs. lightweight modify, invoked when index name or minor options are modified.. Before this patch, index alteration creates a pair of operations (DropIndex + AddIndex) in all cases, but later replaces two operations with one at AlterSpaceOp::prepare() phase. This is bad by several reasons: - it's done while traversing of a linked list of operations, and it changes the list being traversed. - an order in the list of operations is required for this to work: drop must precede add. - needless allocation and deallocation of operations makes the logic unnecessarily complex. Necessary for gh-1796.
-
Konstantin Osipov authored
Always first create the primary key index in a space. Put the primary key key def first in the array of key_defs, passed into tuple_format_new(). This is necessary for gh-1796.
-
Konstantin Osipov authored
Assert that we can't create a space with secondary key but no primary.
-
alyapunov authored
Now drop primary index checks are made in alter triggers after new space creation. Such an implementation leads to temporary creation of a space with invalid index set. Fix it and check the index set before space_new call.
-
Georgy Kirichenko authored
Non destructive swap_index_def function sould be used because memtx_tree stores a pointer to an index_def used while tree creation. Fixed #2570
-
Kirill Yukhin authored
Use `net.box` instead of `console`.
-
Kirill Yukhin authored
LLVM is more eager for frame size than GCC Current maximal call chain length may corrupt stack then. Reduce maximal call chain length to 30. Related to #2550
-
Kirill Yukhin authored
If after recovery first client to invoke SQL differs from ADMIN, then initialization of SQL subsystem will fail due to insufficient access rights. Problem is that SQL invokes create_from_tuple() to fill space_def structure, which in turn verifies access right. As far as SQL is a static part of Tarantool, there's no sense to initialize the system by demand. Change performs data dictionary initialization upon config completion. Regression test added as well. Closes #2483
-
- Jul 05, 2017
-
-
Konstantin Osipov authored
-
- Jul 04, 2017
-
-
Vladislav Shpilevoy authored
Needed for #2285
-
Vladimir Davydov authored
Commit dbfd515f ("vinyl: fix crash if snapshot is called while dump is in progress") introduced a bug that can result in statements inserted after WAL checkpoint being included in a snapshot. This happens, because vy_begin_checkpoint() doesn't force rotation of in-memory trees anymore: it bumps checkpoint_generation, but doesn't touch scheduler->generation, which is used to trigger in-memory tree rotation. To fix this issue, this patch zaps scheduler->checkpoint_generation and makes vy_begin_checkpoint() bump scheduler->generation directly as it used to. To guarantee dump consistency (the issued fixed by commit dbfd515f), scheduler->dump_generation is introduced - it defines the generation of in-memory data that are currently being dumped. The scheduler won't start dumping newer trees until all trees whose generation equals dump_generation have been dumped. The counter is only bumped by the scheduler itself when all old in-memory trees have been dumped. Together, this guarantees that each dump contains data of the same generation, i.e. is consistent. While we are at it, let's also remove vy_scheduler->dump_fifo, the list of all in-memory trees sorted in the chronological order. The scheduler uses it to keep track of the oldest in-memory tree, which is needed to invoke lsregion_gc(). However, since we do not remove indexes from the dump_heap, as we used to not so long ago, we can use the heap for this. The only problem is indexes that are currently being dumped are moved off the top of the heap, but we can detect this case by maintaining a counter of dump tasks in progress: if dump_task_count is > 0 when a dump task is completed, we must not call lsregion_gc() irrespective of the generation of the index at the top of the heap. A good thing about ridding of vy_scheduler->dump_fifo is that it is a step forward towards making vy_index independent of vy_scheduler so that it can be moved to a separate source file. Closes #2541 Needed for #1906
-