Skip to content

pointing latest version to MariaDB 10.9 or 10.11 gives Unknown column 'SRS_ID' in 'field list' #1258

@Elrinth

Description

@Elrinth

Software versions
MySqlConnector version:
The version currently on git (2022-12-16 01:00:00 GMT+1)

Server type (MySQL, MariaDB, Aurora, etc.) and version:
MariaDB 10.9 and also tried with 10.11

.NET version:
4.7.2
(Optional) ORM NuGet packages and versions:

Describe the bug
Getting a MySqlException on a column which I don't have in any of my tables: 'SRS_ID'

Exception

 ERROR: MySqlConnector.MySqlException (0x80004005): Unknown column 'SRS_ID' in 'field list'
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.GetResult()
   at MySqlConnector.Core.ResultSet.<ReadResultSetHeaderAsync>d__2.MoveNext() in C:\dev\.net\valiweb\trunk\MySqlConnector\Core\ResultSet.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in C:\dev\.net\valiweb\trunk\MySqlConnector\MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.<CreateAsync>d__107.MoveNext() in C:\dev\.net\valiweb\trunk\MySqlConnector\MySqlDataReader.cs:line 489
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at MySqlConnector.Core.CommandExecutor.<ExecuteReaderAsync>d__0.MoveNext() in C:\dev\.net\valiweb\trunk\MySqlConnector\Core\CommandExecutor.cs:line 56
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at MySqlConnector.MySqlCommand.<ExecuteReaderAsync>d__84.MoveNext() in C:\dev\.net\valiweb\trunk\MySqlConnector\MySqlCommand.cs:line 344
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at MySqlConnector.Core.SchemaProvider.<FillDataTableAsync>d__4.MoveNext() in C:\dev\.net\valiweb\trunk\MySqlConnector\Core\SchemaProvider.cs:line 421
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at MySqlConnector.Core.SchemaProvider.<FillColumnsAsync>d__11.MoveNext() in C:\dev\.net\valiweb\trunk\MySqlConnector\Core\SchemaProvider.g.cs:line 216
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at MySqlConnector.Core.SchemaProvider.<GetSchemaAsync>d__6.MoveNext() in C:\dev\.net\valiweb\trunk\MySqlConnector\Core\SchemaProvider.g.cs:line 25
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
   at MySqlConnector.MySqlConnection.GetSchema(String collectionName, String[] restrictionValues) in C:\dev\.net\valiweb\trunk\MySqlConnector\MySqlConnection.cs:line 601
   at SubSonic.SqlGeneration.Schema.ANSISchemaGenerator.GetTableFromDB(IDataProvider provider, String tableName) in C:\dev\.net\lib\subsonic\trunk\3.0\SubSonic.Core\SQLGeneration\Schema\ANSISchemaGenerator.cs:line 205
   at SubSonic.DataProviders.DbDataProvider.GetTableFromDB(String tableName) in C:\dev\.net\lib\subsonic\trunk\3.0\SubSonic.Core\DataProviders\DbDataProvider.cs:line 395
   at SubSonic.Schema.Migrator.MigrateFromModel(Type type, IDataProvider provider) in C:\dev\.net\lib\subsonic\trunk\3.0\SubSonic.Core\Schema\Migrator.cs:line 95
   at Tim.Migrator.Form1.AddT(Migrator m, Type t, IDataProvider provider, IDataProvider providerRevisions, BatchQuery queryTimDB, BatchQuery queryTimRevisionsDB, List`1 result, String SpecificClass) in C:\dev\.net\valiweb\trunk\Tim.Migrator\Form1.cs:line 163
   at Tim.Migrator.Form1.ReadThread1() in C:\dev\.net\valiweb\trunk\Tim.Migrator\Form1.cs:line 121, provider: server=localhost;Port=3306;database=skellec_vw2017;user id=skellec_user; password=valibali16; Convert Zero Datetime=True;
using(var scope = new AutomaticConnectionScope(provider))
            {
                var restrictions = new string[4] {null, scope.Connection.Database, tableName, null};
                schema = scope.Connection.GetSchema("COLUMNS", restrictions);
            }

Expected behavior
To work the same as with a MySQL database but with a MariaDB

Additional context
So the exact same code works vs a MySQL database, but not vs a MariaDB with identical tables etc.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions