Skip to content

Fix #20041 - Fix export for raw queries without table reference#20266

Merged
williamdes merged 2 commits intophpmyadmin:masterfrom
predictor2718:fix/20041-export-raw-query
Apr 9, 2026
Merged

Fix #20041 - Fix export for raw queries without table reference#20266
williamdes merged 2 commits intophpmyadmin:masterfrom
predictor2718:fix/20041-export-raw-query

Conversation

@predictor2718
Copy link
Copy Markdown
Contributor

Description

  • Raw queries like SELECT 1 as foo failed to export because /table/export required db and table parameters
  • Skip db/table validation in ExportController when raw_query is set
  • Skip SHOW TABLES workaround in Results.php for raw queries to avoid injecting a fake table name
  • Added unit test for the raw query export case

Fixes #20041

…ence

Signed-off-by: Nicolai Ehrhardt <245527909+predictor2718@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.50%. Comparing base (1859a20) to head (bcaf89c).
⚠️ Report is 39 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20266   +/-   ##
=========================================
  Coverage     63.49%   63.50%           
- Complexity    16060    16071   +11     
=========================================
  Files           676      676           
  Lines         59891    59903   +12     
=========================================
+ Hits          38028    38041   +13     
+ Misses        21863    21862    -1     
Flag Coverage Δ
dbase-extension 63.43% <100.00%> (+<0.01%) ⬆️
unit-8.2-ubuntu-latest 63.40% <100.00%> (-0.06%) ⬇️
unit-8.3-ubuntu-latest 63.46% <100.00%> (+0.01%) ⬆️
unit-8.4-ubuntu-latest 63.47% <100.00%> (+0.07%) ⬆️
unit-8.5-ubuntu-latest 63.40% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 5, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

…ontroller

Signed-off-by: Nicolai Ehrhardt <245527909+predictor2718@users.noreply.github.com>
@williamdes williamdes added this to the 6.0.0 milestone Apr 7, 2026
@williamdes williamdes self-assigned this Apr 9, 2026
@williamdes williamdes merged commit 0eab757 into phpmyadmin:master Apr 9, 2026
43 checks passed
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.

[Bug]: Export raw query doesn't work due to missing db param in /table/export

3 participants