* Create sqlite_master row and populate the associated hash * */
| 146 | * |
| 147 | */ |
| 148 | void 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 | |
| 166 | inline static void fill_mem_str(Mem *m, char *str) |
| 167 | { |
no test coverage detected