[ https://issues.apache.org/jira/browse/HIVE-13980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593494#comment-15593494 ]
Eugene Koifman commented on HIVE-13980: --------------------------------------- cc [~sershe] - maybe CTAS does work.... > create table as select should acquire X lock on target table > ------------------------------------------------------------ > > Key: HIVE-13980 > URL: https://issues.apache.org/jira/browse/HIVE-13980 > Project: Hive > Issue Type: Bug > Components: Transactions > Affects Versions: 1.0.0 > Reporter: Eugene Koifman > > hive> create table test.dummy as select * from oraclehadoop.dummy; > This acquires SHARED_READ on oraclehadoop.dummy table and SHARED_READ on > _test_ database. > The effect is that you can drop _test.dummy_ from another session while the > insert is still in progress. > This operation is a bit odd in that it combines a DDL operation which is not > transactional with a DML operation which is. > If it were to fail in the middle, the target table would remain. This can't > be fixed easily but we should get an X lock on _test.dummy_. > The workaround is to split this into 2 commands > 1. create table > 2. perform insert > -- This message was sent by Atlassian JIRA (v6.3.4#6332)