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

Method GetMaxSize

storage/connect/tabmul.cpp:313–346  ·  view source on GitHub ↗

/ Sum up the sizes of all sub-tables. */ /

Source from the content-addressed store, hash-verified

311/* Sum up the sizes of all sub-tables. */
312/***********************************************************************/
313int TDBMUL::GetMaxSize(PGLOBAL g)
314 {
315 if (MaxSize < 0) {
316 int i;
317 int mxsz;
318
319 if (trace(1))
320 htrc("TDBMUL::GetMaxSize: Filenames=%p\n", Filenames);
321
322 if (!Filenames && InitFileNames(g))
323 return -1;
324
325 if (Use == USE_OPEN) {
326 strcpy(g->Message, MSG(MAXSIZE_ERROR));
327 return -1;
328 } else
329 MaxSize = 0;
330
331 for (i = 0; i < NumFiles; i++) {
332 Tdbp->SetFile(g, Filenames[i]);
333 Tdbp->ResetSize();
334
335 if ((mxsz = Tdbp->GetMaxSize(g)) < 0) {
336 MaxSize = -1;
337 return mxsz;
338 } // endif mxsz
339
340 MaxSize += mxsz;
341 } // endfor i
342
343 } // endif MaxSize
344
345 return MaxSize;
346 } // end of GetMaxSize
347
348/***********************************************************************/
349/* Reset read/write position values. */

Callers

nothing calls this directly

Calls 6

GetLastErrorFunction · 0.85
PlgGetUserFunction · 0.85
htrcFunction · 0.70
PlugSetPathFunction · 0.70
SetFileMethod · 0.45
ResetSizeMethod · 0.45

Tested by

no test coverage detected