- 18 May, 2019 5 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
* add error for truncation of versioned tables: `ER_TRUNCATE_ILLEGAL_VERS` * make a full table open with `tdc_aquire_share` instead of just `ha_table_exists` check test suites run: main, parts, versioning Closes #785
-
Sergei Golubchik authored
-
Robert Bindar authored
Closes #1212
-
Alexander Barkov authored
Fixing a test failure tokudb.change_column_varbin_descriptor
-
- 17 May, 2019 5 commits
-
-
Marko Mäkelä authored
Always initialize dict_sys.m_initialised.
-
Marko Mäkelä authored
dict_sys.lock(), dict_sys_lock(): Acquire both mutex and latch. dict_sys.unlock(), dict_sys_unlock(): Release both mutex and latch. dict_sys.assert_locked(): Assert that both mutex and latch are held.
-
Marko Mäkelä authored
The magic_n only complicated object destruction and did not serve any useful purpose.
-
Marko Mäkelä authored
dict_sys_t::create(): Renamed from dict_init(). dict_sys_t::close(): Renamed from dict_close(). dict_sys_t::add(): Sliced from dict_table_t::add_to_cache(). dict_sys_t::remove(): Renamed from dict_table_remove_from_cache(). dict_sys_t::prevent_eviction(): Renamed from dict_table_move_from_lru_to_non_lru(). dict_sys_t::acquire(): Replaces dict_move_to_mru() and some more logic. dict_sys_t::resize(): Renamed from dict_resize(). dict_sys_t::find(): Replaces dict_lru_find_table() and dict_non_lru_find_table().
-
Alexander Barkov authored
-
- 16 May, 2019 6 commits
-
-
Sujatha authored
Problem: ======== gcc 8 -O2 seems to indicate a real error for this code: direct_pos= table->file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION; the warning: /mariadb/10.4/sql/rpl_gtid.cc:980:7: warning: 'direct_pos' may be used uninitialized in this function [-Wmaybe-uninitialized] Analysis: ========= 'direct_pos' is a variable which holds 'table_flags'. If this flag is set it means that a record within a table can be directly located by using its position. If this flag is set to '0' means there is no direct access is available, hence index scan must be initiated to locate the record. This direct_pos is used to locate a row within mysql.gtid_slave_pos table for deletion. Prior to the initialization of 'direct_pos' following steps take place. 1. mysql.gtid_slave_pos table is opened and 'table_opened' flag is set to true. 2. State check for mysql.gtid_slave_pos table is initiated. If there is a failure during step2 code will be redirected to the error handling part. This error handling code will access uninitialized value of 'direct_pos'. This results in above mentioned warning. Another issue found during analysis is the error handling code uses '!direct_pos' to identify if the index is initialized or not. This is incorrect. The index initialization code is shown below. if (!direct_pos && (err= table->file->ha_index_init(0, 0))) { table->file->print_error(err, MYF(0)); goto end; } In case there is a failure during ha_index_init code will be redirected to end part which tries to close the uninitialized index. It will result in an assert 10.4/sql/handler.h:3186: int handler::ha_index_end(): Assertion `inited==INDEX' failed. Fix: === Introduce a new variable named 'index_inited'. Set this variable upon successful initialization of index initialization otherwise by default it is false. Use this variable during error handling.
-
Alexander Barkov authored
This patch fixes: - MDEV-19284 INSTANT ALTER with ucs2-to-utf16 conversion produces bad data - MDEV-19285 INSTANT ALTER from ascii_general_ci to latin1_general_ci produces corrupt data These regressions were introduced in 10.4.3 by: - MDEV-15564 Avoid table rebuild in ALTER TABLE on collation or charset changes Changes: 1. Cleanup: Adding a helper method Field_longstr::csinfo_change_allows_instant_alter(), to remove some duplicate code in field.cc. 2. Cleanup: removing Type_handler::Charsets_are_compatible() and static function charsets_are_compatible() and introducing new methods in the recently added class Charset instead: - encoding_allows_reinterpret_as() - encoding_and_order_allow_reinterpret_as() 3. Bug fix: Removing the code that allowed instant conversion for ascii-to->8bit and ucs2-to->utf16. This actually fixes MDEV-19284 and MDEV-19285. 4. Bug fix: Adding a helper method Charset::collation_specific_name(). The old corresponding code in Type_handler::Charsets_are_compatible() was not safe against (badly named) user-defined collations whose character set name can be longer than collation name.
-
Marko Mäkelä authored
row_build_spatial_index_key(): Return early if the column is missing in the table row tuple. This is a regression that was introduced by commit 0e5a4ac2.
-
Sergei Petrunia authored
Step #2: "[ORDER BY ...] LIMIT n" should not prevent EXISTS-to-IN conversion, as long as - the LIMIT clause doesn't have OFFSET - the LIMIT is not "LIMIT 0".
-
Sergei Petrunia authored
Step 1: Removal of ORDER BY [LIMIT] from the subquery should be done earlier and for broader class of subqueries. The rewrite was done in Item_in_subselect::select_in_like_transformer(), but this had problems: - It didn't cover EXISTS subqueries - It covered IN-subqueries, but was done after the semi-join transformation was considered inapplicable, because ORDER BY was present. Remaining issue: - EXISTS->IN transformation happens before check_and_do_in_subquery_rewrites() is called, so it is still prevented by the present ORDER BY.
-
Anel Husakovic authored
-
- 15 May, 2019 3 commits
-
-
Jan Lindström authored
Make sure that SIGNALs are not overwritten before they are received.
-
Oleksandr Byelkin authored
-
Varun Gupta authored
-
- 14 May, 2019 4 commits
-
-
Sergey Vojtovich authored
Use different signal names, so that subsequent WAIT_FOR is not awaken by previous signal.
-
Oleksandr Byelkin authored
MDEV-19277: Add status variable that gets incremented if connection is aborted prior to authentication MDEV-19282: Log more specific warning with log_warnings=2 if connection is aborted prior to authentication
-
Marko Mäkelä authored
In 62d28f83 the CMake variable IS_BIG_ENDIAN became orphaned. Remove it.
-
Jan Lindström authored
In wsrep_plugins_post_init we iterate all theads and if they are galera appliers (wsrep_applier) we init session variables. However, current_thd was not set and recent changes on session variables require holding LOCK_gloal_system_variables mutex. This is 10.4 version.
-
- 13 May, 2019 4 commits
-
-
Varun Gupta authored
-
Sergey Vojtovich authored
With MDEV-19384 fixed FTWRL releases HANDLER locks early, which allows concurrent threads to go. Test case may get stuck on FTWRL waiting for LOCK TABLES.
-
Monty authored
-
Monty authored
- Remove warning about aria_control_file - Write to unique test file Other things: - Fixed typo in aria_chk --help
-
- 11 May, 2019 2 commits
-
-
Varun Gupta authored
So to push index condition for each join tab we have calculate the index condition that can be pushed and then remove this index condition from the original condition. This is done through the function make_cond_remainder. The problem is the function make_cond_remainder does not remove index condition when there is an OR operator. Fixed this by making the function make_cond_remainder to keep in mind of the OR operator. Also updated results for multiple test files which were incorrectly updated by the commit e0c1b3f2 code which was supposed to remove the condition present in the index condition was not getting executed when the condition had OR operator, with AND the pushed index condition was getting removed from where. This problem affects all versions starting from 5.5 but this is a performance improvement, so fixing it in 10.4
-
Monty authored
Problem was that SHOW CREATE didn't remove PAGE_CHECKSUM=1
-
- 10 May, 2019 2 commits
-
-
hygonsoc authored
Signed-off-by: hygonsoc <hygonsoc@gmail.com>
-
Daniel Black authored
For a table column `a`, the above expressions logically equate to false in all cases. With this patch the optimizer knows about this and queries like: SELECT * FROM t1 WHERE a!=a no longer need to evaluate a!=a for every row. The same applies if the expression was `a<a`, or `a>a` An `EXPLAIN SELECT COOUNT(*) FROM t1 WHERE a<a` will show: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Similarly `NOT (a!=a)` is always true. EXPLAIN SELECT COUNT(*) FROM t1 WHERE not (a!=a); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-
- 09 May, 2019 2 commits
-
-
Vladislav Vaintroub authored
With MAX_INDEXIES=64(default), key_map=Bitmap<64> is just a wrapper around ulonglong and thus "trivial" (can be bzero-ed, or memcpy-ed, and stays valid still) With MAX_INDEXES=128, key_map = Bitmap<128> is not a "trivial" type anymore. The implementation uses MY_BITMAP, and MY_BITMAP contains pointers which make Bitmap invalid, when it is memcpy-ed/bzero-ed. The problem in 10.4 is that there are many new key_map members, inside TABLE or KEY, and those are often memcopied and bzeroed The fix makes Bitmap "trivial", by inlining most of MY_BITMAP functionality. pointers/heap allocations are not used anymore.
-
Monty authored
-
- 07 May, 2019 1 commit
-
-
Vladislav Vaintroub authored
-
- 06 May, 2019 5 commits
-
-
Igor Babaev authored
Parenthesis around table names and derived tables should be allowed in FROM clauses and some other context as it was in earlier versions. Returned test queries that used such parenthesis in 10.3 to their original form. Adjusted test results accordingly.
-
Monty authored
The deadlock happened between FTWRL under open HANDLER, LOCK TABLE and DROP DATABASE Fixed by reverting the previous fix for handler open in lock_global_read_lock() Fixed the original (wrong) test case in flush_read_lock.test to be repeatable.
-
Vladislav Vaintroub authored
Windows does atomic writes, as long as they are aligned and multiple of sector size. this is documented in MSDN. Fix innodb.doublewrite test to always use doublewrite buffer, (even if atomic writes are autodetected)
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
Fallback to detecting if TRIM is enabled, if we cannot determine seek penalty.
-
- 05 May, 2019 1 commit
-
-
Marko Mäkelä authored
-