[freetds] old patch

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Mon Jul 10 11:19:26 EDT 2006


Hi James,
  trying to fix rpc2.php test (and some done_handling) I came to this
old patch. This is pre 0.63 !!!
https://sourceforge.net/tracker/index.php?func=detail&aid=1095806&group_
id=33106&atid=407808
Do you remember the print problem??
What I don't understand is

@@ -1304,6 +1308,10 @@
 		dbproc->dbresults_state = _DB_RES_INIT;
 		return NO_MORE_RESULTS;
 		break;
+	case _DB_RES_NEXT_RESULT:
+	case _DB_RES_INIT:
+		tds_free_all_results(tds);
+		break;
 	default:
 		break;
 	}

this cause result free on last dbresults and another before metadata
information (which should be redundant as libTDS already free results
before issuing a new query). So dbhasretstat always returns FALSE and
PHP fails getting store procedure results... I remove
tds_free_all_results call and all unit tests works (well, rpc excluded,
but currently rpc test does not work either on cvs head). As
done_handling prove dblib eat more results and keep informations longer.

Oh... have you see (which is the correct english form here...)
src/odbc/unittests/describecol.c test? It use an external file as some
sort of basic script language for test. Mainly is composed by actions
(like select, odbc and set commands) and tests (attr). I would like to
have a script that could tranform dumps to some sort of test script one
day...

freddy77




More information about the FreeTDS mailing list