projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9185: first effort at support field names in QUERY calls, still needs testing
[clsql.git]
/
db-mysql
/
mysql-client-info.lisp
diff --git
a/db-mysql/mysql-client-info.lisp
b/db-mysql/mysql-client-info.lisp
index 9b201821ff249df6cba461ba8cc7cfcf79ce194e..75abdd075b36c69d5439f5da6af4bc272616306a 100644
(file)
--- a/
db-mysql/mysql-client-info.lisp
+++ b/
db-mysql/mysql-client-info.lisp
@@
-9,8
+9,7
@@
;;;;
;;;; $Id$
;;;;
;;;;
;;;; $Id$
;;;;
-;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
-;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
+;;;; This file, part of CLSQL, is Copyright (c) 2004 by Kevin M. Rosenberg
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser GNU Public License
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser GNU Public License
@@
-21,22
+20,26
@@
(declaim (inline mysql-get-client-info))
(declaim (inline mysql-get-client-info))
+(defvar *mysql-client-info* nil)
+
(eval-when (:compile-toplevel :load-toplevel :execute)
(uffi:def-function "mysql_get_client_info"
()
:module "mysql"
:returning :cstring)
(eval-when (:compile-toplevel :load-toplevel :execute)
(uffi:def-function "mysql_get_client_info"
()
:module "mysql"
:returning :cstring)
- (let ((version (uffi:convert-from-cstring (mysql-get-client-info))))
+ (setf *mysql-client-info* (uffi:convert-from-cstring (mysql-get-client-info)))
+
+ (when (and (stringp *mysql-client-info*)
+ (plusp (length *mysql-client-info*)))
(cond
(cond
- ((eql (schar
version
0) #\3)
+ ((eql (schar
*mysql-client-info*
0) #\3)
(pushnew :mysql-client-v3 cl:*features*))
(pushnew :mysql-client-v3 cl:*features*))
- ((eql (schar version 0) #\4)
- (pushnew :mysql-client-v4 cl:*features*))
+ ((eql (schar *mysql-client-info* 0) #\4)
+ (pushnew :mysql-client-v4 cl:*features*)
+ (when (and (>= (length *mysql-client-info*) 3)
+ (string-equal "4.1" *mysql-client-info* :end2 3))
+ (pushnew :mysql-client-v4.1 cl:*features*)))
(t
(t
- (error "Unknown mysql client version '~A'." version)))))
-
-;;#-(or :mysql-client-v3 :mysql-client-v4)
-;;(eval-when (:compile-toplevel :load-toplevel :execute)
-;; (pushnew :mysql-client-v3 cl:*features*))
+ (error "Unknown mysql client version '~A'." *mysql-client-info*)))))