Index: /trunk/psLib/test/dataIO/tst_psDB.c
===================================================================
--- /trunk/psLib/test/dataIO/tst_psDB.c	(revision 4271)
+++ /trunk/psLib/test/dataIO/tst_psDB.c	(revision 4272)
@@ -9,6 +9,6 @@
  *  @author Aaron Culliney, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-15 03:20:36 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-15 19:53:05 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -73,5 +73,5 @@
                               {TPDBChange,         842,  "dbChange",          0, false},
                               {TPDBCreateTable,    843,  "dbCreateTable",     0, false},
-                              {TPDBDropTable,       -4,  "dbDropTable",       0, false},
+                              {TPDBDropTable,      844,  "dbDropTable",       0, false},
                               {TPDBSelectColumn,    -5,  "dbSelectColumn",    0, false},
                               {TPDBSelectColumnNum, -6,  "dbSelectColumnNum", 0, false},
@@ -405,5 +405,5 @@
 }
 
-// Testpoint #XXX, psDBDropTable shall create tables in the test database ...
+// Testpoint #844, psDBDropTable shall remove tables in the test database ...
 psS32 TPDBDropTable( void )
 {
@@ -411,18 +411,23 @@
     psDB *dbh = NULL;
     const char* table = "table2";
+
+    // Create table definition metadata
     psMetadata *row=NULL, *md = _get_CreateTableMetadata();
 
-    dbh = _init_psDB();
-    if (dbh == NULL) {
-        return 1;
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "psDBDropTable shall create/drop a new table in the new test database.\n" );
-
+    // Initialize database connection
+    dbh = _init_psDB();
+    if (dbh == NULL) {
+        psError(PS_ERR_UNKNOWN,true,"Did not expect NULL return to initialize database");
+        return 1;
+    }
+
+    // Create table in database
     failed = ! psDBCreateTable(dbh, table, md);
     if (!failed) {
+
+        // Drop table with valid arguments
         failed = ! psDBDropTable(dbh, table);
 
-        // insert should fail ...
+        // insert should fail since the table has been drop from database
         psLogMsg( __func__, PS_LOG_INFO, "psDBDropTable: insert should fail here...\n" );
         row = _get_row();
@@ -432,4 +437,25 @@
         }
         psFree(row);
+    }
+
+    // Attempt to drop table from NULL psDB object
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL database object");
+    if(psDBDropTable(NULL,table)) {
+        psError(PS_ERR_UNKNOWN,true,"Did not return false as expected for NULL database object");
+        return 2;
+    }
+
+    // Attempt to drop table from valid psDB but invalid table
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid table");
+    if(psDBDropTable(dbh,"table99")) {
+        psError(PS_ERR_UNKNOWN,true,"Did not return false as expected for invalid table");
+        return 3;
+    }
+
+    // Attempt to drop table from valid psDB but NULL table
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL table");
+    if(psDBDropTable(dbh,NULL)) {
+        psError(PS_ERR_UNKNOWN,true,"Did not return false as expected for NULL table");
+        return 4;
     }
 
Index: /trunk/psLib/test/dataIO/verified/tst_psDB.stderr
===================================================================
--- /trunk/psLib/test/dataIO/verified/tst_psDB.stderr	(revision 4271)
+++ /trunk/psLib/test/dataIO/verified/tst_psDB.stderr	(revision 4272)
@@ -59,6 +59,4 @@
 
 <DATE><TIME>|<HOST>|I|TPDBDropTable
-    psDBDropTable shall create/drop a new table in the new test database.
-<DATE><TIME>|<HOST>|I|TPDBDropTable
     psDBDropTable: insert should fail here...
 <DATE><TIME>|<HOST>|E|psDBInsertRows (FILE:LINENO)
@@ -66,4 +64,22 @@
 <DATE><TIME>|<HOST>|E|psDBInsertOneRow (FILE:LINENO)
     Insert failed.
+<DATE><TIME>|<HOST>|I|TPDBDropTable
+    Following should generate an error message for NULL database object
+<DATE><TIME>|<HOST>|E|p_psDBRunQuery (FILE:LINENO)
+    Invalid psDB has been specified.
+<DATE><TIME>|<HOST>|E|psDBDropTable (FILE:LINENO)
+    Failed to drop table.
+<DATE><TIME>|<HOST>|I|TPDBDropTable
+    Following should generate an error message for invalid table
+<DATE><TIME>|<HOST>|E|p_psDBRunQuery (FILE:LINENO)
+    Failed to execute SQL query.  Error: Unknown table 'table99'
+<DATE><TIME>|<HOST>|E|psDBDropTable (FILE:LINENO)
+    Failed to drop table.
+<DATE><TIME>|<HOST>|I|TPDBDropTable
+    Following should generate an error message for NULL table
+<DATE><TIME>|<HOST>|E|p_psDBRunQuery (FILE:LINENO)
+    Failed to execute SQL query.  Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(null)' at line 1
+<DATE><TIME>|<HOST>|E|psDBDropTable (FILE:LINENO)
+    Failed to drop table.
 
 ---> TESTPOINT PASSED (psDB{dbDropTable} | tst_psDB.c)
