We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When compression is enabled on the client my application fails with connection was bad, the nested exception is:
connection was bad
io.CopyN failed. err unexpected EOF, copied 0, expected 29
But when disabling compression the application works correctly.
Start MariaDB in Docker:
docker run --rm -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 mariadb:10.3.39
Create the DB and table found in the attached file
db_schema.txt
Run this test:
import ( "github.com/go-mysql-org/go-mysql/client" "github.com/go-mysql-org/go-mysql/mysql" "github.com/stretchr/testify/assert" ) func TestServer_ShowFieldTable1(t *testing.T) { a := assert.New(t) c, err := client.Connect("localhost:3306", "root", "root", "mydb", func(conn *client.Conn) { conn.SetCapability(mysql.CLIENT_COMPRESS) // Disable compression and the test will pass }) a.NoError(err) execute, err := c.Execute("SHOW FIELDS FROM mydb.table1") if a.NoError(err) { rs := execute.Resultset a.Equal(575, len(rs.RowDatas)) } }
The text was updated successfully, but these errors were encountered:
Some more context in case it helps. I notice that setting net_buffer_length on the server causes the above test case to pass, for example:
net_buffer_length
set global net_buffer_length=32768;
then resetting it lot the original value will revert to the previous failing behavior.
set global net_buffer_length=16384;
Sorry, something went wrong.
Thanks for the bugreport. I'll try to reproduce this.
I've created a PR that seems to fix this in my fork: #863
Merged #863
No branches or pull requests
When compression is enabled on the client my application fails with
connection was bad
, the nested exception is:But when disabling compression the application works correctly.
Repro Steps
Start MariaDB in Docker:
Create the DB and table found in the attached file
db_schema.txt
Run this test:
The text was updated successfully, but these errors were encountered: