Where I can find a list of "mysqldump" exit codes?

I know that exit code = 0 means No error.

I got exit code = 2. What does it means ?

Where I can see the complete list of mysqldump exit codes ?


Taken from client/mysqldump.c in MySQL 5.1.59:

#define EX_USAGE 1
#define EX_MYSQLERR 2
#define EX_CONSCHECK 3
#define EX_EOM 4
#define EX_EOF 5 /* ferror for output file was got */
#define EX_ILLEGAL_TABLE 6

Skimming through the source, EX_MYSQLERR seems to be used mostly for errors from the server, but also in case malloc fails. CONSCHECK seems to stand for consistency checks. EX_EOM is returned for some _alloc calls too - "End Of Memory"?


Exit code 2 often occurs when the dump could not be completed due to privilege problems; for example, if the user does not have the LOCK TABLES privilege, or the supplied password was wrong.