- Feb 27, 2019
-
-
Vladislav Shpilevoy authored
'Info' is a header-only library consisting of one file. It is going to be used by SWIM, stored in src/lib, but src/lib can not depend on src/. This commit moves 'info' to lib/info. Needed for #3234
-
Vladislav Shpilevoy authored
Core is supposed to be the most basic library, providing only really common features used everywhere like fiber, diag, memory, logging. Which can't be said about collations - they are used only by high level things - SQL, Lua utf8, comparators. Collations are built now as 'lib/coll' library. The patch is not necessary for anything, but it is a right thing to do, while some activity is happening there.
-
Mergen Imeev authored
Error "syntax error after column name" does not make any sense. Let's remove it. Part of ...3965
-
Mergen Imeev authored
-
Mergen Imeev authored
Macros SQL_*_BKPT were used in debug mode to log errors that occurred during the execution of VDBE. They are not used now. This patch removes them. Part of #3965
-
Mergen Imeev authored
@TarantoolBot document Title: changes in EXPLAIN and PRAGMA The most important change is that the column names for the result of the "EXPLAIN ...", "EXPLAIN QUERY PLAN ..." and "PRAGMA ..." commands are now defined. Example: box.cfg{listen = 3302} cn = require('net.box').connect(box.cfg.listen) cn:execute('EXPLAIN SELECT 1;') In addition, the 'case_sensitive_like', 'parser_trace' and 'sql_default_engine' pragmas now return their values if they are executed without arguments. For the first two pragmas, this value is their state, and for the latter, the default engine currently set in SQL. Example: box.sql.execute('PRAGMA case_sensitive_like;') And the last change is that now the execution of the “PRAGMA” command without determining which pragma to execute returns status for all flag-type pragmas. Flag-type pragmas are pragmas that have TRUE or FALSE as status. Example: box.sql.execute('PRAGMA;')
-
Mergen Imeev authored
Currently, EXPLAIN and PRAGMA do not set the column types for the result. This is incorrect, since any returned row must have a column type. This patch defines the types for these columns. Closes #3832
-
Mergen Imeev authored
Currently box.sql.execute ('PRAGMA') returns nothing, but prints list of pragmas and their statuses to stdout. Such strategy is considered to be wrong since output of this command would be unavailable for users who redirect stdout, use net box connection etc. This patch makes the command to return result as the rest of SQL commands. The result contains only FLAG-type pragmas and their statuses.
-
Mergen Imeev authored
Currently PRAGMA case_sensitive_like returns nothing. This seems wrong, since other similar pragmas return their status. Fixed in the current patch.
-
Mergen Imeev authored
After this patch, "PRAGMA sql_default_engine" called without arguments will return currently set sql_default_engine.
-
Mergen Imeev authored
Currently PRAGMA parser_trace returns an empty table. This seems wrong, since other similar pragmas return their status. Fixed in the current patch.
-
Mergen Imeev authored
Some macros in pragma.c and pragma.h are obsolete because the values they are checking are no longer used or their usage makes no sense. Let's remove them.
-
- Feb 26, 2019
-
-
Vladislav Shpilevoy authored
For the same reason why 'uri' was moved to src/lib - SWIM needs core and uuid, and SWIM will live in src/lib. This commit follows 'uri' relocation as a separate one because 'uri' relocation required some changes in the files, moved by this commit. Needed for #3234
-
Vladislav Shpilevoy authored
Http_parser in fact does not depend on anything, even on the core. As a rule, such basic libraries are stored in src/lib. The patch is not necessary for anything, but it is a right thing to do, while some activity is happening there.
-
Vladislav Shpilevoy authored
Http_parser is a standalone library, which in fact does not require httpc. And because of that it is going to be moved into lib/http_parser.
-
Vladislav Shpilevoy authored
URI and core libraries are going to be used by SWIM, stored in src/lib. But src/lib can not depend on src/. This patch pushes URI library down to src/lib - the lowest level of source dependencies. Needed for #3234
-
- Feb 25, 2019
-
-
Kirill Shcherbatov authored
Memtx uses separate mempools for iterators of different types. Due to the fact that there will be more iterators of different sizes in a series of upcoming changes, let's always allocate the iterator of the largest size. No changes have been made to the rtree iterators pool because the size of these structures is significantly larger. Needed for #3961
-
Vladimir Davydov authored
This can't entail any consequences, because socket fd is set to -1 in this case, but this just looks a bit messy. Let's clean it up. Follow-up commit 305dbcf6 ("iproto: close socket explicitly before wal_dir at exit").
-
Nikita Pettik authored
When we replaced SQLite's ephemeral spaces with our ones, one optimization concerning ORDER BY clause was disabled. It allows to reduce number of fields in format of ephemeral space or sorter table. To illustrate how it works, consider example: CREATE TABLE t (id INT PRIMARY KEY, b INT); SELECT * FROM t ORDER BY b; To sort entries from t, ephemeral space with format [b, id, b] is created. One can see, that such format contains duplicate of b column. To avoid such situation, SQLite provides optimization which removes duplicates. Meanwhile, it doesn't change already set format of ephemeral (or sorter) space (and SQLite tolerates that format difference). That's why it was turned off. However, such optimization turns out to be not optional but required: some column values shouldn't be computed twice. For instance: SELECT random() AS x FROM t ORDER BY x; Without filtering fields from ephemeral space format, it would be like: [random(), random()]. In other words, results would be sorted by first call to random() function, but resulting set would consist of values given by second call of random(). So, to enable it, we should reduce field count in format of ephemeral space by number of matches between SELECT and ORDER BY column lists. Also, type of return value for random() function has been fixed. Closes #3783
-
Kirill Shcherbatov authored
Refactored memtx_tree code so that memtx_tree.h, memtx_rtree.h, memtx_bitset.h, memtx_hash.h contained only the signature of the tree object constructor while all implementation details were in corresponding *.c files. Needed for #3961
-
Kirill Shcherbatov authored
Introduce a macro BPS_TREE_IDENTICAL for BPS TREE class. This makes possible to define custom comparators for stucture-based leafs. Previously, a C++ comparison operator "!=" override was used for this purpose. Due to the fact that we are not going to rework on C++ C-only components of Tarantool like memtx_tree, we needed a way to make complex structures comparisons using preprocessor. Needed for #3961
-
Kirill Shcherbatov authored
The bps_tree.h header defines the macro _api_name, but does not undefine it at the end. Fixed.
-
Ilya Kosarev authored
tarantool instance didn't close socket explicitly which could cause hot standby instance to fail to bind in case it tries to bind before socket is closed by OS. Now it is fixed by closing socket explicitly before wal_dir. Closes #3967
-
Roman Khabibov authored
Add preprocessing of the request headers. Each header must be 'string' or 'table' with '__tostring' metamethod. Closes #3679
-
Cyrill Gorcunov authored
If I create a new fiber and the join to himself we get an abort: | tarantool> f = require('fiber') | --- | ... | | tarantool> f.join(f.self()) | tarantool: src/fiber.c:407: fiber_join: Assertion `fiber->flags & FIBER_IS_JOINABLE' failed. | Aborted (core dumped) we should better throw an error.
-
Vladislav Shpilevoy authored
The only goal of reading and writing heap_node.pos was checking if a node is now in a heap, or not. This commit encapsulates this logic into a couple of functions.
-
Roman Khabibov authored
Replace assert in socket:read() and add a check in socket:sysread() when the size is negative. Closes #3979
-
Nikita Pettik authored
It is possible to create vinyl tables, if pragma sql_default_engine is set to corresponding engine. However, such spaces don't inherit global vinyl-specific options which can be set by box.cfg{}. Lets fix it and during encoding of index options fetch appropriate configurations from cfg. Closes #3912
-
Nikita Pettik authored
Since previous commit allows us to raise an error during msgpack decode inside VDBE, lets do this if decoded integer is out of [INT64_MIN, INT64_MAX] range and set "integer is overflowed" diagnostic message. Closes #3735 Workaround for #3810
-
Nikita Pettik authored
Tarantool allows to hold in INTEGER field values in range [INT64_MAX, UINT64_MAX], which is obviously larger than common int64_t range. In this regard, if value of integer field in range [INT64_MAX, UINT64_MAX] is presented in tuple (e.g. after insertion from Lua interface), then after decoding msgpack (during processing SQL query) its value won't fit into int64_t (which in turn is basic type used to hold integers inside VDBE memory). Now if this happens, instead of raising an overflow error, value is stored as floating point number (with precise loss, obviously). Such approach is considered to be messy and we are going to raise "integer overflow" error instead. To make this happen, lets firstly refactor sqlVdbeMsgpackGet() to make it return error code to indicate that something went wrong and move length of decoded part to output parameters. Codestyle fixes are included as well. Needed for #3735
-
Nikita Pettik authored
Before this patch, if integer overflow occurred during casting to integer, it was simply ignored. As a result, wrong results might take place. Lets check possible overflows before CAST conversion, and if it happens, raise an appropriate error. Part of #3735
-
Nikita Pettik authored
Before this patch, if integer was overflowed during math operations (OP_Add, OP_Subtract, OP_Multiply, OP_Divide), it would be implicitly converted and stored as floating point number. This is obviously wrong way to handle integer overflow errors. Instead, let's raise corresponding error. Part of #3735
-
Nikita Pettik authored
Before this patch, resulting type of concatenation operator always was TEXT (i.e. type of memory cell containing result - MEM_Str). Lets fix it and return type depending on type of concatenation arguments: if both arguments are TEXT, then resulting type is TEXT; BLOB otherwise. Note that other options of combining types of arguments are illegal. Closes #3544
-
Nikita Pettik authored
Original SQLite operator of concatenation accepts all types of arguments. If type of parameter is not TEXT, it is implicitly converted to TEXT (except for NULLs). That contradicts ANSI (it is regulated by [1]), so lets allow only TEXT and BLOB as argument type for concatenation. Moreover, they both must be of the same type at the same time (i.e. both TEXT or BLOB). [1] SQL ANSI 2013, 9.5 Result of data type combination Part of #3544
-
Nikita Pettik authored
Accidentally, mask which is used to map type of VDBE memory cell into outer API types was replaced with MEM_TypeMask. But value of the latter is larger then possible values of VDBE memory cells types. Hence, if it is applied to memory cell, not only pure types is taken into consideration, but some additional flags (such as MEM_Zero) as well. Overall, it results in wrong type calculation for zeroed blobs, for instance. Lets return back previous mask. Follow-up #3698 Needed for #3544
-
Alexander Turenko authored
yaml.encode() now wraps a string literal whose content is equal to a null or a boolean value representation in YAML into single quotes. Those literals are: 'false', 'no', 'true', 'yes', '~', 'null'. Reverted the a2d7643c commit to use single quotes instead of multiline encoding for 'true' and 'false' string literals. Follows up #3476 Closes #3662 Closes #3583
-
AKhatskevich authored
Use lua_is*() functions instead of explicit lua_gettop() checks in yaml.encode() and yaml.decode() functions. Behaviour changes: * yaml.decode(object, nil) ignores nil (it is consistent with encode behaviour). * yaml.encode() gives an usage error instead of "unsupported Lua type 'thread'". * yaml.encode('', {}, {}) ignores 3rd argument (it is consistent with decode behaviour).
-
Serge Petrenko authored
Previously readahead was set after the instance synced with all existing masters. This could lead to a case when some client connections created rather early would start with default readahead value even when it was explicitly set to some value. So, start setting readahead before replicaset sync. Follow-up: #3958
-
Serge Petrenko authored
Iproto connections keep old readahead values for input buffers even after box.cfg.readahead reconfiguration. This means that for the changes to take place for the old clients, they have to reconnect. Otherwise tarantool log will be spammed with 'readahead limit is reached' errors. To fix this, start updating input buffer size for iproto connections if needed every time the buffer is empty. Closes: #3958
-
- Feb 24, 2019
-
-
Vladislav Shpilevoy authored
Checks for fiber_name legth worked with FIBER_NAME_MAX, while one byte in fact was occupied by terminating zero. Closes #4011
-