Index: /trunk/psLib/src/db/psDB.c
===================================================================
--- /trunk/psLib/src/db/psDB.c	(revision 17852)
+++ /trunk/psLib/src/db/psDB.c	(revision 17853)
@@ -23,5 +23,5 @@
  * 4.1.2 or newer is required.
  *
- * $Id: psDB.c,v 1.157 2008-05-29 03:02:28 jhoblitt Exp $
+ * $Id: psDB.c,v 1.158 2008-05-29 21:05:50 jhoblitt Exp $
  */
 
@@ -1647,7 +1647,4 @@
     while ((item = psListGetAndIncrement(cursor))) {
         // don't compile a regex unless we have too
-        if (psStrcasestr(item->comment, "INDEX") == NULL) {
-            continue;
-        }
 
         if (psStrcasestr(item->comment, "UINDEX")) {
@@ -1696,5 +1693,5 @@
             psStringAppend(&query, ", UNIQUE KEY(%s)", index);
             psFree(index);
-        } else {
+        } else if (psStrcasestr(item->comment, "INDEX")) {
             regex_t         myregex;
             regmatch_t      mymatch[2];     // match + 1 sub strings
@@ -1702,5 +1699,5 @@
             char            errbuf[errbuf_size];
             // don't accidentally match uindex
-            char            *pattern = "[^U]INDEX[:space:]*[(]([^)]*)";
+            char            *pattern = "[:space:]*INDEX[:space:]*[(]([^)]*)";
 
             int status = regcomp(&myregex, pattern, REG_EXTENDED|REG_ICASE);
