You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the following exception when trying to update a MySql database with transaction.
2018-04-06 00:14:15,402 [INFO ] - Setup, Backup, Create/Restore/Drop
2018-04-06 00:14:16,535 [ERROR] - RoundhousE encountered an error. You were running in a transaction though, so the database should be in the state it was in prior to this piece running. This does not include a drop/create or any creation of a database, as those items can not run in a transaction.
System.NullReferenceException: Object reference not set to an instance of an object.
at MySql.Data.MySqlClient.MySqlCommand.AddCallStatement(String query)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction()
at MySql.Data.MySqlClient.MySqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at roundhouse.databases.AdoNetDatabase.open_connection(Boolean with_transaction)
at roundhouse.migrators.DefaultDatabaseMigrator.open_connection(Boolean with_transaction)
at roundhouse.runners.RoundhouseMigrationRunner.run()
The text was updated successfully, but these errors were encountered:
After doing some digging I was able to track down the root cause. The MySql.Data uses a util to read embedded resource files, in this case keywords.txt. This util method appends Assembly.GetExecutingAssembly().GetName().Name to the resource name passed in, which in this case becomes "rh.keywords.txt" which doesn't exist, when it is really looking for "MySql.Data.keywords.txt".
I'm not sure if this is the best way to fix this issue, but the solution I found that works was copying the resource file into the roundhouse.databases.mysql project and overriding the name to "rh.keywords.txt". I am going to submit a pull request shortly for this.
Getting the following exception when trying to update a MySql database with transaction.
2018-04-06 00:14:15,402 [INFO ] - Setup, Backup, Create/Restore/Drop
2018-04-06 00:14:16,535 [ERROR] - RoundhousE encountered an error. You were running in a transaction though, so the database should be in the state it was in prior to this piece running. This does not include a drop/create or any creation of a database, as those items can not run in a transaction.
System.NullReferenceException: Object reference not set to an instance of an object.
at MySql.Data.MySqlClient.MySqlCommand.AddCallStatement(String query)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction()
at MySql.Data.MySqlClient.MySqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at roundhouse.databases.AdoNetDatabase.open_connection(Boolean with_transaction)
at roundhouse.migrators.DefaultDatabaseMigrator.open_connection(Boolean with_transaction)
at roundhouse.runners.RoundhouseMigrationRunner.run()
The text was updated successfully, but these errors were encountered: