I had posted some notes on the MySQL test framework in my earlier post at http://blogs.sun.com/amitsaha/entry/the_mysql_test_framework
'mysql_client_test.c' which lives in the 'tests/' directory uses the MySQL C API to write various client side tests to be executed on the server. In this post, I will show how you can add your own test(s) to this file.
Why would you want to do that?
Adding your tests to this file enables you take advantage of the existing test framework to run your tests.
How does 'mysql_client_test.c' execute the tests?
In the main( ) function, this code snippet selects the tests to be run:
for ( ; *argv ; argv++)
18054 {
18055 for (fptr= my_tests; fptr->name; fptr++)
18056 {
18057 if (!strcmp(fptr->name, *argv)) …[Read more]