Changeset 17853
- Timestamp:
- May 29, 2008, 11:05:50 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/db/psDB.c
r17843 r17853 23 23 * 4.1.2 or newer is required. 24 24 * 25 * $Id: psDB.c,v 1.15 7 2008-05-29 03:02:28jhoblitt Exp $25 * $Id: psDB.c,v 1.158 2008-05-29 21:05:50 jhoblitt Exp $ 26 26 */ 27 27 … … 1647 1647 while ((item = psListGetAndIncrement(cursor))) { 1648 1648 // don't compile a regex unless we have too 1649 if (psStrcasestr(item->comment, "INDEX") == NULL) {1650 continue;1651 }1652 1649 1653 1650 if (psStrcasestr(item->comment, "UINDEX")) { … … 1696 1693 psStringAppend(&query, ", UNIQUE KEY(%s)", index); 1697 1694 psFree(index); 1698 } else {1695 } else if (psStrcasestr(item->comment, "INDEX")) { 1699 1696 regex_t myregex; 1700 1697 regmatch_t mymatch[2]; // match + 1 sub strings … … 1702 1699 char errbuf[errbuf_size]; 1703 1700 // don't accidentally match uindex 1704 char *pattern = "[ ^U]INDEX[:space:]*[(]([^)]*)";1701 char *pattern = "[:space:]*INDEX[:space:]*[(]([^)]*)"; 1705 1702 1706 1703 int status = regcomp(&myregex, pattern, REG_EXTENDED|REG_ICASE);
Note:
See TracChangeset
for help on using the changeset viewer.
