All of these functions return zero if they're successful, which is idiomatic in some C systems. However, in Sneaky Pete we typically log an error message and throw an exception if something goes wrong. See nova/guest/mysql/MySqlApp.h / .cc for examples.