Changeset 1282 for trunk/mainfunc.h

Show
Ignore:
Timestamp:
03/19/10 08:04:03 (2 years ago)
Author:
Gary
Message:

unxsVZ tGlossary functionality work in progress.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/mainfunc.h

    r1126 r1282  
    921921        unsigned uJobContainerIndex=0; 
    922922        unsigned uTemplateLabelIndex=0; 
     923        unsigned uGlossaryLabelIndex=0; 
    923924 
    924925        printf("UpdateSchema(): Start\n"); 
     
    10021003        mysql_free_result(res); 
    10031004 
     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 
    10041017        if(uIncorrectVeth) 
    10051018        { 
     
    11721185                else 
    11731186                        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"); 
    11741197        } 
    11751198