- 07 Oct, 2018 1 commit
-
-
Igor Babaev authored
This was a bug in the code of MDEV-12387 "Push conditions into materialized subqueries". The bug manifested itself in rather rare situations. An affected query must contain IN subquery predicate whose left operand was an outer field of a mergeable derived table or view and right operand was a materialized subquery. The erroneous code in fact stripped off the Item_direct_ref wrapper from the left operand of the IN subquery predicate when building equalities produced by the conversion of the predicate into a semi-join. As a result the left operand was not considered as an outer reference anymore and used_tables() was calculated incorrectly. This caused a crash in the function optimize_keyuse().
-
- 05 Oct, 2018 4 commits
-
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
- remove function prototype for shared memory (no more used), and VIO members that are unused - Do not call DisconnectNamedPipe on pipe handle. CloseHandle() is enough.
-
Vladislav Vaintroub authored
Remove threads that are doing nothing but wait - main thread now handles the connections (if threadpool is used, also threadpool threads would wait for connections) - thread for socket and pipe connections are removed - shutdown thread is now removed, we wait for shutdown notification in main thread as well - kill_server() is also called inside the main thread, after connection loop finished.
-
Marko Mäkelä authored
-
- 04 Oct, 2018 2 commits
-
-
Marko Mäkelä authored
btr_cur_instant_root_init(): Check the "infimum" and "supremum" record strings already here, and not later in btr_cur_instant_root_init(). In this way, we can properly reject files from later versions where instant ALTER TABLE could support further operations that change the format of InnoDB clustered indexes.
-
Marko Mäkelä authored
-
- 03 Oct, 2018 2 commits
-
-
Marko Mäkelä authored
Because changes of the FIL_PAGE_TYPE or PAGE_INSTANT in the root page are not undo-logged, it is possible that the fields suggest that instant ADD COLUMN is in effect, even though no metadata record exists. If the fields are set, proceed to fetch the metadata record. If the metadata record does not exist, return success if !index->is_instant(). Also, check that the "infimum" and "supremum" records carry the strings in the root page. In a later format that supports instant DROP COLUMN, we will have to store more information in the root page, so that index->n_core_null_bytes can be determined accurately.
-
Marko Mäkelä authored
btr_cur_instant_init_low(): If columns were instantly added and dropped, then index->is_instant() might not hold even though the root page type was FIL_PAGE_TYPE_INSTANT. MariaDB 10.3 must refuse to open such files, because instant DROP COLUMN is not supported. Also, refuse to open the table if the metadata record has wrong info OR status bits. Previously, we only refused to open if both bits were wrong.
-
- 02 Oct, 2018 3 commits
-
-
Jan Lindström authored
MDEV-16211 Contents of transaction_registry should not be replicated by Galera
-
Elena Stepanova authored
Addition based on Travis results
-
Sergey Vojtovich authored
truncating a temporary table TRUNCATE expects only one TABLE instance (which is used by TRUNCATE itself) to be open. However this requirement wasn't enforced after "MDEV-5535: Cannot reopen temporary table". Fixed by closing unused table instances before performing TRUNCATE.
-
- 01 Oct, 2018 6 commits
-
-
Elena Stepanova authored
-
Eugene Kosov authored
Patch fixes two bugs: 1) BEGIN_TIMESTAMP of MYSQL.TRANSACTION_REGISTY is '0-0-0' on replication record insertion 2) BEGIN_TIMESTAMP equals COMMMIT_TIMESTAMP in MYSQL.TRANSACTION_REGISTRY Fixed by calling THD::set_time() at appropriate places
-
Alexander Barkov authored
-
Alexander Barkov authored
A cleanup for MDEV-17317 Add THD* parameter into Item::get_date() and stricter data type control to "fuzzydate" Fixing C++ function check_date() to get the "fuzzydate" as date_mode_t rather than ulonglong, so conversion from date_time_t to ulonglong is now done inside C++ check_date(), and no conversion is needed in the callers' code. As an additional safety, modified the code not to pass TIME_FUZZY_DATE to the low level C functions: - check_date() - str_to_datetime() - str_to_time() - number_to_datetime() because TIME_FUZZY_DATE is known only on the C++ level, C functions do not know it. Soon we'll be adding more flags into the C++ level (i.e. to date_time_t), e.g. for rounding. It's a good idea to prevent passing C++ specific flags into pure C routines before this change. Asserts were added into the affected C functions to verify that the caller passed only known C level flags.
-
Sergei Golubchik authored
-
Marko Mäkelä authored
-
- 30 Sep, 2018 3 commits
-
-
Marko Mäkelä authored
rec_offs_nth_extern_old() was introduced in commit a4948daf and never used.
-
Marko Mäkelä authored
-
Alexander Barkov authored
Also fixes: MDEV-17330 Wrong result for 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') Problems: 1. These methods did not take into account the current session date flags and passed date_mode_t(0) to func->get_date(): Type_handler_temporal_result::Item_func_min_max_val_real Type_handler_temporal_result::Item_func_min_max_val_int Type_handler_temporal_result::Item_func_min_max_val_decimal Fixing to pass sql_mode_for_dates(thd) instead of date_mode_t(0). Note, sql_mode_for_dates(thd) is only needed for DATE/DATETIME data types. It is not needed for TIME. So splitting value methods Type_handler_temporal_result::Item_func_min_max_xxx into individual implementations for Type_handler_{time|date|datetime|timestamp}_common and, instead of calling get_date(), reusing inside classes Time(), Date(), Datetime() and their methods to_longlong(). sql_mode_for_dates(thd) is automatically passed to get_date() inside Date() and Datetime() constructors. The switch to classes also fixed the problem reported in MDEV-17330. Type_handler_temporal_result::Item_func_min_max_val_int() used to call TIME_to_ulonglong(), which was not correct for TIME. Changing the code to use Time().to_longlong() solved this. 2. Type_handler_temporal_result::Item_func_min_max_get_date also did not take into account the current session date flags in case of conversion from DATE/DATETIME to time and passed date_mode_t(0) to get_date_native(). Fixing to pass sql_mode_for_dates(thd) in case of conversion from DATE/DATETIME to TIME.
-
- 29 Sep, 2018 1 commit
-
-
Alexander Barkov authored
-
- 28 Sep, 2018 6 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Alexander Barkov authored
-
- 27 Sep, 2018 1 commit
-
-
Alexander Barkov authored
MDEV-15406 NO_ZERO_IN_DATE erroneously affects how CAST(AS DATE) warns about fractional digit truncation
-
- 26 Sep, 2018 2 commits
-
-
Alexander Barkov authored
MDEV-17219 Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning
-
Marko Mäkelä authored
-
- 25 Sep, 2018 1 commit
-
-
Alexander Barkov authored
-
- 24 Sep, 2018 2 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 23 Sep, 2018 6 commits
-
-
Sergei Golubchik authored
storage/rocksdb/rdb_datadic.cc: In member function 'int myrocks::Rdb_key_def::unpack_integer(myrocks::Rdb_field_packing*, Field*, uchar*, myrocks::Rdb_string_reader*, myrocks::Rdb_string_reader*) const' storage/rocksdb/rdb_datadic.cc:1781:1: internal compiler error: Segmentation fault } on ppc64le, ubuntu bionic gcc 7.3.0 and debian stretch gcc 6.3.0 The error happens with -ftree-loop-vectorize when trying to vectorize a particular loop (see Rdb_key_def::unpack_integer()) Compiler gets confused by __attribute__((optimize("O0")) that comes from ha_rocksdb_proto.h. The intention of this __attribute__ was to prevent function from being inlined (see ha_rocksdb.cc). Let's use a more specific attribute that prevents inlining but does not confuse loop vectorizer.
-
Sergei Golubchik authored
-
Jan Lindström authored
-
Sergei Petrunia authored
An error in "group commit with MariaDB's binlog" code: we would flush the WAL even when the transaction did not do any writes (and so the logic in myrocks::Rdb_transaction::commit caused it to rollback).
-
Jan Lindström authored
-
Jan Lindström authored
Reset query cache after every test case and add wait after load infile.
-