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

Aihua Xu updated HIVE-10984:
----------------------------
    Description: 
The following statements will fail since tb1 and its database are locked in 
shared, and exclusive lock on database fails as expected.
{noformat}
use db1; 
lock table tbl1 shared; 
lock database db1 exclusive;
{noformat}

While the following similar statements will pass just because the current 
database is different.
{noformat}
use default; 
lock table db1.tbl1 shared; 
lock database db1 exclusive;
{noformat}

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


  was:
The following statements will fail since tb1 and its database are locked in 
shared, and exclusive lock on database fails as expected.
{noformat}
use db1; 
lock table tbl1 shared; 
lock database db1 exclusive;
{noformat}

While the following similar statements will pass since the current database is 
different.
{noformat}
use default; 
lock table db1.tbl1 shared; 
lock database db1 exclusive;
{noformat}

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



> After "lock table shared" explicit lock, "lock database exclusive" should 
> fail.
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-10984
>                 URL: https://issues.apache.org/jira/browse/HIVE-10984
>             Project: Hive
>          Issue Type: Bug
>          Components: Locking
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>
> The following statements will fail since tb1 and its database are locked in 
> shared, and exclusive lock on database fails as expected.
> {noformat}
> use db1; 
> lock table tbl1 shared; 
> lock database db1 exclusive;
> {noformat}
> While the following similar statements will pass just because the current 
> database is different.
> {noformat}
> use default; 
> lock table db1.tbl1 shared; 
> lock database db1 exclusive;
> {noformat}
> Seems both case should fail.
> Also check the test case lockneg_try_lock_db_in_use.q to add more reasonable 
> failure cases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to