LiJie20190102 opened a new pull request, #12968:
URL: https://github.com/apache/gravitino/pull/12968

   
   ### What changes were proposed in this pull request?
   
   PostgreSQL: add IF NOT EXISTS to 5 CREATE INDEX statements in 
upgrade-1.1.0-to-1.2.0-postgresql.sql.
   
   MySQL: use prepared statements with information_schema check to make 7 
CREATE [UNIQUE] INDEX statements idempotent across 2 upgrade scripts 
(upgrade-1.2.0-to-1.3.0-mysql.sql and upgrade-1.3.0-to-2.0.0-mysql.sql), since 
MySQL 8.0 does not support CREATE INDEX IF NOT EXISTS.
   
   Add testUpgradeSQLScriptIdempotency to TestSQLScripts to verify that 
re-running upgrade scripts does not fail on index-creation statements.
   ### Why are the changes needed?
   
   (Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, describe the bug.)
   
   Fix: #12516 
   
   ### Does this PR introduce _any_ user-facing change?
   
   (Please list the user-facing changes introduced by your change, including
     1. Change in user-facing APIs.
     2. Addition or removal of property keys.)
   
   ### How was this patch tested?
   
   Execute the method 
`org.apache.gravitino.storage.TestSQLScripts#testUpgradeSQLScriptIdempotency`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to