Return value of mysql_library_init/mysql_server_init is not checked.
However, if this function returns error, then calls to any mysql functions produce undefinded result (Access Violations)
https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/tags/7.2.1-rc/src/plain/ZPlainMySqlDriver.pas#l975
That is changed with the latest revision in the SVN. Do you agree?
Best regards,
Jan
No, as I can see in lines https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/trunk/src/plain/ZPlainMySqlDriver.pas#l975 and https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/trunk/src/plain/ZPlainMySqlDriver.pas#l978 result is not used
My changes were done in the testing-7.2 branch. See https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/branches/testing-7.2/src/plain/ZPlainMySqlDriver.pas#l980
Checking the result of mysql_init might be a good idea nontheless - although it only should reserve some meomory and returning a null pointer means that no memory could be aquired...
Last edit: marsupilami79 2016-09-25
Now I see.
mysql_init result should be checked too, you can't call any mysql func with null mysql handle
Changed in SVN Rev. 3934 for Zeos 7.2 testing branch. Do you agree? In that case I will close this bug as fixed. :o)
Yes, you can close this bug