Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter does not work on callable statements if filtering should be done on bind params #499

Open
chamisf opened this issue May 24, 2020 · 0 comments

Comments

@chamisf
Copy link

chamisf commented May 24, 2020

In some cases, the statement is defined to take the query as bind parameters. See the following case.

if I take com.p6spy.engine.common.P6LogQuery#logElapsed(int, long, com.p6spy.engine.logging.Category, com.p6spy.engine.common.Loggable) method where i've loggable as CallableStatementInformation.

with that when I get loggable.getSql() it returns {call [some_DB].[sys].[sp_executesql] (?,?,?)} But if you take loggable.getSqlWithValues() it gives me {call [some_DB].[sys].[sp_executesql] ('SELECT [command] FROM spd.SomeTable WHERE [name]=@0','@0 varchar(4000)','some_value')} So as you can see my query params got table information as well.
In this case, filtering won't serve its purpose with the only SQL but it needs SQL with values. I've locally modified to see and it worked with loggable.getSqlWithValues(). I would like to see if this is a common case that needs to be rectified. If so I could give a PR too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant