fix undefined field in odbc connection

closes PR 14490
This commit is contained in:
Ryan Culpepper 2014-05-26 17:00:49 -04:00
parent c3893a6c73
commit 0821ca8717

View File

@ -30,6 +30,7 @@
notice-handler notice-handler
char-mode) char-mode)
(init strict-parameter-types?) (init strict-parameter-types?)
(super-new)
(define statement-table (make-hasheq)) (define statement-table (make-hasheq))
@ -653,10 +654,6 @@
;; Handler ;; Handler
(define add-notice! ;; field, not method; allocate only once
(lambda (sqlstate message)
(add-delayed-call! (lambda () (notice-handler sqlstate message)))))
(define/private (handle-status who s [handle #f] (define/private (handle-status who s [handle #f]
#:ignore-ok/info? [ignore-ok/info? #f]) #:ignore-ok/info? [ignore-ok/info? #f])
(define (handle-error e) (define (handle-error e)
@ -682,9 +679,10 @@
(with-handlers ([exn:fail? handle-error]) (with-handlers ([exn:fail? handle-error])
(handle-status* who s handle (handle-status* who s handle
#:ignore-ok/info? ignore-ok/info? #:ignore-ok/info? ignore-ok/info?
#:on-notice add-notice!))) #:on-notice (lambda (sqlstate msg)
(add-delayed-call!
(lambda () (notice-handler sqlstate msg)))))))
(super-new)
(register-finalizer this (register-finalizer this
(lambda (obj) (lambda (obj)
;; Keep a reference to the class to keep all FFI callout objects ;; Keep a reference to the class to keep all FFI callout objects