Skip to content

zero-value of mysql.Result was expected by server.WriteValue, breaks in v1.11.0 #1005

Closed
@stgarrity

Description

@stgarrity

d02e79a introduced new constructors for mysql.Result that always initializes Result.Resultset to be non-nil, but this breaks the logic in server.WriteValue that differentiates between a resultset response and an OK response. This in turn breaks responses to things like INSERT statements.

This is missed in tests because server/server_test.go creates Results without the constructors, and with nil Resultsets

I have a fix https://github.com/userclouds/go-mysql/tree/stg/server_missed_ok that I'm happy to PR if it makes sense and I'm not mis-understanding the intent here.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions