Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
"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
+-----------+ | tab_name | +-----------+ | ab | +-----------+ 1 row selected (0.457 seconds) No rows affected (0.039 seconds) +-----------+ | tab_name | +-----------+ | newtab | +-----------+
But after running it several, times you see threads having newdb as default database, ie the output of above command becomes -
+-----------+ | tab_name | +-----------+ | newtab | +-----------+ 1 row selected (0.518 seconds) No rows affected (0.052 seconds) +-----------+ | tab_name | +-----------+ | newtab | +-----------+ 1 row selected (0.232 seconds)
Attachments
Issue Links
- duplicates
-
HIVE-4171 Current database in metastore.Hive is not consistent with SessionState
- Closed