When the SQL client disconnected after a failed ALTER TABLE, it entered an infinite loop because the table handle had not been removed from the database's table list, causing it to keep looping on that entry. The logic has been updated to correct this.