-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: add mysql engine to cli #228
Conversation
Sorry, I missed the PR. Will review soon. |
Hi, @xxchan, @BugenZhao. This PR is ready to review. |
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.
Rest LGTM!
sqllogictest-engines/src/mysql.rs
Outdated
let value_str = match value { | ||
Value::Bytes(bytes) => match String::from_utf8(bytes) { | ||
Ok(x) => x, | ||
Err(_) => "NULL".to_string(), |
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.
Is this reachable?
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 think this shouldn't be reachable.
sqllogictest-engines/src/mysql.rs
Outdated
Ok(x) => x, | ||
Err(_) => "NULL".to_string(), | ||
}, | ||
_ => "NULL".to_string(), |
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.
Can we explicitly assert other variants to be unreachable?
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.
Yes. The NULL judgment logic has been updated and is now clearer.
sqllogictest-engines/src/mysql.rs
Outdated
output.push(row_vec); | ||
} | ||
if output.is_empty() { | ||
Ok(DBOutput::StatementComplete(0)) |
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.
Is there anyway we can retrieve the affected row count?
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.
Yes, it can be obtained through conn.affected_rows
, updated.
Signed-off-by: zjregee <[email protected]>
Signed-off-by: zjregee <[email protected]>
Signed-off-by: zjregee <[email protected]>
Signed-off-by: zjregee <[email protected]>
Signed-off-by: zjregee <[email protected]>
Signed-off-by: zjregee <[email protected]>
Signed-off-by: zjregee <[email protected]>
Signed-off-by: zjregee <[email protected]>
24dac33
to
455286a
Compare
@@ -44,7 +44,7 @@ You can find more options in `sqllogictest --help` . | |||
|
|||
> **Note** | |||
> | |||
> Currently only postgres is supported in the CLI tool. | |||
> Currently only postgres and mysql are supported in the CLI tool. |
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.
In addition, the description of the cli has been modified here.
Signed-off-by: zjregee <[email protected]>
It looks like there is an issue with semver ci that is not related to this PR. |
Signed-off-by: xxchan <[email protected]>
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.
Thank you for the PR!
published to crates.io and github release |
related: #120