trx_purge_free_segment(), trx_purge_truncate_rseg_history():
Replace some unreachable code with debug assertions.
A buffer-fix does prevent pages from being evicted
from the buffer pool; see buf_page_t::can_relocate().
Tested by: Matthias Leich
trx_purge_truncate_history(): Only call trx_purge_truncate_rseg_history()
if the rollback segment is safe to process. This will avoid leaking undo
log pages that are not yet ready to be processed. This fixes a regression
that was introduced in
commit 0de3be8cfd (MDEV-30671).
trx_sys_t::any_active_transactions(): Separately count XA PREPARE
transactions.
srv_purge_should_exit(): Terminate slow shutdown if the history size
does not change and XA PREPARE transactions exist in the system.
This will avoid a hang of the test innodb.recovery_shutdown.
Tested by: Matthias Leich
The CODEOWNERS was added almost 3 years ago but never saw any adoption.
Only one person used it (me) to mark what files I maintain and for which
I wish to review commits. No other maintainers or code paths were added,
so clean it away for clarity.
collations
Analysis:
When we have negative index, the value in array_counter[] array is going to
be -1 at some point ( because in case of negative index in json path, the
initial value for a path with negative index is -<size_of_array>, and as we
move forward in array while parsing it and finding path, this value
increments). Since SKIPPED_STEP_MARK, is maximum uint value, it gets
compared to some int value in the array and eventually equates to -1
and messes with path.
Fix:
Make SKIPPED_STEP_MARK maximum of INT32.
Add Modern Perl headers. Perl 5.16 is still fairly
old from 2012.
Enable UTF-8, warnings and make script 'strict'
Small fixes for perlcritic reported problems and some crashes
I/O layer ":utf8" used at line 268, column 16. Use ":encoding(UTF-8)" to get strict validation. (Severity: 5)
"return" statement with explicit "undef" at line 806, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 6844, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7524, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7527, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7599, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7602, column 4. See page 199 of PBP. (Severity: 5)
Expression form of "eval" at line 7784, column 4. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 7806, column 4. See page 161 of PBP. (Severity: 5)
Glob written as <...> at line 8016, column 25. See page 167 of PBP. (Severity: 5)
"return" statement followed by "sort" at line 9195, column 60. Behavior is undefined if called in scalar context. (Severity: 5)
Expression form of "eval" at line 9846, column 10. See page 161 of PBP. (Severity: 5)
buf_read_page_low(): Remove an error message and a debug assertion
that can be triggered when using innodb_page_size=4k and
innodb_file_per_table=0. In that case, buf_read_ahead_linear()
may be invoked on page 255, which is one less than the first
page of the doublewrite buffer (256).
fil_space_t::flush_freed(): Renamed from buf_flush_freed_pages();
this is a backport of aa45850687 from 10.6.
Invoke log_write_up_to() on last_freed_lsn, instead of avoiding
the operation when the log has not yet been written.
A more costly alternative would be that log_checkpoint() would invoke
this function on every affected tablespace.
buf_read_ahead_linear(): Correct some calculations that were broken
in commit b1ab211dee (MDEV-15053).
Thanks to Daniel Black for providing a test case and initial debugging.
Tested by: Matthias Leich
btr_cur_need_opposite_intention(): Check also page_zip_available()
so that we will escalate to exclusive index latch when a non-leaf
page may have to be split further due to ROW_FORMAT=COMPRESSED page
overflow.
Tested by: Matthias Leich
Command lsof can fail on Debian install.
Revert logic more like old one to make sure that there is no failing
and still does don't boundce on shellcheck.
lunar and manic don't need lsb-base any more.
Add a consistent style of fall though, and add_lsb_base_depends
is called once on the last fall through value.
Remove impish (EOL).
There is several misindentation inside Debian post and pre
installation scripts. False indentation with space
as indent space should be 2 and indentation with tabs.
Derived table creation code would call Field::make_new_field() which would
memcpy the Field object from the source table, including Field::read_stats.
But the temp. table as a whole had table->stats_is_read=false. Which was
correct but not consistent with Field::read_stats and caused an assertion.
Fixed by making sure that Field::read_stats=NULL for fields in the new
temporary (i.e. work) tables.
The problem, introduced in patch for MDEV-26301:
When check_join_cache_usage() decides not to use join buffer, it must
adjust the access method accordingly. For BNL-H joins this means switching
from pseudo-"ref access"(with index=MAX_KEY) to some other access method.
Failing to do this will cause assertions down the line when code that is
not aware of BNL-H will try to initialize index use for ref access with
index=MAX_KEY.
The fix is to follow the regular code path to disable the join buffer for
the join_tab ("goto no_join_cache") instead of just returning from
check_join_cache_usage().