- Mar 25, 2019
-
-
Alexander Turenko authored
Debian Wheezy is EOL since 31st May 2018, mirrors are disabled now.
-
Kirill Yukhin authored
-
- Mar 22, 2019
-
-
Kirill Yukhin authored
Development branch is now named master, so update conditions for extended extended checks on Travis. Also, set new repo name.
-
- Mar 21, 2019
-
-
Vladimir Davydov authored
There's a bug in the code building index hash on recovery: we replace a dropped index with any newer index, even incomplete one. Apparently, this is wrong, because a dropped index may have been dropped during final recovery and hence is still needed for initial recovery. If we replace it with an incomplete index in the index hash, initial recovery will fail with ER_INVALID_VYLOG_FILE: Invalid VYLOG file: LSM tree 512/1 not found (see vy_lsm_recover()). Fix this problem by checking create_lsn of the index that is going to replace a dropped one - if it's negative, we must link it to the dropped index via vy_lsm_recovery_info->prepared instead of inserting it into the hash directly. Closes #4066
-
Georgy Kirichenko authored
Perform a log rotation instead of a termination according to the documentation. Fix regression caused by 9f99bc62 Follow up for: 9f99bc62 Closes: #4063
-
Kirill Shcherbatov authored
Previously, all tuples created with frommap() used default format table_format_runtime, and therefore the created data tuples were not checked for the ability to be inserted into the target space. Moreover frommap(...):tomap(...) procedures sequence also did not work because tomap(..) routine assumes that the tuple has format with field names. Closes #4045
-
- Mar 20, 2019
-
-
Kirill Shcherbatov authored
Implement functions for retrieving tuple hints for a particular key_def. Hint is an integer that can be used for tuple comparison optimization: if a hint of one tuple is less than a hint of another then the first tuple is definitely less than the second; only if hints are equal tuple_compare must be called for getting comparison result. Hints are calculated using only the first part of key_def. @locker: - Rework key_def_set_hint_func. - Refactor functions calculating hints. - Drop has_collation template argument (we don't use templates for collations anywhere else). - Add part_count argument to key_hint (it's conventional to pass part_count along with decoded key). - Improve comments, rename a few functions, and cleanup code. Close #3961
-
Vladimir Davydov authored
- Fold key_def/cmp_def selection logic (memtx_tree_index_cmp_def). There are only a couple places that use it so it isn't going to hurt readability. - Add memtx_tree_cmp_def helper that returns the definition currently used by a memtx tree. In contrast to removed memtx_tree_index_cmp_def this one doesn't check index_def. Instead it returns memtx_tree arg. We will use it to compute key/tuple hints.
-
Nikita Pettik authored
During creation of VIEW space, string containing its definition (i.e. "SELECT ...") is parsed to fetch names of referenced spaces. By those names real struct space objects are found using schema_find_id(). This function processes lookup in _space using its secondary index. On the other hand, secondary indexes of _space are unavailable during this stage of recovery, so this lookup fails and whole recovery process aborts. It is worth mentioning that now we can fetch space directly from in-memory cache using its name (originally, when view reference counter was introduced, we couldn't do this due to absence of name-cache). So, to fix this issue, let's use space_by_name() instead of schema_find_id() Closes #3814
-
Nikita Pettik authored
Our SQL codebase was inherited from SQLite, where each table must have at least one index - primary (if no explicit PK declared, one based on rowid is implicitly created). In Tarantool spaces can exists without indexes. The only existing restriction is that they can't contain any data. Hence, even very basic queries fail with assertion/seagfault if they are applied to spaces with no indexes. Situation when space turns out to remain without PK is quite common due to the absence of transactional DDL: for instance, space drop procedure consists of several steps including dropping all indexes; space itself is dropped at the very end. Thus, if a sequence of queries is interrupted by drop space procedure and one is not finished, the rest of queries will operate on space with no indexes. As a solution to this problem (at least temporary) now we disallow query processing involving spaces without PK except for views. Closes #3780
-
- Mar 19, 2019
-
-
Vladimir Davydov authored
We're planning to introduce tuple comparison hints soon. Let's rename those helper function so as not to mix them.
-
Vladimir Davydov authored
Over time key_def virtual func setter code has turned into a complete mess: now it's an incomprehensible mix of if-else blocks, linear array search, and devious array indexing. What is worse, it's duplicated by tuple_compare_create and tuple_compare_with_key_create. Adding yet another parameter to key_def templates, which is needed to implement multi-key indexes, is literally impossible. This patch attempts to alleviate the situation by splitting code paths for pre-compiled, plain, and json indexes plus merging tuple_compare and tuple_compare_with_key setters.
-
Mergen Imeev authored
Three errors of "unsupported" type were reworked in this patch. Part of ...3965
-
Mergen Imeev authored
At the moment, the only purpose of the field nErr of struct Parse is to show whether the field is_aborted of the same struct is true or false. Let's remove it. Part of ...3965
-
Nikita Pettik authored
It is obvious that BLOB (that is value encoded in msgpack with MP_BIN format) values must be bound as BLOBs, not as strings. Unfortunately, they were bound as strings, which lead to wrong resulting type calculations after execution of SQL statement.
-
Mergen Imeev authored
Currently, field representing return code in struct Parse can take only two values: SQL_OK (successfully finished parsing) and SQL_TARANTOOL_ERROR (in case of any errors occurred). Therefore, it can be replaced with a boolean field. Patch provides straightforward refactoring. Part of #3965
-
Mergen Imeev authored
This argument has practically no functionality, but deleting it allows us to replace the rc field of the Parse structure with a new bool field. Part of #3965
-
Alexander Turenko authored
Fixes #4027.
-
Alexander Turenko authored
SHA-0 is considered weak for years and was removed in OpenSSL since 1.1.0. These Lua functions did not work since 15ed10e4, but give 'Digest method "sha" is not supported' error for any input. Removed them to don't confuse a user with a Tab completion. Follow up #1722. Fixes #4028.
-
Ivan Koptelov authored
Without multi-directional iterators (to be introduced in #3309) ORDER BY + LIMIT with different specified ordered leads to wrong result. So for now (till #3309 is resolved) different sort orders are forbidden in ORDER BY + LIMIT. Close #4038 @TarantoolBot document Title: different sorting orders in ORDER BY are forbidden now The error will be raised if different sorting orders are encountered.
-
Mergen Imeev authored
After this patch all SQL parser errors will be set via diag_set(). They were saved in field zErrMsg of struct Parse before this patch. Part of #3965
-
- Mar 18, 2019
-
-
Alexander Turenko authored
Fixed _func system space clean when pretest_clean is set to True in suite.ini.
-
Vladimir Davydov authored
If tt_static_buf is too small to store the request string, 'pos' will become greater than 'end', leading to snprintf(pos, end - pos) crash, as it doesn't allow the buffer size to be negative. Use SNPRINT instead.
-
Cyrill Gorcunov authored
Fixes commit 553dc562 ("lib/core/fiber: Relax stack memory usage on recycle").
-
Vladimir Davydov authored
So that we notice in case anything goes wrong.
-
Cyrill Gorcunov authored
We want to detect a situation where task in fiber is too eager for stack memory and relax rss usage in such case. For this sake upon stack creation we put 8 marks near 64K bound (such params allows us to fill ~1/4 of a page, which seem reasonable but we might change this params with time). Once stack get recycled we investigate the marks and if they were overwritten we drop all pages behind to relax memory usage (if OS supports madvise syscall). Another important moment is that we're marking the whole stack as not present thus if fiber never stepped over 64K limit the marks will be in tact and it means the fibers are light ones there won't be much #pf in future. Later we plan to implement an intelligent fiber scheduling considering how many memory fibers consume in average. @locker: - fix watermark page alignment for grow-up stack - improve MADV_DONTNEED check - clean up code and elaborate comments - add test case to unit/fiber - fix unit/guard test Follow-up #3418
-
Cyrill Gorcunov authored
The default 64K stack size used for years become too small for modern distors (Fedora 29 and etc) where third party libraries (such as ncurses) started to use 64K for own buffers and we get SIGSGV early without reaching interactive console phase. Thus we increase default size up to 512K which should fit for common case. Later we will make this value configurable to address arbitrary stack sizes without a need to rebuild the whole code. Closes #3418
-
- Mar 15, 2019
-
-
Vladimir Davydov authored
See commit 65061cb4 ("test: don't leave open read views after vinyl/iterator") for more details. Follow-up #3862
-
Vladimir Davydov authored
The patch fixes the following test failure: | --- vinyl/errinj.result Fri Mar 15 19:19:19 2019 | +++ vinyl/errinj.reject Fri Mar 15 19:21:37 2019 | @@ -854,7 +854,8 @@ | ... | ret | --- | -- - [3, 3] | +- - [2, 2] | + - [3, 3] | ... | s:drop() | --- The error occurrs, because the test doesn't make sure that a read from the scondary index actually occurs and the fiber does stall on a read from the primary index. Use index stats to assure that. Closes #3863
-
Alexander V. Tikhonov authored
Fixed Mojave Mac build with setting MACOSX_DEPLOYMENT_TARGET environment variable for LuaJIT's Makefile. This variable specifies the minimum version of OS X on which the target binaries are to be deployed. The reason why we need to set MACOSX_DEPLOYMENT_TARGET to at least 10.6 is that 10.4 SDK (which is set by default in LuaJIT's Makefile) is not longer included in Mac OS X Mojave 10.14. See also https://github.com/LuaJIT/LuaJIT/issues/484 We already set -Wl,-macosx_version_min,10.6 (-macosx_version_min and MACOSX_DEPLOYMENT_TARGET are synonymous), but it affects only a linker. We possibly should remove -macosx_version_min, because it superseded by MACOSX_DEPLOYMENT_TARGET, but it should be done with verification that the original problem really fixed by the new way to set a deployment target. This is not part of this patch. Removed virtualenv usage in CI for OS X (so pip just installs packages into a system), because OS X Mojave 10.14 does not offer virtualenv by default. Fixed #3797
-
Vladimir Davydov authored
The patch fixes the following test failure: | --- vinyl/deferred_delete.result Fri Mar 15 18:17:05 2019 | +++ vinyl/deferred_delete.reject Fri Mar 15 18:18:18 2019 | @@ -577,7 +577,7 @@ | ... | sk:stat().rows -- ditto | --- | -- 5 | +- 25 | ... | s:drop() | --- The failure was introduced by commit 6dd0d2fb ("vinyl: do not apply run_count_per_level to the last level"). Due to the commit compaction of the secondary index may happen before compaction of the primary index, in which case deferred DELETE statements won't make it to the secondary index in time against the test expectation. Fix this by making the first run big enough to prevent major compaction from kicking in. Follow-up #3657 Closes #4047
-
Nikita Pettik authored
According to ANSI[1] specification, LIKE arguments must be of string-like type (VARCHAR, CHAR, TEXT etc). If one of arguments is NULL, then the result of LIKE function is NULL as well. This patch makes LIKE follow these rules. ANSI 2013 Part 2: Foundation; Chapter 8.5 <like predicate> Closes #3954
-
Nikita Pettik authored
We don't rely on this debug facility anymore, so let's remove it.
-
Nikita Pettik authored
We are going to always throw an error if value of BLOB type gets to LIKE arguments, so code under is macro is not needed anymore. Part of #3954
-
Vladimir Davydov authored
The watermark is updated every second anyway, however not updating it when the limit is reset results in vinyl/quota test failure: | --- vinyl/quota.result Thu Mar 14 16:03:54 2019 | +++ vinyl/quota.reject Fri Mar 15 16:32:44 2019 | @@ -146,7 +146,7 @@ | for i = 1, count do s:replace{i, pad} end -- does not trigger dump | --- | ... | -box.stat.vinyl().memory.level0 > count * pad:len() | +box.stat.vinyl().memory.level0 > count * pad:len() or box.stat.vinyl() | --- | - true | ... Closes #3864
-
Mergen Imeev authored
This patch reworks SQL syntax errors. After this patch, these error will be set as Tarantool errors. Part of #3965
-
Kirill Yukhin authored
Fixed GC issue.
-
Vladimir Davydov authored
An open iterator may disrupt the following test run, because it may prevent dump/compaction from purging stale rows. In particular, iterators left by vinyl/iterator result in the following test failure: | --- vinyl/deferred_delete.result Mon Feb 11 19:14:01 2019 | +++ vinyl/deferred_delete.reject Fri Mar 15 16:21:11 2019 | @@ -155,7 +155,7 @@ | ... | pk:stat().rows -- 5 new REPLACEs | --- | -- 5 | +- 10 | ... | i1:stat().rows -- 10 old REPLACE + 5 new REPLACEs + 10 deferred DELETEs | --- Fix this by calling the Lua garbage collector to delete all dangling iterators in the end of vinyl/iterator test. Closes #3862
-
- Mar 14, 2019
-
-
Serge Petrenko authored
The function evio_timeout_update() failed to update the starting time point, which lead to timeouts happening much faster than they should if there were consecutive calls to the function. This lead, for example, to applier timing out while reading a several megabyte-size row in 0.2 seconds even if replication_timeout was set to 15 seconds. Closes #4042
-
- Mar 13, 2019
-
-
Alexander Turenko authored
Run a unit test from a var directory. It is needed to, say, allow a test to write a log file to a gitignored directory. The only behaviour change observed on tarantool's tests is that unit/swim.test and unit/swim_proto.test write a log.txt file to a test var directory ./test/xxx_unit instead of ./test.
-