summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-19831 find_select_handler() now tries its best to find a handlerton ↵bb-10.4-MDEV-19831_2Roman Nozdrin2019-08-242-1/+3
| | | | | | that is able to processes the whole query. For that it traverses tables from subqueries. Select_handler now cleans up temporary table structures on dctor call.
* Merge 10.3 into 10.4Marko Mäkelä2019-08-1495-995/+1927
|\
| * MDEV-20336 Assertion bitmap_is_set(read_partitions) upon SELECT FOR UPDATE ↵Aleksey Midenkov2019-08-144-3/+28
| | | | | | | | | | | | | | | | | | | | | | from versioned table Exclude SELECT and INSERT SELECT from vers_set_hist_part(). We cannot likewise exclude REPLACE SELECT because it may REPLACE into itself (and REPLACE generates history). INSERT also does not generate history, but we have history modification setting which might be interfered.
| * MDEV-18862 Unfortunate error message upon attempt to drop system versioningAleksey Midenkov2019-08-144-7/+5
| | | | | | | | Fix error code.
| * Merge 10.2 to 10.3Marko Mäkelä2019-08-1381-984/+1700
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2019-08-131-1/+1
| | |\
| | | * MDEV-20138 innodb.trx_id_future fails on big-endianMarko Mäkelä2019-08-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip the test on big-endian systems. In MariaDB Server 10.0 and 10.1 (as well as MySQL 5.6), the implementation of innodb_checksum_algorithm=crc32 wrongly assumes little-endian byte order.
| | | * MDEV-20335: Extra trans_commit_stmt after rollback caused by incorrect fix ↵Jan Lindström2019-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | of MDEV-14401 Fix incorrect else that should have been else if.
| | * | MDEV-20060: Remove bogus unit from error messageMarko Mäkelä2019-08-131-1/+1
| | | |
| | * | MDEV-20310: Make InnoDB crash tests Valgrind-friendlyMarko Mäkelä2019-08-135-148/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use DEBUG_SYNC to hang the execution at the interesting point, and then kill and restart the server externally. This will work also with Valgrind. DBUG_SUICIDE() causes Valgrind to hang, and it could also cause uninteresting reports about memory leaks. While we are at it, let us clean up innodb.innodb_bulk_create_index_debug so that it will actually test the desired functionality also in future versions (with instant ADD COLUMN and DROP COLUMN) and avoid some unnecessary restarts. We are adding two DEBUG_SYNC points for ALTER TABLE, because there were none that would be executed right before ha_commit_trans().
| | * | MDEV-20324: Galera threads are not registered to performance schemaJan Lindström2019-08-137-7/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Galera threads were not registered to performance schema and used pthread_create when mysql_thread_create should have been used. Added test case to verify current galera performance schema instrumentation does work.
| | * | MDEV-17847 Galera test failure on MW-328[A|B|C]Jan Lindström2019-08-1310-28/+55
| | | | | | | | | | | | | | | | Test changes only.
| | * | MDEV-17614: After-merge fixMarko Mäkelä2019-08-1211-259/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-17614 flags INSERT…ON DUPLICATE KEY UPDATE unsafe for statement-based replication when there are multiple unique indexes. This correctly fixes something whose attempted fix in MySQL 5.7 in mysql/mysql-server@c93b0d9a972cb6f98fd445f2b69d924350f9128a caused lock conflicts. That change was reverted in MySQL 5.7.26 in mysql/mysql-server@066b6fdd433aa6673622341f1a2f0a3a20018043 (with a substantial amount of other changes). In MDEV-17073 we already disabled the unfortunate MySQL change when statement-based replication was not being used. Now, thanks to MDEV-17614, we can actually remove the change altogether. This reverts commit 8a346f31b913daa011085afec2b2d38450c73e00 (MDEV-17073) and mysql/mysql-server@c93b0d9a972cb6f98fd445f2b69d924350f9128a while keeping the test cases.
| | * | Merge 10.1 into 10.2Marko Mäkelä2019-08-1222-92/+452
| | |\ \ | | | |/
| | | * Merge 5.5 into 10.1Marko Mäkelä2019-08-122-2/+10
| | | |\
| | | | * Fix -Wimplicit-fallthroughMarko Mäkelä2019-08-121-1/+3
| | | | |
| | | | * Document TRASH_FILL, TRASH_ALLOC, TRASH_FREEMarko Mäkelä2019-08-121-1/+9
| | | | |
| | | | * bump the VERSIONDaniel Bartholomew2019-07-311-1/+1
| | | | |
| | | * | MDEV-17614: Re-record a resultMarko Mäkelä2019-08-121-0/+2
| | | | |
| | | * | MDEV-17614 INSERT on dup key update is replication unsafeSachin2019-08-099-74/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem:- When mysql executes INSERT ON DUPLICATE KEY INSERT, the storage engine checks if the inserted row would generate a duplicate key error. If yes, it returns the existing row to mysql, mysql updates it and sends it back to the storage engine.When the table has more than one unique or primary key, this statement is sensitive to the order in which the storage engines checks the keys. Depending on this order, the storage engine may determine different rows to mysql, and hence mysql can update different rows.The order that the storage engine checks keys is not deterministic. For example, InnoDB checks keys in an order that depends on the order in which indexes were added to the table. The first added index is checked first. So if master and slave have added indexes in different orders, then slave may go out of sync. Solution:- Make INSERT...ON DUPLICATE KEY UPDATE unsafe while using stmt or mixed format When there is more then one unique key. Although there is two exception. 1. Auto Increment key is not counted because Innodb will get gap lock for failed Insert and concurrent insert will get a next increment value. But if user supplies auto inc value it can be unsafe. 2. Count only unique keys for which insertion is performed. So this patch also addresses the bug id #72921
| | | * | MDEV-20247 Replication hangs with "preparing" and never startsbb-10.1-MDEV-20247Thirunarayanan Balathandayuthapani2019-08-074-6/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The commit ab6dd774082c57f48d998e03655c06b672799b2d wrongly sets the condition inside innobase_srv_conc_enter_innodb(). Problem is that InnoDB makes the thread to sleep indefinitely if it is a replication slave thread. Thanks to Sujatha Sivakumar for contributing the replication test case.
| | | * | MDEV-18930: Failed CREATE OR REPLACE TEMPORARY not written into binary log ↵Sujatha2019-08-053-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | makes data on master and slave diverge Problem: ======= Failed CREATE OR REPLACE TEMPORARY TABLE statement which dropped the table but failed at a later stage of creation of temporary table is not written to binarylog in row based replication. This causes the slave to diverge. Analysis: ======== CREATE OR REPLACE statements work as shown below. CREATE OR REPLACE TABLE table_name (a int); is basically the same as: DROP TABLE IF EXISTS table_name; CREATE TABLE table_name (a int); Hence every CREATE OR REPLACE TABLE command which dropped the table should be written to binary log, even when following CREATE TABLE part fails. In order to achieve this, during the execution of CREATE OR REPLACE command, when a table is dropped 'thd->log_current_statement' flag is set. When table creation results in an error within 'mysql_create_table' code, the error handling part looks for this flag. If it is set the failed CREATE OR REPLACE statement is written into the binary log inspite of error. This ensure that slave doesn't diverge from the master. In case of row based replication the error handling code returns very early, if the table is of type temporary. This is done based on the assumption that temporary tables are not replicated in row based replication. It fails to handle the cases where a temporary table was created as part of statement based replication at an earlier stage and the binary log format was changed to row because of an unsafe statement. In this case when a CREATE OR REPLACE statement is executed on this temporary table it will dropped but the query will not be written to binary log. Hence slave diverges. Fix: === In error handling code check the return status of create table operation. If it is successful and replication mode is row based and table is of type temporary then return. Other wise proceed further to the code which checks for thd->log_current_statement flag and does appropriate logging.
| | | * | MDEV-17638 Improve error message about corruption of encrypted pagebb-10.1-MDEV-17638-improve-warningEugene Kosov2019-08-011-1/+2
| | | | | | | | | | | | | | | | | | | | Help user distinguish between space ID and page number.
| | | * | bump the VERSIONDaniel Bartholomew2019-07-311-1/+1
| | | | |
| | | * | Fix extra space in mysql-test READMEAnel Husakovic2019-07-311-2/+2
| | | | |
| | | * | List of unstable tests for 10.1.41 release (updated)mariadb-10.1.41Elena Stepanova2019-07-261-11/+27
| | | | |
| | * | | Fixed issues found by valgrindMonty2019-08-126-42/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - mysqltest didn't free read_command_buf - wait_for_slave_param did write different things to the log if valgrind was used. - Table open cache should not write the initial variable value as it can depend on the configuration or if valgrind is used - A variable in GetResult was used uninitalized
| | * | | MDEV-16955: rocksdb_sys_vars.rocksdb_update_cf_options_basicSergei Petrunia2019-08-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... produces "bytes lost" warnings When rocksdb_validate_update_cf_options() returns an error, the update won't happen. Free the copy of the string in this case.
| | * | | Fixed assertion Assertion `!table->pos_in_locked_tables' failedMonty2019-08-085-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-17717 Assertion `!table->pos_in_locked_tables' failed in tc_release_table on flushing RocksDB table under SERIALIZABLE MDEV-17998 Deadlock and eventual Assertion `!table->pos_in_locked_tables' failed in tc_release_table on KILL_TIMEOUT MDEV-19591 Assertion `!table->pos_in_locked_tables' failed in tc_release_table upon altering table into S3 under lock. The problem was that thd->open_tables->pos_in_locked_tables was not reset when alter table failed to reopen a locked table.
| | * | | Fixed some errors & warnings found by clangMonty2019-08-085-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - pcretest.c could use macro with side effect - maria_chk could access freed memory - Initialized some variables that could be accessed uninitalized - Fixed compiler warning in my_atomic-t.c
| | * | | Fixed connect_debug.test to not depend on system error messageMonty2019-08-081-0/+1
| | | | |
| | * | | Updated BUILD/compile-pentium64-asan-maxMonty2019-08-081-1/+1
| | | | |
| | * | | revert accidental libmariadb changeEugene Kosov2019-08-081-0/+0
| | | | |
| | * | | MDEV-20060: Failing assertion: srv_log_file_size <= 512ULL << 30 while ↵Vlad Lesin2019-08-0710-16/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | preparing backup The general reason why innodb redo log file is limited by 512G is that log_block_convert_lsn_to_no() returns value limited by 1G. But there is no need to have unique log block numbers in log group. The fix removes 512G limit and limits log group size by (uint32_t maximum value) * (minimum page size), which, in turns, can be removed if fil_io() is no longer used for innodb redo log io.
| | * | | fix build (-Werror + -Wignored-qualifiers)Eugene Kosov2019-08-062-12/+0
| | | | |
| | * | | Cleanup: this is how to use spanEugene Kosov2019-08-051-32/+28
| | | | |
| | * | | MDEV-20103 add a class similar to std::spanEugene Kosov2019-08-051-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-owning reference to elements. Use it as function argument instead of pointer+size pair or instead of const std::vector<T>. Do not use it for strings! More info is here http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines Or just google about it.
| | * | | MDEV-20227: rocksdb.rocksdb_concurrent_delete fails on windowsSergei Petrunia2019-08-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A combination of: * lots of include'd test files where each has "--source include/have_rocksdb.inc" * for each such occurrence, MTR adds testsuite's arguments into server arguments * which hits some limit on the length of argv array on Windows, causing the server to get garbage data in the last argument. Work around this by commenting out one of the totally redundant "source include/have_rocksdb.inc" lines.
| | * | | Post-merge fixes for rocksdb.group_min_max testSergei Petrunia2019-08-044-360/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the LooseScan code to support storage engines that return HA_ERR_END_OF_FILE if the index scan goes out of provided range bounds - Add a DBUG_EXECUTE_IF("force_group_by",...) to allow a test to force a LooseScan - Adjust rocksdb.group_min_max test not to use features not present in MariaDB 10.2 (e.g. optimizer_trace. In MariaDB 10.4 it's present but it doesn't meet the assumptions that the test makes about it - Adjust the test result file: = MariaDB doesn't support "Enhanced Loose Scan" that FB/MySQL has = MariaDB has different cost calculations.
| | * | | bump the VERSIONDaniel Bartholomew2019-07-311-1/+1
| | | | |
| | * | | List of unstable tests for 10.2.26 release (updated)mariadb-10.2.26Elena Stepanova2019-07-271-13/+30
| | | | |
| * | | | MDEV-20138 innodb.trx_id_future fails on 10.3+Marko Mäkelä2019-08-132-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with MDEV-12288 in MariaDB Server 10.3, the transaction identifiers on records will be reset on purge. Because purge might or might not run to completion before shutdown, it could happen that the bogus transaction identifier that our test is writing will be reset by purge after restart, and the expected warning message on SELECT will fail to appear. We resolve the race condition by ensuring that purge runs to completion before the shutdown.
| * | | | Fixing `MDEV-20303 SPACE(-1) returns a wrong data type` compilation problem ↵Alexander Barkov2019-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | in Windows
| * | | | MDEV-17609 mysql client sets wrong application name for Readline libraryAleksey Midenkov2019-08-111-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialize_readline() is called with full pathname of executable which sets rl_readline_name to that value. It is expected that rl_readline_name is initialized with static name not depending on the file name at all. Needed for setting custom hotkeys in .inputrc
| * | | | MDEV-18154 Deadlock and assertion upon no-op ALTER under LOCK TABLESAleksey Midenkov2019-08-114-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Fix DBUG_ASSERT(!table->pos_in_locked_tables) in tc_release_table(); 2. Fix access of prematurely freed MDL_ticket: don't close ticket if table was not closed; 3. Fix deadlock after erroneous ALTER. mysql_alter_table() leaves dirty table->m_needs_reopen in case of error exit which then incorrectly treated by mysql_lock_tables().
| * | | | MDEV-19127 Assertion `row_start_field' failed in vers_prepare_keys upon ↵Aleksey Midenkov2019-08-114-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALTER TABLE Prevent conflicting clauses at parser level. Clear HA_VERSIONED_TABLE flag for DROP SYSTEM VERSIONING (for the sake of strictness).
| * | | | MDEV-18862 Unfortunate error message upon attempt to drop system versioningAleksey Midenkov2019-08-114-2/+42
| | | | | | | | | | | | | | | | | | | | Special case for DROP PERIOD when system fields are implicit.
| * | | | MDEV-19304 Segfault in ALTER TABLE after UPDATE for SIMULTANEOUS_ASSIGNMENTAleksey Midenkov2019-08-113-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For MODE_SIMULTANEOUS_ASSIGNMENT it is required to return back field offsets from record[1] to record[0]. 'continue' in warning branch did skip of rfield->move_field_offset() call.
| * | | | MDEV-20068 History partition rotation is not done under LOCK TABLESAleksey Midenkov2019-08-113-2/+38
| | | | | | | | | | | | | | | | | | | | Wrong value F_WRLCK for thr_lock_type.
| * | | | MDEV-17613 MIN/MAX Optimization (Select tables optimized away) does not workAleksey Midenkov2019-08-114-6/+63
| | | | | | | | | | | | | | | | | | | | Prune to now-partition when there is no FOR SYSTEM_TIME clause.