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

Method InitBind

storage/connect/tabmysql.cpp:1366–1387  ·  view source on GitHub ↗

/ InitBind: Initialize the bind structure according to type. */ /

Source from the content-addressed store, hash-verified

1364/* InitBind: Initialize the bind structure according to type. */
1365/***********************************************************************/
1366void MYSQLCOL::InitBind(PGLOBAL g)
1367 {
1368 PTDBMY tdbp = (PTDBMY)To_Tdb;
1369
1370 assert(tdbp->Bind && Rank < tdbp->Nparm);
1371
1372 Bind = &tdbp->Bind[Rank];
1373 memset(Bind, 0, sizeof(MYSQL_BIND));
1374
1375 if (Buf_Type == TYPE_DATE) {
1376 Bind->buffer_type = PLGtoMYSQL(TYPE_STRING, false);
1377 Bind->buffer = (char *)PlugSubAlloc(g,NULL, 20);
1378 Bind->buffer_length = 20;
1379 Bind->length = &Slen;
1380 } else {
1381 Bind->buffer_type = PLGtoMYSQL(Buf_Type, false);
1382 Bind->buffer = (char *)Value->GetTo_Val();
1383 Bind->buffer_length = Value->GetClen();
1384 Bind->length = (IsTypeChar(Buf_Type)) ? &Slen : NULL;
1385 } // endif Buf_Type
1386
1387 } // end of InitBind
1388
1389/***********************************************************************/
1390/* ReadColumn: */

Callers 1

BindColumnsMethod · 0.80

Calls 4

PLGtoMYSQLFunction · 0.85
PlugSubAllocFunction · 0.85
IsTypeCharFunction · 0.85
GetTo_ValMethod · 0.80

Tested by

no test coverage detected