Comments (6)
Does this only occur if you run this two queries in that order?
Is the driver on both machines up to date? ( run go get -u github.com/Go-SQL-Driver/MySQL
to be sure )
Which server version are you running on your Linux machine?
from mysql.
I tried to get some answers to your question. But the problem becomes even more bizarre. Again, on my laptop darwin_amd64, everything works as expected. When I ssh to any linux_amd64 server and run the mysql
CLI manually, my manual queries work as expected. But when I run the exact same Go program, now every Query[Row] reports 0 rows returned.
I'm trying to bundle this into a single reproducible test case. Please stay tuned. Do you test this driver on linux_amd64 against MySQL 5.1.63-rel13.4?
from mysql.
Create a database on MySQL 5.1.63-rel13.4 with one table:
CREATE TABLE `live` (
`user_id` int(11) NOT NULL,
`list` text NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Insert one record:
INSERT INTO live (user_id, list) VALUES (2, "999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999,999999999");
edit: make the list longer, because the real data is bigger than "1,2,3,4,5", and I think it might be the same bug as #38
Save this program as dbtest.go and run with go run dbtest.go -dsn="user:pass@tcp(1.2.3.4:3306)/database_name"
.
On my laptop (darwin_amd64) it works as expected, printing the list. On my Linux server (linux_amd64) it errors with sql: no rows in result set. Running the latest version of your driver, as retrieved by go get -u -d github.com/Go-SQL-Driver/MySQL
in both cases.
from mysql.
This is definitely a bug in the Go-SQL-Driver. This code is exactly the same, but uses the mymysql
driver (and a different DSN syntax). Running it yields the expected behavior.
from mysql.
Can you confirm, that the it works now?
from mysql.
Test case confirmed working.
Thanks!
from mysql.
Related Issues (20)
- For some reason the data is not showing. HOT 1
- Cut a new v1.7.2 release HOT 14
- Potential out of bound access in `(*mysqlConn).handleErrorPacket` HOT 7
- Toggle Click in Leaderboards
- mysql startWatcher panic error HOT 3
- Bizarre hanging issue in rows.Close() HOT 7
- Can't Install, bug in edwards25519/scalar.go HOT 1
- Likely race that can prevent to recycle closed connections HOT 5
- Return timeout error instead of Invalid connection err when read packet network timeout HOT 5
- 保存时报错:Prepared statement contains too many placeholders
- too may ram usage when lost connection HOT 13
- SEGV writing packet HOT 1
- Connection liveness/goodeness check and AWS Aurora HOT 1
- Data race between mysqlConn watcher and okHandler during context cancellation HOT 3
- v1.6.0 get error
- Data race between mysqlConn.cleanup() and writeHandshakeResponsePacket HOT 2
- MaxOpenConns is not working
- Receiving "(using password: NO)" when password was given HOT 2
- Why must use port 3306?
- Scanner should return one of int64,float64,bool,[]byte,string,time.Time,nil , but I got uint64 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysql.