#Increse max packet size (why this doesn't work)
2 messages · Page 1 of 1 (latest)
On super quick glance..
- Why not set a constant to hold
len(b)instead of reading it twice:const curFileSize := len(b) - If you're setting
max_allowed_packetfor each request, you should use a tx to rollback in case that your insert stmt does fail it won't keep the previously setmax_allowed_packetvalue. - I would add some logging to debug: What is the output of
fmt.Println("FileSize:", len(b))