Skip to content

Fix prepare and bind sample metadata argument mapping - #889

Merged
darold merged 1 commit into
darold:masterfrom
dajiaohuang:fix/prepare-bind-metadata-20261016
Oct 19, 2026
Merged

darold merged 1 commit into
darold:masterfrom
dajiaohuang:fix/prepare-bind-metadata-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Problem

The generated Time consuming prepare and Time consuming bind example details show the wrong database, user, remote host and application. A synthetic log with db=demo_db,user=demo_user,app=demo_app,client=example.test instead displays database postgres, user demo_db, remote demo_user, application example.test, and a spurious query ID demo_app.

Both store_queries callers pass the aggregate report database followed by the actual database name to set_top_prepare_bind_sample, but its parameter list omits the actual database name. Every subsequent argument is shifted.

Change

Accept that existing argument and store it as the sample's database name, preserving the aggregate report key and all other caller contracts. Three production lines change; a self-contained CLI-to-HTML regression checks both prepare and bind examples.

Validation

  • Base fb5e1bfe80e50180e77795bac49653cc92c6813d: 10 of 11 new assertions fail; fixed version passes 11/11 on Perl 5.38.2.
  • Perl syntax, POD syntax and whitespace checks pass.
  • Inputs are self-authored log strings; no database connection or production logs.
  • Full upstream suite/Perl matrix not run locally (fixed /tmp outputs and upstream log fixtures outside this isolated check; optional JSON::XS absent). This PR is independent of Fix multiline prepare query continuation #888.

@darold
darold merged commit 0c6b015 into darold:master Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants