"mtr ctype_ldml" failed when compiled with "gcc -funsigned-char".
Changing the code not to depend on the signed/unsigned compiler defaults
for the "char" data type.
MDEV-4725: Incorrect binlog state recovery if crash while writing event group
The binlog state was not recovered correctly if XA is not used (eg. InnoDB
disabled), or if server crashed in the middle of writing an event group to the
binlog.
With this patch, we ensure that recovery of binlog state is done even if we do
not do the full XA binlog recovery, and we ensure that we only recover fully
written event groups into the binlog state.
- Don't pull out a table out of a semi-join if it is on the inner side of an outer join.
- Make join->sort_by_table= get_sort_by_table(...) call after const table detection
is done. That way, the value of join->sort_by_table will match the actual execution.
Which will allow the code in setup_semijoin_dups_elimination() (search for
"Make sure that possible sorting of rows from the head table is not to be employed."
to see that "Using filesort" is going to be used together with Duplicate Elimination (
and change it to Using temporary + Using filesort)
Analysis: In earlier MySQL 5.6 versions this table innodb_index_stats used to have a foreign key referencing to innodb_table_stats. However, in newer MySQL 5.6 versions this foreign key is removed and if you upgrade, your innodb_table_stats is created by the earlier mariadb version, thus a newer version will complain that the table is incorrectly defined.
Added drop foreign key on mysql_system_tables_fix.sql to be executed on mysql_upgrade.
Analysis: When filespace is extended there is first prepare for IO. But if
posix_fallocate is used there was no complete IO causing assertion
at shutdown indicating that all IO is not finished.
Fix: If posix_fallocate is used to extend the filespace, there
is no need to wait for IO to complete, thus we treat this
operation as a read operation. We need to mark IO as
completed or there would be assertion on shutdown at
fil_node_close_file() because all pending IO is not finished.
There were some places where insufficient locking between
parallel threads could cause invalid memory accesses and
possibly other grief.
This patch adds the missing locking, and moves the locking
into the struct rpl_binlog_state methods to make it easier
to see that proper locking is in place everywhere.
-DINSTALL_SYSCONFDIR/-DDEFAULT_SYSCONFDIR specified
The reason for a bug is in support-files/CMakeLists.txt that tries to
install files in INSTALL_SYSCONF2DIR, without checking whether this
variable is actually defined.
Normally INSTALL_SYSCONF2DIR is always defined if INSTALL_SYSCONFDIR is
defined, and support-files/CMakeLists.txt assumes that. But when one
specifies INSTALL_SYSCONFDIR manually on the command line, this
assumption might be broken.
- make_join_readinfo() has the code that forces use of "Using temporary;
Using filesort" when join buffering is in use.
That code didn't handle all cases, in particular it didn't hande the case
where ORDER BY originally has tables from multiple columns, but the
optimizer eventually figures out that doing filesort() on one table
will be sufficient. Adjusted the code to handle that case.