X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDBUpgrade2.pm;h=f694b5aaca3cf813ecc9e1bc8777f297995c16e0;hb=f9a93e326337ed219de49f575c02e5a8cb36a1b6;hp=01af8f6e5ec476d6607c5dc94056988117616c2c;hpb=09479f022ab9e0815ceee55923ae46df51afbd42;p=kivitendo-erp.git diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index 01af8f6e5..f694b5aac 100644 --- a/SL/DBUpgrade2.pm +++ b/SL/DBUpgrade2.pm @@ -147,9 +147,6 @@ sub process_query { # Remove DOS and Unix style line endings. chomp; - # remove comments - s/--.*$//; - for (my $i = 0; $i < length($_); $i++) { my $char = substr($_, $i, 1); @@ -176,6 +173,11 @@ sub process_query { && $tag =~ /^ (?= [A-Za-z_] [A-Za-z0-9_]* | ) $/x) { # tag is identifier push @quote_chars, $char = '$' . $tag . '$'; $i = $tag_end; + } elsif ($char eq "-") { + if ( substr($_, $i+1, 1) eq "-") { + # found a comment outside quote + last; + } } elsif ($char eq ";") { # Query is complete. Send it.