From 51dfb5b8eedd6b4a35eed1139b50a7550a11ecdf Mon Sep 17 00:00:00 2001 From: mar Date: Thu, 11 Jan 1990 18:31:01 +0000 Subject: [PATCH] make sure we use proper table names for caching; report real error codes, not SMS_INGRES_ERR on basic queries --- server/qrtn.qc | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/server/qrtn.qc b/server/qrtn.qc index cd4151a8..f182a9ff 100644 --- a/server/qrtn.qc +++ b/server/qrtn.qc @@ -669,8 +669,8 @@ do_retrieve(q, pqual, psort, action, actarg) } } -## inquire_equel (rowcount = "rowcount", errorno = "errorno") - if (errorno != 0) return(SMS_INGRES_ERR); + if (sms_errcode) return(sms_errcode); +## inquire_equel (rowcount = "rowcount") return ((rowcount == 0) ? SMS_NO_MATCH : SMS_SUCCESS); ##} @@ -694,11 +694,7 @@ do_update(q, argv, qual, action, actarg) ## replace rvar (param (q->tlist, argv)) ## where cqual -## inquire_equel (errorno = "errorno") - if (errorno == INGRES_BAD_INT) - return(SMS_INTEGER); - else if (errorno != 0) - return(SMS_INGRES_ERR); + if (sms_errcode) return(sms_errcode); return(SMS_SUCCESS); ##} @@ -725,11 +721,7 @@ do_append(q, argv, pqual, action, actarg) ## append to rtable (param (q->tlist, argv)) } -## inquire_equel (errorno = "errorno") - if (errorno == INGRES_BAD_INT) - return(SMS_INTEGER); - else if (errorno != 0) - return(SMS_INGRES_ERR); + if (sms_errcode) return(sms_errcode); return(SMS_SUCCESS); ##} @@ -751,8 +743,7 @@ do_delete(q, qual, action, actarg) cqual = qual; ## delete rvar where cqual -## inquire_equel (errorno = "errorno") - if (errorno != 0) return(SMS_INGRES_ERR); + if (sms_errcode) return(sms_errcode); return(SMS_SUCCESS); ##} @@ -828,7 +819,7 @@ int *uid; return; } - if (name_to_id(name, "STRING", &k_id) == SMS_SUCCESS) + if (name_to_id(name, "STRINGS", &k_id) == SMS_SUCCESS) *kid = -k_id; if (!ok) { @@ -836,7 +827,7 @@ int *uid; return; } - if (name_to_id(login, "USER", uid) != SMS_SUCCESS) + if (name_to_id(login, "USERS", uid) != SMS_SUCCESS) *uid = 0; if (*kid == 0) -- 2.45.2