[Rls-support] RLS does not answer

Robert Schuler schuler at ISI.EDU
Wed May 25 15:41:04 PDT 2005


| Where can I find the sequence of statements that you are executing for
Pg?

You could start by looking in db_lrc_create
(replica/rls/server/db.c:1208).

For instance,

...
  /* Create LFN, error if already exists>...*/
  snprintf(buf, BIGBUF, "insert into t_lfn (name, ref) values ('%s',
1)", lfn);
  r = SQLExecDirect(h->stmt, (SQLCHAR *) buf, SQL_NTS);
  if (!SQLOK(r)) {
      rc = seterr_insert(h, r, "t_lfn", lfn, GLOBUS_RLS_LFN_EXIST,
errmsg);
      goto error;
  }
  adjcount[T_LRCLFN]++;
  if ((rc = getid(h, lfn, "t_lfn", GLOBUS_RLS_LFN_NEXIST, &lfn_id,
                  errmsg)) != GLOBUS_RLS_SUCCESS)
      goto error;
  /* Update ref count for pfn or create if it doesn't exist>*/
  if ((rc = updateref(h, T_LRCPFN, pfn, 1, 1, &pfn_id, NULL,
                  errmsg, adjcount)) != GLOBUS_RLS_SUCCESS)
      goto error;

  /* Add mapping for lfn_id, pfn_id>*/
  snprintf(buf, BIGBUF, "insert into t_map (lfn_id,pfn_id) values
(%d,%d)",
          lfn_id, pfn_id);
  r = SQLExecDirect(h->stmt, (SQLCHAR *) buf, SQL_NTS);
  if (!SQLOK(r)) {
      rc = seterr_insertmap(h, r, "lfn_id", lfn_id, "pfn_id", pfn_id,
NULL, 0,
              errmsg);
      goto error;
  }
  adjcount[T_LRCMAP]++;
...

If I'm not mistaken, the error message returned by odbc was simply "DB
Error" -- unless I misinterpreted where that was coming from. If so
that's awfully non-descript.

rob



More information about the Rls-support mailing list