⚡ Sangsakala Proxy 🏠 Home
Skip to content

opt: support new features in SQLite - #654

Merged
bajinsheng merged 3 commits into
sqlancer:masterfrom
bajinsheng:master
Dec 18, 2022
Merged

bajinsheng merged 3 commits into
sqlancer:masterfrom
bajinsheng:master

Conversation

@bajinsheng

@bajinsheng bajinsheng commented Dec 17, 2022 •

Copy link
Copy Markdown
Collaborator

Some new features are required for QPG in SQLite.

  • a maximum number of tables/indexes: QPG gradually mutates the database state, so the database state may be extremely sophisticated and should be controlled.
  • explain interface: adding an interface to get query plan by a query in string format.
  • some actions are incorporated.

@bajinsheng
bajinsheng requested a review from mrigger December 17, 2022 13:43
@bajinsheng
bajinsheng enabled auto-merge (squash) December 17, 2022 13:48
public boolean executeQuery = true;

@Parameter(names = {
"--max-tables" }, description = "The maximum number of tables/virtual tables/ rtree tables/ views that can be created")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we use --max-num-tables here and --max-num-indexes below, to match the naming convention of other option classes (see below)?

@Parameter(names = "--max-num-views", description = "The maximum number of views that can be generated for a database", arity = 1)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed


@Parameter(names = {
"--max-tables" }, description = "The maximum number of tables/virtual tables/ rtree tables/ views that can be created")
public int maxTable = 10;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

perhaps maxNumTables?

public int maxTable = 10;

@Parameter(names = { "--max-index" }, description = "The maximum number of indexes that can be created")
public int maxIndex = 20;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps maxNumIndexes?

@bajinsheng
bajinsheng requested a review from mrigger December 17, 2022 22:22
@bajinsheng bajinsheng mentioned this pull request Dec 17, 2022
REINDEX(SQLite3ReindexGenerator::executeReindex), //
ANALYZE(SQLite3AnalyzeGenerator::generateAnalyze), //
DELETE(SQLite3DeleteGenerator::deleteContent), //
PRAGMA(SQLite3PragmaGenerator::insertPragma), // 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure why we are numbering the actions here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I number these actions for debugging. The enumeration variable only includes index information in execution, and these numbers help me to quickly locate which action is selected and executed.

@mrigger mrigger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@bajinsheng
bajinsheng merged commit a195cdd into sqlancer:master Dec 18, 2022
albertZhangTJ pushed a commit to albertZhangTJ/sqlancer-lancerfuzz that referenced this pull request Dec 19, 2022
* opt: support maximum number of table/index

* opt: support explain interface
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