MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / cmp_ready

Function cmp_ready

src/gpre/cmp.cpp:1264–1358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1262//
1263
1264static void cmp_ready( gpre_req* request)
1265{
1266 gpre_dbb* db = request->req_database;
1267
1268 //act* action = request->req_actions;
1269 request->req_blr = request->req_base = MSC_alloc(250);
1270 request->req_length = 250;
1271 request->req_flags |= REQ_exp_hand;
1272
1273 request->add_byte(isc_dpb_version1);
1274
1275#ifdef NOT_USED_OR_REPLACED
1276 if (db->dbb_allocation)
1277 {
1278 request->add_byte(isc_dpb_allocation);
1279 request->add_byte(4);
1280 request->add_long(db->dbb_allocation);
1281 }
1282#endif
1283
1284 if (db->dbb_pagesize)
1285 {
1286 request->add_byte(isc_dpb_page_size);
1287 request->add_byte(4);
1288 request->add_long(db->dbb_pagesize);
1289 }
1290
1291 if (db->dbb_buffercount)
1292 {
1293 request->add_byte(isc_dpb_num_buffers);
1294 request->add_byte(4);
1295 request->add_long(db->dbb_buffercount);
1296 }
1297
1298 const TEXT* p;
1299 SSHORT l;
1300
1301 if (db->dbb_c_user && !db->dbb_r_user)
1302 {
1303 request->add_byte(isc_dpb_user_name);
1304 l = static_cast<SSHORT>(strlen(db->dbb_c_user));
1305 request->add_byte(l);
1306 p = db->dbb_c_user;
1307 while (l--)
1308 request->add_byte(*p++);
1309 }
1310
1311 if (db->dbb_c_password && !db->dbb_r_password)
1312 {
1313 request->add_byte(isc_dpb_password);
1314 l = static_cast<SSHORT>(strlen(db->dbb_c_password));
1315 request->add_byte(l);
1316 p = db->dbb_c_password;
1317 while (l--)
1318 request->add_byte(*p++);
1319 }
1320
1321 if (db->dbb_c_sql_role && !db->dbb_r_sql_role)

Callers 1

CMP_compile_requestFunction · 0.85

Calls 3

MSC_allocFunction · 0.85
add_byteMethod · 0.45
add_longMethod · 0.45

Tested by

no test coverage detected