Load objects in engine caches so they can be used in the user's transaction.
| 1355 | |
| 1356 | // Load objects in engine caches so they can be used in the user's transaction. |
| 1357 | void ProfilerPlugin::loadMetadata(ThrowStatusExceptionWrapper* status) |
| 1358 | { |
| 1359 | constexpr auto loadObjectsSql = |
| 1360 | R"""( |
| 1361 | select * |
| 1362 | from plg$prof_sessions |
| 1363 | cross join plg$prof_statements |
| 1364 | cross join plg$prof_record_sources |
| 1365 | cross join plg$prof_requests |
| 1366 | cross join plg$prof_psql_stats |
| 1367 | cross join plg$prof_record_source_stats |
| 1368 | where next value for plg$prof_profile_id = 0 |
| 1369 | )"""; |
| 1370 | |
| 1371 | auto transaction = makeNoIncRef(userAttachment->startTransaction(status, 0, nullptr)); |
| 1372 | |
| 1373 | makeNoIncRef(userAttachment->prepare(status, transaction, 0, loadObjectsSql, SQL_DIALECT_CURRENT, 0)); |
| 1374 | |
| 1375 | transaction->commit(status); |
| 1376 | transaction.clear(); |
| 1377 | } |
| 1378 | |
| 1379 | //-------------------------------------- |
| 1380 |
nothing calls this directly
no test coverage detected