X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=interfaces%2Fmysql%2Fmysql-loader.cl;h=caa8c55fa559ba80f6194e4dd62f2bb03f504f50;hb=ba513c82016bfa0dfe3c3e5398fea1e78bada78b;hp=df0bd643915574b513f550d30a7fc40e3802475c;hpb=8213ff48f5362c3d4792444c929f50bd128bd044;p=clsql.git diff --git a/interfaces/mysql/mysql-loader.cl b/interfaces/mysql/mysql-loader.cl index df0bd64..caa8c55 100644 --- a/interfaces/mysql/mysql-loader.cl +++ b/interfaces/mysql/mysql-loader.cl @@ -7,7 +7,7 @@ ;;;; Programmers: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: mysql-loader.cl,v 1.1 2002/03/23 14:04:52 kevin Exp $ +;;;; $Id: mysql-loader.cl,v 1.3 2002/03/24 04:37:09 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -51,19 +51,26 @@ load the MySQL client library succesfully. If this differs at your site, 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))) + *mysql-library-loaded*) + +(defmethod clsql-sys:database-type-load-foreign ((database-type (eql :mysql))) + (when + (and + (uffi:load-foreign-library *mysql-library-filename* + :module "mysql" + :supporting-libraries + *mysql-supporting-libraries*) + (uffi:load-foreign-library *clsql-mysql-library-filename* + :module "clsql-mysql" + :supporting-libraries + (append *mysql-supporting-libraries*))) + (setq *mysql-library-loaded* t))) -(defmethod database-type-load-foreign ((database-type (eql :mysql))) - (uffi:load-foreign-library *mysql-library-filename* - :module "mysql" - :supporting-libraries - *mysql-supporting-libraries*) - (uffi:load-foreign-library *clsql-mysql-library-filename* - :module "clsql-mysql" - :supporting-libraries - (append *mysql-supporting-libraries*))) - -(database-type-load-foreign :mysql) +(clsql-sys:database-type-load-foreign :mysql)