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-38136: Prevent elimination of tables in a FULL OUTER JOIN

Prevent elimination of tables participating in a FULL OUTER JOIN during
eliminate_tables as part of phase one FULL OUTER JOIN development.

Move the functionality gate for FULL JOIN further into the codebase: convert
LEX::has_full_outer_join to a counter so we can see how many FULL JOINs
remain which makes the gate work correctly after simplify_joins and
eliminate_tables are called.

Fixes an old bug where, when running the server as a debug build and in
debug mode, a null pointer deference in
Dep_analysis_context::dbug_print_deps would cause a crash.
Dave Gosselin
MDEV-38508: Constant table detection

If a table that's in a FULL OUTER JOIN is found to be a const
table, then don't allow the constant table optimization to
take place.

Later, when we support FULL OUTER JOIN on the inner side of
other join types then we may be able to relax this restriction.
Vladislav Vaintroub
x
Sergei Petrunia
Update test results
ParadoxV5
Merge branch 'MDEV-39788.test' into MDEV-39788
ParadoxV5
simplify rpl.rpl_read_new_relay_log_info and merge into it

new description for the eventual squashed commit follows–

---

MDEV-39788 found that the recent refactor on the `main` (now 12.3)
branch missed the (inconsistent) detail that, unlike `@@relay_log_info`,
`@@master_info`’s line count _includes_ the line-count line itself.

This commit extends and simplifies the test
`rpl.rpl_read_new_relay_log_info` to `main.rpl_read_new_info` so it
* Checks this detail to remind future changes of this type of mistakes.
* Covers `@@master_info` as well.

While here, this commit also includes a new-format version
of MDEV-39788’s test to double as the value read check.
Sergei Petrunia
Capture more system variables in optimizer_context: sql_mode
ParadoxV5
whoops. (RIP our CI today)
Vladislav Vaintroub
Merge branch '11.4' into 11.8
Dave Gosselin
MDEV-38692: COALESCE() on NATURAL FULL JOIN result sets

FULL JOIN yields result sets with columns from both tables participating in
the join (for the sake of explanation, assume base tables).  However,
NATURAL FULL JOIN should show unique columns in the output.

Given the following query:
  SELECT * FROM t1 NATURAL JOIN t2;
transform it into:
  SELECT COALESCE(t1.f_1, t2.f_1), ..., COALESCE(t1.f_n, t2.f_n) FROM
    t1 NATURAL JOIN t2;

This change applies only in the case of NATURAL FULL JOIN.  Otherwise,
NATURAL JOINs work as they have in the past, which is using columns
from the left table for the resulting column set.
Vladislav Vaintroub
MDEV-14443 - address some review comments and rebase against upstream
Sergei Petrunia
MDEV-39368: Run "SET foreign_key_checks=0" on the replay server.

This is to avoid FK mismatch errors.
Dave Gosselin
MDEV-39746: FULL JOIN with a nested join on the right loses rows

The outermost FULL JOIN's right operand can be a nested join rather
than a single base table.  The parser places the nest on the right
when the outermost FULL JOIN's ON is the last one written, because the
parser keeps the outermost FULL JOIN pending until its ON arrives, and
the inner FULL JOINs reduce first into a nest that becomes the right
operand.
alloc_full_join_duplicate_filters allocates the fj_dups filter on a
JOIN_TAB carrying JOIN_TYPE_FULL | JOIN_TYPE_RIGHT, so with the
FULL|RIGHT bits on the nest, which is never a JOIN_TAB, no filter was
allocated and the null complement pass never fired.  The unmatched
rows from the right side were never emitted, producing a result with
missing rows.

Add swap_full_join_sides, called from rewrite_full_outer_joins
when a FULL JOIN survives simplify_joins with a leaf on the left
and a nested join on the right.  FULL JOIN is symmetric on its
operands, so swapping does not change query semantics; after the
swap the leaf carries the FULL|RIGHT bits and the rescan target
is a single base table.
Sergei Petrunia
main.derived_opt: add a few --disable_replay next_query Need to preserve optimizer trace
Vladislav Vaintroub
MDEV-14443 add replication test for DENY

Verify that DENY is correctly replicated to slave.
Added to rpl suite, since it runs all 3 modes of replication (stmt,mix,row)
Dave Gosselin
Reject a nested join on the right of a rewritten FULL JOIN

check_full_join_base_tables runs before simplify_joins and rejects the
disallowed FULL JOIN shapes that are visible in the parse tree.
simplify_joins can rewrite a FULL JOIN to a LEFT, RIGHT, or INNER
JOIN, so sometimes disallowed queries appear only afterward.

Add check_full_join_after_simplify, called from optimize_inner once
simplify_joins is done, to reject unsupported queries after
rewrite by simplify_joins.
Sergei Petrunia
Capture more system variables in optimizer_context: TIMESTAMP, old_mode.
Vladislav Vaintroub
MDEV-14443 - address some review comments and rebase against upstream
Dave Gosselin
MDEV-39569: Skip FULL JOIN rewrite to inner side of an outer join

Prevent simplify_joins from rewriting a chained FULL JOIN into a query
where a FULL JOIN could end up on the inner side of another outer
join.  Of course, this means that we will have a null complement pass
that the rewritten query would have avoided.  Once we support FULL
JOINs on the inner side of outer joins, in phase 3, then we can relax
this constraint.
Oleg Smirnov
Fix failing tests
Monty
Fixed potential race condition in heap that could cause crash

In case of "create table(..) engine=heap" there is this possible scenaro:
- T1 deletes a row with a blob, that is stored for a later call to
  hp_flush_pending_blob_free(), and then ends the statement.
- T2 does a write of a new row
- T1 calls hp_close() that calls hp_flush_pending_blob_free()
Now T1 and T2 are both working on the same delete list, which can
cause a crash.

Fix is to call hp_flush_pending_blob_free() at external_unlock
(end of statement) so that T1's blobs are freed before T2 can
get a lock on the table.
Sergei Petrunia
MDEV-39412: parse error reading tabs in ranges

Variant 2:
Previous commits have made these fixes:
- Writing JSON does proper escaping,
- Reading JSON doesn't damage characters with wchar_t > 255.

The only thing left to fix is to properly escape the SQL literal when
writing the
  SET @opt_context='json_doc';
statement.

This fixes at least this test: ./mtr --replay-server type_varchar
Vladislav Vaintroub
y
Dave Gosselin
Update table_elim for FULL JOIN base table check

Two EXPLAIN queries in table_elim place a nested join on the right
side of a FULL JOIN.  Phase 2 supports only base tables there, so
check_full_join_base_tables rejects them with
ER_FULL_JOIN_BASE_TABLES_ONLY.
Dave Gosselin
MDEV-39014: FULL JOIN Phase 2

In phase 1, FULL [OUTER] JOIN was only supported when simplify_joins()
could rewrite it into an equivalent LEFT, RIGHT, or INNER JOIN based
on NULL-rejecting WHERE predicates.  Queries that could not be
rewritten raised ER_NOT_SUPPORTED_YET.  (Phase 1 was not released.)

This commit removes that restriction by adding proper support for FULL
JOIN by executing a 'LEFT JOIN pass' that emits matched rows and left
null-complemented rows, then a second "null-complement" pass which
rescans the right table to emit null-complement rows that were never
matched.

FULL JOIN supports nested joins on the left of the FULL JOIN,
NATURAL FULL JOIN, semi-joins, CTEs / derived tables (kept
materialized when they participate in a FULL JOIN), prepared
statements, stored procedures, and aggregates.  Examples:

  SELECT * FROM (d1 FULL JOIN d2 ON d1.a = d2.a)
              FULL JOIN t3 ON d1.a = t3.a;

  SELECT * FROM t1 NATURAL FULL JOIN t2;

  SELECT * FROM t1 INNER JOIN t2 FULL JOIN t3 ON t1.a = t3.a;

  PREPARE st FROM
    'SELECT COUNT(*) FROM t1 FULL JOIN t2 ON t1.a = t2.a';

Limitations:
  - Statistics and cost estimates for the null-complement pass have
    not been fully implemented; the optimizer may under- or
    over-estimate FULL JOIN costs in plans involving multiple
    FULL JOINs.  Again, a follow-up will optimize the cost calculations.
  - Optimizations for constant tables not fully supported.
  - Nested tables on the right side of a FULL JOIN are not yet supported.
Sergei Petrunia
Fixup for: Make INFORMATION_SCHEMA.OPTIMIZER_CONTEXT.CONTEXT binary
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.
copilot-swe-agent[bot]
Address five Copilot review findings
Monty
MDEV-39703 mroonga/storage.fulltext_order_natural_language_mode_different
Removed unnessary show status like "Created_tmp%" test
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.
Vladislav Vaintroub
x
Vladislav Vaintroub
MDEV-14443 DENY statement

Implements DENY/REVOKE DENY and associated tasks.
Vladislav Vaintroub
x
Vladislav Vaintroub
MDEV-14443 - address some review comments

Make sure deny_entry_to_json does not fail in memory allocation,
by providing StringBuffer with a large enough statically allocated
size DENY_JSON_ENTRY_BUFSIZE, currently 1230 bytes.

update_deny_entry() - handle json.append() errors
Vladislav Vaintroub
x
ParadoxV5
didn’t notice that null lists were allowed in pre-12.3
Sergei Petrunia
Update test results
ParadoxV5
MDEV-24646/MDEV-39711: Fix System-Versioned UPDATE with VIRTUAL columns

UPDATEs on System-Versioned Tables used stale data for Row
Format Binary Logging’s after-image, which may be the before-
value (MDEV-39711) or even invalidated memory (MDEV-24646).
Alexey Botchkov
MDEV-37262 XMLISVALID() schema validation function.

XMLVALID function added.