HHH-13758 - Limit Handler for SQL server doesn't work with CTE queries with strings literals
This commit is contained in:
parent
42752ec89d
commit
7daf67172a
|
@ -585,7 +585,7 @@ public class SQLServer2005LimitHandler extends AbstractLimitHandler {
|
||||||
int index = offset;
|
int index = offset;
|
||||||
boolean inString = false;
|
boolean inString = false;
|
||||||
for ( ; index < sql.length(); ++index ) {
|
for ( ; index < sql.length(); ++index ) {
|
||||||
if ( sql.charAt( index ) == '\'' ) {
|
if ( sql.charAt( index ) == '\'' && !inString ) {
|
||||||
inString = true;
|
inString = true;
|
||||||
}
|
}
|
||||||
else if ( sql.charAt( index ) == '\'' && inString ) {
|
else if ( sql.charAt( index ) == '\'' && inString ) {
|
||||||
|
|
Loading…
Reference in New Issue