kgyrtkirk commented on code in PR #3348:
URL: https://github.com/apache/hive/pull/3348#discussion_r891508679


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -316,17 +316,20 @@ private boolean ensureDbInit() {
   }
 
   private boolean runTestQuery() {
+    boolean doTrace = LOG.isDebugEnabled();
     Transaction tx = pm.currentTransaction();
     boolean doCommit = false;
     if (!tx.isActive()) {
       tx.begin();
       doCommit = true;
     }
     // Run a self-test query. If it doesn't work, we will self-disable. What a 
PITA...
-    String selfTestQuery = "select \"DB_ID\" from " + DBS + "";
+    String selfTestQuery = "select \"DB_ID\" from " + DBS + " WHERE 
\"DB_ID\"=1";

Review Comment:
   this query may or may not have results... I think both is fine... how about 
changing it to `LIMIT 0`  ? 
   then it will not even need a primary-key scan... :)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to