1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: mysql-client-info.lisp
6 ;;;; Purpose: Check mysql client version
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: April 2004
12 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
13 ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
15 ;;;; CLSQL users are granted the rights to distribute and use this software
16 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
17 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
18 ;;;; *************************************************************************
22 (declaim (inline mysql-get-client-info))
24 (defvar *mysql-client-info* nil)
26 (eval-when (:compile-toplevel :load-toplevel :execute)
27 (uffi:def-function "mysql_get_client_info"
32 (setf *mysql-client-info* (uffi:convert-from-cstring (mysql-get-client-info)))
35 ((eql (schar *mysql-client-info* 0) #\3)
36 (pushnew :mysql-client-v3 cl:*features*))
37 ((eql (schar *mysql-client-info* 0) #\4)
38 (pushnew :mysql-client-v4 cl:*features*))
40 (error "Unknown mysql client version '~A'." *mysql-client-info*))))