- 02 Feb, 2019 3 commits
-
-
Marko Mäkelä authored
-
Julius Goryavsky authored
This patch contains the port of the MDEV-18379 patch for 10.2 branch, but also includes a number of changes made within MDEV-17835, which are necessary for the normal operation of tests that use IPv6: 1) Currently, the three-node mtr suite for Galera (galera_3nodes) uses a separate IPv6 availability check using the "have_ipv6.inc" file. This check duplicates a more accurate check at suite.pm level, which can be used by including the file "check_ipv6.inc". This patch removes this discrepancy between suites. 2) Fixed numerous bugs in the SST scripts and in the mtr test files (galera_3nodes mtr suite) that prevented the use of Galera with IPv6 addresses. 3) Fixed flaws in the galera_3nodes mtr suite control scripts, because of which they could not work with mariabackup. 4) Fixed flaws in the rsync and mysqldump tests (for galera_3nodes mtr tests suite). These tests were not performed successfully without these fixes. 5) GAL-501 test in the galera_3nodes suite does not contain the option "--bind-address=::" that is needed for the test to work correctly with IPv6 (at least on some systems), since without it the server will not wait for connections on the IPv6 interface. https://jira.mariadb.org/browse/MDEV-18379 and partially https://jira.mariadb.org/browse/MDEV-17835
-
Marko Mäkelä authored
-
- 01 Feb, 2019 7 commits
-
-
Alexey Botchkov authored
No need to lowercase table names on case-sensitive file systems, as the cache won't contain the 'lowercased' table anyway. And it prevents the UPPERCASE.frm from being deleted.
-
Marko Mäkelä authored
Only starting with MariaDB 10.2, the .result file will echo "connect" and "connection" statements. There is no way how the test could have passed on debug builds after commit 1037edcb (which looks like an untested backport from a later version).
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
Problem: ======= Mariabackup incremental prepare creates new tablespace when it encounter new tablespace. It sets the intial size as FIL_IBD_FILE_INITIAL_SIZE (4). But while applying redo log, it tries to access 5th page and then it leads to out of tablespace error. Fix: === While parsing the redo log record, track FSP_SIZE in recv_spaces for the respective space id. Assign the recv_size for the tablespace when it is loaded. Extend the tablespace depends on recv_size while applying the redo log record.
-
Marko Mäkelä authored
-
Vladislav Vaintroub authored
-
Thirunarayanan Balathandayuthapani authored
- Added retry logic if validation of first page fails with checksum mismatch.
-
- 31 Jan, 2019 3 commits
-
-
Vladislav Vaintroub authored
Do not try to write ER_SHUTDOWN error message to socket, when it is forcefully closed by the shutdown. This will avoid the race condition (attempt to write to closed socket, if connection shuts down by itself).
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
- 30 Jan, 2019 2 commits
-
-
Thirunarayanan Balathandayuthapani authored
Analysis: ======== Increasing the length of the indexed varchar column is not an instant operation for innodb. Fix: === - Introduce the new handler flag 'Alter_inplace_info::ALTER_COLUMN_INDEX_LENGTH' to indicate the index length differs due to change of column length changes. - InnoDB makes the ALTER_COLUMN_INDEX_LENGTH flag as instant operation. This is a port of Mysql fix. commit 913071c0b16cc03e703308250d795bc381627e37 Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com> Date: Wed May 30 14:54:46 2018 +0530 BUG#26848813: INDEXED COLUMN CAN'T BE CHANGED FROM VARCHAR(15) TO VARCHAR(40) INSTANTANEOUSLY
-
Vladislav Vaintroub authored
-
- 28 Jan, 2019 2 commits
-
-
Jan Lindström authored
MDEV-15740 Fixes to Galera transaction recovery
-
Jan Lindström authored
MDEV-18379: Unification of check for IPv6
-
- 27 Jan, 2019 3 commits
-
-
Teemu Ollakka authored
-
Teemu Ollakka authored
-
Teemu Ollakka authored
If the TC log did not provide list of XIDs to recover, the commit by XID was skipped during wsrep recovery if binlog emulation was on. However, with wsrep we want to commit every prepared transaction with assigned wsrep XID since the transaction has already been committed in the cluster. Added a special condition to always proceed to commit by XID in xarecover_handlerton() if binlog is off and the recovered transaction has wsrep XID.
-
- 26 Jan, 2019 1 commit
-
-
Julius Goryavsky authored
This patch contains the port of the MDEV-18379 patch for 10.1 branch, but also includes a number of changes made within MDEV-17835, which are necessary for the normal operation of tests that use IPv6: 1) Fixed flaws in the galera_3nodes mtr suite control scripts, because of which they could not work with mariabackup. 2) Fixed numerous bugs in the SST scripts and in the mtr test files (galera_3nodes mtr suite) that prevented the use of Galera with IPv6 addresses. 3) Fixed flaws in tests for rsync and mysqldump (for galera_3nodes mtr tests suite). These tests were not performed successfully without these fixes. 4) Currently, the three-node mtr suite for Galera (galera_3nodes) uses a separate IPv6 availability check using the "have_ipv6.inc" file. This check duplicates a more accurate check at suite.pm level, which can be used by including the file "check_ipv6.inc". This patch removes this discrepancy between suites. 5) GAL-501 test in the galera_3nodes suite does not contain the option "--bind-address=::" which is needed for the test to work correctly with IPv6 (at least on some systems), since without it the server will not wait for connections on the IPv6 interface. https://jira.mariadb.org/browse/MDEV-18379 and partially https://jira.mariadb.org/browse/MDEV-17835
-
- 25 Jan, 2019 8 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
It's too late. Might work or not (and on buster it doesn't).
-
Sergei Golubchik authored
-
Teemu Ollakka authored
Clear wsrep XID in innobase_rollback_by_xid() for recovered wsrep transaction in order to avoid resetting XID storage when rolling back wsrep transaction during recovery. Sort wsrep XIDs read from storage engine in ascending order and erify that the range is continuous during crash recovery. If binlog is off, commit all recovered transactions for continuous seqno range. This is safe because all transactions with wsrep XID have been certified and must be committed in the cluster. On the other hand if binlog is on, respect binlog as a transaction coordinator in order to avoid missing transactions in binlog that have been committed into storage engine .
-
Teemu Ollakka authored
Backported wsrep-recover test from 10.4 to test the wsrep recovery after database shutdown or crash. Renamed the test to wsrep-recover-v25 to avoid conflicts with existing test in 10.4 and to provide coverage for wsrep-API v25 compatible behavior. The test case in 10.2 is simpler because out of order prepare step cannot happen, the commit order critical section is grabbed before prepare phase. Test is not recorded since it does not produce expected result.
-
Eugene Kosov authored
Remove fil_node_t::sync_event. I had a discussion with kernel fellows and they said it's safe to call fsync() simultaneously at least on VFS and ext4. So initially I wanted to disable check for recent Linux but than I realized code is buggy. Consider a case when one thread is inside fsync() and two others are waiting inside os_event. First thread after fsync() calls os_event_set() which is a broadcast! So two waiting threads will awake and may call fsync() at the same time. One fix is to add a notify_one() functionality to os_event but I decided to remove incorrect check completely. Note, it works for one waiting thread but not for more than one. IMO it's ok to avoid existing bugs but there is not too much sense in avoiding possible(!) bugs as this code does. fil_space_t::is_in_rotation_list(), fil_space_t::is_in_unflushed_spaces(): Replace redundant bool fields with member functions. fil_node_t::needs_flush: Replaces fil_node_t::modification_counter and fil_node_t::flush_counter. We need to know whether there _are_ some unflushed writes and we do not need to know _how many_ writes. fil_system_t::modification_counter: Remove as not needed. Even if we needed fil_node_t::modification_counter, every file could have its own counter that would be incremented on each write. fil_system_t::modification_counter is a global modification counter for all files. It was incremented on every write. But whether some file was flushed or not is an internal fil_node_t deal/state and this makes fil_system_t::modification_counter useless. Closes #1061
-
Andrei Elkin authored
MDEV-17803: ulonglongization of table_mapping entry::table_id to fix windows compilation in particular.
-
Marko Mäkelä authored
Add a simplest regression test. Specifically, I want to be sure that SYS_COLUMNS.LEN is increased. Closes #1123
-
- 24 Jan, 2019 11 commits
-
-
Andrei Elkin authored
The problem was originally stated in http://bugs.mysql.com/bug.php?id=82212 The size of an base64-encoded Rows_log_event exceeds its vanilla byte representation in 4/3 times. When a binlogged event size is about 1GB mysqlbinlog generates a BINLOG query that can't be send out due to its size. It is fixed with fragmenting the BINLOG argument C-string into (approximate) halves when the base64 encoded event is over 1GB size. The mysqlbinlog in such case puts out SET @binlog_fragment_0='base64-encoded-fragment_0'; SET @binlog_fragment_1='base64-encoded-fragment_1'; BINLOG @binlog_fragment_0, @binlog_fragment_1; to represent a big BINLOG. For prompt memory release BINLOG handler is made to reset the BINLOG argument user variables in the middle of processing, as if @binlog_fragment_{0,1} = NULL is assigned. Notice the 2 fragments are enough, though the client and server still may need to tweak their @@max_allowed_packet to satisfy to the fragment size (which they would have to do anyway with greater number of fragments, should that be desired). On the lower level the following changes are made: Log_event::print_base64() remains to call encoder and store the encoded data into a cache but now *without* doing any formatting. The latter is left for time when the cache is copied to an output file (e.g mysqlbinlog output). No formatting behavior is also reflected by the change in the meaning of the last argument which specifies whether to cache the encoded data. Rows_log_event::print_helper() is made to invoke a specialized fragmented cache-to-file copying function which is copy_cache_to_file_wrapped() that takes care of fragmenting also optionally wraps encoded strings (fragments) into SQL stanzas. my_b_copy_to_file() is refactored to into my_b_copy_all_to_file(). The former function is generalized to accepts more a limit argument to constraint the copying and does not reinitialize anymore the cache into reading mode. The limit does not do any effect on the fully read cache.
-
Andrei Elkin authored
always logged properly with binlog_row_image=MINIMAL There are two issues fixed in this commit. The first is an observation of a multi-table UPDATE binlogged in row-format in binlog_row_image=MINIMAL mode. While the UPDATE aims at a table with an ON-UPDATE attribute its binlog after-image misses to record also installed default value. The reason for that turns out missed marking of default-capable fields in TABLE::write_set. This is fixed to mark such fields similarly to 10.2's MDEV-10134 patch (db7edfed) that introduced it. The marking follows up 93d1e5ce's idea to exploit TABLE:rpl_write_set introduced there though, and thus does not mess (in 10.1) with the actual MDEV-10134 agenda. The patch makes formerly arg-less TABLE::mark_default_fields_for_write() to accept an argument which would be TABLE:rpl_write_set. The 2nd issue is extra columns in in binlog_row_image=MINIMAL before-image while merely a packed primary key is enough. The test main.mysqlbinlog_row_minimal always had a wrong result recorded. This is fixed to invoke a function that intended for read_set possible filtering and which is called (supposed to) in all type of MDL, UPDATE including; the test results have gotten corrected. At *merging* from 10.1->10.2 the 1st "main" part of the patch is unnecessary since the bug is not observed in 10.2, so only hunks from sql/sql_class.cc are required.
-
Marko Mäkelä authored
Use the same data type 'ulong' to avoid type mismatch on Windows and on 32-bit systems. FIXME: The correct data type should probably be 64-bit.
-
Alexander Barkov authored
MDEV-18195 ASAN use-after-poison in my_strcasecmp_utf8 / Item::eq upon prepared statement with ORDER BY NAME_CONST ASAN noticed a freed memory access during EXECUTE in this script: PREPARE stmt FROM "SELECT 'x' ORDER BY NAME_CONST( 'f', 'foo' )"; EXECUTE stmt; In case of a PREPARE statement, all Items, including Item_name_const, are created on Prepared_statement::main_mem_root. Item_name_const::fix_fields() did not take this into account and could allocate the value of Item::name on a wrong memory root, in this code: if (is_autogenerated_name) { set_name(thd, item_name->c_ptr(), (uint) item_name->length(), system_charset_info); } When fix_fields() is called in the reported SQL script, THD's arena already points to THD::main_mem_root rather than to Prepared_statement::main_mem_root, so Item::name was allocated on THD::main_mem_root. Then, at the end of the dispatch_command() for the PREPARE statement, THD::main_mem_root got cleared. So during EXECUTE, Item::name pointed to an already freed memory. This patch changes the code to set the implicit name for Item_name_const at the constructor time rather than at fix_fields time. This guarantees that Item_name_const and its Item::name always reside on the same memory root. Note, this change makes the code for Item_name_const symmetric with other constant-alike items that set their default implicit names at the constructor call time rather than at fix_fields() time: - Item_string - Item_int - Item_real - Item_decimal - Item_null - Item_param
-
Marko Mäkelä authored
-
Geoff Montee authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
When innobase_allocate_row_for_vcol() returns true (for failure), it may already have invoked mem_heap_create(). However, some callers would fail to invoke mem_heap_free().
-
Andrei Elkin authored
-
Sergei Golubchik authored
pcre needs symbols from pcreposix (but this is only an issue when linking with system static libraries)
-