MCPcopy Create free account
hub / github.com/MariaDB/server / write

Method write

client/mysqltest.cc:1074–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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");

Callers 4

do_diff_filesFunction · 0.45
run_queryFunction · 0.45
mark_progressFunction · 0.45
mainFunction · 0.45

Calls 1

dieFunction · 0.70

Tested by

no test coverage detected