Skip to content

MySqlBulkLoader not working with Azure Mariadb #853

Description

@naitikmalaviya

Dotnet core version: 2.1
ORM: Dapper
Azure Mariadb version: 10.2 / 10.3
OS platform: CentOS 7 / Windows 10
MySqlConnector Version: 0.64.1

I am migrating from Mysql.Data library to Mysqlconnector library. I am facing this issue only on Azure Mariadb.

I've followed this troubleshooting guide as well. I've changed code and used MysqlBulkLoader class to use local data infile. And it is working properly with mariadb 10.2 docker image and windows mariadb 10.2 as well. It is only failing on Azure Mariadb. I am not sure why maybe because they have different architecture and there is some weird issue with version as well (the MySQL client displays the version of MariaDB set in the gateway, not the actual version running on your MariaDB server instance.).

It is working with old mysql connector so I am assuming it is not related to any Mariadb server settings.

Error:

Message: The used command is not allowed with this MariaDB version
StackTrace:
at MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet() in /_/src/MySqlConnector/MySql.Data.MySqlClient/MySqlDataReader.cs:line 116
   at MySql.Data.MySqlClient.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySql.Data.MySqlClient/MySqlDataReader.cs:line 391
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 62
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySql.Data.MySqlClient/MySqlCommand.cs:line 220
   at MySql.Data.MySqlClient.MySqlBulkLoader.LoadAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySql.Data.MySqlClient/MySqlBulkLoader.cs:line 116
   at MySql.Data.MySqlClient.MySqlBulkLoader.Load() in /_/src/MySqlConnector/MySql.Data.MySqlClient/MySqlBulkLoader.cs:line 60

Notes:

  • I've also tried to run mysql query from dotnet code with VerifyCA option in connection string. It also failed on Azure Mariadb.
  • I've also tried latest version of MySqlConnector library - same result.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions