João Henrique Freitas writes:
 > Yes. But this is a test and we need to tests all libdbi API. If I did
 > use dbi_conn_quote_string() I can't have sure about the correct value
 > get by an dbi_result_get* call.
 > 
 > In other words. We have two types of test: 1st: Every test function
 > need to test one libdbi function. 2nd: We can create a test case and
 > use more functions together.
 > 
 > Currently I wrote tests to "all" libdbi API function.
 > 
 > This is the reason because I encode all the fields of table
 > test_datatypes by hand.
 > 

This is a good point. I've fiddled a bit with the tests. Actually the
manual quoting was not the culprit (I've simplified it according to
the MySQL roles anyway), but the query that retrieved the values used
an incorrect field name. See the attached patch. Using these changes
the MySQL driver is down to 3 errors, all of which are related to the
"retrieve zero rows" test which may be a libdbi bug.

 > 
 > These tests code can be enhanced. Libdbi is a generic library. Inside
 > of the tests we need to work with the particularities of every
 > database engine.
 > 

One thing which I'd like to work on is to make better use of the error
reporting capabilities of libdbi during these tests. When I debugged
the quote_string bug mentioned above, I had to resort to inserting
printf() calls into the libdbi sources. If we use libdbi's error
reporting capabilities liberally, debugging should be easier.

regards,
Markus

Attachment: cgreen-mysql.diff
Description: patch

-- 
Markus Hoenicka
markus.hoeni...@cats.de
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to