Skip to content

MDEV-39763 main.innodb_mrr_cpk fails under view protocol#5343

Open
grooverdan wants to merge 1 commit into
MariaDB:12.3from
grooverdan:MDEV-39763
Open

MDEV-39763 main.innodb_mrr_cpk fails under view protocol#5343
grooverdan wants to merge 1 commit into
MariaDB:12.3from
grooverdan:MDEV-39763

Conversation

@grooverdan

Copy link
Copy Markdown
Member

Since 12.3, this test has been failing under view protocol.

During the creation of the view for ICP=off, the ha_innobase::info_low gains a measurement of the nuber of rows. This measurement showed up in the explain output as a difference in row number despite no query plan change.

The majority of the SELECT statements in this test are of the form:
SELECT * FROM t1,t2 ..

where t1 and t2 have a significant overlap in column names. The creation of the view ultimately fails with ER_DUP_FIELDNAME. No view protocol is exercised for the majority of the tests.

As such, disabled the view protocol for the portion of tests that resulted in ER_DUP_FIELDNAME when a view of them is created.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request disables the view protocol around a specific test block in mysql-test/main/innodb_mrr_cpk.test to prevent overlapping fieldnames from causing ER_DUP_FIELDNAME errors, which was impacting the EXPLAIN output when index condition pushdown is disabled. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@gkodinov gkodinov added the MariaDB Foundation Pull requests created by MariaDB Foundation label Jul 6, 2026
The rows returned by this under view protocol where inconsistent.

Under view protocol the create view in a different thread
was providing statistics that ended up in the result.

To normalize the output:
* Disable innodb_stats_auto_recalc for duration of test.
* Use analyze with persistent stats on the tables.

Despite the CREATE VIEW being executed under view protocol, it
aways failed as most cases in the test had t1 and t2 with the same
columns and a SELECT * FROM t1,t2 form of query resulting in duplicate
field names. To make the results more consistent with a view protcol
returning the first column generated the same query plan.

Thanks Rex Johnston for guidance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MariaDB Foundation Pull requests created by MariaDB Foundation

Development

Successfully merging this pull request may close these issues.

2 participants