File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
tests/MySqlConnector.Tests Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,10 @@ public void Parse(string sql)
218
218
state = State . Hyphen ;
219
219
}
220
220
else if ( ch == '/' && index < sql . Length - 1 && sql [ index + 1 ] == '*' )
221
+ {
222
+ beforeCommentState = state ;
221
223
state = State . ForwardSlash ;
224
+ }
222
225
else if ( ch == '\' ' )
223
226
state = State . SingleQuotedString ;
224
227
else if ( ch == '"' )
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ public class StatementPreparerTests
16
16
[ InlineData ( "SELECT Id\n FROM mytable\n WHERE column1 = 2 -- mycomment\n AND column2 = @param" ) ]
17
17
[ InlineData ( "SELECT Id\n FROM mytable\n WHERE column1 = 2 -- mycomment\n AND column2 = @param" ) ]
18
18
[ InlineData ( "SELECT Id\n FROM mytable\n WHERE column1 = 2 -- mycomment\n AND column2 = @param" ) ]
19
+ [ InlineData ( "SELECT Id\n FROM mytable\n WHERE column1 = 2 /* mycomment */\n AND column2 = @param" ) ]
20
+ [ InlineData ( "SELECT Id\n FROM mytable\n WHERE column1 = 2 /* mycomment */ AND column2 = @param" ) ]
19
21
public void Bug429 ( string sql )
20
22
{
21
23
var parameters = new MySqlParameterCollection ( ) ;
You can’t perform that action at this time.
0 commit comments