| 1072 | } |
| 1073 | |
| 1074 | void write(DYNAMIC_STRING* ds) |
| 1075 | { |
| 1076 | DBUG_ENTER("LogFile::write"); |
| 1077 | DBUG_PRINT("enter", ("length: %u", (uint) ds->length)); |
| 1078 | |
| 1079 | DBUG_ASSERT(m_file); |
| 1080 | |
| 1081 | if (ds->length == 0) |
| 1082 | DBUG_VOID_RETURN; |
| 1083 | DBUG_ASSERT(ds->str); |
| 1084 | |
| 1085 | #ifdef EXTRA_DEBUG |
| 1086 | DBUG_DUMP("extra", (uchar*) ds->str, ds->length); |
| 1087 | #endif |
| 1088 | |
| 1089 | if (fwrite(ds->str, 1, ds->length, m_file) != ds->length) |
| 1090 | die("Failed to write %lu bytes to '%s', errno: %d", |
| 1091 | (unsigned long)ds->length, m_file_name, errno); |
| 1092 | m_bytes_written+= ds->length; |
| 1093 | DBUG_VOID_RETURN; |
| 1094 | } |
| 1095 | |
| 1096 | void show_tail(uint lines) { |
| 1097 | DBUG_ENTER("LogFile::show_tail"); |
no test coverage detected