int set_modtime(struct query *q, char *argv[], client *cl)
{
char *name, *entity, *table;
- int who;
+ int who, row = 0;
entity = cl->entity;
who = cl->client_id;
table = table_name[q->rtable];
- name = argv[0];
+
+ if (q->type == MR_Q_UPDATE)
+ row = 1;
+
+ name = argv[0 + row];
sprintf(stmt_buf, "UPDATE %s SET modtime = SYSDATE, modby = %d, "
"modwith = '%s' WHERE name = '%s'", table, who, entity, name);
* conflicts between what is possible in the query table and what
* is possible in SQL.
*/
- if (q->type == APPEND)
+ if (q->type == MR_Q_APPEND)
{
incremental_clear_before();
EXEC SQL INSERT INTO quota
if (dbms_errno)
return mr_errcode;
- if (q->type == APPEND)
+ if (q->type == MR_Q_APPEND)
{
EXEC SQL UPDATE tblstats SET appends = appends + 1, modtime = SYSDATE
WHERE table_name = :tname;