2018/06/27 21:24:20 http: panic serving 10.105.107.106:34988: runtime error: invalid memory address or nil pointer dereference
goroutine 1242 [running]:
net/http.(*conn).serve.func1(0xc4202fe000)
/usr/local/go/src/net/http/server.go:1726 +0xd0
panic(0x701840, 0x91fd70)
/usr/local/go/src/runtime/panic.go:502 +0x229
database/sql.(*Stmt).ExecContext(0x0, 0x7a82a0, 0xc4200160d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/database/sql/sql.go:2224 +0x4a
database/sql.(*Stmt).Exec(0x0, 0x0, 0x0, 0x0, 0x7efe6b4862a8, 0xc420312120, 0x0, 0xc420016115)
/usr/local/go/src/database/sql/sql.go:2253 +0x65
main.mpp(0x7a7fe0, 0xc420316000, 0xc42030c000)
/root/golang_mysql_proxy_pool/pool.go:151 +0x12e1
net/http.HandlerFunc.ServeHTTP(0x77e138, 0x7a7fe0, 0xc420316000, 0xc42030c000)
/usr/local/go/src/net/http/server.go:1947 +0x44
net/http.(*ServeMux).ServeHTTP(0x92c0a0, 0x7a7fe0, 0xc420316000, 0xc42030c000)
/usr/local/go/src/net/http/server.go:2337 +0x130
net/http.serverHandler.ServeHTTP(0xc420097110, 0x7a7fe0, 0xc420316000, 0xc42030c000)
/usr/local/go/src/net/http/server.go:2694 +0xbc
net/http.(*conn).serve(0xc4202fe000, 0x7a8260, 0xc4202a6040)
/usr/local/go/src/net/http/server.go:1830 +0x651
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2795 +0x27b
有疑问加站长微信联系(非本文作者))
![](https://static.golangjob.cn/static/img/footer.png?imageView2/2/w/280)