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):
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.
This is, of course, a deficiency of mysql-connector-net, not knowing utf8mb3 character set.
But the question is, if there is an workaround for our users? If I understand you correctly, C# client can set the result charset, can it? if this is the case, then I would think it's a reasonable workaround, until MySQL adds utf8mb3 to their connector.
Sergei Golubchik
added a comment - This is, of course, a deficiency of mysql-connector-net, not knowing utf8mb3 character set.
But the question is, if there is an workaround for our users? If I understand you correctly, C# client can set the result charset, can it? if this is the case, then I would think it's a reasonable workaround, until MySQL adds utf8mb3 to their connector.
I am also having this issue. I tried switching completly to utf8mb4 but I cant seem to make this issue disappear when doing something like
"SELECT * FROM information_schema.TABLES WHERE TABLE_NAME = 'xxxx'"
I tried setting the character set in the connection string but this seemed to happen consistently.
I am using docker and have switched back down to 10.5.
Max Hayman
added a comment - - edited Hello,
I am also having this issue. I tried switching completly to utf8mb4 but I cant seem to make this issue disappear when doing something like
"SELECT * FROM information_schema.TABLES WHERE TABLE_NAME = 'xxxx'"
I tried setting the character set in the connection string but this seemed to happen consistently.
I am using docker and have switched back down to 10.5.
The system character set is used only internally by MariaDB and does not need to be changed. In my client program written in C# here is what I did after connecting to make it work with MariaDB 10.6:
MySqlCommand setcmd = new MySqlCommand("SET character_set_results=utf8", conn);
int n = setcmd.ExecuteNonQuery();
setcmd.Dispose();
in this command utf8 was defaulted to utf8mb4 by MariaDB due to the old_mode setting. That is the results charset that was causing problem with my program.
Olivier Bertrand
added a comment - - edited The system character set is used only internally by MariaDB and does not need to be changed. In my client program written in C# here is what I did after connecting to make it work with MariaDB 10.6:
MySqlCommand setcmd = new MySqlCommand("SET character_set_results=utf8", conn);
int n = setcmd.ExecuteNonQuery();
setcmd.Dispose();
in this command utf8 was defaulted to utf8mb4 by MariaDB due to the old_mode setting. That is the results charset that was causing problem with my program.
Alex
added a comment - Has been fixed with MySQL Connector/NET 8.0.28 which has been released 2022-01-18: https://dev.mysql.com/doc/relnotes/connector-net/en/news-8-0-28.html
People
Alexander Barkov
Olivier Bertrand
Votes:
6Vote for this issue
Watchers:
20Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":797.1000003814697,"ttfb":247.10000038146973,"pageVisibility":"visible","entityId":101102,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"cdbec7c6-392e-4c5e-a95a-724bc44260f2","navigationType":0,"readyForUser":889.2000002861023,"redirectCount":0,"resourceLoadedEnd":969,"resourceLoadedStart":253.30000019073486,"resourceTiming":[{"duration":8,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":253.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":261.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":12.599999904632568,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":253.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":266.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":65.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":253.80000019073486,"connectEnd":253.80000019073486,"connectStart":253.80000019073486,"domainLookupEnd":253.80000019073486,"domainLookupStart":253.80000019073486,"fetchStart":253.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":253.80000019073486,"responseEnd":319,"responseStart":318.90000009536743,"secureConnectionStart":253.80000019073486},{"duration":213.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":254,"connectEnd":254,"connectStart":254,"domainLookupEnd":254,"domainLookupStart":254,"fetchStart":254,"redirectEnd":0,"redirectStart":0,"requestStart":254,"responseEnd":467.40000009536743,"responseStart":467.40000009536743,"secureConnectionStart":254},{"duration":217.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":254.2000002861023,"connectEnd":254.2000002861023,"connectStart":254.2000002861023,"domainLookupEnd":254.2000002861023,"domainLookupStart":254.2000002861023,"fetchStart":254.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":254.2000002861023,"responseEnd":471.5,"responseStart":471.5,"secureConnectionStart":254.2000002861023},{"duration":217.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":254.40000009536743,"connectEnd":254.40000009536743,"connectStart":254.40000009536743,"domainLookupEnd":254.40000009536743,"domainLookupStart":254.40000009536743,"fetchStart":254.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":254.40000009536743,"responseEnd":472.30000019073486,"responseStart":472.30000019073486,"secureConnectionStart":254.40000009536743},{"duration":218.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":254.60000038146973,"connectEnd":254.60000038146973,"connectStart":254.60000038146973,"domainLookupEnd":254.60000038146973,"domainLookupStart":254.60000038146973,"fetchStart":254.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":254.60000038146973,"responseEnd":472.90000009536743,"responseStart":472.90000009536743,"secureConnectionStart":254.60000038146973},{"duration":218.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":254.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":254.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":473.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":218.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":254.90000009536743,"connectEnd":254.90000009536743,"connectStart":254.90000009536743,"domainLookupEnd":254.90000009536743,"domainLookupStart":254.90000009536743,"fetchStart":254.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":254.90000009536743,"responseEnd":473.5,"responseStart":473.5,"secureConnectionStart":254.90000009536743},{"duration":219.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":255.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":255.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":474.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":219.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":255.2000002861023,"connectEnd":255.2000002861023,"connectStart":255.2000002861023,"domainLookupEnd":255.2000002861023,"domainLookupStart":255.2000002861023,"fetchStart":255.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":255.2000002861023,"responseEnd":474.5,"responseStart":474.40000009536743,"secureConnectionStart":255.2000002861023},{"duration":338.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":256.7000002861023,"connectEnd":256.7000002861023,"connectStart":256.7000002861023,"domainLookupEnd":256.7000002861023,"domainLookupStart":256.7000002861023,"fetchStart":256.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":256.7000002861023,"responseEnd":595.2000002861023,"responseStart":595.2000002861023,"secureConnectionStart":256.7000002861023},{"duration":701.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":261.2000002861023,"connectEnd":261.2000002861023,"connectStart":261.2000002861023,"domainLookupEnd":261.2000002861023,"domainLookupStart":261.2000002861023,"fetchStart":261.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":261.2000002861023,"responseEnd":962.6000003814697,"responseStart":962.6000003814697,"secureConnectionStart":261.2000002861023},{"duration":126.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":466.5,"connectEnd":466.5,"connectStart":466.5,"domainLookupEnd":466.5,"domainLookupStart":466.5,"fetchStart":466.5,"redirectEnd":0,"redirectStart":0,"requestStart":466.5,"responseEnd":593.4000000953674,"responseStart":593.4000000953674,"secureConnectionStart":466.5},{"duration":217.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":751.1000003814697,"connectEnd":751.1000003814697,"connectStart":751.1000003814697,"domainLookupEnd":751.1000003814697,"domainLookupStart":751.1000003814697,"fetchStart":751.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":751.1000003814697,"responseEnd":969,"responseStart":969,"secureConnectionStart":751.1000003814697},{"duration":261.7000002861023,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":789,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":789,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1050.7000002861023,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":32,"responseStart":248,"responseEnd":253,"domLoading":251,"domInteractive":994,"domContentLoadedEventStart":994,"domContentLoadedEventEnd":1042,"domComplete":1219,"loadEventStart":1219,"loadEventEnd":1219,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":969.7000002861023},{"name":"bigPipe.sidebar-id.end","time":970.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":970.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.end","time":972.5},{"name":"activityTabFullyLoaded","time":1064.8000001907349}],"measures":[],"correlationId":"f3724e7e7765e4","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":111,"dbReadsTimeInMs":18,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This is, of course, a deficiency of mysql-connector-net, not knowing utf8mb3 character set.
But the question is, if there is an workaround for our users? If I understand you correctly, C# client can set the result charset, can it? if this is the case, then I would think it's a reasonable workaround, until MySQL adds utf8mb3 to their connector.