Skip to content

MySQL 4.1.21 EOF error [moved] #13

Closed
@julienschmidt

Description

@julienschmidt

This is Issue 13 moved from a Google Code project.
Added by 2012-09-27T21:15:48.000Z by tam...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (WontFix).

Original labels: Type-Defect, Priority-Medium

Original description

<b>Problem summary:</b>
Any query that has an expected return (i.e. SELECT, SHOW, etc.) returns an EOF error on *sql.DB.Query() or *sql.DB.QueryRow(). CREATE TABLE and DROP TABLE work fine. Nonsense queries (e.g. on non-existant tables) and incorrect credentials generate the expected errors, so connecting to the DB isn't the problem.

Everything works fine on MySQL 5.0+

Used go-mysql-version (e.g. May 26, 2012):May 30, 2012


<b>MySQL-Server version (e.g. MySQL-Server 5.5 or MariaDB 5.1):</b>
MySQL-Server 4.1.21

<b>Used Operation System (e.g. Windows 7 64bit, Ubuntu 12.04 64bit):</b>
Server: CentOS 5.1, Client: OS X 10.8.2

<b>Example code which reproduces the error (optional):</b>

func main() {
    dbs, err := sharddbs.GetDBs()
    if err != nil {
        panic(err)
    }
    for _, db := range dbs {
        row := db.QueryRow(&quot;SHOW TABLES&quot;)
        var result string
        err = row.Scan(&result)
        if err != nil {
            panic(err) //panic happens here
        }
        fmt.Println(result)
    }
}

Stack trace:
panic: EOF

goroutine 1 [running]:
main.main()
    /Users/tamird/dev/go/src/15852/15852.go:18 +0x22c
----- stack segment boundary -----

goroutine 2 [syscall]:
created by runtime.main
    /usr/local/Cellar/go/1.0.3/src/pkg/runtime/proc.c:221

goroutine 3 [syscall]:
syscall.Syscall6()
    /usr/local/Cellar/go/1.0.3/src/pkg/syscall/asm_darwin_amd64.s:38 +0x5
syscall.kevent(0x14, 0x0, 0x0, 0xf84006d188, 0xa, ...)
    /usr/local/Cellar/go/1.0.3/src/pkg/syscall/zsyscall_darwin_amd64.go:199 +0x88
syscall.Kevent(0xf800000014, 0x0, 0x0, 0xf84006d188, 0xa0000000a, ...)
    /usr/local/Cellar/go/1.0.3/src/pkg/syscall/syscall_bsd.go:546 +0xa4
net.(*pollster).WaitFD(0xf84006d180, 0xf84008aac0, 0x0, 0x0, 0x0, ...)
    /usr/local/Cellar/go/1.0.3/src/pkg/net/fd_darwin.go:96 +0x185
net.(*pollServer).Run(0xf84008aac0, 0x0)
    /usr/local/Cellar/go/1.0.3/src/pkg/net/fd.go:236 +0xe4
created by net.newPollServer
    /usr/local/Cellar/go/1.0.3/src/pkg/net/newpollserver.go:35 +0x382
exit status 2

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