Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31608

MySQL.Data can not connect to MariaDB 11 due a collations with a NULL id.

Details

    Description

      I am working with 11.0.2 and (varios clients, one of them is ) MySQL.Data.MySQLConnector.

      The new feature for multiple collations with NULL ID (MDEV-27009) broke the connector as you can see here:

      https://stackoverflow.com/questions/74060289/mysqlconnection-open-system-invalidcastexception-object-cannot-be-cast-from-d

      I know the problem is in the connector internals, but how I can disable the new collations to make the connection connect until they will fix it ?

      Thanks for a must-using product !

      https://i.stack.imgur.com/zGwvA.png

      Attachments

        Activity

          Hi I just published pre-pre-alpha version of package trying to fix this issue before fix in mariadb-server will be publicly available. You can try it and let me know if it helped.

          NuGet: https://www.nuget.org/packages/Jf.MySql.Data.Collations/

          Sources: https://github.com/jeffraska/Jf.MySql.Data.Collations/

          The package is in "works on my computer" state. This means .NET framework 4.5, really old MySql.Data 6.9.7 library and latest MariaDB 10.11.4 currently available in Debian repository. So don't expect miracles.

          It uses standard Command Interceptor functionality of MySql.Data library (https://dev.mysql.com/doc/connector-net/en/connector-net-interceptors.html) to alter all `SHOW COLLATION` queries and replacing it with `SHOW COLLATION WHERE id IS NOT NULL`.

          Also the package have functionality to alter MySql.Data's internal charset mapping to allow reading utf8mb3 fields in pre 8.0.28 versions of MySql.Data .

          jeffraska David Raška added a comment - Hi I just published pre-pre-alpha version of package trying to fix this issue before fix in mariadb-server will be publicly available. You can try it and let me know if it helped. NuGet: https://www.nuget.org/packages/Jf.MySql.Data.Collations/ Sources: https://github.com/jeffraska/Jf.MySql.Data.Collations/ The package is in "works on my computer" state. This means .NET framework 4.5, really old MySql.Data 6.9.7 library and latest MariaDB 10.11.4 currently available in Debian repository. So don't expect miracles. It uses standard Command Interceptor functionality of MySql.Data library ( https://dev.mysql.com/doc/connector-net/en/connector-net-interceptors.html ) to alter all `SHOW COLLATION` queries and replacing it with `SHOW COLLATION WHERE id IS NOT NULL`. Also the package have functionality to alter MySql.Data's internal charset mapping to allow reading utf8mb3 fields in pre 8.0.28 versions of MySql.Data .
          PureEnergy1991 Ben added a comment -

          This issue still appears in 10.11.7

          PureEnergy1991 Ben added a comment - This issue still appears in 10.11.7
          wlad Vladislav Vaintroub added a comment - - edited

          @Ben, can you be more specific? We do have a unit test on CI , specifically against MySQL Connector/NET and this passes.
          So there is a doubt that this issue still appears in 10.11.7

          we run this powershell script on CI, where there is a user root
          with empty password, with MASTER_MYPORT env.variable set to the port on which server runs.

          https://github.com/MariaDB/server/blob/9d07b0520c65d8088a522e3d8b1292ad723dba15/mysql-test/main/mysql_connector_net.ps1

          This passes and spits out 2 lines, like

          PS E:\work> .\mysql_connector_net.ps1
          @@old_mode
          UTF8_IS_UTF8MB3,NO_NULL_COLLATION_IDS
          

          wlad Vladislav Vaintroub added a comment - - edited @Ben, can you be more specific? We do have a unit test on CI , specifically against MySQL Connector/NET and this passes. So there is a doubt that this issue still appears in 10.11.7 we run this powershell script on CI, where there is a user root with empty password, with MASTER_MYPORT env.variable set to the port on which server runs. https://github.com/MariaDB/server/blob/9d07b0520c65d8088a522e3d8b1292ad723dba15/mysql-test/main/mysql_connector_net.ps1 This passes and spits out 2 lines, like PS E:\work> .\mysql_connector_net.ps1 @@old_mode UTF8_IS_UTF8MB3,NO_NULL_COLLATION_IDS
          rpop Rosian Pop added a comment -

          I can also confirm this is not working with versions 10.11.7+ and the MySQL ODBC (8.4.0) connector in PowerBI. Let me know what kind of additional information you need

          rpop Rosian Pop added a comment - I can also confirm this is not working with versions 10.11.7+ and the MySQL ODBC (8.4.0) connector in PowerBI. Let me know what kind of additional information you need
          wlad Vladislav Vaintroub added a comment - - edited

          rpop, thanks for the info, but this specific bug is specifically about MySQL Connector/NET, not about any MySQL connector not working, not about MySQL ODBC or PowerBI.

          Best thing you can do is to create a new bug, and describe, in all details, the environment, the symptoms, and "how to repeat" . There is some information on how to file a bug report
          here https://mariadb.com/kb/en/reporting-bugs/

          wlad Vladislav Vaintroub added a comment - - edited rpop , thanks for the info, but this specific bug is specifically about MySQL Connector/NET, not about any MySQL connector not working, not about MySQL ODBC or PowerBI. Best thing you can do is to create a new bug, and describe, in all details, the environment, the symptoms, and "how to repeat" . There is some information on how to file a bug report here https://mariadb.com/kb/en/reporting-bugs/

          People

            wlad Vladislav Vaintroub
            Moshe L Moshe L
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start 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.