Skip to content

Malformed packet error #844

Closed
Closed
@81698

Description

@81698

Issue description

Tell us what should happen and what happens instead
Expected this to open a connection and return a 1 from the database. Instead got a malformed packet error.
Works in v1.3.0

Example code

If possible, please enter some example code here to reproduce the issue.
func TestAQuery(t *testing.T) {
    db, err := sql.Open("mysql", "username:password@/database?allowOldPasswords=1")
    if err != nil {
        t.Fatal(err)
    }
    defer db.Close()
    var id int
    if err := db.QueryRow("SELECT 1").Scan(&id); err != nil {
        t.Fatal(err)
    }
}

Error log

If you have an error log, please paste it here.
malformed packet

Configuration

Driver version (or git SHA):
v1.4.0

Go version: run go version in your console
go version devel +15c106d Tue Aug 7 20:33:33 2018 +0000 linux/amd64

Server version: E.g. MySQL 5.6, MariaDB 10.0.20
5.5.59-MariaDB

Server OS: E.g. Debian 8.1 (Jessie), Windows 10
14.04.1-Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions