buffered-sql patch