Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6
-
Windows & Debian
Description
This is because the character set 'utf8mb3' is not supported by the .Net Framework.
Since version 10.6 utf8 defaults to utf8mb3 but the this can be prevented by starting the server with the option 'old_mode='.
However the system character set is utf8mb3 and this cannot be changed. Then each command answered by the system cause the client to crash.
For instance, using the MyTest C# client (uploaded):
Chose MariaDB version:6
|
Query: drop table t1;
|
Done.
|
Query: create table t1 (n int, m varchar(50)) default charset utf8;
|
Done.
|
Query: insert into t1 values(1, 'Déjà Noël ?');
|
Done.
|
Query: select * from t1;
|
System.Int32: n = 1
|
System.String: m = Déjà Noël ?
|
============================
|
Query: show create table t1;
|
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
|
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
|
at MySql.Data.MySqlClient.MySqlField.SetFieldEncoding()
|
at MySql.Data.MySqlClient.NativeDriver.GetColumnData(MySqlField field)
|
at MySql.Data.MySqlClient.NativeDriver.GetColumnsData(MySqlField[] columns)
|
at MySql.Data.MySqlClient.Driver.GetColumns(Int32 count)
|
at MySql.Data.MySqlClient.ResultSet.LoadColumns(Int32 numCols)
|
at MySql.Data.MySqlClient.ResultSet..ctor(Driver d, Int32 statementId, Int32 numCols)
|
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
|
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
|
at MySql.Data.MySqlClient.MySqlDataReader.Close()
|
at MySql.Data.MySqlClient.MySqlCommand.ResetReader()
|
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
|
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
|
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
|
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
|
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
|
at MyTest.Program.Main(String[] args) in C:\vc2013\Projects\MyTest\MyTest\Program.cs:line 52
|
Press any key to continue . . .
|
Setting 'old_mode=' made the t1 table work, but any SHOW commands will crash the client, even a simple command such as:
select version();
|
doesn't work.
Note: Setting manually the variable character_set_results to anything other then utf8mb3 (which seems to be its default value) avoids these crashed but this should be also the result of the old_mode setting.
It should be also possible to set the character_set_results variables in my.ini but on Windows 10 trying to do this fails. The server cannot be started saying "unknown variable character_set_results" or "unknow variable character-set-results" depending on what was used in my.ini.
See MDEV-26107.
Attachments
Issue Links
- duplicates
-
MDEV-26163 after 10.6 upgrade problems connecting to pipo db
- Closed
- is blocked by
-
MDEV-27177 OLD_MODE Ignored during initial hand shake for utf8
- Confirmed
- is caused by
-
MDEV-8334 Rename utf8 to utf8mb3
- Closed
- relates to
-
MDBF-205 Ecosystem CI - mysql-connector/NET
- Open
-
MDEV-26605 Creating table with primary key constraint name fails when using C# connector
- Open
-
MDEV-26607 Information schema not accessable in C# using MySql connector
- Open
-
MDEV-26107 Cannot set character_set variables in my.ini
- Open
-
MDEV-26462 MariaDB 10.6.x set caratteri
- Closed
- links to