GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opt: support new features in SQLite by bajinsheng · Pull Request #654 · sqlancer/sqlancer

Conversation

@bajinsheng

@bajinsheng bajinsheng commented Dec 17, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bajinsheng
bajinsheng requested a review from mrigger December 17, 2022 13:43
@bajinsheng
bajinsheng enabled auto-merge (squash) December 17, 2022 13:48
mrigger
mrigger reviewed Dec 17, 2022
View reviewed changes
Comment thread src/sqlancer/sqlite3/SQLite3Options.java Outdated
public boolean executeQuery = true;

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

@mrigger mrigger Dec 17, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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)?

sqlancer/src/sqlancer/duckdb/DuckDBOptions.java

Line 84 in a535520

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bajinsheng bajinsheng Dec 17, 2022

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/sqlancer/sqlite3/SQLite3Options.java Outdated

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

@mrigger mrigger Dec 17, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

perhaps maxNumTables?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/sqlancer/sqlite3/SQLite3Options.java Outdated
public int maxTable = 10;

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

@mrigger mrigger Dec 17, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Perhaps maxNumIndexes?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bajinsheng
bajinsheng requested a review from mrigger December 17, 2022 22:22
bajinsheng added 2 commits December 18, 2022 06:26
bajinsheng
opt: support maximum number of table/index
27615f1
bajinsheng
opt: support explain interface
9f5dbd9
@bajinsheng bajinsheng mentioned this pull request Dec 17, 2022
Support QPG #641
Closed
bajinsheng
opt: add new Actions
1a40509
mrigger
mrigger reviewed Dec 18, 2022
View reviewed changes
Comment thread src/sqlancer/sqlite3/SQLite3Provider.java
REINDEX(SQLite3ReindexGenerator::executeReindex), //
ANALYZE(SQLite3AnalyzeGenerator::generateAnalyze), //
DELETE(SQLite3DeleteGenerator::deleteContent), //
PRAGMA(SQLite3PragmaGenerator::insertPragma), // 0

@mrigger mrigger Dec 18, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bajinsheng bajinsheng Dec 18, 2022

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mrigger
mrigger approved these changes Dec 18, 2022
View reviewed changes

@mrigger mrigger left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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
Jinsheng Ba @albertZhangTJ
opt: support new features in SQLite (sqlancer#654)
0d07948
* 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

Reviewers

@mrigger mrigger mrigger approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@bajinsheng @mrigger
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.