#207170 by hswong3i slightly modified: drupal_write_record() did not return FALSE on query failure and had bad documentation on the returned values