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

Fix oracle audit auditOperationClause rule #28857

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,7 @@ auditingByClause

auditOperationClause
: (sqlStatementShortcut | ALL | ALL STATEMENTS) (COMMA_ sqlStatementShortcut | ALL | ALL STATEMENTS)*
| (systemPrivilege | ALL PRIVILEGES) (COMMA_ systemPrivilege | ALL PRIVILEGES)
| (systemPrivilege | ALL PRIVILEGES) (COMMA_ systemPrivilege | ALL PRIVILEGES)*
;

sqlStatementShortcut
Expand Down
5 changes: 5 additions & 0 deletions test/it/parser/src/main/resources/case/ddl/audit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,9 @@
<audit sql-case-id="audit_all_on_default_by_access" />
<audit sql-case-id="audit_all_statements_by_by_access_whenever_successful" />
<audit sql-case-id="audit_all_statements_in_session_current" />
<audit sql-case-id="audit_create_any_directory" />
<audit sql-case-id="audit_create_alter" />
<audit sql-case-id="audit_delete_any_table_by_access" />
<audit sql-case-id="audit_crete_table_by_access_whenever_not_successful" />
<audit sql-case-id="audit_select_table_by" />
</sql-parser-test-cases>
5 changes: 5 additions & 0 deletions test/it/parser/src/main/resources/sql/supported/ddl/audit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,9 @@
<sql-case id="audit_all_on_default_by_access" value="AUDIT ALL ON DEFAULT BY ACCESS" db-types="Oracle" />
<sql-case id="audit_all_statements_by_by_access_whenever_successful" value="AUDIT ALL STATEMENTS BY jward, jsmith BY ACCESS WHENEVER SUCCESSFUL" db-types="Oracle" />
<sql-case id="audit_all_statements_in_session_current" value="AUDIT ALL STATEMENTS IN SESSION CURRENT" db-types="Oracle" />
<sql-case id="audit_create_any_directory" value="AUDIT CREATE ANY DIRECTORY" db-types="Oracle" />
<sql-case id="audit_create_alter" value="AUDIT CREATE TABLE, CREATE SEQUENCE, CREATE SYNONYM, CREATE DATABASE LINK, CREATE CLUSTER, CREATE VIEW, ALTER SESSION" db-types="Oracle" />
<sql-case id="audit_delete_any_table_by_access" value="AUDIT DELETE ANY TABLE BY ACCESS" db-types="Oracle" />
<sql-case id="audit_crete_table_by_access_whenever_not_successful" value="AUDIT CREATE TABLE BY ACCESS WHENEVER NOT SUCCESSFUL" db-types="Oracle" />
<sql-case id="audit_select_table_by" value="AUDIT SELECT TABLE BY jackson" db-types="Oracle" />
</sql-cases>