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

Method SetFile

storage/connect/tabodbc.cpp:276–293  ·  view source on GitHub ↗

/ Set DBQ and get the new file name into the connect string. */ /

Source from the content-addressed store, hash-verified

274/* Set DBQ and get the new file name into the connect string. */
275/***********************************************************************/
276void TDBODBC::SetFile(PGLOBAL g, PCSZ fn)
277{
278 if (MulConn) {
279 int n = strlen(MulConn) + strlen(fn) - 1;
280
281 if (n > BufSize) {
282 // Allocate a buffer larger than needed so the chance
283 // of having to reallocate it is reduced.
284 BufSize = n + 6;
285 Connect = (char*)PlugSubAlloc(g, NULL, BufSize);
286 } // endif n
287
288 // Make the complete connect string
289 snprintf(Connect, BufSize, MulConn, fn);
290 } // endif MultConn
291
292 DBQ = PlugDup(g, fn);
293} // end of SetFile
294
295/***********************************************************************/
296/* MakeInsert: make the Insert statement used with ODBC connection. */

Callers 4

CardinalityMethod · 0.45
GetMaxSizeMethod · 0.45
OpenDBMethod · 0.45
ReadDBMethod · 0.45

Calls 2

PlugSubAllocFunction · 0.85
PlugDupFunction · 0.85

Tested by

no test coverage detected