Bug #22035 LOAD DATA INFILE "no-such-file" returns a general error

Submitted: 5 Sep 2006 23:39 Modified: 6 Sep 2006 10:23
Reporter: Marc ALFF Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.0, 5.1 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[5 Sep 2006 23:39] Marc ALFF
Description:
LOAD DATA INFILE "no-such-file" into table ...
fails as expected.

LOAD DATA INFILE "no-such-dir/no-such-file" into table ...
fails as expected.

However, the error code reported is 29 and 13 respectively (on linux),
and the message is :

load data infile "no-such-file" into table t1 (a);
ERROR HY000: File '.../no-such-file' not found (Errcode: 2)
load data infile "no-such-dir/no-such-file" into table t1 (a);
ERROR HY000: Can't get stat of '.../no-such-dir/no-such-file' (Errcode: 2)

See man 2 stat (Linux)

Expected result :
- return an error defined sql_state.h, not "General error" HY000
- return an error that is not platform dependent, so it's trappable.
- document the returned error for these cases

How to repeat:
See above

Suggested fix:
See above
[6 Sep 2006 9:59] Sveta Smirnova
Thank you for the reasonable feature request.

Verified as described on Linux using last BK sources.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.