- 20 Oct, 2020 3 commits
-
-
Aleksey Midenkov authored
For join to work correctly versioning condition must be added to table on_expr. Without that JOIN_CACHE gets expression (1) trigcond(xtitle.row_end = TIMESTAMP'2038-01-19 06:14:07.999999') and trigcond(xtitle.elementId = x.`id` and xtitle.pkey = 'title') instead of (2) trigcond(xtitle.elementId = x.`id` and xtitle.pkey = 'title') for join_null_complements(). It is NULL-row of xtitle for complementing the join and the above comparisons of course FALSE, but trigcond (Item_func_trig_cond) makes them TRUE via its trig_var property which is bound to some boolean properties of JOIN_TAB. Expression (2) evaluated to TRUE because its trig_var is bound to first_inner_tab->not_null_compl. The expression (1) does not evaluate correctly because row_end comparison's trig_var is bound to first_inner->found earlier. As a result JOIN_CACHE::check_match() skipped the row for join_null_complements(). When we add versioning condition to table's on_expr the optimizer in make_join_select() distributes conditions differently. tmp_cond inherits on_expr value and in Good case it is full expression xgender.elementId = x.`id` and xgender.pkey = 'gender' and xgender.row_end = TIMESTAMP'2038-01-19 06:14:07.999999' while in Bad case it is only xgender.elementId = x.`id` and xgender.pkey = 'gender'. Later in Good row_end condition is optimized out and we get one trigcond in form of (2).
-
Thirunarayanan Balathandayuthapani authored
- This issue is caused by commit a4948daf. Purge doesn't free the externally stored page associated with the last record of the root page. In that case, purge thread does empty the root page and leads to more orphaned blob page in the tablespace. Purge thread should free the blob even for the last record of the root page. Reviewed-by: Marko Mäkelä
-
Rucha Deodhar authored
Analysis: When we reach the maximum limit to examine rows killed_state is set as ABORT. But this isn't an actual error and we still return TRUE. This eventually sets error as UNKNOWN ERROR. Fix: Check if need to stop execution by checking the killed state. If we have to abort it, return false because this isn't an actual error.
-
- 16 Oct, 2020 1 commit
-
-
Monty authored
This also fixes some issues with MDEV-23730 s3.replication_partition 'innodb,mix' segv The problem was that mysql_change_partitions() closes all handler files in case of error, which was not properly reflected in fast_alter_partition_table(). This caused handle_alter_part_error() to try to close already closed tables, which caused the crash. Fixed fast_alter_partion_table() to reflect when tables are opened. I also fixed that ha_partition::change_partitions() resets m_new_file in case of errors. Either of the above changes fixes the issue, but both are needed to ensure that the code works as expected.
-
- 07 Oct, 2020 2 commits
-
-
Sergei Golubchik authored
-
Daniel Bartholomew authored
-
- 05 Oct, 2020 4 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 01 Oct, 2020 1 commit
-
-
Marko Mäkelä authored
-
- 30 Sep, 2020 3 commits
-
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
In fts_optimize_remove_table(), InnoDB tries to access the fts_optimize_wq after shutting down the fts optimize thread. This issue caused by the commit a41d4297. Fix should check for fts optimize thread shutdown state before checking fts_optimize_wq.
-
Marko Mäkelä authored
This has been unused from the very beginning (mysql/mysql-server@d5e512ae7e37cd1f70c44a3f12205d70b13118ab).
-
- 29 Sep, 2020 4 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
ibuf_merge_or_delete_for_page(): Do not attempt to invoke ibuf_delete_recs() on a page of the change buffer itself. The caller could already be holding ibuf->index->lock, and an attempt to acquire it in S mode would hang the release server or cause an assertion failure in rw_lock_s_lock_func() in a debug server. This problem was reproducible on 1 out of 2 runs of the following: ./mtr --no-reorder \ innodb.innodb-page_compression_default \ innodb.innodb-page_compression_snappy \ innodb.innodb-page_compression_zip \ innodb.innodb_wl6326_big innodb.xa_recovery
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This was missed in commit 2c252ba9 (MySQL 5.5.42, MariaDB 5.5.42).
-
- 28 Sep, 2020 7 commits
-
-
Sujatha authored
-
Jan Lindström authored
Fix typo.
-
Thirunarayanan Balathandayuthapani authored
MDEV-22277 LeakSanitizer: detected memory leaks in mem_heap_create_block_func after attempt to create foreign key - During online DDL, prepare phase error handler fails to remove the memory allocated for newly created foreign keys.
-
Sujatha authored
-
Jan Lindström authored
This will update galera_3nodes/disabled.def.
-
Vladislav Vaintroub authored
Make open_table() fail if sequence should be opened, but it turns out to be locked view.
-
Sujatha authored
MDEV-22330: mysqlbinlog stops with an error Don't know how to handle column type: 255 meta: 4 (0004) Analysis: ======== "mysqlbinlog -v" option will reconstruct row events and display them as commented SQL statements. If this option is given twice, the output includes comments to indicate column data types and some metadata. `log_event_print_value` is the function reponsible for printing values and their types. This function doesn't handle GEOMETRY type. Hence the above error gets printed. Fix: === Add support for GEOMETRY datatype.
-
- 25 Sep, 2020 1 commit
-
-
Monty authored
The original code was correct. mysql_upgrade calls the mysql client to talk with MariaDB. It doesn't call itself!
-
- 24 Sep, 2020 1 commit
-
-
Daniel Black authored
Appoligies, had a dirty branch before pushing: This reverts commit 053653a2. This reverts commit 0ff89780. This reverts commit 85b08597. This reverts commit f3f45e46. This reverts commit a470b357. This reverts commit f8b8d202. This reverts commit 6b6f066f. This reverts commit a701e9e6. This reverts commit c1698386.
-
- 23 Sep, 2020 7 commits
-
-
Daniel Black authored
-
Daniel Black authored
Leave debian/additions/mysqlreport as #!/usr/bin/perl Acknowledge that `env perl` is a hack, a complete fix needs to consider which path perl is at and insert into these scripts. The usefulness of these scripts is questionable.
-
-
Marko Mäkelä authored
Passing a null pointer to a nonnull argument is not only undefined behaviour, but it also grants the compiler the permission to optimize away further checks whether the pointer is null. GCC -O2 at least starting with version 8 may do that, potentially causing SIGSEGV.
-
Marko Mäkelä authored
Shifting a 16-bit type by 16 bits is undefined behaviour. The result is at least 32 bits, so let us cast the shift operand to a wider type before shifting.
-
Marko Mäkelä authored
For some reason, adding -fsanitize=undefined (cmake -DWITH_UBSAN=ON) to the compilation flags will cause even more warnings to be emitted. The warnings do look bogus, but the code can be simplified.
-
Marko Mäkelä authored
For some reason, adding -fsanitize=undefined (cmake -DWITH_UBSAN=ON) to the compilation flags will cause even more warnings to be emitted. The warning was a bogus one: tests/mysql_client_test.c:8632:22: error: '%d' directive writing between 1 and 11 bytes into a region of size 9 [-Werror=format-overflow=] 8632 | sprintf(field, "c%d int", i); | ^~ tests/mysql_client_test.c:8632:20: note: directive argument in the range [-2147483648, 999] The warning does not take into account that the lower bound of the variable actually is 0. But, we can help the compiler and use an unsigned variable.
-
- 22 Sep, 2020 6 commits
-
-
Marko Mäkelä authored
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
It turns out that we must check for DISCARD TABLESPACE both when the table is being rebuilt and when the AUTO_INCREMENT value of the table is being added. This was caught by the test innodb.alter_missing_tablespace. Somehow I failed to run all tests. Sorry!
-
Marko Mäkelä authored
The statement ALTER TABLE...DISCARD TABLESPACE is problematic, because its designed purpose is to break the referential integrity of the data dictionary and make a table point to nowhere. ha_innobase::commit_inplace_alter_table(): Check whether the table has been discarded. (This is a bit late to check it, right before committing the change.) Previously, we performed this check only in a specific branch of the function commit_set_autoinc(). Note: We intentionally allow non-rebuilding ALTER TABLE even if the tablespace has been discarded, to remain compatible with MySQL. (See the various tests with "wl5522" in the name, such as innodb.innodb-wl5522.) The test case would crash starting with 10.3 only, but it does not hurt to minimize the code and test difference between 10.2 and 10.3.
-