You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to be having some issues when trying to use compression in the connection string. It just hangs on Open() forever.
Here's what I did to reproduce:
Create a test table:
CREATEDATABASEtestdb;
CREATEUSER 'testuser'@'%' IDENTIFIED BY 'testpassword';
GRANT ALL PRIVILEGES ON testdb.* to 'testuser'@'%';
FLUSH PRIVILEGES;
USE testdb;
CREATETABLEtesttable (id INT, name VARCHAR(100));
INSERT INTO testtable VALUES (1,'Testing!');
Create a console app with the following code:
using System;using MySql.Data.MySqlClient;namespaceTestMySql{publicclassProgram{publicstaticvoidMain(string[]args){varconnStr="Host=mysql;Database=testdb;User=testuser;Password=testpassword";//Basic connection stringusing(varconn=new MySqlConnection(connStr)){
Console.WriteLine("About to open uncompressed connection");
conn.Open();
Console.WriteLine(conn.ServerVersion);
Console.WriteLine(conn.UseCompression);
WriteData(conn);
Console.WriteLine("");}connStr+=";compress=True";using(varconn=new MySqlConnection(connStr)){
Console.WriteLine("About to open compressed connection");
conn.Open();//Hangs here
WriteData(conn);
Console.WriteLine("With compression, it never gets here...");
Console.WriteLine("");}}privatestaticvoidWriteData(MySqlConnectionconn){using(varcmd= conn.CreateCommand()){
cmd.CommandText ="SELECT * FROM testtable";using(varr= cmd.ExecuteReader()){while(r.Read()){varid= r["id"].ToString();varname= r["name"].ToString();
Console.WriteLine($"ID = {id}, Name = {name}");}}}}}}
TestMySql> dotnet run
Project TestMySql (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
About to open uncompressed connection
5.6.28-0ubuntu0.15.10.1
False
ID = 1, Name = Testing!
About to open compressed connection
^C
TestMySql> dotnet --version
1.0.0-preview1-002702
I have another project using "full" .NET, and the official MySQL client, and it connects to the server with compression fine.
Please let me know if I can provide further information.
The text was updated successfully, but these errors were encountered:
The fix is being published in version 6.9.8-rc2-008. Please re-open the issue if it doesn't resolve the problem you're having. Thanks for the bug report!
I seem to be having some issues when trying to use compression in the connection string. It just hangs on Open() forever.
Here's what I did to reproduce:
Create a test table:
Create a console app with the following code:
And here's the project.json:
Get the following results:
I have another project using "full" .NET, and the official MySQL client, and it connects to the server with compression fine.
Please let me know if I can provide further information.
The text was updated successfully, but these errors were encountered: