Hello everyone,

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

                    client->retcode = SQLDriverConnect(client->dbc,
                                               NULL,
                                               (SQLTCHAR*) dsn,
                                               SQL_NTS,
                                               NULL,
                                               0,
                                               NULL,
                                               SQL_DRIVER_NOPROMPT);
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==
    ==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==
    ==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

     db.c:222

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, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to