Details
Description
As a part of executing mysql_library_init (=mysql_server_init) user gives an array of arguments, one specifying '--datadir'. If accessing that directory fails, mariadb handlerton init fails, and the function returns with value indicating error, which is translated as 'Unknown error' to the user.
If the error is trivial and known for underlying OS, for example errno==2, file not found, it would be expected that mariadb would report the failure to the user so that user can correct her input argument. Now real error is hidden with no reason thus making it pretty difficult to write an application which could fix the problem without human intervention.
Currently, if opening datadir fails, the easiest way for the user is to build debug version and run debugger to see what failed.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
in the embedded server library or a pure client library?
with the embedded, yes, we can do that — embedded library includes the whole server anyway, and it uses sql_print_error already.
with a pure client library there's no way to report anything to the user, we can only notify the caller. it's the application's task to inform the user.