Regression tests now work - except for some changes in error message
text.  The library is now safe to use for experimental work. (CVS 885)

FossilOrigin-Name: 8a593e9c2d57e758739a7ef54fa40ca6a0071a9a
diff --git a/src/insert.c b/src/insert.c
index 14f7824..f9f72f8 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle INSERT statements in SQLite.
 **
-** $Id: insert.c,v 1.75 2003/03/27 12:51:25 drh Exp $
+** $Id: insert.c,v 1.76 2003/03/27 13:50:00 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -93,7 +93,6 @@
 ){
   Table *pTab;          /* The table to insert into */
   char *zTab;           /* Name of the table into which we are inserting */
-  char *zDb;            /* Name of the database holding zTab */
   int i, j, idx;        /* Loop counters */
   Vdbe *v;              /* Generate code into this virtual machine */
   Index *pIdx;          /* For looping over indices of the table */
@@ -121,8 +120,7 @@
   assert( pTabList->nSrc==1 );
   zTab = pTabList->a[0].zName;
   if( zTab==0 ) goto insert_cleanup;
-  zDb = pTabList->a[0].zDatabase;
-  pTab = sqliteTableNameToTable(pParse, zTab, zDb);
+  pTab = sqliteSrcListLookup(pParse, pTabList);
   if( pTab==0 ){
     goto insert_cleanup;
   }