- Oct 15, 2017
-
-
Vladimir Davydov authored
Preparation for converting txn to C. This will help removing exceptions from txn methods. Needed for #2776
-
Vladimir Davydov authored
To convert engine and space infrastructure to C, we need to make txn usable from C code. The only reason why we can't convert txn.cc to C right now is triggers: they are set from alter.cc and may throw exceptions. To handle this, let's make trigger_run() catch all exceptions and return an error code instead. For C++ code, introduce trigger_run_xc() which calls trigger_run() under the hood and throws the exception suppressed by it. Needed for #2776
-
Vladimir Davydov authored
Preparation for converting engine implementation to C. Needed for #2776
-
Vladimir Davydov authored
- Add a return code to both space_foreach() and its callback so that the caller can use it to propagate errors instead of throwing exceptions. - Make space_foreach() exception-free. - Export the function to C. Preparation for converting engine implementation to C. Needed for #2776
-
Vladimir Davydov authored
Preparation for converting engine implementation to C. This will help removing exceptions from engine callbacks. Needed for #2776
-
Vladimir Davydov authored
vy_set_timeout() and vy_set_max_tuple_size() are not supposed to fail. Remove the return code and diag_raise() in the engine wrapper.
-
Vladimir Davydov authored
Needed for #2776
-
Vladimir Davydov authored
Preparation for converting class Engine to plain struct. Needed for #2776
-
Vladimir Davydov authored
engine::createFormat() wasn't such a good idea after all - it's difficult to convert it to C in a neat way: the problem is it may return NULL on success (which it does in case of sysview engine) so to make it exception-free we have to either return the format in an extra argument or allow the engine set this method to NULL. Both ways look ugly. Let's remove engine::createFormat() and oblige engine::createSpace() fully initialize a space, similarly to how it works for indexes. To ease its work, introduce space_create() which initializes engine independent fields (i.e. struct space). While we are at it, let's also - make memtx/vinyl space_vtab private to the engines and export functions to create a memtx/vinyl space; - make struct space initialization code exception-free - after all we are going to convert it to C. Needed for #2776
-
Vladimir Davydov authored
Vinyl engine initialization is done in two steps: first we create the engine class and then we call ->init() method, which creates vinyl environment. There's no reason not to create the environment right in the engine class constructor, so let's move it there and drop ->init(). Also, let's pass engine parameters to the engine constructor, just like we do in case of memtx, instead of reading the config from the engine implementation.
-
Vladimir Davydov authored
To find an engine object, we always use engine_find(), which raises an error if the engine was not found. Sometimes we know for sure that the engine we are looking for exists, in which case we don't need to raise an error. Let's introduce engine_by_name() that just looks up the engine and does nothing else and use it when we are sure that the engine must exist.
-
Vladimir Davydov authored
Rename MemtxEngine, VinylEngine, and SysviewEngine to memtx_engine, vinyl_engine, and sysview_engine as well. Preparation for converting class Engine to plain struct. Needed for #2776
-
Vladimir Davydov authored
IllegalParams and ErrorInjection are not used anymore. Delete them.
-
Vladimir Davydov authored
Preparation for converting space implementation to C. Needed for #2776
-
Vladimir Davydov authored
There are four such functions declared in space.h: space_new index_find_unique index_find_system access_check_space index_find_unique() and access_check_space() are used in the code that is about to be converted to C so for them add exception-free variants (without xc suffix). Preparation for converting space implementation to C. Needed for #2776
-
Vladimir Davydov authored
This function is very unreliable: - it crashes if the space doesn't have indexes; - it only works for memtx spaces, for other engines it throws an exception. Since it is only used in memtx, let's zap it and call index_size() directly.
-
Vladimir Davydov authored
Preparation for converting space implementation to C. Note, all methods that may throw have *_xc suffix. This will help removing exceptions from space callbacks. Needed for #2776
-
Vladimir Davydov authored
Needed for #2776
-
Vladimir Davydov authored
Add index_build_xc() wrapper for C++ code. Preparation for converting index implementation to C. Needed for #2776
-
Vladimir Davydov authored
Preparation for converting index implementation to C. Needed for #2776
-
Vladimir Davydov authored
Add space_cache_find_xc() wrapper for C++ code. Preparation for converting index implementation to C. Needed for #2776
-
Vladimir Davydov authored
Needed for #2776
-
Vladimir Davydov authored
Preparation for converting class Index to plain struct. Note, all methods that may throw have *_xc suffix. This will help removing exceptions from index callbacks. Needed for #2776
-
Vladimir Davydov authored
- Index::findByTuple(), index_is_primary(), index_id() are not used anywhere. - Index::initIterator() is useless - it just throws an exception, child classes can do it themselves. - index_name() is trivial - callers can use index->def->name. Needed for #2776
-
Vladimir Davydov authored
For the sake of aesthetics and consistency with space::def. Needed for #2776
-
Vladimir Davydov authored
Preparation for converting class Index to plain struct. Needed for #2776
-
Vladimir Davydov authored
Preparation for converting class Index to plain struct. Needed for #2776
-
Vladimir Davydov authored
Preparation for converting class Index to plain struct. Needed for #2776
-
Vladimir Davydov authored
Closes #2832
-
- Oct 14, 2017
-
-
Vladislav Shpilevoy authored
Closes #2773
-
Roman Tsisyk authored
After implementing of #2802 many user started to complain about sudden change of _index system space format. Since both formats (new and old) are fully supported it is possible to store part definition in old format if there are no collation or other special options. Make it. Closes #2802
-
Roman Tsisyk authored
- Forbid get(), update(), delete() with NULLS - Improve is_nullable checking in ALTER - Set default value for is_nullable from space:format() - Rename primary_key_validate() to exact_key_validate() Follow up #1557
-
Vladislav Shpilevoy authored
Use extended key parts to compare tuples, containing NULLs in the base key parts. Closes #1557
-
Vladislav Shpilevoy authored
Unique part count is a minimal part count which always is unique. For example, if a secondary index is unique, then unique_part_count == secondary index part count. But if a secondary index is not unique, then unique_part_count == part count of a merged key_def. Needed for #1557
-
Vladislav Shpilevoy authored
Store nullable in field_def, tuple_field, key_def and key_part. Key_def is nullable if at least one part references to a nullable field. Needed for #1557
-
Vladislav Shpilevoy authored
If the only change is a new type of a key_def part and a new type can store values of an old type, then do not rebuild index.
-
Vladislav Shpilevoy authored
Disallow changing field type of space format fields to an incompatible type. For example, forbid changing a type from integer to string, but allow to change from integer to number. If an user adds new fields, then validate existing tuples to be compatible with a new format. Check works in O(N) time and for big spaces can be realy long. But it can be skipped, if conditions below are ok: 1. if space format field count < old tuple format field count. Then field count of all tuples >= new format field count; 2. new fields are indexed or have type ANY. If a field is already indexed, then its type is already validated. If a field has type ANY, then any value is ok. Closes #2800
-
- Oct 13, 2017
-
-
Roman Tsisyk authored
-
Alexandr Lyapunov authored
Fast ucol_strcollUTF8 function was introduced in ICU 50. In older ICU versions we have to use slower ucol_strcollIter with properly initialized UTF8 iterators. Fix #2820
-
- Oct 12, 2017
-
-
Ilya authored
Follow up the previous commit
-