From 57620e961987757747e59eb7024b22c6d87b9c97 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Fri, 30 Apr 2004 03:08:19 +0000 Subject: [PATCH] r9178: add mysql client 4.1 version detection --- ChangeLog | 5 +++++ db-mysql/mysql-client-info.lisp | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e0d379..1aa9499 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +29 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net) + * Version 2.9.6-pre1 + * db-mysql/mysql-client-info.lisp: Add client version 4.1 + detection + 28 Apr 2004 Kevin Rosenberg (kevin@rosenberg.net) * Version 2.9.5 * db-mysql/mysql-sql.lisp: Fix bug in transaction capability diff --git a/db-mysql/mysql-client-info.lisp b/db-mysql/mysql-client-info.lisp index 5cb8d0e..e443508 100644 --- a/db-mysql/mysql-client-info.lisp +++ b/db-mysql/mysql-client-info.lisp @@ -9,8 +9,7 @@ ;;;; ;;;; $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 @@ -30,12 +29,17 @@ :returning :cstring) (setf *mysql-client-info* (uffi:convert-from-cstring (mysql-get-client-info))) - + (cond ((eql (schar *mysql-client-info* 0) #\3) (pushnew :mysql-client-v3 cl:*features*)) ((eql (schar *mysql-client-info* 0) #\4) - (pushnew :mysql-client-v4 cl:*features*)) + (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))) (t - (error "Unknown mysql client version '~A'." *mysql-client-info*)))) + (error "Unknown mysql client version '~A'." *mysql-client-info*))) + + ) -- 2.34.1