HHH-13758 - Limit Handler for SQL server doesn't work with CTE queries with strings literals

This commit is contained in:
Jason Jijón 2019-11-29 11:40:56 -05:00 committed by Sanne Grinovero
parent 42752ec89d
commit 7daf67172a
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ public class SQLServer2005LimitHandler extends AbstractLimitHandler {
int index = offset;
boolean inString = false;
for ( ; index < sql.length(); ++index ) {
if ( sql.charAt( index ) == '\'' ) {
if ( sql.charAt( index ) == '\'' && !inString ) {
inString = true;
}
else if ( sql.charAt( index ) == '\'' && inString ) {