In the method AFScriptContextUtil.checkCustomSQLFilters() we need to do the filter on the statement without client and server side comments.
Customer wants to filter on the word "merge", but some users have server side comments on Sybase ASE like this :
// This statement will be part of the MERGE process
select * from mytable
So, they want to prevent a user from executing a MERGE command, but not prevent the statement because they have a comment with the word "MERGE" in it.
|
52 KB
|
155 KB
Only way to get the SQL statement without the client & server side comments is to use AFScriptParser and pass "false" for the last 3 parameters. We don't seem to do this right now, which means we will need to call this for each executed statement. To minimize parsing time, we should only execute this if there is a filter present for the connection.
Under File -> Options, I enabled Sybase ASE Server Side Comments. Under Edit Server Properties, which permission should I disable to test this ?
Under File -> Options, I enabled Sybase ASE Server Side Comments. Under Edit Server Properties, which permission should I disable to test this ?
I think I was able to test it successfully, I will get more info tomorrow..I did not not disable any permission. I enabled Server Side Comments for Sybase ASE and used the SQL that Niels has provided to test this out.
I think I was able to test it successfully, I will get more info tomorrow..I did not not disable any permission. I enabled Server Side Comments for Sybase ASE and used the SQL that Niels has provided to test this out.
Verified in ADS 15.0.12-2. Please see attached screenshot "Verified.png" for details
Verified in ADS 15.0.12-2. Please see attached screenshot "Verified.png" for details
I've code reviewed and tested this. Works as needed.
I've code reviewed and tested this. Works as needed.
Issue #13061 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 15.0.12-2 |
No time estimate |
1 issue link |
duplicates #13060
Issue #13060Enhance Custom SQL Filters |
Only way to get the SQL statement without the client & server side comments is to use AFScriptParser and pass "false" for the last 3 parameters. We don't seem to do this right now, which means we will need to call this for each executed statement. To minimize parsing time, we should only execute this if there is a filter present for the connection.