From c02d130e43aff7f72b04f263e8b67a8ff5a2d4e6 Mon Sep 17 00:00:00 2001 From: AndersMalmgren Date: Mon, 26 Nov 2012 13:41:52 +0100 Subject: [PATCH] Fixed a bug which caused RoundhousE to hang on regex parsing. Thanks to Stackoverflow user "Tim Pietzcker" for helping me with the regex http://stackoverflow.com/questions/13562435/infinite-loop-with-regex --- product/roundhouse.databases.sqlserver/SqlServerDatabase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/roundhouse.databases.sqlserver/SqlServerDatabase.cs b/product/roundhouse.databases.sqlserver/SqlServerDatabase.cs index 52409ffc..b6d36278 100644 --- a/product/roundhouse.databases.sqlserver/SqlServerDatabase.cs +++ b/product/roundhouse.databases.sqlserver/SqlServerDatabase.cs @@ -16,7 +16,7 @@ public class SqlServerDatabase : AdoNetDatabase public override string sql_statement_separator_regex_pattern { - get { return @"(?^(?:[\s\t])*(?:-{2}).*$)|(?/{1}\*{1}[\S\s]*?\*{1}/{1})|(?'{1}(?:[^']|\n[^'])*?'{1})|(?\s)(?GO)(?\s)|(?\s)(?GO)(?$)"; } + get { return @"(?^\s*--.*$)|(?/\*[\S\s]*?\*/)|(?'[^']*')|(?\s)(?GO)(?\s|$)"; } } public override void initialize_connections(ConfigurationPropertyHolder configuration_property_holder)