char stmt_buf[MR_STMTBUF_LEN];
EXEC SQL END DECLARE SECTION;
-char *Argv[16];
+char *Argv[QMAXARGS];
int ingres_errno = 0;
int mr_errcode = 0;
EXEC SQL BEGIN DECLARE SECTION;
int query_timeout = 30;
+char *database = "moira";
EXEC SQL END DECLARE SECTION;
extern char *whoami;
extern FILE *journal;
break;
/* These should never come up unless someone breaks the query table */
case INGRES_NO_CURSOR:
- mr_errcode = MR_INTERNAL;
+ if (mr_errcode != MR_BUSY &&
+ mr_errcode != MR_DEADLOCK)
+ mr_errcode = MR_INTERNAL;
com_err(whoami, 0, "Cursor not opened");
break;
case INGRES_NO_STMT:
/* open the database */
#ifsql INGRES
- EXEC SQL CONNECT moira;
+ EXEC SQL CONNECT :database;
if(ingres_errno)
return (ingres_errno);
EXEC SQL set lockmode session where level = table, timeout = :query_timeout;