Skip to content

db.Query() can not return the query result on ubuntu14.04 64bit system #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
niechaoya opened this issue Jun 9, 2015 · 1 comment
Closed

Comments

@niechaoya
Copy link

import(
"database/sql"
_ "github.com/go-sql-driver/mysql"
)
func DBQuery() []map[string]string{
var db *sql.DB
var err error
db, err = sql.Open("mysql", dbServer) //dbServer is my local mysql database
str:=call user_list(); //user_list() is a procedure of mysql database,it return the list of all user
rows,err:=db.Query(str)
if err!=nil{
fmt.Println("err=",err)
}
}

where i call this function ,the error is:Error 1312: PROCEDURE mytestdb.user_list can't return a result set in the given context

this function can work on win7 64bit and centos 64bit system,but it can not work on ubuntu 14.04 64bit system

@julienschmidt
Copy link
Member

See #339

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

No branches or pull requests

2 participants