TableRecord[] refreshTableRecords() throws IOException {

		try {
			int masterRootId = dbParms.get(DBParms.MASTER_TABLE_ROOT_BUFFER_ID_PARM);
			if (masterRecord.getRootBufferId() != masterRootId) {
				masterRecord.setRootBufferId(masterRootId);
				table.tableRecordChanged();
			}
		}
		catch (IndexOutOfBoundsException e) {
			throw new IOException("Corrupt database parameters", e);
		}

		ArrayList<TableRecord> trList = new ArrayList<TableRecord>();

		int ix = 0;
		int oldTableCnt = tableRecords.length;
		RecordIterator it = table.iterator();
		while (it.hasNext()) {
			DBRecord rec = it.next();
			long tablenum = rec.getKey();

			while (ix < tableRecords.length && tablenum > tableRecords[ix].getTableNum()) {
				tableRecords[ix++].invalidate();  // table no longer exists
			}

			if (ix == oldTableCnt || tablenum < tableRecords[ix].getTableNum()) {
				trList.add(new TableRecord(dbh, rec));  // new table
			}
			else if (tablenum == tableRecords[ix].getTableNum()) {
				tableRecords[ix].setRecord(dbh, rec);
				trList.add(tableRecords[ix++]);    // update existing table
			}
		}

		while (ix < tableRecords.length) {
			tableRecords[ix++].invalidate();  // table no longer exists
		}

		tableRecords = trList.toArray(new TableRecord[trList.size()]);
		return tableRecords;
	}
Refresh table data from the master table.
Records are returned in the list ordered by their table number key.
@return the update list of master table records.
@throws IOException database IO error
Ghidra/Framework/DB/src/main/java/db/MasterTable.java