diff options
Diffstat (limited to 'src/gtm')
| -rw-r--r-- | src/gtm/main/gtm_snap.c | 4 | ||||
| -rw-r--r-- | src/gtm/main/gtm_thread.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gtm/main/gtm_snap.c b/src/gtm/main/gtm_snap.c index 5a538985df..f8e3d31976 100644 --- a/src/gtm/main/gtm_snap.c +++ b/src/gtm/main/gtm_snap.c @@ -103,6 +103,10 @@ GTM_GetTransactionSnapshot(GTM_TransactionHandle handle[], int txn_count, int *s Assert(snapshot != NULL); + /* + * This can only happen when using a snapshot from GTMTransactions, as the + * thread-specific sn_xip array is allocated statically as part of GTM_ThreadInfo. + */ if (snapshot->sn_xip == NULL) { /* diff --git a/src/gtm/main/gtm_thread.c b/src/gtm/main/gtm_thread.c index c513f6a71f..9d166f4a0e 100644 --- a/src/gtm/main/gtm_thread.c +++ b/src/gtm/main/gtm_thread.c @@ -256,6 +256,11 @@ GTM_ThreadCreate(GTM_ConnectionInfo *conninfo, 8 * 1024, false); + /* + * Set the sn_xip pointer to the statically-allocated array (see GTM_ThreadInfo). + */ + thrinfo->thr_snapshot.sn_xip = thrinfo->thr_xip; + thrinfo->thr_startroutine = startroutine; /* |
