Skip to content
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

Support global and session parts in show variables for mysql and generic dialects #1032

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

emin100
Copy link
Contributor

@emin100 emin100 commented Oct 31, 2023

Examples:
mysql_and_generic().verified_stmt("SHOW GLOBAL VARIABLES");
mysql_and_generic().verified_stmt("SHOW GLOBAL VARIABLES LIKE 'admin%'");
mysql_and_generic().verified_stmt("SHOW GLOBAL VARIABLES WHERE value = '3306'");
mysql_and_generic().verified_stmt("SHOW SESSION VARIABLES");
mysql_and_generic().verified_stmt("SHOW SESSION VARIABLES LIKE 'admin%'");
mysql_and_generic().verified_stmt("SHOW GLOBAL VARIABLES WHERE value = '3306'");

Copy link
Contributor

@tobyhede tobyhede left a comment

Choose a reason for hiding this comment

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

👍 Seems like a simple change with solid set of tests

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6926290207

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 12 of 14 (85.71%) changed or added relevant lines in 3 files are covered.
  • 517 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.06%) to 87.707%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 9 11 81.82%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_mysql.rs 2 99.42%
src/ast/data_type.rs 3 81.93%
src/lib.rs 5 11.83%
tests/sqlparser_mssql.rs 9 97.36%
tests/sqlparser_postgres.rs 33 98.06%
src/ast/query.rs 61 83.81%
src/tokenizer.rs 80 88.62%
tests/sqlparser_common.rs 120 96.91%
src/parser/mod.rs 204 83.16%
Totals Coverage Status
Change from base Build 6683069102: 0.06%
Covered Lines: 17801
Relevant Lines: 20296

💛 - Coveralls

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @emin100 and @tobyhede (I really appreciate the help reviewing!)

@alamb alamb merged commit c0c2d58 into apache:main Nov 20, 2023
@emin100 emin100 deleted the show_variables_with_global_session branch December 19, 2023 05:44
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.

4 participants