Skip to content
This repository was archived by the owner on Jan 24, 2020. It is now read-only.
This repository was archived by the owner on Jan 24, 2020. It is now read-only.

Malformed Packet error querying Sphinx 2.1.1 server... #1

Description

@jzawodn

I'm using this simple program to test out the sphinxql driver (not sure if it's ready for prime time given the lack of docs, but figured I'd give it a spin since the mysql driver doesn't talk to sphinxql):

package main

import "fmt"
import "database/sql"
import _ "github.com/go-sql-driver/sphinxql"

func main() {

    db, err := sql.Open("sphinxql", "user:pass@tcp(dev7h:9306)/")
    fmt.Println("opened!")

    if err != nil {
        panic(err.Error())
    }

    defer db.Close()

    rows, err := db.Query("SELECT id FROM index_1 LIMIT 10")

    if err != nil {
        panic(err.Error())
    }

    for rows.Next() {
        var id string
            if err := rows.Scan(&id); err != nil {
                fmt.Println(err.Error())
                return
            }
        fmt.Println(id)
    }

}

Upon running, I get this error"

$ ./sphinxql-test
opened!
panic: Malformed Packet

goroutine 1 [running]:
main.main()
    /Users/jzawodn/code/go/mysql/sphinxql-test.go:21 +0x224

goroutine 2 [syscall]:

Line 21 is the db.Query() call.

Any thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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