;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: mysql-api.cl,v 1.2 2002/03/25 14:13:41 kevin Exp $
+;;;; $Id: mysql-api.cl,v 1.4 2002/05/25 15:57:28 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
:module "mysql"
:returning (* mysql-mysql))
-(declaim (inline mysql-real-connect))
+;; Need to comment this out for LW 4.2.6
+;; ? bug in LW version
+;;(declaim (inline mysql-real-connect))
(uffi:def-function "mysql_real_connect"
- ((mysql (* mysql-mysql))
- (host :cstring)
- (user :cstring)
- (passwd :cstring)
- (db :cstring)
- (port :unsigned-int)
- (unix-socket :cstring)
- (clientflag :unsigned-int))
+ ((mysql (* mysql-mysql))
+ (host :cstring)
+ (user :cstring)
+ (passwd :cstring)
+ (db :cstring)
+ (port :unsigned-int)
+ (unix-socket :cstring)
+ (clientflag :unsigned-int))
:module "mysql"
:returning (* mysql-mysql))
;;;; Equivalents of C Macro definitions for accessing various fields
;;;; in the internal MySQL Datastructures
-(uffi:def-constant +2^32+ 4294967296)
-(uffi:def-constant +2^32-1+ (1- +2^32+))
-
-(defmacro make-64-bit-integer (high32 low32)
- `(+ ,low32 (* ,high32 +2^32+)))
(declaim (inline mysql-num-rows))
(defun mysql-num-rows (res)
:returning :void)
-(declaim (inline split-64bit-integer))
-(defun split-64bit-integer (int64)
- (values (ash int64 -32) (logand int64 +2^32-1+)))
-
(defun mysql-data-seek (res offset)
- (multiple-value-bind (high32 low32) (split-64bit-integer offset)
+ (multiple-value-bind (high32 low32) (split-64-bit-integer offset)
(clsql-mysql-data-seek res high32 low32)))