Automated commit for upstream build of version 6.6.3
[clsql.git] / db-mysql / mysql-api.lisp
index 91fc3c5a6998807f31520f94bee61b0f7a2b8aea..19d1f91d74a40651e557630c364ecd534173d500 100644 (file)
      :named-pipe
      :init-command
      :read-default-file
-     :read-default-group))
+     :read-default-group
+     :set-charset-dir
+     :set-charset-name
+     :local-infile
+     :protocol
+     :shared-memory-base-name
+     :read-timeout
+     :write-timeout
+     :use-result
+     :use-remote-connection
+     :use-embedded-connection
+     :guess-connection
+     :set-client-ip
+     :secure-auth
+     :report-data-truncation
+     :reconnect
+     :ssl-verify-server-cert))
+
+(defvar +mysql-option-parameter-map+
+  '((:connect-timeout . :uint-ptr)
+    (:compress . :none)
+    (:named-pipe . :none)
+    (:init-command . :char-ptr)
+    (:read-default-file . :char-ptr)
+    (:read-default-group . :char-ptr)
+    (:set-charset-dir . :char-ptr)
+    (:set-charset-name . :char-ptr)
+    (:local-infile . :uint-ptr)
+    (:protocol . :uint-ptr)
+    (:shared-memory-base-name . :char-ptr)
+    (:read-timeout . :uint-ptr)
+    (:write-timeout . :uint-ptr)
+    (:use-result . :none)
+    (:use-remote-connection . :none)
+    (:use-embedded-connection . :none)
+    (:guess-connection . :none)
+    (:set-client-ip . :char-ptr)
+    (:secure-auth . :boolean-ptr)
+    (:report-data-truncation . :boolean-ptr)
+    (:reconnect . :boolean-ptr)
+    (:ssl-verify-server-cert . :boolean-ptr)))
 
 (uffi:def-enum mysql-status
     (:ready
      :get-result
      :use-result))
 
-#+(or mysql-client-v4.1 mysql-client-v5)
-(uffi:def-enum mysql-field-types
-    (:ready
-     :get-result
-     :use-result))
-
 ;;; Opaque pointers to mysql C-defined structures
 (uffi:def-foreign-type mysql-mysql (* :void))
 (uffi:def-foreign-type mysql-mysql-res (* :void))
 (uffi:def-function "mysql_options"
   ((mysql mysql-mysql)
    (option mysql-option)
-   (arg :cstring))
+   (arg :pointer-void))
   :module "mysql"
   :returning :int)
 
   :module "mysql"
   :returning :void)
 
+(declaim (inline mysql-next-result))
+(uffi:def-function "mysql_next_result"
+    ((mysql mysql-mysql))
+  :module "mysql"
+  :returning :int)
+
 (declaim (inline mysql-fetch-row))
 (uffi:def-function "mysql_fetch_row"
     ((res mysql-mysql-res))