MySQL Forums
Forum List  »  Newbie

Re: mysql_query returns 1 but mysql_errno is 0
Posted by: Calin Dorohoi
Date: September 11, 2014 11:07PM

Sorry for misleading you, I was in a hurry when I posted the original message.
I meant that in other sessions mysql_errno() returns the expected value for the duplicates, MYSQL_DUPLICATE_KEY_ERROR_CODE.
The table is created as follows:

CREATE TABLE IF NOT EXISTS main_hash_db.main_tbl
(
sha256 CHAR(64) PRIMARY KEY ,
sha1 CHAR(40) UNIQUE KEY ,
md5 CHAR(32) UNIQUE KEY ,
created DATETIME ,
modified DATETIME ,
size BIGINT ,
ext VARCHAR(260) ,
path TEXT(32768) ,
orig_path TEXT(32768)
)
ENGINE = MyISAM/InnoDB


(subsequent tests revealed that it also happens with InnoDB)

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.