r2195: *** empty log message ***
[clsql.git] / interfaces / mysql / mysql-loader.cl
index 35dfb101c15a029a796ab33ed3a25ffb01316984..c421fc25e0cc45f26f6ed7f6e13b6899a890553a 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmers:   Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: mysql-loader.cl,v 1.10 2002/05/14 16:15:24 kevin Exp $
+;;;; $Id: mysql-loader.cl,v 1.19 2002/07/08 17:37:18 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 (defvar *clsql-mysql-library-filename* 
   (uffi:find-foreign-library
    "clsql-mysql"
-   `(,(translate-logical-pathname 
-       "CL-LIBRARY:clsql;interfaces;clsql-uffi;")
-     "/usr/share/common-lisp/source/clsql/interfaces/clsql-uffi/")))
-
+   `(,(directory-namestring
+       (translate-logical-pathname 
+       "CL-LIBRARY:clsql;interfaces;mysql;"))
+     "/usr/lib/cl-sql/")
+   :drive-letters '("C" "D" "E" "F" "G")))
+  
 (defvar *mysql-library-filename*
     (cond
      ((probe-file "/opt/mysql/lib/mysql/libmysqlclient.so")
@@ -63,10 +65,10 @@ set to the right path before compiling or loading the system.")
 (defvar *mysql-library-loaded* nil
   "T if foreign library was able to be loaded successfully")
 
-(defmethod clsql-sys:database-type-library-loaded ((database-type (eql :mysql)))
+(defmethod clsql-base-sys:database-type-library-loaded ((database-type (eql :mysql)))
   *mysql-library-loaded*)
                                      
-(defmethod clsql-sys:database-type-load-foreign ((database-type (eql :mysql)))
+(defmethod clsql-base-sys:database-type-load-foreign ((database-type (eql :mysql)))
   (let ((mysql-path
         (uffi:find-foreign-library *mysql-library-candidate-names*
                                    *mysql-library-candidate-directories*
@@ -87,11 +89,8 @@ set to the right path before compiling or loading the system.")
                                    (append *mysql-supporting-libraries*)))
        (setq *mysql-library-loaded* t)
       (warn "Unable to load MySQL client library ~A or CLSQL-MySQL library ~A"
-           mysql-path clsql-mysql-library-filename))))
+           mysql-path *clsql-mysql-library-filename*))))
+
 
+(clsql-base-sys:database-type-load-foreign :mysql)
 
-(clsql-sys:database-type-load-foreign :mysql)
-(when (clsql-sys:database-type-library-loaded :mysql)
-  (clsql-sys:initialize-database-type :database-type :mysql)
-  (setq clsql:*default-database-type* :mysql)
-  (pushnew :mysql cl:*features*))