Skip to content

Conversation

@AmrRiyad
Copy link
Contributor

@AmrRiyad AmrRiyad commented Mar 24, 2025

Description

This pull request implements Differential Query Execution (DQE) for the MySOL DBMS module in the SQLancer repository. DQE is a testing technique that runs multiple variants of a query concurrently to detect discrepancies and uncover potential bugs. This approach enhances our ability to validate query correctness and improves overall testing fidelity. For a deeper technical understanding, please refer to this paper.

Proposed Changes

  • Integration of DQE: Introduced Differential Query Execution into MySOL DBMS to run different query variants sequentially.
  • Outcome Comparison Mechanism: Developed functionality to compare the results of the different queries, ensuring that any inconsistencies are detected.

Impact

  • Increased Testing Accuracy: The DQE approach significantly improves the detection of query anomalies, ensuring more reliable database operations.
  • Foundation for Future Enhancements: This integration sets the stage for further improvements in query processing and database testing within SQLancer.

@AmrRiyad
Copy link
Contributor Author

AmrRiyad commented Mar 24, 2025

To use DQE on MySQL

mvn package -DskipTests
cd target
java -jar sqlancer-*.jar mysql --oracle dqe

@mrigger
Copy link
Contributor

mrigger commented Mar 27, 2025

Thanks for the PR! @JensonSung, could you have a look?

We might need to break the PR into smaller, more manageable bits before merging.

@JensonSung
Copy link
Contributor

The implementation looks good to me.
I agree to break this PR into multiple subtasks. For example, Task1: changes in query folder. Task2: implements DQEBase.java. Task3: add support for other DBMSs, like MySQL.

@AmrRiyad
Copy link
Contributor Author

Thanks for your reviews and comments.

@AmrRiyad
Copy link
Contributor Author

AmrRiyad commented Mar 31, 2025

Hi @mrigger and @JensonSung,

Here is one of the PRs 1196, I'd appreciate any feedback or suggestions for improvements before proceeding with the remaining PRs.

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.

3 participants