You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Marcin Kurczych (JIRA)" <ji...@apache.org> on 2011/08/16 01:01:27 UTC
[jira] [Created] (HIVE-2377) USE database doesn't work when it's
first command in session
USE database doesn't work when it's first command in session
------------------------------------------------------------
Key: HIVE-2377
URL: https://issues.apache.org/jira/browse/HIVE-2377
Project: Hive
Issue Type: Bug
Reporter: Marcin Kurczych
Priority: Minor
When USE database is run as a first command it has no effect:
USE database;
SHOW TABLES;
// wrong - default database tables
When run twice it works:
USE database;
USE database;
SHOW TABLES;
// ok
When SHOW DATABASES is used before it, it works:
SHOW DATABASES;
USE database;
SHOW tables;
// ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2377) USE database doesn't work when it's
first command in session
Posted by "Marcin Kurczych (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085462#comment-13085462 ]
Marcin Kurczych commented on HIVE-2377:
---------------------------------------
On some snapshot of 0.8 version, I believe it's revision 1155573. Maybe the problem appeared after 0.7, or it has something to do with local configuration.
> USE database doesn't work when it's first command in session
> ------------------------------------------------------------
>
> Key: HIVE-2377
> URL: https://issues.apache.org/jira/browse/HIVE-2377
> Project: Hive
> Issue Type: Bug
> Reporter: Marcin Kurczych
> Priority: Minor
>
> When USE database is run as a first command it has no effect:
> USE database;
> SHOW TABLES;
> // wrong - default database tables
> When run twice it works:
> USE database;
> USE database;
> SHOW TABLES;
> // ok
> When SHOW DATABASES is used before it, it works:
> SHOW DATABASES;
> USE database;
> SHOW TABLES;
> // ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2377) USE database doesn't work when it's
first command in session
Posted by "Marcin Kurczych (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcin Kurczych updated HIVE-2377:
----------------------------------
Description:
When USE database is run as a first command it has no effect:
USE database;
SHOW TABLES;
// wrong - default database tables
When run twice it works:
USE database;
USE database;
SHOW TABLES;
// ok
When SHOW DATABASES is used before it, it works:
SHOW DATABASES;
USE database;
SHOW TABLES;
// ok
was:
When USE database is run as a first command it has no effect:
USE database;
SHOW TABLES;
// wrong - default database tables
When run twice it works:
USE database;
USE database;
SHOW TABLES;
// ok
When SHOW DATABASES is used before it, it works:
SHOW DATABASES;
USE database;
SHOW tables;
// ok
> USE database doesn't work when it's first command in session
> ------------------------------------------------------------
>
> Key: HIVE-2377
> URL: https://issues.apache.org/jira/browse/HIVE-2377
> Project: Hive
> Issue Type: Bug
> Reporter: Marcin Kurczych
> Priority: Minor
>
> When USE database is run as a first command it has no effect:
> USE database;
> SHOW TABLES;
> // wrong - default database tables
> When run twice it works:
> USE database;
> USE database;
> SHOW TABLES;
> // ok
> When SHOW DATABASES is used before it, it works:
> SHOW DATABASES;
> USE database;
> SHOW TABLES;
> // ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2377) USE database doesn't work when it's
first command in session
Posted by "John Sichi (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Sichi updated HIVE-2377:
-----------------------------
Resolution: Duplicate
Status: Resolved (was: Patch Available)
Duplicate of HIVE-2501.
> USE database doesn't work when it's first command in session
> ------------------------------------------------------------
>
> Key: HIVE-2377
> URL: https://issues.apache.org/jira/browse/HIVE-2377
> Project: Hive
> Issue Type: Bug
> Reporter: Marcin Kurczych
> Assignee: Marcin Kurczych
> Priority: Minor
> Attachments: HIVE-2377.1.patch
>
>
> When USE database is run as a first command it has no effect:
> USE database;
> SHOW TABLES;
> // wrong - default database tables
> When run twice it works:
> USE database;
> USE database;
> SHOW TABLES;
> // ok
> When SHOW DATABASES is used before it, it works:
> SHOW DATABASES;
> USE database;
> SHOW TABLES;
> // ok
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2377) USE database doesn't work when it's
first command in session
Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085427#comment-13085427 ]
Jakob Homan commented on HIVE-2377:
-----------------------------------
@Marcin what version of Hive are you running against? On 7, use as the initial command works fine for me:
{noformat}hive> [jhoman@gw ~]$ hive
Hive history file=/hive_query_logs/jhoman/hive_job_log_jhoman_201108152322_635559337.txt
hive> use u_jhoman;
OK
Time taken: 1.968 seconds
hive> show tables;
OK
foo
Time taken: 0.297 seconds{noformat}
> USE database doesn't work when it's first command in session
> ------------------------------------------------------------
>
> Key: HIVE-2377
> URL: https://issues.apache.org/jira/browse/HIVE-2377
> Project: Hive
> Issue Type: Bug
> Reporter: Marcin Kurczych
> Priority: Minor
>
> When USE database is run as a first command it has no effect:
> USE database;
> SHOW TABLES;
> // wrong - default database tables
> When run twice it works:
> USE database;
> USE database;
> SHOW TABLES;
> // ok
> When SHOW DATABASES is used before it, it works:
> SHOW DATABASES;
> USE database;
> SHOW TABLES;
> // ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2377) USE database doesn't work when it's
first command in session
Posted by "Marcin Kurczych (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcin Kurczych updated HIVE-2377:
----------------------------------
Attachment: HIVE-2377.1.patch
> USE database doesn't work when it's first command in session
> ------------------------------------------------------------
>
> Key: HIVE-2377
> URL: https://issues.apache.org/jira/browse/HIVE-2377
> Project: Hive
> Issue Type: Bug
> Reporter: Marcin Kurczych
> Priority: Minor
> Attachments: HIVE-2377.1.patch
>
>
> When USE database is run as a first command it has no effect:
> USE database;
> SHOW TABLES;
> // wrong - default database tables
> When run twice it works:
> USE database;
> USE database;
> SHOW TABLES;
> // ok
> When SHOW DATABASES is used before it, it works:
> SHOW DATABASES;
> USE database;
> SHOW TABLES;
> // ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-2377) USE database doesn't work when it's
first command in session
Posted by "Marcin Kurczych (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcin Kurczych updated HIVE-2377:
----------------------------------
Assignee: Marcin Kurczych
Status: Patch Available (was: Open)
Problem appeared when changing between databases with different parameters. This made Hive.get function construct new Hive object with currentDatabase unbound.
Patch adds setting currentDatabase to value from previous instance.
> USE database doesn't work when it's first command in session
> ------------------------------------------------------------
>
> Key: HIVE-2377
> URL: https://issues.apache.org/jira/browse/HIVE-2377
> Project: Hive
> Issue Type: Bug
> Reporter: Marcin Kurczych
> Assignee: Marcin Kurczych
> Priority: Minor
> Attachments: HIVE-2377.1.patch
>
>
> When USE database is run as a first command it has no effect:
> USE database;
> SHOW TABLES;
> // wrong - default database tables
> When run twice it works:
> USE database;
> USE database;
> SHOW TABLES;
> // ok
> When SHOW DATABASES is used before it, it works:
> SHOW DATABASES;
> USE database;
> SHOW TABLES;
> // ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira