patch suggestion mysql-sql.lisp
Michael Pheasant <[email protected]>
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
Database-list ignores a supplied database name and instead uses
"mysql". It is possible that a mysql userid has permissions to issue
"show databases" but no permission to connect to db "mysql".
database-list gives an error in this scenario.
The following patch overcomes this by using the user-supplied db name
or else "mysql" if nil supplied.
I'm new to this list; what is the procedure for suggesting patches?
Cheers
Mike
--- mysql-sql.lisp~ 2007-09-17 08:00:35.000000000 -0700
+++ mysql-sql.lisp 2009-08-22 22:52:47.000000000 -0700
@@ -475,8 +475,7 @@
(defmethod database-list (connection-spec (type (eql :mysql)))
(destructuring-bind (host name user password &optional port) connection-spec
- (declare (ignore name))
- (let ((database (database-connect (list host "mysql" user
password port) type)))
+ (let ((database (database-connect (list host (or name "mysql")
user password port) type)))
(unwind-protect
(progn
(setf (slot-value database 'clsql-sys::state) :open)
--
Michael Pheasant
Associate Project Scientist
UCSC Genome Browser
Email: mikep-Emgmuai4XwL2fBVCVOL8/[email protected]
Skype: mpheasant
Phone: +1-831-459-1424
Location: Engineering2 Room 515
Post: CBSE, UC Santa Cruz, MS:CBSE/ITI
1156 High Street
Santa Cruz, CA 95064, USA