Changeset 1282 for trunk/mainfunc.h
- Timestamp:
- 03/19/10 08:04:03 (2 years ago)
- Files:
-
- 1 modified
-
trunk/mainfunc.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mainfunc.h
r1126 r1282 921 921 unsigned uJobContainerIndex=0; 922 922 unsigned uTemplateLabelIndex=0; 923 unsigned uGlossaryLabelIndex=0; 923 924 924 925 printf("UpdateSchema(): Start\n"); … … 1002 1003 mysql_free_result(res); 1003 1004 1005 sprintf(gcQuery,"SHOW INDEX IN tGlossary"); 1006 mysql_query(&gMysql,gcQuery); 1007 if(mysql_errno(&gMysql)) 1008 printf("%s\n",mysql_error(&gMysql)); 1009 mysql_query(&gMysql,gcQuery); 1010 res=mysql_store_result(&gMysql); 1011 while((field=mysql_fetch_row(res))) 1012 { 1013 if(!strcmp(field[2],"cLabel")) uGlossaryLabelIndex=1; 1014 } 1015 mysql_free_result(res); 1016 1004 1017 if(uIncorrectVeth) 1005 1018 { … … 1172 1185 else 1173 1186 printf("Added INDEX cLabel tTemplate\n"); 1187 } 1188 1189 if(!uGlossaryLabelIndex) 1190 { 1191 sprintf(gcQuery,"ALTER TABLE tGlossary ADD INDEX (cLabel)"); 1192 mysql_query(&gMysql,gcQuery); 1193 if(mysql_errno(&gMysql)) 1194 printf("%s\n",mysql_error(&gMysql)); 1195 else 1196 printf("Added INDEX cLabel tGlossary\n"); 1174 1197 } 1175 1198
