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

Method OpenTempFile

storage/connect/filamtxt.cpp:1077–1098  ·  view source on GitHub ↗

/ Open a temporary file used while updating or deleting. */ /

Source from the content-addressed store, hash-verified

1075/* Open a temporary file used while updating or deleting. */
1076/***********************************************************************/
1077bool DOSFAM::OpenTempFile(PGLOBAL g)
1078 {
1079 char tempname[_MAX_PATH];
1080 bool rc = false;
1081
1082 /*********************************************************************/
1083 /* Open the temporary file, Spos is at the beginning of file. */
1084 /*********************************************************************/
1085 PlugSetPath(tempname, To_File, Tdbp->GetPath());
1086 PlugRemoveType(tempname, tempname);
1087 safe_strcat(tempname, sizeof(tempname), ".t");
1088
1089 if (!(T_Stream = PlugOpenFile(g, tempname, "wb"))) {
1090 if (trace(1))
1091 htrc("%s\n", g->Message);
1092
1093 rc = true;
1094 } else
1095 To_Fbt = PlgGetUser(g)->Openlist;
1096
1097 return rc;
1098 } // end of OpenTempFile
1099
1100/***********************************************************************/
1101/* Move intermediate deleted or updated lines. */

Callers

nothing calls this directly

Calls 7

PlugRemoveTypeFunction · 0.85
safe_strcatFunction · 0.85
PlugOpenFileFunction · 0.85
PlgGetUserFunction · 0.85
PlugSetPathFunction · 0.70
htrcFunction · 0.70
GetPathMethod · 0.45

Tested by

no test coverage detected