fix broken sqlite3 insert-record-order-query-auth query