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

Method GetSizeCatInfo

storage/connect/reldef.cpp:219–238  ·  view source on GitHub ↗

/ This function returns size catalog information. */ /

Source from the content-addressed store, hash-verified

217/* This function returns size catalog information. */
218/***********************************************************************/
219int RELDEF::GetSizeCatInfo(PCSZ what, PCSZ sdef)
220 {
221 char c;
222 PCSZ s;
223 int i, n= 0;
224
225 if (!(s= Hc->GetStringOption(what)))
226 s= sdef;
227
228 if ((i= sscanf(s, " %d %c ", &n, &c)) == 2)
229 switch (toupper(c)) {
230 case 'M':
231 n *= 1024;
232 // fall through
233 case 'K':
234 n *= 1024;
235 } // endswitch c
236
237 return n;
238} // end of GetSizeCatInfo
239
240/***********************************************************************/
241/* This function sets char table information in buf. */

Callers

nothing calls this directly

Calls 1

GetStringOptionMethod · 0.80

Tested by

no test coverage detected