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

"current database" is retained between sessions in hive server2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: HiveServer2
    • Labels:
      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

            Activity

              People

              • Assignee:
                thejas Thejas Nair
                Reporter:
                thejas Thejas Nair
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: