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

Method GetOptFileName

storage/connect/tabdos.cpp:191–210  ·  view source on GitHub ↗

/ Get the full path/name of the optimization file. */ /

Source from the content-addressed store, hash-verified

189/* Get the full path/name of the optimization file. */
190/***********************************************************************/
191bool DOSDEF::GetOptFileName(PGLOBAL g, char *filename)
192 {
193 PCSZ ftype;
194
195 switch (Recfm) {
196 case RECFM_VAR: ftype = ".dop"; break;
197 case RECFM_FIX: ftype = ".fop"; break;
198 case RECFM_BIN: ftype = ".bop"; break;
199 case RECFM_VCT: ftype = ".vop"; break;
200 case RECFM_CSV: ftype = ".cop"; break;
201 case RECFM_DBF: ftype = ".dbp"; break;
202 default:
203 snprintf(g->Message, sizeof(g->Message), MSG(INVALID_FTYPE), Recfm);
204 return true;
205 } // endswitch Ftype
206
207 PlugSetPath(filename, Ofn, GetPath());
208 strcat(PlugRemoveType(filename, filename), ftype);
209 return false;
210 } // end of GetOptFileName
211
212/***********************************************************************/
213/* After an optimize error occurred, remove all set optimize values. */

Callers 2

SaveBlockValuesMethod · 0.80
GetBlockValuesMethod · 0.80

Calls 2

PlugRemoveTypeFunction · 0.85
PlugSetPathFunction · 0.70

Tested by

no test coverage detected