Val-grind with ODBC

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Val-grind with ODBC

Jaime Tun
Hello everyone,

I am using ODBC in C to communicate with any DB. I connect using 

                    client->retcode = SQLDriverConnect(client->dbc,
                                               (SQLTCHAR*) dsn,
the connection string that I use is:

    char *dsn = "Driver=MYSQL;Server=x.x.x.x;Port=port;Database=mydb;User=user;Password=pass;"

I can connect properly with Postgres and Mysql, the problem is that i am running it with Val-grind and it gives me the error below only when i connect to mysql, when I connect to Postgres I do not get an error:

    ==19927==    by 0x402831: db_connect (db.c:222)
    ==19927==    by 0x4013DF: main (main.c:47)
    ==19927== LEAK SUMMARY:
    ==19927==    definitely lost: 0 bytes in 0 blocks
    ==19927==    indirectly lost: 0 bytes in 0 blocks
    ==19927==      possibly lost: 176 bytes in 1 blocks
    ==19927==    still reachable: 86,865 bytes in 131 blocks
    ==19927==         suppressed: 0 bytes in 0 blocks
    ==19927== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
    ==19927== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

The line number that Val-grind says the error is occurring 


is the line where I have the SQLDriverConnet statement. Why does val-grind says I have possibly lost bytes on the same line when connecting to mysql but when connecting to Postgres.
Does anyone know what the issue may be here?

NOTE: I have not tried with other DBs, just these 2.

Please help.
Thank you

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Valgrind-users mailing list
[hidden email]