Skip to content

Commit

Permalink
Fix oracle encryptionSpecification rule (#28683)
Browse files Browse the repository at this point in the history
  • Loading branch information
zihaoAK47 authored Oct 9, 2023
1 parent 39f926e commit cf2ec23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ identityOption
;

encryptionSpecification
: (USING STRING_)? (IDENTIFIED BY STRING_)? (integrityAlgorithm? (NO? SALT)? | (NO? SALT)? integrityAlgorithm?)
: (USING STRING_)? (IDENTIFIED BY (STRING_ | IDENTIFIER_))? (integrityAlgorithm? (NO? SALT)? | (NO? SALT)? integrityAlgorithm?)
;

inlineConstraint
Expand Down
9 changes: 9 additions & 0 deletions test/it/parser/src/main/resources/case/ddl/alter-table.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1709,4 +1709,13 @@
<alter-table sql-case-id="alter_table_move_compress_for_oltp">
<table name="table_name" start-index="12" stop-index="21" />
</alter-table>

<alter-table sql-case-id="alter_table_modify_encrypt_identified_by_password">
<table name="t1" start-index="12" stop-index="13" />
<modify-column>
<column-definition type="CLOB" start-index="24" stop-index="55">
<column name="a" />
</column-definition>
</modify-column>
</alter-table>
</sql-parser-test-cases>
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,5 @@
<sql-case id="alter_table_modify_lob1" value="ALTER TABLE t1 MODIFY LOB(a) (KEEP_DUPLICATES)" db-types="Oracle" />
<sql-case id="alter_table_modify_lob2" value="ALTER TABLE t1 MODIFY LOB(a) (COMPRESS LOW)" db-types="Oracle" />
<sql-case id="alter_table_move_compress_for_oltp" value="ALTER TABLE table_name MOVE COMPRESS FOR OLTP" db-types="Oracle" />
<sql-case id="alter_table_modify_encrypt_identified_by_password" value="ALTER TABLE t1 MODIFY ( a CLOB ENCRYPT IDENTIFIED BY foo)" db-types="Oracle" />
</sql-cases>

0 comments on commit cf2ec23

Please sign in to comment.