Skip to content

Differentiating between analyze and explain statements #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 17, 2022

Conversation

iifawzi
Copy link
Contributor

@iifawzi iifawzi commented Nov 12, 2022

Signed-off-by: iifawzi [email protected]

Hi, this should fix phpmyadmin/phpmyadmin#17482 (comment)

seems that ANALYZE maps to AnalyzeStatement, which is seen as "Table Maintenance Statements", which is fine, for ANALYZE TABLE.

However, ANALYZE SELECT is similar to EXPLAIN (in MariaDB), so it probably should be seen as ExplainStatement.

Ref: phpmyadmin/phpmyadmin#17482 (comment).

We still need to implement the EXPLAIN statement, but this might take place in a separate PR.

@codecov
Copy link

codecov bot commented Nov 12, 2022

Codecov Report

Base: 95.63% // Head: 95.64% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (92bb872) compared to base (a9cd167).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 92bb872 differs from pull request most recent head a9dbfe0. Consider uploading reports for the commit a9dbfe0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #386   +/-   ##
=========================================
  Coverage     95.63%   95.64%           
- Complexity     2141     2145    +4     
=========================================
  Files            67       67           
  Lines          4538     4548   +10     
=========================================
+ Hits           4340     4350   +10     
  Misses          198      198           
Impacted Files Coverage Δ
src/Parser.php 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

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

Looks nice, thank you !

@williamdes williamdes self-assigned this Nov 17, 2022
@williamdes williamdes added this to the 5.6.0 milestone Nov 17, 2022
@williamdes williamdes force-pushed the differentiate-analyze-explain branch from 14c814f to a70d5e8 Compare November 17, 2022 15:50
Signed-off-by: William Desportes <[email protected]>
@williamdes williamdes force-pushed the differentiate-analyze-explain branch from a70d5e8 to a9dbfe0 Compare November 17, 2022 15:52
williamdes added a commit that referenced this pull request Nov 17, 2022
williamdes added a commit that referenced this pull request Nov 17, 2022
Pull-request: #386

Signed-off-by: William Desportes <[email protected]>
@williamdes williamdes merged commit a9dbfe0 into phpmyadmin:master Nov 17, 2022
@nunoperalta
Copy link

@iifawzi - thank you very much for this!

I saw your test cases,

can you please also add another test?

ANALYZE FORMAT=JSON SELECT * FROM orders

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.

Default to "Full texts" when running ANALYZE
3 participants