Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-10984

After "lock table shared" explicit lock, "lock database exclusive" should fail.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Locking
    • None

    Description

      The following statements will fail since tb1 and its database are locked in shared, and exclusive lock on database fails as expected.

      use db1; 
      lock table db1.tbl1 shared; 
      lock database db1 exclusive;
      

      While the following similar statements will pass just because the current database is different.

      use default; 
      lock table db1.tbl1 shared; 
      lock database db1 exclusive;
      

      Seems both case should fail.
      Also check the test case lockneg_try_lock_db_in_use.q to add more reasonable failure cases.

      Attachments

        Activity

          People

            aihuaxu Aihua Xu
            aihuaxu Aihua Xu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: