clear table functions create their own connection and cursor