Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Dave Gosselin
MDEV-38502: FULL OUTER JOIN get correct sargable condition

Fetches the ON condition from the FULL OUTER JOIN as the sargable condition.
We ignore the WHERE clause here because we don't want accidental conversions
from FULL JOIN to INNER JOIN during, for example, range analysis, as that
would produce wrong results.

GCOV shows that existing FULL OUTER JOIN tests exercise this new codepath.
Marko Mäkelä
recv_sys_t::find_checkpoint_archived(): Add a sanity check
Marko Mäkelä
Improve the checkpoint

TODO:
mysql-test/mtr --mysqld=--innodb-log-archive innodb.insert_into_empty

log0log.cc:1078: Assertion ‘!resize_log.is_opened()’ failed.
buf0flu.cc:1903: InnoDB: Failing assertion: d <= lsn_t{~uint32_t{0}}
Alessandro Vetere
fixup: improve testing strategy, test 64 fields limit

TODO test "illegal" configurations such as:
  1) fields=0,bytes=0,left=1 (left=0 would be same as forcing AHI off)
  2) fields > #fields in the index
  3) bytes > #bytes in the incomplete/target field
Alessandro Vetere
fixup: use 7 bits for fields
Alessandro Vetere
fixup: fix compilation error
Dave Gosselin
MDEV-38502: FULL OUTER JOIN get correct sargable condition

Move the temporary gate against FULL OUTER JOIN deeper into the
codebase, which causes the FULL OUTER JOIN query plans to have
more relevant information (hence the change).  In some cases, the
join order of nested INNER JOINs within the FULL OUTER JOIN changed.

Small cleanups in get_sargable_cond ahead of the feature work in
the next commit.
Marko Mäkelä
Use a less overloaded variable name last_lsn
Sergei Golubchik
MDEV-37832 The IF operator implicitly sets SHARED LOCK

InnoDB was supposed to take shared lock only for reads that are
part of data-modifying statement. 20+ years ago, when this logic
was implemented the only way to check for that was
`sql_command != SQLCOM_SELECT` which is overly broad.

