fix(deps): Update module github.com/go-sql-driver/mysql to v1.10.0 (main)#21747
Open
renovate-sh-app[bot] wants to merge 1 commit into
Open
fix(deps): Update module github.com/go-sql-driver/mysql to v1.10.0 (main)#21747renovate-sh-app[bot] wants to merge 1 commit into
renovate-sh-app[bot] wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix prepared fixes for all 3 issues found in the latest run.
- ✅ Fixed: Exec skips columns when server sent none (MariaDB)
- stmt.Exec now branches on metadataFollows first and skips only the optional EOF before rows when MariaDB omits column metadata.
- ✅ Fixed: NextResultSet ignores metadataFollows for binary rows
- binaryRows.NextResultSet now preserves and uses metadataFollows, reusing cached columns and skipping EOF instead of reading absent column metadata.
- ✅ Fixed: discardResults ignores metadataFollows, corrupts packet stream
- discardResults now honors metadataFollows and avoids skipColumns when the server did not send column definitions.
Or push these changes by commenting:
@cursor push 23b77c7fb2
Preview (23b77c7fb2)
diff --git a/vendor/github.com/go-sql-driver/mysql/packets.go b/vendor/github.com/go-sql-driver/mysql/packets.go
--- a/vendor/github.com/go-sql-driver/mysql/packets.go
+++ b/vendor/github.com/go-sql-driver/mysql/packets.go
@@ -1244,14 +1244,20 @@
// mc.affectedRows and mc.insertIds.
func (mc *okHandler) discardResults() error {
for mc.status&statusMoreResultsExists != 0 {
- resLen, _, err := mc.readResultSetHeaderPacket()
+ resLen, metadataFollows, err := mc.readResultSetHeaderPacket()
if err != nil {
return err
}
if resLen > 0 {
// columns
- if err := mc.conn().skipColumns(resLen); err != nil {
- return err
+ if metadataFollows {
+ if err := mc.conn().skipColumns(resLen); err != nil {
+ return err
+ }
+ } else {
+ if err := mc.conn().skipEof(); err != nil {
+ return err
+ }
}
// rows
if err := mc.conn().skipRows(); err != nil {
diff --git a/vendor/github.com/go-sql-driver/mysql/rows.go b/vendor/github.com/go-sql-driver/mysql/rows.go
--- a/vendor/github.com/go-sql-driver/mysql/rows.go
+++ b/vendor/github.com/go-sql-driver/mysql/rows.go
@@ -16,9 +16,10 @@
)
type resultSet struct {
- columns []mysqlField
- columnNames []string
- done bool
+ columns []mysqlField
+ columnNames []string
+ done bool
+ metadataFollows bool
}
type mysqlRows struct {
@@ -156,12 +157,13 @@
rows.rs = resultSet{}
// rows.mc.affectedRows and rows.mc.insertIds accumulate on each call to
// nextResultSet.
- resLen, _, err := rows.mc.resultUnchanged().readResultSetHeaderPacket()
+ resLen, metadataFollows, err := rows.mc.resultUnchanged().readResultSetHeaderPacket()
if err != nil {
// Clean up about multi-results flag
rows.rs.done = true
rows.mc.status = rows.mc.status & (^statusMoreResultsExists)
}
+ rows.rs.metadataFollows = metadataFollows
return resLen, err
}
@@ -181,12 +183,18 @@
}
func (rows *binaryRows) NextResultSet() error {
+ columns := rows.rs.columns
resLen, err := rows.nextNotEmptyResultSet()
if err != nil {
return err
}
- rows.rs.columns, err = rows.mc.readColumns(resLen, nil)
+ if rows.rs.metadataFollows {
+ rows.rs.columns, err = rows.mc.readColumns(resLen, nil)
+ } else {
+ rows.rs.columns = columns
+ err = rows.mc.skipEof()
+ }
return err
}
diff --git a/vendor/github.com/go-sql-driver/mysql/statement.go b/vendor/github.com/go-sql-driver/mysql/statement.go
--- a/vendor/github.com/go-sql-driver/mysql/statement.go
+++ b/vendor/github.com/go-sql-driver/mysql/statement.go
@@ -72,13 +72,18 @@
if resLen > 0 {
// Columns
- if metadataFollows && stmt.mc.extCapabilities&clientCacheMetadata != 0 {
- // we can not skip column metadata because next stmt.Query() may use it.
- if stmt.columns, err = mc.readColumns(resLen, stmt.columns); err != nil {
+ if metadataFollows {
+ if stmt.mc.extCapabilities&clientCacheMetadata != 0 {
+ // we can not skip column metadata because next stmt.Query() may use it.
+ stmt.columns, err = mc.readColumns(resLen, stmt.columns)
+ } else {
+ err = mc.skipColumns(resLen)
+ }
+ if err != nil {
return nil, err
}
} else {
- if err = mc.skipColumns(resLen); err != nil {
+ if err = mc.skipEof(); err != nil {
return nil, err
}
}You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit b83bac8. Configure here.
033d3ff to
9cb6e91
Compare
63e7ce7 to
b2ffdaa
Compare
d85db6a to
6efebbf
Compare
| datasource | package | from | to | | ---------- | ------------------------------ | ------ | ------- | | go | github.com/go-sql-driver/mysql | v1.9.3 | v1.10.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
6efebbf to
0426049
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


This PR contains the following updates:
v1.9.3→v1.10.0Release Notes
go-sql-driver/mysql (github.com/go-sql-driver/mysql)
v1.10.0Compare Source
Fix
getSystemVar("max_allowed_packet")potentially returned wrong value. (#1754)This affects only when
maxAllowedPacket=0is set.Bump filippo.io/edwards25519 from 1.1.1 to 1.2.0. (#1756)
While older versions have reported CVEs, they do not affect go-mysql.
Update Go versions to 1.24-1.26. (#1763)
Enhance interpolateParams to correctly handle placeholders. (#1732)
The question mark (?) within strings and comments will no longer be treated as a placeholder.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.