@Test
  public void testMultiInsertOnDynamicallyPartitionedMmTable() throws Exception {
    dropTable(new String[] {"tabMmDp", "tab_not_acid"});
    driver.run("create table if not exists tabMmDp (a int, b int) partitioned by (p string) "
        + "stored as orc "
        + "TBLPROPERTIES ('transactional'='true', 'transactional_properties'='insert_only')");
    driver.run("create table if not exists tab_not_acid (a int, b int, p string)");
    driver.run("insert into tab_not_acid values (1 ,1, 'one'), (2, 2, 'two')");
    // insert 2 rows twice into the MM table
    driver.run("from tab_not_acid "
        + "insert into tabMmDp select a,b,p "
        + "insert into tabMmDp select a,b,p"); //txnid: 2 (2 drops, 2 creates, 2 inserts)

    final String completedTxnComponentsContents =
        TestTxnDbUtil.queryToString(conf, "select * from \"COMPLETED_TXN_COMPONENTS\"");
    Assert.assertEquals(completedTxnComponentsContents,
        4, TestTxnDbUtil.countQueryAgent(conf, "select count(*) from \"COMPLETED_TXN_COMPONENTS\""));
    Assert.assertEquals(completedTxnComponentsContents,
        4, TestTxnDbUtil.countQueryAgent(conf, "select count(*) from \"COMPLETED_TXN_COMPONENTS\" where \"CTC_TXNID\"=2"));
    Assert.assertEquals(completedTxnComponentsContents,
        4, TestTxnDbUtil.countQueryAgent(conf, "select count(*) from \"COMPLETED_TXN_COMPONENTS\" where \"CTC_TXNID\"=2 "
            + "and \"CTC_TABLE\"='tabmmdp'"));
    // ctc_update_delete value should be "N" for both partitions since these are inserts
    Assert.assertEquals(completedTxnComponentsContents,
        4, TestTxnDbUtil.countQueryAgent(conf, "select count(*) from \"COMPLETED_TXN_COMPONENTS\" where \"CTC_TXNID\"=2 "
            + "and \"CTC_TABLE\"='tabmmdp' and \"CTC_UPDATE_DELETE\"='N'"));
    dropTable(new String[] {"tabMmDp", "tab_not_acid"});
  }
Concurrent delete/delete of same partition - should NOT pass
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java