Skip to content

Commit 7803598

Browse files
committed
Del dead fn: run_verify_dbstore_function
Signed-off-by: mdouglas47 <[email protected]>
1 parent 1785421 commit 7803598

File tree

3 files changed

+9
-35
lines changed

3 files changed

+9
-35
lines changed

db/sql.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,6 @@ struct sqlclntstate {
10821082
LISTC_T(struct participant) participants;
10831083

10841084
unsigned disabled_logdel : 1; /* 1 if this clnt disabled logdel using set stmt and has not tried to re-enable it */
1085-
unsigned verify_dbstore : 1;
10861085
unsigned multiline : 1;
10871086
int tail_offset;
10881087

db/sqlglue.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12866,26 +12866,6 @@ static int run_verify_indexes_query(char *sql, struct schema *sc, Mem *min,
1286612866
return rc;
1286712867
}
1286812868

12869-
static int run_verify_dbstore_function(char *sql)
12870-
{
12871-
struct schema_mem sm = {0};
12872-
12873-
struct sqlclntstate clnt;
12874-
start_internal_sql_clnt(&clnt);
12875-
clnt.dbtran.mode = TRANLEVEL_SOSQL;
12876-
clnt.sql = sql;
12877-
clnt.admin = gbl_force_writesql;
12878-
clnt.schema_mems = &sm;
12879-
clnt.verify_dbstore = 1;
12880-
12881-
int rc = dispatch_sql_query(&clnt);
12882-
rc = rc ? rc : clnt.had_errors;
12883-
12884-
end_internal_sql_clnt(&clnt);
12885-
12886-
return rc;
12887-
}
12888-
1288912869
unsigned long long verify_indexes(struct dbtable *db, uint8_t *rec,
1289012870
blob_buffer_t *blobs, size_t maxblobs,
1289112871
int is_alter)

db/sqlinterfaces.c

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3364,22 +3364,17 @@ static int get_prepared_stmt_int(struct sqlthdstate *thd,
33643364
int get_prepared_stmt(struct sqlthdstate *thd, struct sqlclntstate *clnt,
33653365
struct sql_state *rec, struct errstat *err, int flags)
33663366
{
3367-
/* sc-thread holds schema-lk in verify_dbstore */
3368-
if (!clnt->verify_dbstore) {
3369-
curtran_assert_nolocks();
3370-
if (clnt->dbtran.mode == TRANLEVEL_MODSNAP && !clnt->modsnap_in_progress && populate_modsnap_state(clnt)) {
3371-
return SQLITE_INTERNAL;
3372-
}
3373-
if (gbl_sleep_5s_after_caching_table_versions) {
3374-
sleep(5);
3375-
}
3376-
rdlock_schema_lk();
3367+
curtran_assert_nolocks();
3368+
if (clnt->dbtran.mode == TRANLEVEL_MODSNAP && !clnt->modsnap_in_progress && populate_modsnap_state(clnt)) {
3369+
return SQLITE_INTERNAL;
33773370
}
3371+
if (gbl_sleep_5s_after_caching_table_versions) {
3372+
sleep(5);
3373+
}
3374+
rdlock_schema_lk();
33783375
int rc = get_prepared_stmt_int(thd, clnt, rec, err,
33793376
flags | PREPARE_RECREATE);
3380-
if (!clnt->verify_dbstore) {
3381-
unlock_schema_lk();
3382-
}
3377+
unlock_schema_lk();
33833378
if (gbl_stable_rootpages_test) {
33843379
static int skip = 0;
33853380
if (!skip) {
@@ -4356,7 +4351,7 @@ static int prepare_engine(struct sqlthdstate *thd, struct sqlclntstate *clnt,
43564351

43574352
if (!thd->sqldb || (rc == SQLITE_SCHEMA_REMOTE)) {
43584353
/* need to refresh things; we need to grab views lock */
4359-
if (!got_views_lock && !clnt->verify_dbstore) {
4354+
if (!got_views_lock) {
43604355
unlock_schema_lk();
43614356

43624357
if (!clnt->dbtran.cursor_tran) {

0 commit comments

Comments
 (0)