IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17853


Ignore:
Timestamp:
May 29, 2008, 11:05:50 AM (18 years ago)
Author:
jhoblitt
Message:

attempt to make INDEX work again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.c

    r17843 r17853  
    2323 * 4.1.2 or newer is required.
    2424 *
    25  * $Id: psDB.c,v 1.157 2008-05-29 03:02:28 jhoblitt Exp $
     25 * $Id: psDB.c,v 1.158 2008-05-29 21:05:50 jhoblitt Exp $
    2626 */
    2727
     
    16471647    while ((item = psListGetAndIncrement(cursor))) {
    16481648        // don't compile a regex unless we have too
    1649         if (psStrcasestr(item->comment, "INDEX") == NULL) {
    1650             continue;
    1651         }
    16521649
    16531650        if (psStrcasestr(item->comment, "UINDEX")) {
     
    16961693            psStringAppend(&query, ", UNIQUE KEY(%s)", index);
    16971694            psFree(index);
    1698         } else {
     1695        } else if (psStrcasestr(item->comment, "INDEX")) {
    16991696            regex_t         myregex;
    17001697            regmatch_t      mymatch[2];     // match + 1 sub strings
     
    17021699            char            errbuf[errbuf_size];
    17031700            // don't accidentally match uindex
    1704             char            *pattern = "[^U]INDEX[:space:]*[(]([^)]*)";
     1701            char            *pattern = "[:space:]*INDEX[:space:]*[(]([^)]*)";
    17051702
    17061703            int status = regcomp(&myregex, pattern, REG_EXTENDED|REG_ICASE);
Note: See TracChangeset for help on using the changeset viewer.