use a single connection in Data.putDefinition(), so that the SELECT LAST_INSERT_ID() always returns what we care about