HHH-18739 - Fix for hints in queries containing joins
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
db24cf11c5
commit
75885b9dd1
|
@ -25,8 +25,7 @@ public class IndexQueryHintHandler implements QueryHintHandler {
|
|||
|
||||
public static final IndexQueryHintHandler INSTANCE = new IndexQueryHintHandler();
|
||||
|
||||
private static final Pattern QUERY_PATTERN = Pattern.compile( "^\\s*(select\\b.+?\\bfrom\\b.+?)(\\bwhere\\b.+?)$" );
|
||||
|
||||
private static final Pattern QUERY_PATTERN = Pattern.compile( "^\\s*(select\\b.+?\\bfrom\\b.+?)(\\b(where|join)\\b.+?)$" );
|
||||
@Override
|
||||
public String addQueryHints(String query, String hints) {
|
||||
Matcher matcher = QUERY_PATTERN.matcher( query );
|
||||
|
|
Loading…
Reference in New Issue