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

fix: return error to client if prepare stmt param not match #2918

Merged

Conversation

MichaelScofield
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

before: (in server)

2023-12-12T11:39:05.369596Z WARN servers::mysql::server: Internal error occurred during query exec, server actively close the channel to let client try next time err=0: Expected type: Timestamp(Millisecond(TimestampMillisecondType)), actual: MYSQL_TYPE_VAR_STRING, at src/servers/src/mysql/helper.rs:168:14

after: (in client)

com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: err: Expected type: Timestamp(Millisecond(TimestampMillisecondType)), actual: MYSQL_TYPE_VAR_STRING, params: (Value(Bytes([49])), MYSQL_TYPE_VAR_STRING),(Value(Int(1)), MYSQL_TYPE_LONG),(Value(Int(1)), MYSQL_TYPE_LONG),(Value(Int(1)), MYSQL_TYPE_LONG),(Value(Int(1)), MYSQL_TYPE_LONG),(Value(Int(1)), MYSQL_TYPE_LONG),(Value(Int(1)), MYSQL_TYPE_LONG)

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

Rest LGTM

Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

@MichaelScofield MichaelScofield added this pull request to the merge queue Dec 12, 2023
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #2918 (1a7a0f1) into develop (47e5154) will decrease coverage by 0.63%.
Report is 4 commits behind head on develop.
The diff coverage is 16.66%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2918      +/-   ##
===========================================
- Coverage    85.11%   84.48%   -0.63%     
===========================================
  Files          756      755       -1     
  Lines       119511   119181     -330     
===========================================
- Hits        101719   100691    -1028     
- Misses       17792    18490     +698     

Merged via the queue into GreptimeTeam:develop with commit 880ca2e Dec 12, 2023
13 checks passed
@MichaelScofield MichaelScofield deleted the fix/return-param-err branch December 12, 2023 12:52
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