MySQL Forums
Forum List  »  Newbie

Re: mysql_query returns 1 but mysql_errno is 0
Posted by: Calin Dorohoi
Date: September 13, 2014 02:29PM

Only the sha256, sha1 and md5 are unique. The times are irrelevant.
I generally try not to give too much data because it can be misleading. For instance, I was considering if I should be giving the full queries because I was foreseeing replies picking up on the UNIX times, and it's exactly what happened.
There is nothing in my (C, not PHP) code that can possibly clear the errno (it works most of the times, remember), but here you go, this is the code that produces the output above:


sql_query_status = mysql_query(db_hnd, sql_query);

printf("Thread %lu: %s\n", this_thread_id, sql_query);

if (sql_query_status) {
uint32_t mysql_err = mysql_errno(db_hnd);
if (!mysql_err)
printf("Query returned %d but errno is 0\n", sql_query_status);



Meanwhile I did a test with SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE. No difference.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.