- Jul 31, 2018
-
-
Mergen Imeev authored
SQL functions UPPER and LOWER now works with COLLATE as they should according to ANSI Standart. Closes #3052.
-
- Jul 27, 2018
-
-
Kirill Yukhin authored
SQLITE_ENABLE_PREUPDATE_HOOK is dead macro. Remove it. Part of #2356
-
Kirill Shcherbatov authored
To implement new TRUNCATE operation, we have introduced a new P2 argument for OP_Clear opcode that calles box_truncate instead of tarantoolSqlite3ClearTable. This operation should work faster than DELETE FROM; but have a few restricts. Closes #2201. @TarantoolBot document Title: New TRUNCATE operation TRUNCATE is DDL operation. Removes all rows from a table or specified partitions of a table, without logging the individual row deletions. TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system resources. It couldn't be used with system tables or with tables having FKs. It also couldn't be called in transaction. The triggers on table will have ignored. Example: TRUNCATE TABLE t1;
-
- Jul 24, 2018
-
-
Olga Arkhangelskaia authored
This check happens twice. The patch simply removes check.
-
Kirill Shcherbatov authored
Get rid of is_primkey in Column structure as it becomes redundant. Moved the last member coll with collation pointer to field_def structure. Finally, dropped Column.
-
Kirill Shcherbatov authored
-
Kirill Shcherbatov authored
This patch dissallows define multiple "NULL", "NOT NULL" options per column and fixes silent implicit behavior for invalid "NULL PRIMARY KEY" construction. Closes #3473.
-
- Jul 23, 2018
-
-
Kirill Yukhin authored
Basic structures (struct Table/Index) of legacy SQL's data dictionary used to so-called tnum to refer to engine's btree structures. Tarantool used this field to store composition of space_id and index_id. Recently both structures incorporated native space_def/index_def descriptors. This patch finally removes tnum field. It also refactors init_callback machinery, removing varargs from declarations. Closes #3482
-
- Jul 21, 2018
-
-
Vladimir Davydov authored
-
Vladimir Davydov authored
Currently, the way txn_stmt::old_tuple and new_tuple are referenced depends on the engine. For vinyl, the rules are straightforward: if txn_stmt::{old_tuple,new_tuple} is not NULL, then the reference to the corresponding tuple is elevated. Hence when a transaction is committed or rolled back, vinyl calls tuple_unref on both txn_stmt::old_tuple and new_tuple. For memtx, things are different: the engine doesn't explicitly increment the reference counter of the tuples - it simply sets them to the newly inserted tuple and the replaced tuple. On commit, the reference counter of the old tuple is decreased to delete the replaced tuple, while on rollback the reference counter of the new tuple is decreased to delete the new tuple. Because of this, we can't implement the blackhole engine (aka /dev/null) without implementing commit and rollback engine methods - even though such an engine doesn't store anything it still has to set the new_tuple for on_replace trigger and hence it is responsible for releasing it on commit or rollback. Since commit/rollback are rather inappropriate for this kind of engine, let's instead unify txn_stmt reference counting rules and make txn.c unreference the tuples no matter what engine is. This doesn't change vinyl, because it already conforms. For memtx, this means that we need to increase the reference counter when we insert a new tuple into a space - not a big deal as tuple_ref is almost free.
-
Nikita Pettik authored
By now, replace function takes new tuple and old tuple as arguments, instead of single txn_stmt. It has been done in order to avoid abusing txn_stmt: the only usage was extracting tuples from it. As a result, this function can be used by ephemeral tables without any patching. (cherry picked from commit 880712c9)
-
Vladimir Davydov authored
They are fairly small and closely related so let's merge them and call the result sysview.[hc].
-
Vladimir Davydov authored
This should reduce maintenance burden and help us introduce a new engine.
-
Vladimir Davydov authored
It will be used to check if a replica fell too much behind its peers and so needs to be rebootstrapped. Needed for #461
-
Vladimir Davydov authored
Not needed anymore as we now use the new IPROTO_VOTE command instead of IPROTO_VOTE_DEPRECATED. Let's remove it altogether and reuse its code for IPROTO_BALLOT (they are never decoded together so no conflict should happen). Worst that can happen is we choose a read-only master when bootstrapping an older version of tarantool.
-
Vladimir Davydov authored
This patch contains some follow-up fixes for fe8ae607 ("Introduce IPROTO_VOTE command"): - Rename 'status' to 'ballot' everywhere in the comments. - Rename IPROTO_REQUEST_VOTE to IPROTO_VOTE_DEPRECATED and iproto_reply_request_vote to iproto_reply_vote_deprecated to emphasize the fact that this iproto command has been deprecated and IPROTO_VOTE should be used instead. - Only send an IPROTO_VOTE request to a master if it is running tarantool 1.10.1 or newer.
-
- Jul 20, 2018
-
-
Vladimir Davydov authored
The new command is supposed to supersede IPROTO_REQUEST_VOTE, which is difficult to extend, because it uses the global iproto key namespace. The new command returns a map (IPROTO_BALLOT), to which we can add various information without polluting the global namespace. Currently, the map contains IPROTO_BALLOT_IS_RO and IPROTO_BALLOT_VCLOCK keys, but soon it will be added info needed for replica rebootstrap feature. Needed for #461
-
Kirill Yukhin authored
Schema reference is useless. Remove it.
-
Kirill Yukhin authored
During tnum removal, convertToWithoutRowidtable became redundant. Remove it, refactor addPrimaryIndex. Also fix naming for un-named indexes. Finally, remove iPKey from struct table and update testsuite. Part of #3482
-
N.Tatunov authored
Previously "BEGIN" / "BEGIN TRANSACTION", "COMMIT TRANSACTION" / "END" / "END TRANSACTION", "ROLLBACK TRANSACTION" could be used to handle transactions. By changing these commands syntax in parser we're aiming on getting closer to ANSI SQL. Also found initialization in ifdef that caused some problems with error messages in occasions when the wrong syntax was used. With the patch applied only following commands can be used: - "START TRANSACTION" to begin transaction. - "COMMIT" to end transaction. - "ROLLBACK" to rollback transaction without savepoints. - "ROLLBACK TO .." to rollback transaction to savepoint. Closes #2164
-
N.Tatunov authored
To optimize the select-subquery tarantool uses subquery flattening optimization which is only used with respect to some restrictions. When any of subselects but the last one has an ORDER BY clause we should raise an error. So subquery components containing it are not accepted to be optimized. Checking part was only checking if the last subselect contains the clause which led to an assertion fail. With the patch applied flattening is not used in case any of subselects has an ORDER BY. Closes #3353
-
- Jul 19, 2018
-
-
Kirill Yukhin authored
-
Kirill Yukhin authored
-
Kirill Shcherbatov authored
_say function was called with invalid arguments. Thank @sorc1 for patch. Closes #3433.
-
Olga Arkhangelskaia authored
Strdup may silently fail without any message from tarantool. Patch adds this checks.
-
Olga Arkhangelskaia authored
Mode logging to syslog was broken due to assertion in case ov vaild configuration: box.cfg{log = 'syslog:identity=tarantool'} Closes #3502
-
Kirill Yukhin authored
-
Kirill Shcherbatov authored
Strings containing "true" and "false" were converted to a boolean type when serializing. Fixed. Example: type(yaml.decode(yaml.encode('false'))) == string type(yaml.decode(yaml.encode('true'))) == string Closes #3476.
-
Kirill Yukhin authored
-
Kirill Shcherbatov authored
Function tonumber64 has worked incorrectly with values less than INT64_MAX. Now it works in the interval [INT64_MAX, UINT64_MAX] returning nil otherwise. Closes #3466.
-
Kirill Shcherbatov authored
Net.box didn't pass options containing iterator to server side. There were also invalid results for two :count tests in net.box.result file. Thanks @ademenev for contributing problem and help with problem locating. Closes #3262.
-
Kirill Shcherbatov authored
Parser didn't raise error when DELETE FROM can't find a table specified on statement. As no error was raised, partially-prepared VDBE code seemed to be generated fine, that was not true. Closes #3535, #3511.
-
Kirill Yukhin authored
Before the patch, big integer constants were silently converted to floating point values. Fix that by issuing error message if value doesn't fit in int64_t range. Also, refactor surrounding code as per Tarantool's code style. Closes #2347
-
Vladimir Davydov authored
Currently, this function takes a single boolean argument, but I'm planning to add another one. Since two bool arguments look rather confusing, let's turn this arguments into flags. Needed for #461
-
Konstantin Osipov authored
A small cleanup to avoid a potentially inefficient use of gc_consumer_vclock(). Follow up on a patch for gh-461.
-
Vladimir Davydov authored
In order to check if a replica needs to be rebootstrapped, we need to know the vclock of the oldest WAL stored on the master, but the garbage collector works with signatures and hence can't report the vclock it was last called for. Actually, all gc users have a vclock and can pass it instead of signature so it's pretty easy to switch garbage collection infrastructure to vclock. Needed for #461
-
- Jul 18, 2018
-
-
Vladimir Davydov authored
We will need it in other places.
-
Vladimir Davydov authored
- Remove extra scan of the WAL directory from local_recovery() - we scan the directory in recovery_end_vclock() hence we can skip scan in recover_remaining_wals() by passing scan_dir = false. - Rename recovery_end_vclock() to recovery_scan() to emphasize the fact that this function scans the WAL directory. Write a comment to this function. - Add comments to wal.c explaining why we scan the WAL directory there. Follow-up 0695fbbb ("box: retrieve end vclock before starting local recovery").
-
Vladimir Davydov authored
To bring crash_expected option of "start server" command.
-
Serge Petrenko authored
There were no checks for granting and revoking a non-existent privilege or a privilege to a non-existent entity. Added the checks, and a test case. Closes #3417
-