{"action":"created","issue":{"url":"https://api.github.com/repos/DbUp/DbUp/issues/190","repository_url":"https://api.github.com/repos/DbUp/DbUp","labels_url":"https://api.github.com/repos/DbUp/DbUp/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/DbUp/DbUp/issues/190/comments","events_url":"https://api.github.com/repos/DbUp/DbUp/issues/190/events","html_url":"https://github.com/DbUp/DbUp/pull/190","id":151696577,"number":190,"title":"Fix for #189 variable substitution OutOfMemory error","user":{"login":"omnibs","id":1060410,"avatar_url":"https://avatars.githubusercontent.com/u/1060410?v=3","gravatar_id":"","url":"https://api.github.com/users/omnibs","html_url":"https://github.com/omnibs","followers_url":"https://api.github.com/users/omnibs/followers","following_url":"https://api.github.com/users/omnibs/following{/other_user}","gists_url":"https://api.github.com/users/omnibs/gists{/gist_id}","starred_url":"https://api.github.com/users/omnibs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omnibs/subscriptions","organizations_url":"https://api.github.com/users/omnibs/orgs","repos_url":"https://api.github.com/users/omnibs/repos","events_url":"https://api.github.com/users/omnibs/events{/privacy}","received_events_url":"https://api.github.com/users/omnibs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-28T17:15:46Z","updated_at":"2016-04-28T17:57:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DbUp/DbUp/pulls/190","html_url":"https://github.com/DbUp/DbUp/pull/190","diff_url":"https://github.com/DbUp/DbUp/pull/190.diff","patch_url":"https://github.com/DbUp/DbUp/pull/190.patch"},"body":"The regex to prevent throwing errors at unset variables inside `VariableSubstitutionPreprocessor` is too complex and susceptible to stack overflow and out of memory errors.\r\n\r\nI've rewritten what it does without regex, parsing the comments and marking the index ranges, with tests and all.\r\n\r\nOne thing I've noticed writing this is that this method of dealing with comments is very error prone if scripts contain strings with `/*` or `--`. \r\n\r\nIt's an issue in the current code and also in this new one I'm proposing. In order to handle that we'd have to parse strings in the query also. I'm willing to try that out in a second PR, since this is already an issue in the master branch."},"comment":{"url":"https://api.github.com/repos/DbUp/DbUp/issues/comments/215510618","html_url":"https://github.com/DbUp/DbUp/pull/190#issuecomment-215510618","issue_url":"https://api.github.com/repos/DbUp/DbUp/issues/190","id":215510618,"user":{"login":"omnibs","id":1060410,"avatar_url":"https://avatars.githubusercontent.com/u/1060410?v=3","gravatar_id":"","url":"https://api.github.com/users/omnibs","html_url":"https://github.com/omnibs","followers_url":"https://api.github.com/users/omnibs/followers","following_url":"https://api.github.com/users/omnibs/following{/other_user}","gists_url":"https://api.github.com/users/omnibs/gists{/gist_id}","starred_url":"https://api.github.com/users/omnibs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omnibs/subscriptions","organizations_url":"https://api.github.com/users/omnibs/orgs","repos_url":"https://api.github.com/users/omnibs/repos","events_url":"https://api.github.com/users/omnibs/events{/privacy}","received_events_url":"https://api.github.com/users/omnibs/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T17:57:05Z","updated_at":"2016-04-28T17:57:05Z","body":"Good idea @dazinator, seems like the perfect candidate. \r\n\r\nI've seen we have one for SqlServer that apparently is also used for SqlCe, one for MySql. Do you have any idea what kind of trouble could we run into using that class for pgsql or firebird?"}}