Skip to content

MDEV-40946 Two heap blob tests fail with the embedded server - #5613

Closed
arcivanov wants to merge 1 commit into
MariaDB:bb-blob-main-montyfrom
arcivanov:MDEV-40946
Closed

MDEV-40946 Two heap blob tests fail with the embedded server#5613
arcivanov wants to merge 1 commit into
MariaDB:bb-blob-main-montyfrom
arcivanov:MDEV-40946

Conversation

@arcivanov

Copy link
Copy Markdown
Contributor

Fixes MDEV-40946. Base is bb-blob-main-monty at 5847c1aab08, the commit the failures were reported against.

Neither failure is a HEAP blob defect. Each test exercises a server facility that is compiled out of libmysqld, so the test cannot run there at all.

INSERT DELAYED has no delayed insert thread in an embedded build. The whole Delayed_insert facility in sql/sql_insert.cc sits inside #ifndef EMBEDDED_LIBRARY, including the check that routes a delayed statement away from the ordinary insert path, so the statement is an ordinary insert, no delayed thread runs, and DELAYED_WRITES stays at 0. That is the reported 1 -> 0 diff.

ALTER TABLE ... LOCK=NONE is never online in an embedded build. In mysql_alter_table(), online is hard-wired to false when HAVE_REPLICATION is undefined, and include/my_global.h leaves it undefined for EMBEDDED_LIBRARY. The MDL downgrade block that carries DEBUG_SYNC(thd, "alter_table_online_downgraded") is itself inside #ifdef HAVE_REPLICATION, so the sync point is never reached and the test's WAIT_FOR downgraded runs out its debug_sync timeout, emitting Warning 1639. That one test took 300 seconds under the embedded server against 8 ms normally.

Both tests are therefore skipped with include/not_embedded.inc, as main.delayed, main.alter_table_online_debug and main.vector_debug already are. No test content is changed and no assertion is weakened; normal runs still exercise both tests in full.

Verification

Built a dedicated embedded debug tree (-DWITH_EMBEDDED_SERVER=ON -DCMAKE_BUILD_TYPE=Debug) and ran test-first:

Run Result
Fix backed out, --embedded-server both tests fail, diffs byte-identical to the ones in the report
Fix applied, --embedded-server --suite=heap both [ skipped ] Not run for embedded server; 40/40 pass, 8 skipped, 0 failures
Fix applied, normal server, --suite=heap 48/48 pass, both tests exercised and passing

The full-suite embedded run also confirms no other heap test is broken under the embedded server.

Both tests exercise server facilities that an embedded build does not
have, so neither can run there.

`INSERT DELAYED` has no delayed insert thread in an embedded build.
The whole facility sits inside `#ifndef EMBEDDED_LIBRARY`, including
the check that routes a delayed statement away from the ordinary
insert path, so the statement is an ordinary insert and
`DELAYED_WRITES` stays at 0.

`ALTER TABLE ... LOCK=NONE` is never online in an embedded build.
`online` is hard-wired to `false` when `HAVE_REPLICATION` is
undefined, and `my_global.h` leaves it undefined for
`EMBEDDED_LIBRARY`.  The source lock is therefore not downgraded, the
`alter_table_online_downgraded` sync point is never reached, and the
test's `WAIT_FOR downgraded` runs out its `debug_sync` timeout.

Skip both with `include/not_embedded.inc`, as `main.delayed` and
`main.alter_table_online_debug` already do.
@arcivanov

Copy link
Copy Markdown
Contributor Author

@montywi has picked #5613 as 153e30a for bb-blob-main-monty.

@arcivanov arcivanov closed this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant