Update cr.c
This commit is contained in:
parent
6b7b9148e3
commit
484f7fb8d7
1 changed files with 10 additions and 6 deletions
16
c/cr.c
16
c/cr.c
|
@ -1460,16 +1460,20 @@ int main(int argc, char **argv)
|
|||
memset(sqlqueryfault,0,450);
|
||||
strcpy(sqlqueryfault,"UPDATE windex SET updated = CURRENT_TIMESTAMP, fault = 1 WHERE id = ");
|
||||
strcat(sqlqueryfault,idexistsvalue);
|
||||
if (mysql_query(con, sqlqueryfault))
|
||||
{
|
||||
finish_with_error(con);
|
||||
}
|
||||
if(nShards>0 && shard != 0){
|
||||
strcat(sqlqueryfault,"; UPDATE ws");
|
||||
memset(sqlqueryfault,0,450);
|
||||
strcat(sqlqueryfault,"UPDATE ws");
|
||||
strcat(sqlqueryfault,shard);
|
||||
strcat(sqlqueryfault," SET updated = CURRENT_TIMESTAMP, fault = 1 WHERE id = ");
|
||||
strcat(sqlqueryfault,idexistsvalue);
|
||||
}
|
||||
//strcat(sqlqueryfault,"; COMMIT");
|
||||
if (mysql_real_query(con, sqlqueryfault,strlen(sqlqueryfault)))
|
||||
{
|
||||
finish_with_error(con);
|
||||
if (mysql_query(con, sqlqueryfault))
|
||||
{
|
||||
finish_with_error(con);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
|
Loading…
Add table
Reference in a new issue