- Jul 03, 2018
-
-
Kirill Shcherbatov authored
As index_size does not match row count for vinyl engine, it was replaced with index_count that working for ITER_ALL in memtx same way. Part of #2199.
-
Kirill Shcherbatov authored
Part of #2199. @TarantoolBot document Title: new pragma sql_default_engine Now it is allowed to create vinyl spaces using special pragma setting default engine for SQL requests. This config is stored in user_session() and affect *only* tables been created with SQL. Example: \set language sql pragma sql_default_engine='vinyl'; CREATE TABLE t3(a primary key,b,c);
-
Kirill Shcherbatov authored
To follow ANSI SQL standard we should dissallow returning multiple rows from subselects after = and in braces (). To achieve this goal we have introduced Select SF_SingleRow flag that indicates the case of subselect having no client-defined LIMIT 1 to patch system implicit LIMIT 1 to be LIMIT 2 and generate extra bytecode to HALT execution on reaching this restrict. Resolves #2366.
-
- Jul 02, 2018
-
-
Vladimir Davydov authored
IPROTO_OPTIONS (2.0) and IPROTO_SERVER_IS_RO (1.10) use the same key code (0x29). Resolve this conflict by moving IPROTO_OPTIONS to 0x2a.
-
Vladislav Shpilevoy authored
-
Vladimir Davydov authored
-
- Jun 29, 2018
-
-
Konstantin Osipov authored
fiber->on_yield triggers were not invoked in fiber_call(), which meant that memtx transaction was not rolled back by fiber.create(). Fixes gh-3493
-
Vladislav Shpilevoy authored
Part of #3328
-
AKhatskevich authored
Analyze samples are encoded with msgpack and should be decoded as a msgpack. sqlite3Stat4Column sqlite-style function converted to sql_stat4_column Tarantool-styled. Closes #2860
-
Kirill Shcherbatov authored
As new _trigger format contains space_id, we can avoid storing AST pointers in HASH. Requested AST could be found by name in appropriate space. Part of #3273.
-
Kirill Shcherbatov authored
Trigger presence in system should be tested on each VDBE execution attempt, not on Parser iteration as system state could be changed between opcode run. With this patch, such checks are the part of VDBE program looking to the _trigger space and raise error message if tuple with specified key already exists. Part of #3435, #3273
-
Kirill Shcherbatov authored
Changed Trigger structure name to sql trigger to avoid confusing similarity with Tarantool trigger structure. Refactored related code to match tarantool codestyle. Part of #3273.
-
Kirill Shcherbatov authored
Introduced sql_triggers field in space structure. Changed parser logic to do not insert built triggers, just only to do parsing. All triggers insertions and deletions are operated via on_replace_dd_trigger now. Global DB hash has been kept as we still ned to get Trigger AST by name on trigger deletion. Resolves #3273.
-
Kirill Shcherbatov authored
As we would like to lookup triggers by space_id in future on space deletion to delete associated _trigger tuples we need to introduce new field space_id as secondary key. Part of #3273.
-
Kirill Shcherbatov authored
As error codes were not sorted, changing any of error constants significantly change test case output. This cause unnecessary changes on each such commit.
-
Kirill Shcherbatov authored
As we are going to port triggers to server, we need an instrument to release allocated memory in alter.cc. Part of #3273.
-
Kirill Shcherbatov authored
-
AKhatskevich authored
`sql_current_time` is exported only in debug mode and used to check builtin datetime sql functions behavior in specific time moments. Extra changes: * table-14.1 test is deleted, as it does not test anything. It was testing ddl inside of a transaction. This case is checked by 14.2 by now. Closes #2646
-
Kirill Yukhin authored
Make RANDOMBLOB(0) return NULL, it was returning random blob of length 1 before. Allow rounding to more than 30 digits. Part of #2347
-
Kirill Yukhin authored
If we ever will have extensions support, it will be impemented in different way. Remove this legacy code. Closes #2183
-
Kirill Yukhin authored
Removed legacy functions: sqlite_version, sqlite_sourceid, sqlite_log. Added version built-in function which returns Tarantool's version. Closes #2184
-
- Jun 28, 2018
-
-
Ilya Markov authored
Bug: During parsing http headers, long headers names are truncated to zero length, but values are not ignored. Fix this with adding parameter max_header_name_length to http request. If header name is bigger than this value, header name is truncated to this length. Default value of max_header_name_length is 32. Do some refactoring with renaming long names in http_parser. Closes #3451
-
Ilya Markov authored
Bug: Header parser validates http status line and besides saving http status, saves valid characters to header name, which is wrong. Fix this with skipping status line after validation without saving it as a header. In scope of #3451
-
Vladimir Davydov authored
If tarantool is stopped while writing a snapshot or a vinyl run file, inprogress files will never be removed. Fix this by collecting those files on recovery completion. Original patch by @IlyaMarkovMipt. Reworked by @locker. Closes #3406
-
Ilya Markov authored
In order to log only about files that were actually removed change log messages from "removing <name of file>" to "removed <name of file>" in vy_run_remove_files and xdir_collect_garbage functions. Needed for #3406
-
Kirill Yukhin authored
Update expander of SELECT statement to search for space if corresponding table wasn't found in table hash. Create dummy table if so and fill def field only. Also fix a leak in VIEW creation. Part of #3369
-
Konstantin Osipov authored
A minor follow up on the fix for gh-3452 (http.client timeout bug)
-
Ilya Markov authored
Current implementation of http.client relies on fiber_cond which is set after the request was registered and doesn't consider the fact that response may be handled before the set of fiber_cond. So we may have the following situation: 1. Register request in libcurl(curl_multi_add_handle in curl_execute). 2. Receive and process response, fiber_cond_signal on cond_var which no one waits. 3. fiber_cond_wait on cond which is already signaled. Wait until timeout is fired. In this case user have to wait timeout, though data was received earlier. Fix this with adding extra flag in_progress to curl_request struct. Set this flag true before registering request in libcurl and set it false when request is finished before fiber_cond_signal. When in_progress flag is false, don't wait on cond variable. Add 1 error injection. Closes #3452
-
- Jun 27, 2018
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
schema_version must be passed to perform_request in 1.9
-
Vladislav Shpilevoy authored
When a connection is closed, some of long-poll requests still may by in TX thread with non-discarded input. If a connection is closed, and then an input is discarded, then connection must not try to read new data. The bug was introduced here: f4d66dae by me. Closes #3400
-
Vladimir Davydov authored
IPROTO_SERVER_IS_RO currently has code 0x07 and is defined in the header key section, which is wrong, because this key is only used in request body. Let's move it to the body section, where it belongs, and set its code to 0x29. This shouldn't break anything even if 0x07 is reused in future, because the two codes belong to different sections and hence are never parsed in the same function. Worst that can happen is we fail to bootstrap a node in the cluster if it is running a newer tarantool version. While we are at it, let's also add the key name and change its type from MP_UINT to MP_BOOL. Fixes commit a8ecd1e1 ("replication: fix bug with read-only replica as a bootstrap leader").
-
Vladimir Davydov authored
Throughout the code, we return -1 on error, but decode methods return 1 for some reason, although according to comments they are supposed to return -1. This doesn't result in any errors, because we use != 0 to check for errors. Nevertheless, let's fix it to avoid confusion.
-
Vladimir Davydov authored
-
Vladimir Davydov authored
When reopening an existing xlog file (as in case of vylog), we do not erase the eof marker immediately. Instead we reposition file offset to (file_size - sizeof eof_marker), assuming the eof marker will be overwritten on the first write. However, it isn't enough if we want to reuse this function for reopening WAL files, because when scanning the WAL directory we close a file if we read eof marker and never reopen it again, see recover_remaining_wals(). So to avoid skipping rows written to a once closed WAL, we have to erase the eof marker when reopening an xlog file. Let's do it with truncate().
-
Vladimir Davydov authored
-
- Jun 26, 2018
-
-
Vladimir Davydov authored
If a source is used on a read iteration (i.e. the key at which it is positioned is the next best match or, in terms of the read iterator implementation, its front_id matches the read iterator front_id), its history is cleaned up, see vy_read_iterator_apply_history(). This breaks the logic behind vy_read_src_is_behind(), which assumes that the history always points to the last used key. As a result, a source may be mistakenly skipped, as illustrated below: Fiber 1 Fiber 2 ------- ------- 1. Opens read iterator. 2. Advances it to the next key. The returned key was read from a mem or run (not from cache). The source's history is emptied. Adds a chain containing the key read by fiber 1 to the cache. 3. Continues iteration, reads next few keys from the cache until the chain ends. The source used at step 2 is skipped. 4. Calls vy_read_src_is_behind() on the source used at step 2 and skipped at step 3. It returns false, because its history is empty, thus skipping keys stored in it. Fix this bug by moving the code that checks whether a source iterator needs to be advanced from vy_read_src_is_behind() to source iterator 'skip' method, because there we always know the last key returned by the iterator. Basically, this returns the code we had before commit b4d57284 ("vinyl: consolidate skip optimization checks in read iterator"). Closes #3477
-
Georgy Kirichenko authored
Allow define access privileges for all spaces, functions and sequences. Read and write privileges are supported for spaces, execute privilege for sequences. Privilege granting and revoking might be done through old api without object identification: box.schema.user.grant("guest", "read", "space") Prerequisite #945
-
Vladislav Shpilevoy authored
-