MCPcopy Create free account
hub / github.com/Tencent/phxsql / binlog_start_consistent_snapshot

Function binlog_start_consistent_snapshot

phx_percona/percona/sql/binlog.cc:1369–1385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1367}
1368
1369static int binlog_start_consistent_snapshot(handlerton *hton, THD *thd)
1370{
1371 int err= 0;
1372 DBUG_ENTER("binlog_start_consistent_snapshot");
1373
1374 if ((err= thd->binlog_setup_trx_data()))
1375 DBUG_RETURN(err);
1376
1377 binlog_cache_mngr * const cache_mngr= thd_get_cache_mngr(thd);
1378
1379 /* Server layer calls us with LOCK_log locked, so this is safe. */
1380 mysql_bin_log.raw_get_current_log(&cache_mngr->binlog_info);
1381
1382 trans_register_ha(thd, TRUE, hton);
1383
1384 DBUG_RETURN(err);
1385}
1386
1387static int binlog_clone_consistent_snapshot(handlerton *hton, THD *thd,
1388 THD *from_thd)

Callers

nothing calls this directly

Calls 3

thd_get_cache_mngrFunction · 0.85
binlog_setup_trx_dataMethod · 0.80
raw_get_current_logMethod · 0.80

Tested by

no test coverage detected