[ 
https://issues.apache.org/jira/browse/HIVE-25707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Naveen Gangam resolved HIVE-25707.
----------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

A patch has been merged that turns off the autocommit when running the 
schematool.
Unfortunately, for Oracle and MySQL, there can be no transactional boundaries 
for DDLs. They are autocommitted as they are run. They cannot be rolled back.

So the patch works for postgres. It wasnt tested for MSSQL.

> SchemaTool may leave the metastore in-between upgrade steps
> -----------------------------------------------------------
>
>                 Key: HIVE-25707
>                 URL: https://issues.apache.org/jira/browse/HIVE-25707
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> it seems like:
> * schematool runs the sql files via beeline
> * autocommit is turned on
> * pressing ctrl+c or killing the process will result in an invalid schema
> https://github.com/apache/hive/blob/6e02f6164385a370ee8014c795bee1fa423d7937/beeline/src/java/org/apache/hive/beeline/schematool/HiveSchemaTool.java#L79



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to