Thejas M Nair created HIVE-4249:
-----------------------------------

             Summary: "current database" is retained between sessions in hive 
server2
                 Key: HIVE-4249
                 URL: https://issues.apache.org/jira/browse/HIVE-4249
             Project: Hive
          Issue Type: Bug
          Components: HiveServer2
            Reporter: Thejas M Nair
            Assignee: Thejas M Nair
             Fix For: 0.11.0


"current database" is retained between sessions in hive server2.

To reproduce -

Run this serveral times -
bin/beeline  -e '!connect jdbc:hive2://localhost:10000 scott tiger 
org.apache.hive.jdbc.HiveDriver' -e 'show tables;' -e ' use newdb;' -e ' show 
tables;'

table ab is a table in default database, newtab is a table in newdb database.
Expected result is 
{code}
+-----------+
| tab_name  |
+-----------+
| ab        |
+-----------+
1 row selected (0.457 seconds)
No rows affected (0.039 seconds)
+-----------+
| tab_name  |
+-----------+
| newtab    |
+-----------+
{code}

But after running it several, times you see threads having newdb as default 
database, ie the output of above command becomes -

{code}
+-----------+
| tab_name  |
+-----------+
| newtab    |
+-----------+
1 row selected (0.518 seconds)
No rows affected (0.052 seconds)
+-----------+
| tab_name  |
+-----------+
| newtab    |
+-----------+
1 row selected (0.232 seconds)

{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to