diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/schema/schema_create.c')
-rw-r--r-- | src/third_party/wiredtiger/src/schema/schema_create.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/schema/schema_create.c b/src/third_party/wiredtiger/src/schema/schema_create.c index 9501b3d82c7..5d805ac4f6c 100644 --- a/src/third_party/wiredtiger/src/schema/schema_create.c +++ b/src/third_party/wiredtiger/src/schema/schema_create.c @@ -1476,6 +1476,15 @@ __wt_schema_create(WT_SESSION_IMPL *session, const char *uri, const char *config WT_DECL_RET; WT_SESSION_IMPL *int_session; + /* + * We should be calling this function with the schema lock, but we cannot verify it here because + * we can re-enter this function with the internal session. If we get here using the internal + * session, we cannot check whether we own the lock, as it would be locked by the outer session. + * We can thus only check whether the lock is acquired, as opposed to, whether the lock is + * acquired by us. + */ + WT_ASSERT(session, __wt_spin_locked(session, &S2C(session)->schema_lock)); + WT_RET(__wt_schema_internal_session(session, &int_session)); ret = __schema_create(int_session, uri, config); WT_TRET(__wt_schema_session_release(session, int_session)); |