Let's use `is_update_query(sql_command)` instead. It uses per-statement
flag (that didn't exist back then) and is much more fine-grained.

Update main.innodb_mysql_lock2 test changing many test cases that used
to say "this shouldn't take shared lock, but in practice InnoDB does".

Also, remove an impossible condition
`(lock_type == TL_READ_HIGH_PRIORITY && in_lock_tables)`:
this lock level can only come from `SELECT HIGH_PRIORITY`,
and never from `LOCK TABLES` statement.
Brandon Nesterenko
MDEV-38641: Failure of Replication of System Versioning Tables

System versioned table UPDATES would fail to replicate on debug builds
with the debug assertion:

rpl_utility_server.cc:1058: bool RPL_TABLE_LIST::give_compatibility_error(rpl_group_info *, uint): Assertion `m_tabledef.master_column_name[col]' failed.

Though caught with system versioned tables, the problem is
generalizable to any transactions which have multiple Rows_log_events
that update the same table. That is, during the error reporting for
columns which were present in the Rows_log_event but not on the slave
table, there is a debug assertion that validates that the master's
table name exists.  After reporting this error, the pointer to that
master table name is nullified. This means that future Rows_log_events
would not have this table name, and the assertion would fail (release
builds would likely segfault when logging the error).

The fix for this is not to nullify the pointer after reporting the
error, so future Rows_log_events can continue using the pointer to the
master's table name.
Rucha Deodhar
MDEV-38620: Server crashes in setup_returning_fields upon 2nd execution
of multi-table-styled DELETE from a view

Analysis:
The item_list of builtin_select stores the fields that are there in the
RETURNING clause.
During the "EXECUTE" command, a "dummy item" is added into the item_list
of the select_lex(builtin_select) representing DELETE during
Sql_cmd_delete::precheck(). This snippet that adds a dummy item is added
because columnstore needs for temporary table. Results are put into a
temporary table and to create a temporary table we need to know what
columns are there which we get from the select_lex->item_list.
As a result, the item_list now has an item even when there is not really
RETURNING clause, resulting in execution of the setup_returning_fields()
when it should have exited already.

Fix:
Instead of checking whether builint_select's item_list is empty to determine
whether there is RETURNING clause, use a flag.
Sergei Golubchik
MDEV-38365 SHA2 auth plugin crash on large packets

use my_safe_alloca() as the key_len comes directly from the client

Reported by Pavel Kohout, Aisle Research, www.aisle.com
Aleksey Midenkov
MDEV-36876 Crash during the Item_subselect::init - outer_select is NULL

Comparison between vector and scalar is invalid (ER_OPERAND_COLUMNS)
and handled by the parser. The problem is outer_context is missing
because relink_hack() cannot recover it due to
!builtin_select.first_inner_unit() condition. This condition was set
by previous relink hack called for previous expression some(select 1).

Since there can be arbitrary number of such expressions there seems to
be no point in such a limitation. MTR test do not fail without that
condition, so the fix proposes to remove it.
Sergey Vojtovich
MDEV-38471 - funcs_1.processlist_val_no_prot fails sporadically

Test output was affected by incompletely closed preceding connections.

Wait for connections to leave I_S.PROCESSLIST before issuing
SHOW PROCESSLIST.

Also fixes similar failures in funcs_1.processlist_val_ps.
Brandon Nesterenko
MDEV-38609: Master should not fragment replication events based on slave_max_allowed_packet

This commit adds a new variable, binlog_row_event_fragment_threshold,
to define the threshold at which Partial_row_log_events are used
(rather than re-using slave_max_allowed_packet).

TODO: Re-write main git commit message to convey this
Dave Gosselin
MDEV-38508 FULL OUTER JOIN constant table detection

Constant tables are those which have one or zero rows or which appear
to have one or zero rows due to WHERE clause filtering.  Such tables
may appear in a FULL JOIN with the understanding that they may result
in a large NULL complement set of rows from the other table.

This patch makes changes that prevented constant table detection from
working properly, but it doesn't emit any result sets because the
FULL JOIN algorithm hasn't yet been implemented.  Those changes
include:
  - Adding an ON expression to both tables in the full outer join.
  Both tables are outer tables with respect to the other which avoids
  some special cases that might've been needed in make_join_statistics.
  - When a FULL OUTER JOIN can't be rewritten to another JOIN kind, we
  cannot allow the OUTER JOIN to be rewritten to an INNER JOIN
  "accidentally" during simplify_joins (otherwise a wrong result will
  occur) and this will prevent constant tables from being correctly
  detected.

Introduce a new optimizer_switch variable, rewrite_full_joins, and
an accompanying hint, [NO_]REWRITE_FULL_JOINS, to control whether
FULL JOINs are rewritten as LEFT, RIGHT, or INNER JOINs.  Primarily for
testing, this option may be useful in the field as well.  This allows
testing of FULL JOINs that would otherwise be optimized to another
kind of JOIN when a NULL-rejecting WHERE clause permits it.
Thirunarayanan Balathandayuthapani
MDEV-38631 Remove unused FTS debug directives and dead code

Remove several unused debugging preprocessor directives from the FTS
module that were never effectively used for debugging purposes and
represent dead code.

Removed debug directives:
- DEBUG_FTS_SORT_PRINT: FTS sorting debug output macros
- FTS_INTERNAL_DIAG_PRINT: Internal FTS diagnostic printing
- FTS_OPTIMIZE_DEBUG: FTS optimization debugging functions
- MYSQL_STORE_FTS_DOC_ID: Store fts doc id in FTS_DOC_ID field
- FTS_DEBUG: Debug for fulltext index
- FTS_CACHE_SIZE_DEBUG: Assign max and min fulltext cache size
- FTS_MULT_INDEX: Updated fulltext index
- Removed FTS_OPTIMIZE_START_TIME and FTS_OPTIMIZE_END_TIME constants

These debug directives were never properly integrated into the build
system and provided no value for production debugging and also
improves code clarity for the FTS module.
Alessandro Vetere
fixup: solve compilation error, small opt/refactor
Alessandro Vetere
fixup: use alter algorithm=instant lock=none
Alexey Botchkov
MDEV-15479 Empty string is erroneously allowed as a GEOMETRY column value.

Empty string disallowed.
Aleksey Midenkov
MDEV-33985 Server crashes at Item_func_nextval::val_int

Pure aliases are not handled properly by Item_func_nextval::val_int().

add_table_to_list() does not create MDL request for pure aliases,
i.e. when there is no table_list->db set or TL_OPTION_ALIAS was
set. When the expression is not inside CTE the case with empty db is
handled by:

  else if (!lex->with_cte_resolution && lex->copy_db_to(&db))
    DBUG_RETURN(0);

So, table_list gets current database name and the query is failed with
ER_NO_SUCH_TABLE error.

The fix adds the case of is_pure_alias() for
Item_func_nextval::val_int() and fails it with ER_NOT_SEQUENCE2 error.

Note: semantics for TL_OPTION_ALIAS cannot be based on empty db, only
parser can set TL_OPTION_ALIAS as resolve_references_to_cte() relies
on TL_OPTION_ALIAS after copy_db_to().
Alessandro Vetere
fixup: address msvc warnings
Rucha Deodhar
MDEV-38620: Server crashes in setup_returning_fields upon 2nd execution
of multi-table-styled DELETE from a view

Analysis:
The item_list of builtin_select stores the fields that are there in the
RETURNING clause.
During the "EXECUTE" command, a "dummy item" is added into the item_list
of the select_lex(builtin_select) representing DELETE during
Sql_cmd_delete::precheck(). This snippet that adds a dummy item is added
because columnstore needs for temporary table. Results are put into a
temporary table and to create a temporary table we need to know what
columns are there which we get from the select_lex->item_list.
As a result, the item_list now has an item even when there is not really
RETURNING clause, resulting in execution of the setup_returning_fields()
when it should have exited already.

Fix:
Instead of checking whether builint_select's item_list is empty to
determine whether there is RETURNING clause, use a flag.
Rucha Deodhar
MDEV-38620: Server crashes in setup_returning_fields upon 2nd execution
of multi-table-styled DELETE from a view

Analysis:
The item_list of builtin_select stores the fields that are there in the
RETURNING clause.
During the "EXECUTE" command, a "dummy item" is added into the item_list
of the select_lex(builtin_select) representing DELETE during
Sql_cmd_delete::precheck(). This snippet that adds a dummy item is added
because columnstore needs for temporary table. Results are put into a
temporary table and to create a temporary table we need to know what
columns are there which we get from the select_lex->item_list.
As a result, the item_list now has an item even when there is not really
RETURNING clause, resulting in execution of the setup_returning_fields()
when it should have exited already.

Fix:
Instead of checking whether builint_select's item_list is empty to
determine whether there is RETURNING clause, use a flag.
Alessandro Vetere
fixup: align index_ahi_option with debug version
Aleksey Midenkov
MDEV-33289 INTERVAL partitioning by system time does not work close to the end of timestamp range

1. Fix empty part_elem->id in prep_alter_part_table().

  On auto-create newly added partition has id 0. It came from
  set_up_default_partitions() for new part_info
  (thd->work_part_info). vers_update_el_ids() can work only with
  unassigned ids (UINT_MAX32), so we assign it explicitly on pushing
  into tab_part_info.

2. If range value is out of TIMESTAMP_MAX_VALUE set it to
  TIMESTAMP_MAX_VALUE, but only if the history partition is the last
  one, otherwise push ER_DATA_OUT_OF_RANGE. Error is to create
  multiple out-of-range partitions (e.g. with PARTITIONS clause in
  CREATE TABLE).
Brandon Nesterenko
MDEV-38625: Mariadb-binlog cant filter partial_log_events

When mysqlbinlog is configured with --database or --table filters, they
wouldn't work on Partial_rows_log_events. The code didn't examine the
inner Rows_log_event within a Partial_rows_log_event to extract the
database/table information to check against the m_table_map_ignored
to see if filtering should take place.

This patch adds in this functionality, when the first
Partial_rows_log_event is processed, the headers from the inner
Rows_log_event are extracted to compare against the m_table_map_ignored
Alexey Botchkov
MDEV-15479 Empty string is erroneously allowed as a GEOMETRY column value.

Empty string disallowed.
Sergei Golubchik
MDEV-38532 followup

include private server headers into libmariadbd-dev,
where plugin server headers already were.
Not in libmariadb-dev. It's different from RPMs, but
RPMs don't have a dedicated embedded devel package.
Sergey Vojtovich
MDEV-38076 - main.mdev375 fails sporadically

Test was affected by incompletely closed preceding connections.

Wait for preceding connections to decrement Threads_connected
before testing ER_CON_COUNT_ERROR condition.
Alessandro Vetere
fixup: add todo move to bit 31
Sergei Golubchik
MDEV-38283 Incorrect results for NULLIF function

narrow a historical hack in convert_const_compared_to_int_field()
to apply only to bigint-vs-string comparison as it was supposed to.
Aleksey Midenkov
MDEV-32724 Segmentation fault due to Deep Recursion in table.cc and sql_lex.cc

Recursive CTE wrongly detected anchor because inner non-recursive CTE
wrongly assigned with-element table to itself due to inner-outer name
clash.
Sergei Golubchik
MDEV-35541 UBSAN: runtime error: addition of unsigned offset to X overflowed to Y in my_b_flush_io_cache

/home/buildbot/server/mysys/mf_iocache.c:1793:39: runtime error: addition of unsigned offset to 0x7e1586a239fb overflowed to 0x7e1586a239fa
SUMMARY: UndefinedBehaviorSanitizer: pointer-overflow /home/buildbot/server/mysys/mf_iocache.c:1793:39
Sergei Golubchik
MDEV-27277 update test results
Oleg Smirnov
MDEV-38129 Match probability