Date: Thursday, March 9, 2006 @ 14:24:10
Author: marc
Path: /cvsroot/carob/odbsequoia/src
Modified: simpletest.c (1.13 -> 1.14)
enhanced log output
--------------+
simpletest.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
Index: odbsequoia/src/simpletest.c
diff -u odbsequoia/src/simpletest.c:1.13 odbsequoia/src/simpletest.c:1.14
--- odbsequoia/src/simpletest.c:1.13 Thu Mar 9 11:40:28 2006
+++ odbsequoia/src/simpletest.c Thu Mar 9 14:24:10 2006
@@ -41,8 +41,9 @@
// can you spell: "functional language" ?
#define EXEC_AND_DIAGS(call, type, hdle, cont) \
- printf ("executing: %s, %s\n", #call, \
- (cont ? "to FAIL" : "to succeed")); \
+ printf ("EXECUTING: %s, %s %s\n", #call, \
+ "expected to ", \
+ (cont ? "FAIL" : "SUCCEED")); \
retcode = call ; \
print_diags(pc, type, hdle); \
if (! SQL_SUCCEEDED(retcode) && ! cont) \
@@ -169,14 +170,17 @@
SQLGetDiagField(hdletype, hdle, ignoredRecNum, SQL_DIAG_NUMBER, &recmax,
ignoredBufLen, ignoredLenPtr);
+ if (recmax > 0)
+ printf ("at step %d\n", pc);
+
for (irec = 1; irec <= recmax; irec++) {
SQLGetDiagRec(hdletype, hdle,
irec, state, &nativecode, msg, 200, &msgsize);
- printf (" --> diag rec number: %ld ", irec);
- printf ("(step %d) <--\n sqlstate: %s, ", pc, state);
- printf ("statesize: %d, ", statesize);
+ printf ("\t--> diag rec number: %ld <--\n", irec);
+ printf ("\tsqlstate: %s, ", state);
+ printf ("statesize: %6d, ", statesize);
printf ("native errr: %ld, ", nativecode);
printf ("%s, ", msg);
printf ("msgsize: %d\n", msgsize);
@@ -188,11 +192,11 @@
// get the same thing through SQLGetDiagField thrice
if (recmax > 0)
- printf (" ----> same diags but through SQLGetDiagField <----\n");
+ printf ("----> same diags but through SQLGetDiagField <----\n");
for (irec = 1; irec <= recmax; irec++) {
- printf (" --> diag rec number: %ld ", irec);
+ printf ("\t--> diag rec number %ld <-- \n", irec);
SQLGetDiagField(hdletype, hdle, irec, SQL_DIAG_SQLSTATE,
state, 12*sizeof(SQLCHAR), &statesize);
@@ -202,8 +206,8 @@
SQLGetDiagField(hdletype, hdle, irec, SQL_DIAG_MESSAGE_TEXT,
msg, 201, &msgsize);
- printf ("sqlstate: %s, ", state);
- printf ("statesize: %d, ", statesize);
+ printf ("\tsqlstate: %s, ", state);
+ printf ("statesize: %6d, ", statesize);
printf ("native errr: %ld, ", nativecode);
printf ("%s, ", msg);
printf ("msgsize: %d\n", msgsize);
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits