Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL delimiter issues inside strings #377

Closed
TheSkorm opened this issue Apr 8, 2019 · 2 comments
Closed

MySQL delimiter issues inside strings #377

TheSkorm opened this issue Apr 8, 2019 · 2 comments

Comments

@TheSkorm
Copy link

TheSkorm commented Apr 8, 2019

Similar to #349 - Versions : 1.0.4 and 1.0.3

MySQL migrations that include delimiters within a string seem to break the parser.

The following up script results in an error.

ALTER TABLE `table_name` 
CHANGE COLUMN `superseded` `superseded` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'this is a test; test 123' ;

RoundhousE encountered an error.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at roundhouse.databases.mysql.MySqlDatabase.run_sql(String sql_to_run, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse.databases.mysql\MySqlDatabase.cs:line 193
   at roundhouse.migrators.DefaultDatabaseMigrator.run_sql(String sql_to_run, String script_name, Boolean run_this_script_once, Boolean run_this_script_every_time, Int64 version_id, EnvironmentSet environment_set, String repository_version, String repository_path, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse\migrators\DefaultDatabaseMigrator.cs:line 209
   at roundhouse.runners.RoundhouseMigrationRunner.traverse_files_and_run_sql(String directory, Int64 version_id, MigrationsFolder migration_folder, EnvironmentSet migrating_environment_set, String repository_version, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse\runners\RoundhouseMigrationRunner.cs:line 290
   at roundhouse.runners.RoundhouseMigrationRunner.log_and_traverse(MigrationsFolder folder, Int64 version_id, String new_version, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse\runners\RoundhouseMigrationRunner.cs:line 222
   at roundhouse.runners.RoundhouseMigrationRunner.run() in C:\projects\roundhouse\product\roundhouse\runners\RoundhouseMigrationRunner.cs:line 145
Index was outside the bounds of the array.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at roundhouse.databases.mysql.MySqlDatabase.run_sql(String sql_to_run, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse.databases.mysql\MySqlDatabase.cs:line 193
   at roundhouse.migrators.DefaultDatabaseMigrator.run_sql(String sql_to_run, String script_name, Boolean run_this_script_once, Boolean run_this_script_every_time, Int64 version_id, EnvironmentSet environment_set, String repository_version, String repository_path, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse\migrators\DefaultDatabaseMigrator.cs:line 209
   at roundhouse.runners.RoundhouseMigrationRunner.traverse_files_and_run_sql(String directory, Int64 version_id, MigrationsFolder migration_folder, EnvironmentSet migrating_environment_set, String repository_version, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse\runners\RoundhouseMigrationRunner.cs:line 290
   at roundhouse.runners.RoundhouseMigrationRunner.log_and_traverse(MigrationsFolder folder, Int64 version_id, String new_version, ConnectionType connection_type) in C:\projects\roundhouse\product\roundhouse\runners\RoundhouseMigrationRunner.cs:line 222
   at roundhouse.runners.RoundhouseMigrationRunner.run() in C:\projects\roundhouse\product\roundhouse\runners\RoundhouseMigrationRunner.cs:line 145
   at roundhouse.console.Program.run_migrator(ConfigurationPropertyHolder configuration) in C:\projects\roundhouse\product\roundhouse.console\Program.cs:line 558
   at roundhouse.console.Program.Main(String[] args) in C:\projects\roundhouse\product\roundhouse.console\Program.cs:line 65
@cmiles74
Copy link
Contributor

cmiles74 commented Apr 14, 2019

I think pull request #376 will fix this.

@TheSkorm
Copy link
Author

Yup, this sounds like some of the issues we've been having.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants