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

Method Set

storage/connect/xobject.cpp:251–271  ·  view source on GitHub ↗

/ Set a STRING new PSZ value. */ /

Source from the content-addressed store, hash-verified

249/* Set a STRING new PSZ value. */
250/***********************************************************************/
251bool STRING::Set(PCSZ s)
252{
253 if (!s)
254 return false;
255
256 uint len = strlen(s) + 1;
257
258 if (len > Size) {
259 char *p = Realloc(len);
260
261 if (!p)
262 return true;
263 else
264 Strp = p;
265
266 } // endif n
267
268 strcpy(Strp, s);
269 Length = len - 1;
270 return false;
271} // end of Set
272
273/***********************************************************************/
274/* Set a STRING new PSZ value. */

Callers 9

MakeCursorMethod · 0.80
ReadDBMethod · 0.80
GetTextMethod · 0.80
MakeCursorMethod · 0.80
ReadDBMethod · 0.80
GetObjectTextMethod · 0.80
MakeInsertMethod · 0.80
MakeCommandMethod · 0.80
ReadDBMethod · 0.80

Calls 1

strnlenFunction · 0.85

Tested by

no test coverage detected