- Feb 27, 2019
-
-
Mergen Imeev authored
-
- Feb 21, 2019
-
-
Michał Durak authored
Add optional 'chars' parameter to string.strip, string.lstrip and string.rstrip for specifying the unwanted characters. Behavior modeled after the equivalent Python built-ins. Closes: #2977 @TarantoolBot document Title: string.strip(inp, chars) Update the documentation for string.strip, string.lstrip and string.rstrip to reflect the addition of the optional param.
-
- Feb 13, 2019
-
-
Nikita Pettik authored
Replace all usage of sqlite3_, sqlite, SQLite prefixes with simple sql_ All other occurrences of SQLite are substituted with SQL word. SQL test suit is purified as well.
-
- Feb 11, 2019
-
-
Alexander Turenko authored
Nikita Pettik suggests me that free(NULL) is no-op according to POSIX. This is follow up of 9dbcaa3a.
-
- Jan 30, 2019
-
-
Serge Petrenko authored
Make os.exit() call tarantool_exit(), just like the signal handler does. Now on_shutdown triggers are not run only when a fatal signal is received. Closes #1607 @TarantoolBot document Title: Document box.ctl.on_shutdown triggers on_shutdown triggers may be set similar to space:on_replace triggers: ``` box.ctl.on_shutdown(new_trigger, old_trigger) ``` The triggers will be run when tarantool exits due to receiving one of the signals: `SIGTERM`, `SIGINT`, `SIGHUP` or when user executes `os.exit()`. Note that the triggers will not be run if tarantool receives a fatal signal: `SIGSEGV`, `SIGABORT` or any signal causing immediate program termination.
-
Stanislav Zudin authored
The "box.sql.execute('values(blob)')" causes an accert in the expression processing, because the parser doesn't distinguish the keyword "BLOB" from the binary value (in the form X'hex'). This fix adds an additional checks in the SQL grammar. Thus the expressions such as "VALUES(BLOB)", "SELECT FLOAT" and so on are treated as a syntax errors. Closes #3888
-
- Jan 05, 2019
-
-
Alexander Turenko authored
It catched by ASAN at build time (lemon is executed to generate parse.[ch]), so tarantool couldn't be built with -DENABLE_ASAN=ON.
-
- Dec 13, 2018
-
-
Yaroslav Dynnikov authored
Allow exploring rocks documentation locally with `tarantoolctl rocks doc ...` In context of #3753
-
- Nov 15, 2018
-
-
N.Tatunov authored
GLOB is a legacy extension for LIKE from SQLite. As we want our SQL to be close to ANSI SQL & LIKE to depend on collations, we do not want to support it. This patch totally removes it from Tarantool along with any mentions of it. Part of #3589 Part of #3572
-
- Nov 02, 2018
-
-
Georgy Kirichenko authored
As a main part of introducing strict typing in SQL it is required to prohibit typeless columns in parser's grammar. Originally, SQLite simply assigns typeless columns to BLOB affinity. Moreover, due to historical reasons, all columns were stored with <SCALAR> type in Tarantool core (except for <INTEGER> when it comes to primary key). Column type should be defined on table creation. Allowed data types are: <TEXT>, <VARCHAR>, <CHAR>, <BLOB>, <INT[EGER]>, <REAL>, <FLOAT>, <NUMERIC>, <DECIMAL>, <DOUBLE> <DATE> and <DATETIME>. However, still any declared data type is converted to one of <BLOB>, <TEXT>, <REAL> or <INTEGER> affinities. While affinity reaches space format, it is (again) converted to Tarantool's field type. To be more precise, table of conversions: +----------+----------+------------+ | SQL TYPE | AFFINITY | FIELD TYPE | +----------+----------+------------+ | FLOAT | REAL | NUMBER | | REAL | REAL | NUMBER | | DOUBLE | REAL | NUMBER | | NUMERIC | REAL | NUMBER | | DECIMAL | REAL | NUMBER | | INTEGER | INTEGER | INTEGER | | TEXT | TEXT | STRING | | VARCHAR | TEXT | STRING | | CHAR | TEXT | STRING | | BLOB | BLOB | SCALAR | | DATETIME | REAL | NUMBER | | DATE | REAL | NUMBER | | TIME | REAL | NUMBER | +----------+----------+------------+ <VARCHAR> and <CHAR> types should be specified with length (e.g. name VARCHAR(10)), but this length currently is not used when types are processed. Only purpose is to support ANSI syntax. The same for <NUMERIC> and <DECIMAL> - it is allowed to specify scale and precision, but they don't affect the way they are stored in memory. Note that patch is not self-sufficient: a lot of tests still fail due to wrong types conversions. Fix for that comes as next two patches. Closes #3018 Closes #3104 Closes #2494 Closes #3459
-
- Sep 25, 2018
-
-
Serge Petrenko authored
If space.before_replace returns the old tuple, the operation turns into no-op, but is still written to WAL as IPROTO_NOP for the sake of replication. Such a request doesn't have a body, and tarantoolctl failed to parse such requests in `tarantoolctl cat` and `tarantoolctl play`. Fix this by checking whether a request has a body. Also skip such requests in `play`, since they have no effect, and, while we're at it, make sure `play` and `cat` do not read excess rows with lsn>=to in case these rows are skipped. Closes #3675
-
- Sep 22, 2018
-
-
Vladimir Davydov authored
Closes #3311
-
- Sep 19, 2018
-
-
Nikita Pettik authored
As a part of SQL DD integration it is required to substitute SQLite structure representing index with one from Tarantool internals. To make this happen, lets add surrogate space to Table, which will hold array of indexes. Those indexes are not real copies from Tarantool core, but contain only index_def, since only def is useful during query compilation. Note that in new implementation indexes are held as array and added to that array in straight order. In SQLite indexes are arranged in list and added to the head. Hence, the order of indexes is reversed. It results in different query plans: if planner must make choice of two equal indexes, it chooses simply first one. Due to this change, some tests are fixed. Moreover, alongside with substituting index struct, <REINDEX> statement and routine connected with it has been completely removed. Part of #3561
-
- Sep 06, 2018
-
-
Georgy Kirichenko authored
A possibility to build tarantool with included library dependencies. Use the flag -DBUILD_STATIC=ON to build statically against curl, readline, ncurses, icu and z. Use the flag -DOPENSSL_USE_STATIC_LIBS=ON to build with static openssl Changes: * Add FindOpenSSL.cmake because some distributions do not support the use of openssl static libraries. * Find libssl before curl because of build dependency. * Catch all bundled libraries API and export then it in case of static build. * Rename crc32 internal functions to avoid a name clash with linked libraries. Notes: * Bundled libyaml is not properly exported, use the system one. * Dockerfile to build static with docker is included Fixes #3445
-
- Aug 29, 2018
-
-
Nikita Pettik authored
We disabled ALTER TABLE ADD COLUMN long ago (i.e. banned in parser ability to process this statement), but internal functions for handling this routine have remained. This patch removes them as well. Part of #3561
-
- Aug 21, 2018
-
-
Konstantin Belyavskiy authored
During startup tarantoolctl ignores 'pid_file' option and set it to default value. This cause a fault if user tries to execute config with option set. In case of being started with tarantoolctl shadow this option with additional wrapper around box.cfg. Closes #3214
-
Konstantin Belyavskiy authored
Fixing build under FreeBSD: Undefined symbol "iconv_open" Add compile time build check with FindICONV.cmake and a wrapper to import relevant symbol names with include file. Closes #3441
-
Serge Petrenko authored
Tarantoolctl enter didn't check whether connection to a socket was established if a socket file existed. It just executed a local console. Fix this by adding a check and an error, also add a test case. Closes #3364
-
- Aug 20, 2018
-
-
Vladimir Davydov authored
If `tarantoolctl eval` fails, apart from returning 3 and printing the eval error to stderr, tarantoolctl will also emit the following message: Error while reloading config: This message is quite confusing and useless too, as we have the return code for that. Let's zap it. Closes #3560
-
- Aug 16, 2018
-
-
Mergen Imeev authored
According to #3072 log_nonblock cannot be used in given case. This patch set this option to "false". Closes #3348
-
- Aug 15, 2018
-
-
Eugine Blikh authored
`lua_tostring`/`lua_tolstring` ignores metatable/boolean/nil and return NULL, but sometimes it's needed to have similar behaviour, like lua functions tostring. Lua 5.1 and LuaJIT ignores it by default, Lua 5.2 introduced auxilary function luaL_to(l)string with supporting of __tostring. This function is backport of Lua 5.1 "lauxlib.h"s luaL_tostring in the luaT namespace.
-
- Aug 14, 2018
-
-
Kirill Shcherbatov authored
Resolves #3284.
-
- Aug 07, 2018
-
-
Nikita Pettik authored
We always compile with enabled foreign keys constraints. They still can be turned off by <pragma foreign_keys = false> in runtime. Follow-up #3271
-
Nikita Pettik authored
After introducing separate space for persisting foreign key constraints, nothing prevents us from adding ALTER TABLE statement to add or drop named constraints. According to ANSI syntax is following: ALTER TABLE <referencing table> ADD CONSTRAINT <referential constraint name> FOREIGN KEY <left paren> <referencing columns> <right paren> REFERENCES <referenced table> [ <referenced columns> ] [ MATCH <match type> ] [ <referential triggered action> ] [ <constraint check time> ] ALTER TABLE <referencing table> DROP CONSTRAINT <constrain name> In our terms it looks like: ALTER TABLE t1 ADD CONSTRAINT f1 FOREIGN KEY(id, a) REFERENCES t2 (id, b) MATCH FULL; ALTER TABLE t1 DROP CONSTRAINT f1; FK constraints which come with CREATE TABLE statement are also persisted with auto-generated name. They are coded after space and its indexes. Moreover, we don't use original SQLite foreign keys anymore: those obsolete structs have been removed alongside FK hash. Now FK constraints are stored only in space. Since types of referencing and referenced fields must match, and now in SQL only PK is allowed to feature INT (other fields are always SCALAR), some tests have been corrected to obey this rule. Part of #3271
-
- Aug 02, 2018
-
-
Mergen Imeev authored
This patch allow to use option "--language" with "tarantoolctl enter" command. Also default value for language were added in default configuration file. Language is either SQL or Lua. Closes #2385. @TarantoolBot document Title: Language selection for tarantoolctl "enter". User can select either Lua or SQL when he uses tarantoolctl "enter" command. It can be done using "--language=<language>" syntax. Default language is set in tarantoolctl config file. Usage: tarantoolctl enter <app_name> --language=SQL tarantoolctl enter <app_name> --language=Lua
-
- Jul 31, 2018
-
-
Konstantin Nazarov authored
The subcommands are used to create binary rock distributions. In context of #3525
-
Kirill Yukhin authored
This pragma is dead and produces nothing else but segfault. Along w/ this pragma, remove now dead opcodes which set/read schema_version and all related routines. Also, improve opcode generation script. Part of #3541
-
- Jul 27, 2018
-
-
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 20, 2018
-
-
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
-
- Jul 13, 2018
-
-
Ivan Kosenko authored
-
- Jul 09, 2018
-
-
Serge Petrenko authored
Net.box usage for console is deprecated in 1.10, replaced it with console. Closes: #3490
-
- Jul 05, 2018
-
-
Ilya Markov authored
Add propagation to luarocks of --only-server, --server keys. Closes #2640
-
Serge Petrenko authored
There are some hacks to know the instance was run by tarantoolctl, none of them are too reliable, though. This patch introduces 2 environment variables set by tarantoolctl for the instance to know when it's being run or restarted. Closes: #3215 @TarantoolBot document Title: tarantoolctl: document setting environment variables tarantoolctl sets the `TARANTOOLCTL` environment variable when starting an instance, and sets the `TARANTOOL_RESTARTED' environment variable when restarting.
-
- Jun 29, 2018
-
-
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
-
- Jun 28, 2018
-
- Jun 19, 2018
-
-
Nikita Pettik authored
In Tarantool VIEWs are always enabled, so there is no need for such ifdef guards. This patch simply removes them.
-
- May 30, 2018
-
-
Mergen Imeev authored
According to ANSI Standard IS/IS NOT can be used to determine if values is null. At the same time in SQLite3 IS/IS NOT have an additional function - it can be used to check equality of two values. This feature isn't common for different versions of SQL (only in PL/SQL right operand can be NONE, TRUE of FALSE) This patch removes described function.
-
- May 24, 2018
-
-
Kirill Yukhin authored
ANSI SQL allows any of Unicode classes ZI, Zp or Zs to act as white space symbol. Allow this in lexical analyzer. Refactor lexical analyzer routine to follow Tarantool's coding style. Also, remove dead encoding: EBCDIC. Closes #2371
-
- May 15, 2018
-
-
Nikita Pettik authored
SQLite provides kind of statistics concerning data holding in each index and space. It is used to help query planner build optimized plan. Such statistics don't depend on internal index implementation (e.g. B-tree or LSM tree) and contain information concerning tuple distribution. This patch moves members responsible statistics from original SQLite structs to Tarantool ones. To be more precise, now index's opts contains statistics from _stat1 space (arrays of integers and their logarithm approximation) and more sophisticated one from _stat4 (array of samples). It also contains set of flags to turn on/off different optimizations (such as skip-scan). After ANALYZE command is executed, statistics are saved into _sql_stat1 and _sql_stat4 spaces (in order to persist them). However, it should also be loaded into in-memory structs representing indexes. This patch reworks original SQLite routine to load it directly to newly introduced stat struct of index. It is worth mentioning that during update of statistics occurs according to 'everything or nothing' policy: firstly, it is allocated on the region. Then, if there is enough memory for stats of ALL indexes it is copied to the heap. Otherwise, region is truncated and no changes take place. Closes #3253
-
- May 11, 2018
-
-
Nikita Pettik authored
In SQLite OP_AutoCommit opcode used to set transaction operation: BEGIN, ROLLBACK and COMMIT, switching auto-commit flag in VDBE. As for Tarantool, it is confusing, since there are some differences between auto-commit modes: 'INSERT ... VALUES (1), (2), (3)' is one indivisible operation for SQLite, and three operations in real auto-commit mode for Tarantool. To simulate SQLite auto-commit mode, these three insertions are wrapped into one SEPARATE transaction, which is, in fact, not real autocommit mode. So, lets add separate explicit opcodes to BEGIN, ROLLBACK and COMMIT transactions as user's operations. Auto-commit mode is set once at VDBE creation and can be changed only by implicit opcode OP_TTransaction, which is added to each DML statement, or by 'BEGIN' SQL statement.
-