summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-16327: Server doesn't account for engines that supports OFFSET on their ↵bb-10.5-MDEV-16327-2Oleksandr Byelkin2019-10-116-7/+71
| | | | | | own. Engine get LIMIT/OFFSET info an can it use/reset.
* MDEV-18553: MDEV-16327 pre-requisits part 3: move kill check in one placeOleksandr Byelkin2019-10-115-22/+6
| | | | | Kill check moved from send_data() methids in its wrapper: send_data_with_check().
* MDEV-18553: MDEV-16327 pre-requisits part 2: uniform of LIMIT/OFFSET handlingOleksandr Byelkin2019-10-1114-83/+63
| | | | | | | Now both offset and limit are stored and do not chenged during execution (offset is decreased during processing in versions before 10.5). (Big part of this changes made by Monty)
* MDEV-18553: MDEV-16327 pre-requisits part 1: isolation of LIMIT/OFFSET handlingOleksandr Byelkin2019-10-1118-154/+198
|
* Merge 10.4 into 10.5Marko Mäkelä2019-10-11161-1009/+1467
|\
| * Add encryption.innodb-redo-badkey,strict_full_crc32Marko Mäkelä2019-10-117-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 0f7732d1d1d898f1a9051858932c18bcc9d6f2b4 we introduced a innodb_checksum_algorithm=full_crc32 combination to a number of encryption tests, and also fixed the code accordingly. The default in MariaDB 10.5 is innodb_checksum_algorithm=full_crc32. In a test merge to 10.5, the test encryption.innodb-redo-badkey failed once due to a message that had been added in that commit. Let us introduce a full_crc32 option to that test. And let us use strict_crc32 and strict_full_crc32 instead of the non-strict variants, for the previously augmented tests, to be in line with the earlier tests encryption.corrupted_during_recovery and encryption.innodb_encrypt_temporary_tables.
| * Merge 10.3 into 10.4Marko Mäkelä2019-10-1064-428/+603
| |\
| | * MDEV-19783: Relax an assertionMarko Mäkelä2019-10-101-4/+10
| | | | | | | | | | | | | | | | | | | | | btr_page_get_split_rec_to_left(): Assert that in the leftmost leaf page, if the metadata record exists, index->is_instant() must hold. The assertion of commit 01f45becd1b71433e240959228e35266f271bba1 could fail during innobase_instant_try().
| | * MDEV-19783: Add more assertionsMarko Mäkelä2019-10-103-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_page_get_split_rec_to_left(): Assert that in the leftmost leaf page, the metadata record exists if and only if index->is_instant(). page_validate(): Correct the wording of a message. rec_init_offsets(): Assert that whenever a record is in "instant ALTER" format, index->is_instant() must hold.
| | * Merge 10.2 into 10.3Marko Mäkelä2019-10-1014-189/+162
| | |\
| | | * MDEV-20788: Bogus assertion failure for PAGE_FREE listMarko Mäkelä2019-10-104-168/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In MDEV-11369 (instant ADD COLUMN) in MariaDB Server 10.3, we introduced the hidden metadata record that must be the first record in the clustered index if and only if index->is_instant() holds. To catch MDEV-19783, in commit ed0793e096a17955c5a03844b248bcf8303dd335 and commit 99dc40d6ac2234fa4c990665cc1914c1925cd641 we added some assertions to find cases where the metadata record is missing while it should not be, or a record exists when it should not. Those assertions were invalid when traversing the PAGE_FREE list. That list can contain anything; we must only be able to determine the successor and the size of each garbage record in it. page_validate(), page_simple_validate_old(), page_simple_validate_new(): Do not invoke page_rec_get_next_const() for traversing the PAGE_FREE list, but instead use a lower-level accessor that does not attempt to validate the REC_INFO_MIN_REC_FLAG. page_copy_rec_list_end_no_locks(), page_copy_rec_list_start(), page_delete_rec_list_start(): Add assertions. btr_page_get_split_rec_to_left(): Remove a redundant return value, and make the output parameter the return value. btr_page_get_split_rec_to_right(), btr_page_split_and_insert(): Clean up.
| | | * Fixed feedback_plugin_load to work with staticly loaded pluginMichael Widenius2019-10-101-1/+5
| | | |
| | | * Rename log_make_checkpoint_at() to log_make_checkpoint()Marko Mäkelä2019-10-099-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function was always called with lsn=LSN_MAX. Remove that redundant parameter. Spotted by Thirunarayanan Balathandayuthapani.
| | * | Fix compilation 2 (GCC 9)Aleksey Midenkov2019-10-102-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Fixed warning: -Woverloaded-virtual for GCC 9 (Clang treats it differently) Caused by c9cba59749e1b5a39a9e3a0a5b8bd762507245f9
| | * | Fix Mroonga compilationAleksey Midenkov2019-10-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixed warnings: -Woverloaded-virtual, -Winconsistent-missing-override Caused by c9cba59749e1b5a39a9e3a0a5b8bd762507245f9
| | * | Fix compiler error when using -Wconversion.Jan Lindström2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | /mariadb/10.3/wsrep/wsrep_gtid.c:45:26: error: conversion from 'long int' to 'unsigned int' may change value [-Werror=conversion] 45 | offset = endptr - str;
| | * | MDEV-17333 Assertion in update_auto_increment() upon exotic LOADAleksey Midenkov2019-10-106-5/+76
| | | | | | | | | | | | | | | | | | | | | | | | While `handler::next_insert_id` is restored on duplicate key errors `part_share->next_auto_inc_val` is not restored which causes discrepancy.
| | * | MDEV-19406 Assertion on updating view of join with versioned tableAleksey Midenkov2019-10-105-10/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TABLE::mark_columns_needed_for_update(): use_all_columns() assigns pointer of all_set into read_set and write_set, but this is not good since all_set is changed later by TABLE::mark_columns_used_by_index_no_reset(). Do column_bitmaps_signal() whenever we change read_set/write_set.
| | * | MDEV-16130 wrong error message adding AS ROW START to versioned tableAleksey Midenkov2019-10-104-12/+17
| | | |
| | * | MDEV-16210 FK constraints on versioned tables use historical rows, which may ↵Aleksey Midenkov2019-10-105-29/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cause constraint violation Constraint check is done on secondary index update. F.ex. DELETE does row_upd_sec_index_entry() and checks constraints in row_upd_check_references_constraints(). UPDATE is optimized for the case when order is not changed (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE) and doesn't do row_upd_sec_index_entry(), so it doesn't check constraints. Since for versioned DELETE we do UPDATE actually, but expect behaviour of DELETE in terms of constraints, we should deny this optimization to get constraints checked. Fix wrong referenced table check when versioned DELETE inserts history in parent table. Set check_ref to false in this case. Removed unused dup_chk_only argument for row_ins_sec_index_entry() and added check_ref argument. MDEV-18057 fix was superseded by this fix and reverted. foreign.test: All key_type combinations: pk, unique, sec(ondary).
| | * | versioning test suite fixesAleksey Midenkov2019-10-1035-183/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preparation for MDEV-16210: replace.test: key_type combinations: PK and UNIQUE. foreign.test: Preparation for key_type combinations. Other fixes: * Merged versioning.update2 into versioning.update; * Removed test2 database and done individual drop instead.
| * | | MDEV-19335 adjustment for innodb_checksum_algorithm=full_crc32Marko Mäkelä2019-10-1011-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MDEV-12026 introduced innodb_checksum_algorithm=full_crc32 in MariaDB 10.4, it accidentally added a dependency on buf_page_t::encrypted. Now that the flag has been removed, we must adjust the page-read routine. buf_page_io_complete(): When the full_crc32 page checksum matches but the tablespace ID in the page does not match after decrypting, we should declare it a decryption failure and suppress the page dump output and any attempts to re-read the page.
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-10-1077-417/+727
| |\ \ \ | | |/ /
| | * | After merge fix, this line was removed in adefaefSergey Vojtovich2019-10-091-1/+0
| | | |
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-10-0935-298/+355
| | |\ \ | | | |/
| | | * MDEV-19335 Remove buf_page_t::encryptedThirunarayanan Balathandayuthapani2019-10-096-77/+25
| | | | | | | | | | | | | | | | | | | | The field buf_page_t::encrypted was added in MDEV-8588. It was made mostly redundant in MDEV-12699. Remove the field.
| | | * Merge 10.1 into 10.2Marko Mäkelä2019-10-098-131/+62
| | | |\
| | | | * Merge 5.5 into 10.1Marko Mäkelä2019-10-082-22/+0
| | | | |\
| | | | | * Remove orphan declaration buf_flush_wait_batch_end_wait_only()Marko Mäkelä2019-10-072-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function was declared but not defined in commit 9d6d1902e091c868bb288e0ccf9f975ccb474db9
| | | | * | MDEV-19536 - Server crash or ASAN heap-use-after-free in is_temporary_table /Sergey Vojtovich2019-10-075-64/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_statistics_for_tables_if_needed Regression after 279a907, read_statistics_for_tables_if_needed() was called after open_normal_and_derived_tables() failure. Fixed by moving read_statistics_for_tables() call to a branch of get_schema_stat_record() where result of open_normal_and_derived_tables() is checked. Removed THD::force_read_stats, added read_statistics_for_tables() instead. Simplified away statistics_for_command_is_needed().
| | | | * | Cleanup EITSSergey Vojtovich2019-10-023-47/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved EITS allocation inside read_statistics_for_tables_if_needed(). Removed redundant is_safe argument.
| | | * | | MDEV-19783: Add more REC_INFO_MIN_REC_FLAG checksEugene Kosov2019-10-096-38/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_cur_pessimistic_delete(): code changed in a way that allows to put more REC_INFO_MIN_REC_FLAG assertions inside btr_set_min_rec_mark(). Without that change tests innodb.innodb-table-online, innodb.temp_table_savepoint and innodb_zip.prefix_index_liftedlimit fail. Removed basically duplicated page_zip_validate() calls which fails because of temporary(!) invariant violation. That fixed innodb_zip.wl5522_debug_zip and innodb_zip.prefix_index_liftedlimit
| | | * | | MDEV-19783 Random crashes and corrupt data in INSTANT-added columnsEugene Kosov2019-10-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug affects MariaDB Server 10.3 or later, but it makes sense to improve CHECK TABLE in earlier versions already. page_validate(): Check REC_INFO_MIN_REC_FLAG in the records. This allows CHECK TABLE to catch more bugs.
| | | * | | Add page_has_prev(), page_has_next(), page_has_siblings()Marko Mäkelä2019-10-0913-62/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, InnoDB inefficiently compared the aligned fields FIL_PAGE_PREV, FIL_PAGE_NEXT to the byte-order-agnostic value FIL_NULL. This is a backport of 32170f8c6d55c497ae7a791997e17ff7c992b86f from MariaDB Server 10.3.
| | | * | | MDEV-20574 Position of events reported by mysqlbinlog is wrong with ↵Sachin Setiya2019-10-089-35/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encrypted binlogs, SHOW BINLOG EVENTS reports the correct one. Analysis Mysqlbinlog output for encrypted binary log #Q> insert into tab1 values (3,'row 003') #190912 17:36:35 server id 10221 end_log_pos 980 CRC32 0x53bcb3d3 Table_map: `test`.`tab1` mapped to number 19 # at 940 #190912 17:36:35 server id 10221 end_log_pos 1026 CRC32 0xf2ae5136 Write_rows: table id 19 flags: STMT_END_F Here we can see Table_map_log_event ends at 980 but Next event starts at 940. And the reason for that is we do not send START_ENCRYPTION_EVENT to the slave Solution:- Send Start_encryption_log_event as Ignorable_log_event to slave(mysqlbinlog), So that mysqlbinlog can update its log_pos. Since Slave can request multiple FORMAT_DESCRIPTION_EVENT while master does not have so We only update slave master pos when master actually have the FORMAT_DESCRIPTION_EVENT. Similar logic should be applied for START_ENCRYPTION_EVENT. Also added the test case when new server reads the data from old server which does not send START_ENCRYPTION_EVENT to slave. Master Slave Upgrade Scenario. When Slave is updated first, Slave will have extra logic of handling START_ENCRYPTION_EVENT But master willnot be sending START_ENCRYPTION_EVENT. So there will be no issue. When Master is updated first, It will send START_ENCRYPTION_EVENT to slave , But slave will ignore this event in queue_event.
| | | * | | Fix problem with warnings of new compilers.Oleksandr Byelkin2019-10-042-2/+0
| | | | | |
| | | * | | fix clang warningEugene Kosov2019-10-031-1/+1
| | | | | |
| | | * | | MDEV-20703: mariabackup creates binlog files in server binlog directory on ↵Vlad Lesin2019-10-012-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --prepare --export step When "--export" mariabackup option is used, mariabackup starts the server in bootstrap mode to generate *.cfg files for the certain innodb tables. The started instance of the server reads options from the file, pointed out in "--defaults-file" mariabackup option. If the server uses the same config file as mariabackup, and binlog is switched on in that config file, then "mariabackup --prepare --export" will create binary log files in the server's binary log directory, what can cause issues. The fix is to add "--skip-log-bin" in mysld options when the server is started to generate *.cfg files.
| | * | | | MDEV-20591: Follow-up fixMarko Mäkelä2019-10-091-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | calc_field_event_length(): For type=MYSQL_TYPE_BLOB and meta==0, return 0 instead of *ptr+1. This was noted by -Wimplicit-fallthrough.
| | * | | | MDEV-19238 Mariadb spider - crashes on where nullOleksandr Byelkin2019-10-095-0/+200
| | | | | | | | | | | | | | | | | | | | | | | | (fix and explanation came with MDEV-20753 (duplicate of this bug))
| | * | | | MDEV-20753: Sequence with limit 0 crashes serverOleksandr Byelkin2019-10-093-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | Do not try to push down conditions to engine if query was resolved without tables (and so the engine).
| | * | | | Cast string literal to char* MDEV-20767Seth Shelnutt2019-10-091-1/+1
| | | | | |
| | * | | | MDEV-16239 Many test in rpl suite failssachin2019-10-0814-36/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix rpl_skip_error test. We cant reset Slave_skipped_errors(even with FLUSH STATUS), So instead of absolute slave_skipped_errors we look for delta of slave_skipped_errors Fix rpl.rpl_binlog_errors and binlog_encryption.rpl_binlog_errors We create the $load_file and $load_file2 but we never remove them. Fix rpl_000011.test Instead of real value use delta value , Since flush status wont flush LONGLONG variable. Fix rpl_row_find_row_debug Instead of searching whole log_error_ file we will use search_pattern_in_file which runs pattern search only on latest test run , instead of full file. Fix rpl_ip_mix rpl_ip_mix2 We should call reset slave all because we also want to reset master_host otherwise show slave status wont be empty and making repeat N a failure. Fix rpl_rotate_logs First we have to remove master.info file (cleanup) and second we have to call reset slave all because if we do not call reset slave all then we wont read master.info file beacuse we already have master config in memory. And this makes start slave to pass , which shoud fail becuase its permision is 000 Fix circular_serverid0 test The reason is that ++dbug_rows_event_count == 2 in queue_event does not take --repeat into account. So I have reseted the dbug_rows_event_count in if body.
| | * | | | MDEV-20591 Wrong Number of rows in mysqlbinlog outputSachin2019-10-083-4/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | calc_field_event_length should accurately calculate the size of BLOB type fields, Instead of returning just the bytes taken by length it should return length bytes + actual length.
| | * | | | Cleanup mman.h includesSergey Vojtovich2019-10-0214-39/+0
| | | | | | | | | | | | | | | | | | | | | | | | As it is included from my_global.h already.
| | * | | | MDEV-20684: innodb/query cache use madvise CORE/NOCORE on FreeBSDDaniel Black2019-10-023-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies to large allocations. This maps to the way Linux does it in MDEV-10814 except FreeBSD uses different constants. Adjust error string to match to implementation. Tested on FreeBSD-12.0
| * | | | | MDEV-20782 : Galera test failure on galera_sr.galera_sr_mysqldump_sstJan Lindström2019-10-092-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add auto increment offset save and restore as node(s) are restarted.
| * | | | | MDEV-20780 : Galera test failure on galera_sr.galera_sr_ddl_masterJan Lindström2019-10-092-25/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix wait_condition and use repeatable read with wsrep_sync at the end.
| * | | | | Fix test case wsrep.mdev_6832 we need to wait until wsrep_readyJan Lindström2019-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | is ON before test can end.
| * | | | | MDEV-15528 preparation: Remove a constant parameterMarko Mäkelä2019-10-081-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fsp_free_seg_inode(): Remove the constant parameter log=true. Only fsp_free_page() could also be called with log=false. The dead code was introduced in commit 304ae942f78f231a1f382624cdef9be80b3f5b84 by me, and spotted by Thirunarayanan Balathandayuthapani.