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

Misha Moroshko picture Misha Moroshko · Oct 2, 2010 · Viewed 27.5k times · Source

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 ?

Answer

Peter picture Peter · Sep 21, 2011

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"?