MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / create_sqlite_master

Function create_sqlite_master

db/sqlmaster.c:148–164  ·  view source on GitHub ↗

* Create sqlite_master row and populate the associated hash * */

Source from the content-addressed store, hash-verified

146 *
147 */
148void create_sqlite_master()
149{
150 master_entry_t *new_arr = NULL;
151 int local_nentries = 0;
152
153 new_arr = create_master_entry_array(thedb->dbs, thedb->num_dbs,
154 thedb->view_hash, &local_nentries);
155 if (!new_arr) {
156 logmsg(LOGMSG_ERROR, "%s: MALLOC OOM\n", __func__);
157 abort();
158 }
159
160 destroy_sqlite_master(sqlmaster, sqlmaster_nentries);
161
162 sqlmaster = new_arr;
163 sqlmaster_nentries = local_nentries;
164}
165
166inline static void fill_mem_str(Mem *m, char *str)
167{

Callers 13

reload_after_bulkimportFunction · 0.85
reload_db_tranFunction · 0.85
osqlcomm.cFile · 0.85
initFunction · 0.85
comdb2_reload_schemasFunction · 0.85
do_ddlFunction · 0.85
backout_schema_changesFunction · 0.85
_master_recsFunction · 0.85
sc_timepart_add_tableFunction · 0.85
sc_timepart_drop_tableFunction · 0.85

Calls 3

destroy_sqlite_masterFunction · 0.85
logmsgFunction · 0.50

Tested by

no test coverage detected