summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* connect.test fixbb-10.4-connectOleksandr Byelkin2019-05-192-0/+7
|
* cleanup: replace a magic constant with a defineSergei Golubchik2019-05-183-2/+4
|
* generalize the error messageSergei Golubchik2019-05-1815-33/+31
|
* MDEV-15966 Behavior for TRUNCATE versioned table is not documented and not ↵Sergei Golubchik2019-05-188-45/+98
| | | | | | | | | | covered by tests * 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
* remove -fno-rttiSergei Golubchik2019-05-187-59/+6
|
* Fix default_password_lifetime message typoRobert Bindar2019-05-184-4/+4
| | | | Closes #1212
* A cleanup for MDEV-19284, MDEV-19285Alexander Barkov2019-05-181-0/+9
| | | | Fixing a test failure tokudb.change_column_varbin_descriptor
* MDEV-19513: Fix the non-debug buildMarko Mäkelä2019-05-171-3/+6
| | | | Always initialize dict_sys.m_initialised.
* MDEV-19513: Rename dict_operation_lock to dict_sys.latchMarko Mäkelä2019-05-1726-252/+169
| | | | | | | | 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.
* MDEV-19513: Remove rw_lock_t::magic_nMarko Mäkelä2019-05-174-43/+1
| | | | | The magic_n only complicated object destruction and did not serve any useful purpose.
* MDEV-19513: Allocate dict_sys staticallyMarko Mäkelä2019-05-1742-882/+660
| | | | | | | | | | | | | | | | | | | | 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().
* MDEV-8919 Wrong result for CAST(9999999999999999999.0)Alexander Barkov2019-05-179-71/+276
|
* MDEV-18970: uninited var can be read in gtid_delete_pending()Sujatha2019-05-161-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* A joint patch for MDEV-19284 and MDEV-19285 (INSTANT ALTER)Alexander Barkov2019-05-168-637/+715
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MDEV-19485: Crash on purge after ADD SPATIAL INDEXMarko Mäkelä2019-05-163-0/+38
| | | | | | | | 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 0e5a4ac2532c64a545796c787354dc41d61d0e62.
* MDEV-19134: EXISTS() slower if ORDER BY is definedSergei Petrunia2019-05-164-20/+82
| | | | | | | 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".
* MDEV-19134: EXISTS() slower if ORDER BY is definedSergei Petrunia2019-05-169-32/+82
| | | | | | | | | | | | | | | | 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.
* Fix echo messageAnel Husakovic2019-05-161-2/+2
|
* MDEV-19423: Galera test failure on galera.MDEV-16509Jan Lindström2019-05-152-2/+6
| | | | | Make sure that SIGNALs are not overwritten before they are received.
* fix the test for windowsbb-10.4-sanjaOleksandr Byelkin2019-05-152-16/+6
|
* Added a 32 bit rdiff for myisam_mrr instead of a 64 bit rdiffVarun Gupta2019-05-153-33/+15
|
* Fixed ya main.flush_read_lock sporadic failureSergey Vojtovich2019-05-142-8/+9
| | | | | Use different signal names, so that subsequent WAIT_FOR is not awaken by previous signal.
* MDEV-19277: Add status variable that gets incremented if connection is ↵Oleksandr Byelkin2019-05-146-6/+108
| | | | | | aborted prior to authentication MDEV-19282: Log more specific warning with log_warnings=2 if connection is aborted prior to authentication
* MDEV-17958: Remove IS_BIG_ENDIANMarko Mäkelä2019-05-141-1/+0
| | | | | In 62d28f83b606510fa2b191d2bb049bbfa78181ab the CMake variable IS_BIG_ENDIAN became orphaned. Remove it.
* MDEV-19404: Assertion failure on !is_thread_specific || ↵Jan Lindström2019-05-141-1/+9
| | | | | | | | | | | (mysqld_server_initialized && thd) 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.
* Fixed myisam_mrr for 32 bit systemsVarun Gupta2019-05-131-2/+2
|
* Fixed main.flush_read_lock sporadic failureSergey Vojtovich2019-05-133-10/+22
| | | | | | 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.
* Removed obsolete file maria_rename.shMonty2019-05-131-17/+0
|
* Make maria-autozerofill a bit more rebustMonty2019-05-132-8/+8
| | | | | | | | - Remove warning about aria_control_file - Write to unique test file Other things: - Fixed typo in aria_chk --help
* MDEV-13628: ORed condition in pushed index condition is not removed from the ↵Varun Gupta2019-05-1121-52/+101
| | | | | | | | | | | | | | | | | WHERE 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 e0c1b3f24246d22e6785315f9a8448bd9a590422 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
* Fixed that storage/funcs tests works with AriaMonty2019-05-11107-15401/+15412
| | | | Problem was that SHOW CREATE didn't remove PAGE_CHECKSUM=1
* add Hygon Dhyana support in check-cpuhygonsoc2019-05-101-0/+3
| | | | Signed-off-by: hygonsoc <hygonsoc@gmail.com>
* MDEV-8553: Impossible where for a!=a, a<a, a>aDaniel Black2019-05-103-1/+126
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* MDEV-19235 MariaDB Server compiled for 128 Indexes crashes at startupbb-10.4-wlad-MDEV-19235Vladislav Vaintroub2019-05-0912-248/+341
| | | | | | | | | | | | | | | | 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.
* Disable 5733_tokudb as the result is not stableMonty2019-05-091-0/+1
|
* MDEV-19403 Remove mysql_secure_installation.plVladislav Vaintroub2019-05-072-391/+1
|
* MDEV-18689 Simple query with extra brackets stopped workingIgor Babaev2019-05-0623-111/+265
| | | | | | | | 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.
* MDEV-19384 Deadlock in FTWRLMonty2019-05-063-3/+83
| | | | | | | | | | | 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.
* Fixes for atomic writes on Windows.Vladislav Vaintroub2019-05-063-1/+11
| | | | | | | | 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)
* MDEV-17380: fix incorrect #ifdefVladislav Vaintroub2019-05-061-1/+5
|
* MDEV-19388 Improve SSD detection on WindowsVladislav Vaintroub2019-05-061-60/+72
| | | | | Fallback to detecting if TRIM is enabled, if we cannot determine seek penalty.
* Fix the Windows buildMarko Mäkelä2019-05-051-0/+0
|
* Merge 10.3 into 10.4Marko Mäkelä2019-05-05125-1722/+1936
|\
| * Restore vars_list destructorSergey Vojtovich2019-05-041-0/+1
| | | | | | | | | | | | | | Regression after reverting fair THD members constructors/destructors. vars_list can be used standalone, in such cases destructor is needed. Part of MDEV-14984 - regression in connect performance
| * Merge 10.2 into 10.3Marko Mäkelä2019-05-0341-479/+406
| |\
| | * MDEV-19385: Inconsistent definition of dtuple_get_nth_v_field()Marko Mäkelä2019-05-0321-358/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The accessor dtuple_get_nth_v_field() was defined differently between debug and release builds in MySQL 5.7.8 in mysql/mysql-server@c47e1751b742454de553937039bbf2bcbe3c6bc7 and a debug assertion to document or enforce the questionable assumption tuple->v_fields == &tuple->fields[tuple->n_fields] was missing. This was apparently no problem until MDEV-11369 introduced instant ADD COLUMN to MariaDB Server 10.3. With that work present, in one test case, trx_undo_report_insert_virtual() could in release builds fetch the wrong value for a virtual column. We replace many of the dtuple_t accessors with const-preserving inline functions, and fix missing or misleadingly applied const qualifiers accordingly.
| | * MDEV-19346: Remove dummy InnoDB log checkpointsMarko Mäkelä2019-05-0315-120/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_checkpoint(), log_make_checkpoint_at(): Remove the parameter write_always. It seems that the primary purpose of this parameter was to ensure in the function recv_reset_logs() that both checkpoint header pages will be overwritten, when the function is called from the never-enabled function recv_recovery_from_archive_start(). create_log_files(): Merge recv_reset_logs() to its only caller. Debug instrumentation: Prefer to flush the redo log, instead of triggering a redo log checkpoint. page_header_set_field(): Disable a debug assertion that will always fail due to MDEV-19344, now that we no longer initiate a redo log checkpoint before an injected crash. In recv_reset_logs() there used to be two calls to log_make_checkpoint_at(). The apparent purpose of this was to ensure that both InnoDB redo log checkpoint header pages will be initialized or overwritten. The second call was removed (without any explanation) in MySQL 5.6.3: mysql/mysql-server@4ca37968da54ddc6b3b6628f41428ddba1c79bb8 In MySQL 5.6.8 WL#6494, starting with mysql/mysql-server@00a0ba8ad92569fcf08212b3b8cf046dc8a0ce10 the function recv_reset_logs() was not only invoked during InnoDB data file initialization, but also during a regular startup when the redo log is being resized. mysql/mysql-server@45e91679832219e2593c77185342f11f85232b58 in MySQL 5.7.2 removed the UNIV_LOG_ARCHIVE code, but still did not remove the parameter write_always.
| | * MDEV-17702 fix unaligned access UB in sint4korr() and similar functionsEugene Kosov2019-05-033-2/+104
| | | | | | | | | | | | | | | Disable (hopefully temprorary) this check. Also add tests for some serialized functions.
| | * MDEV-17008 prepare with datadir, on Windows, does not set ACLVladislav Vaintroub2019-05-021-1/+67
| | | | | | | | | | | | | | | | | | | | | on tablespace files Fix is to always add Full Control for NetworkService account, for every file that copyback/moveback copies around.
| | * MDEV-18544 "missing required privilege PROCESS on *.*" using mariabackup for SSTVladislav Vaintroub2019-05-023-1/+10
| | | | | | | | | | | | | | | | | | | | | If required privilege is missing, dump the output from "SHOW GRANTS" into mariabackup log. This will help troubleshooting, and make the bug reproducible.