Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

exclude option is not respected #78

Closed
quintonm opened this Issue · 0 comments

1 participant

@quintonm
Owner

Migrated from sourceforge: https://sourceforge.net/p/p6spy/bugs/17/

I noticed a bug concerning the "exclude" option.
In the file spy.properties it is said that "exclude" takes a "comma separated list of tables to exclude when filtering". After looking in the current source of the svn trunk I found out that
P6LogQuery.foundTable()
contains the statement
found = Pattern.matches(tables[i], sql);
The JDK-API for Pattern states that
public static boolean matches(String regex, CharSequence input)
takes a regexp as first arg but tables[i] is a tablename and no regexp. Therefore e.g. Pattern.matches("SOMETABLE", "SELECT * FROM SOMETABLE WHERE BLA") will not match and every sql call is passed into the p6spy log.
Simple fix:
found = sql.indexOf(tables[i]) >= 0;

@typekpb typekpb referenced this issue from a commit
@typekpb typekpb P6LogOptions: for exclude/include and sqlexpression we compile Patter…
…n eagerly => to improve performance; tests for these added; fixed #78
413d827
@typekpb typekpb closed this in #115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.