- Apr 05, 2018
-
-
Nikita Pettik authored
Some pragmas turn out to be useless and can't be applied to Tarantool's SQL. Moreover, couple of them lead to assertion faults. List or removed pragmas: - synchronous - empty_result_callbacks - WAL_autocheckpoint - WAL_checkpoint - secure_delete - database_list - data_version - compile_options - application_id - user_version - pragmas connected with HAS_CODEC macro - pragmas connected with heap memory managment
-
vanyail authored
This change removes REINDEX from keywords and also disables tests which were using this syntax. This patch affects only parser, REINDEX implementation still exists, because it is planned to be fixed and enabled in the scope of #3195. Note that REINDEX keyword is still in '%fallback' directive in 'parse.y'. Reserved keywords included there to avoid situation when a keyword has no usages within 'parse.y' file. Fixes #2174
-
Bulat Niatshin authored
Fix non-working 'INDEXED BY' clause for SELECT statement, which caused syntax-error during execution. Closes #2996
-
Vladislav Shpilevoy authored
Type of an operation for struct request can be passed directly with no "proxying" by special codes.
-
Vladislav Shpilevoy authored
1) Code is completely unreadable and complicated by strange optimizations; 2) It still supposes, that there can be multiple statements in a single string; 3) It pushes first letter of affinity together with column names - why? It is not used anywhere. Lets remove prepared statements list, affinity first letters pushing.
-
Vladislav Shpilevoy authored
Remove unused error codes, use enum instead of defines. Later the prefix SQLITE_ must be removed - see #3315.
-
Vladislav Shpilevoy authored
And rework sqlite3CompleteInsertion. Before the patch it * accepts actually unused pTab; * array of records to insert in different indexes, but inserts only one; * has sqlite code style. Code style fix is obvious. PTab is used only to check, that it is not a view and to check, that a first index is primary: 1) caller functions already guarantee the pTab is not a view; 2) regardless of a first index nature: primary or not - it is not used here. It is useless check. With the same success we can check this in each function, that uses struct Table. Array of records to insert makes no sense, since insertion is being done in a primary index only. It is enough to pass a register with a primary index tuple.
-
- Apr 04, 2018
-
-
Kirill Yukhin authored
-
Kirill Yukhin authored
-
Alexander Turenko authored
Filed gh-3311 to remove this export soon. Fixes #3310.
-
- Apr 03, 2018
-
-
Konstantin Osipov authored
-
Vladimir Davydov authored
If the size of a transaction is greater than the configured memory limit (box.cfg.vinyl_memory), the transaction will hang on commit for 60 seconds (box.cfg.vinyl_timeout) and then fail with the following error message: Timed out waiting for Vinyl memory quota This is confusing. Let's fail such transactions immediately with OutOfMemory error. Closes #3291
-
Kirill Yukhin authored
Extract expressions parsing into separate routine to allow Tarantool's backend compile DEFAULT statements w/o SQL machinery at all. So far, for DEFAULT values no context is needed: only constant expressions and built-ins are allowed. In future, table context will be added to allow use column values for CHECK constraint expressions. Move DEFAULT string value to space_def. Move compiled expresion to field_def as well. Reason not to move compiled expression to tuple_field as follows: we do not want to engage parser during tuple validation. So, do it in alter.cc. In order to allow expression duplication in alter.cc: expose those routines from expr.c and make their names correspond to coding style. Since recovery is performed before SQL fronend initialization: split it into two pieces: 1. create SQL handler, enable all subsystems 2. Do recovery. This will allow to run parser during recovery, since it needs db handle so far. Part of #3235
-
- Apr 02, 2018
-
-
Arseny Antonov authored
-
Arseny Antonov authored
-
- Mar 31, 2018
-
-
Kirill Yukhin authored
Remove functions to find DB by name. Not used anymore, was used by SQL legacy code.
-
Kirill Yukhin authored
_schema represented as key-value storage for various values common for Tarantool, like next id for space creation. SQL requires format to be fully specified for columns being access. Unfortunatelly, _schema is inserted into _space before _space's format is set and since DD triggers are disabled during upgrade, format for _schema tuple in _space stays the same. So, set value nullable field in upgrade, regenerate initial snap, update tests. Also, as far as _schema's tuple in _space is not updated: relax fieldno check in sql.c
-
- Mar 30, 2018
-
-
Vladislav Shpilevoy authored
-
Konstantin Belyavskiy authored
In case of sudden power-loss, if data was not written to WAL but already sent to remote replica, local can't recover properly and we have different datasets. Fix it by using remote replica's data and LSN comparison. Based on @GeorgyKirichenko proposal and @locker race free check. Closes #3210
-
Konstantin Belyavskiy authored
Stay in orphan (read-only) mode until local vclock is lower than master's to make sure that datasets are the same across replicaset. Update replication/catch test to reflect the change. Suggested by @kostja Needed for #3210
-
Vladislav Shpilevoy authored
IPROTO_OPTIONS can be used in the future for request types, different from IPROTO_EXECUTE.
-
Vladislav Shpilevoy authored
IPROTO_SQL_ROW_COUNT is not a top level key in an iproto response and can be moved into a separate enum.
-
Vladislav Shpilevoy authored
-
Vladimir Davydov authored
Closes #3148
-
Vladislav Shpilevoy authored
Text console tried to learn about SIGPIPE before its raising by read-before-write. If a socket is readable, but read returns 0, then it is closed, and writing to it can raise SIGPIPE. But Tarantool ignores SIGPIPE, so the process will not be terminated, write() just returns -1. The original code checks for SIGPIPE, because when Tarantool is run under debugger (gdb or lldb), the debugger by default sets its own signal handlers, and SIGPIPE terminates the process. But debugger settings can be changed to ignore SIGPIPE too, so lets remove this overengineering from the console code.
-
Vladislav Shpilevoy authored
If a remote host is unreachable on the first connection attempt, and reconnect_after is set, then netbox state machine enters error state, but it must enter error_reconnect. Do it. The bug was introduced by me in d2468dac.
-
Vladimir Davydov authored
EV_USE_REALTIME and EV_USE_MONOTONIC, which force libev to use clock_gettime, are enabled automatically on Linux, but not on OS X. We used to forcefully enable them for performance reasons, but this broke compilation on certain OS X versions and so was disabled by commit d36ba279 ("Fix gh-1777: clock_gettime detected but unavailable in macos"). Today we need these features enabled not just because of performance, but also to avoid crashes when time changes on the host - see issue #2527 and commit a6c87bf9 ("Use ev_monotonic_now/time instead of ev_now/time for timeouts"). Fortunately, we have this cmake defined macro HAVE_CLOCKGETTIME_DECL, which is set if clock_gettime is available. Let's enable EV_USE_REALTIME and EV_USE_MONOTONIC if this macro is defined. Closes #3299
-
- Mar 29, 2018
-
-
Vladislav Shpilevoy authored
-
Vladislav Shpilevoy authored
-
Vladimir Davydov authored
When a vylog transaction is rolled back, we always reset vy_log.tx_size. Generally speaking, this is incorrect as rollback doesn't necessarily remove all pending records from the tx buffer - there still may be records committed with vy_log_tx_try_commit() that were left in the buffer due to write errors. We don't rollback such records, but we still reset tx_size, which leads to a discrepancy between vy_log.tx_size and the actual length of vy_log.tx list, which further on results in an assertion failure: src/box/vy_log.c:698: vy_log_flush: Assertion `i < vy_log.tx_size' failed. We need vy_log.tx_size to allocate xrow_header array of a proper size so that we can flush pending vylog records to disk. This isn't a hot path there, because vylog operations are rare. Besides, we iterate over all records anyway to fill the xrow_header array. That said, let's remove vy_log.tx_size altogether and instead calculate the vy_log.tx list length right in place.
-
Vladimir Davydov authored
Currently, we use mh_foreach, but each object is on an rlist, which suits better for iteration.
-
Vladimir Davydov authored
The new method is called if index creation failed, either due to WAL write error or build error. It will be used by Vinyl to purge prepared LSM tree from vylog.
-
Vladislav Shpilevoy authored
-
Vladislav Shpilevoy authored
-
IlyaMarkovMipt authored
Introduce limitations on combinations of box.cfg parameters. * Add restriction on log type file and log_nonblock=true. * Add restriction on log type syslog and log_format json. * Each restriction creates error in case of its violation. * Change log_nonblock default value to nil, which means default values of log_nonblock corresponding to type of logger. * Add box_getb function for receiving bool parameters from cfg. Relates #3014 #3072
-
Konstantin Osipov authored
-
Ilya Markov authored
The bug was that logging we passed to function write number of bytes which may be more than size of buffer. This may happen because formatting log string we use vsnprintf which returns number of bytes would be written to buffer, not the actual number. Fix this with limiting number of bytes passing to write function. Close #3248
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Vladimir Davydov authored
To facilitate performance analysis, let's report not only 99th percentile, but also 50th, 75th, 90th, and 95th. Also, let's add microsecond-granular buckets to the latency histogram. Closes #3207
-