Russ Tyndall | 25 Feb 15:28 2015
Picon

Re: CLSQL Release

Thanks as always Zach, and apologies. 

That back end worked last I checked it (~6mo), but apparently that was too long ago.

Everything compiles and all the tests pass for me again, once I resolved the type error.
I thought it a little odd that the "warning" stopped compilation, but it seems SBCL does that more frequently as releases progress.

The fix has been pushed to git.b9.org and http://github.com/Unwashedmeme/clsql

Cheers,
Russ Tyndall
Developer
Acceleration.net


On 02/24/2015 07:08 PM, Zach Beane wrote:
Unfortunately, there seems to be a bug - http://report.quicklisp.org/2015-02-24/failure-report/clsql.html#clsql-mysql has the log.

; caught WARNING: ; Constant NIL conflicts with its asserted type (SB-ALIEN:ALIEN (* T)). ; See also: ; The SBCL Manual, Node "Handling of Types"

On Tue, Feb 24, 2015 at 2:06 PM, Russ Tyndall <russ <at> acceleration.net> wrote:
Spurred on by a message from the SBCL-devel list, I think its time for
a clsql release.

> It is actually a clsql problem, its reinitialize-instance around methods
> for standard-db-class do not return the passed instance to them.
> I made SBCL ignore that again, but things should be prepared that
> SBCL won't be so lenient in the future, maybe with type and equality
> assertions for all standard GFs.
>
> --
> With best regards, Stas.

I made the `reinitialize-instance :around`, return the passed in
instance.

Also in this release are some encoding bug fixes for sqlite backends
(thanks Zach Beane). Fixes for procedures and multiple result sets in
the mysql backend (thanks Ilya Khaprov). There was also a fixed load
bug for mysql on recent Ubuntu's (hopefully not causing problems
elsewhere).

I believe this will be release 6.6.0, but as always I leave that to
Kevin's discretion. Nathan Bird will push this all to b9.org in a bit.

Cheers,
Russ Tyndall
Developer
Acceleration.net

_______________________________________________
CLSQL mailing list
CLSQL <at> b9.com
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql


_______________________________________________
CLSQL mailing list
CLSQL@...
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql
Russ Tyndall | 24 Feb 20:06 2015
Picon

CLSQL Release

Spurred on by a message from the SBCL-devel list, I think its time for
a clsql release.

> It is actually a clsql problem, its reinitialize-instance around methods
> for standard-db-class do not return the passed instance to them.
> I made SBCL ignore that again, but things should be prepared that
> SBCL won't be so lenient in the future, maybe with type and equality
> assertions for all standard GFs.
>
> --
> With best regards, Stas.

I made the `reinitialize-instance :around`, return the passed in
instance.

Also in this release are some encoding bug fixes for sqlite backends
(thanks Zach Beane). Fixes for procedures and multiple result sets in
the mysql backend (thanks Ilya Khaprov). There was also a fixed load
bug for mysql on recent Ubuntu's (hopefully not causing problems
elsewhere).

I believe this will be release 6.6.0, but as always I leave that to
Kevin's discretion. Nathan Bird will push this all to b9.org in a bit.

Cheers,
Russ Tyndall
Developer
Acceleration.net
Mark Meyer | 5 Feb 12:40 2015
Picon

Maria DB Problems

Hi,
I've got a problem using MariaDB with CLSQL. Using the MariaDB Client libs CLSQL does not compile because mysql-client-info.lisp does check for a specific Version of the MySQL libs. The *mysql-client-info* is retrieved from mysql-get-client-info and the result should be something like 5.0.0-mysql but it is in fact 10.0.0-MariaDB. I did a quick fix to work around this (checking if the first letter of the string is 1), but would like a more permanent fix. Any ideas on how a good fix should look?

Regards, Mark
_______________________________________________
CLSQL mailing list
CLSQL@...
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql
Christopher Laux | 20 Dec 12:38 2014
Picon

clsql-mysql problem with join

Hi,

the second point of your post helped thanks, I had to modify 2 Makefiles.

I have another problem with clsql: when querying an object (user) with a one-to-many join

(jobs :reader user-jobs :db-kind :join :db-info (:join-class job
   :home-key id
   :foreign-key user-id
   :set t))

the slot sometimes returns all 4 job objects sometimes only 2 randomly. What could this be?

Chris


On Sat, Dec 20, 2014 at 8:04 AM, Jussi Lahdenniemi <jlahd <at> iki.fi> wrote:
Hello,

> using the most recent quicklisp version of clsql on sbcl 1.2.0 on ubuntu
> 14.04 with the corresponding mysql and libmysqlclient-dev definitely
> installed I receive this error upon loading clsql-mysql:
>
> OPERATION-ERROR while invoking #<COMPILE-OP > on
> #<CLSQL-MYSQL-SOURCE-FILE "clsql-mysql" "db-mysql" "clsql_mysql">

About a month ago I listed in my answer at Stackoverflow
(http://stackoverflow.com/questions/27123292/installing-clsql-sqlite3-using-sbcl-quicklisp)
the three issues I have faced when installing clsql on different
systems. Maybe one of these covers your situation as well?

--
Jussi Lahdenniemi
_______________________________________________
CLSQL mailing list
CLSQL-0lovp2JerKU@public.gmane.org
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql

_______________________________________________
CLSQL mailing list
CLSQL@...
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql
Christopher Laux | 19 Dec 20:45 2014
Picon

clsql-mysql load error

Hi all,

using the most recent quicklisp version of clsql on sbcl 1.2.0 on ubuntu 14.04 with the corresponding mysql and libmysqlclient-dev definitely installed I receive this error upon loading clsql-mysql:

OPERATION-ERROR while invoking #<COMPILE-OP > on #<CLSQL-MYSQL-SOURCE-FILE "clsql-mysql" "db-mysql" "clsql_mysql">

Unfortunately it doesn't say much more...

What can I do?

Cheers,
Chris

_______________________________________________
CLSQL mailing list
CLSQL@...
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql
Zach Beane | 25 Nov 20:33 2014

clsql-sqlite does not build on sbcl - argument error

I get this when trying to build clsql-sqlite:

  ; file: /home/quicklisp/quicklisp-controller/dist/build-cache/clsql/369f4bee8ea4573e08e35f09583a1ea0c1b03c08/clsql-20141124-git/db-sqlite/sqlite-sql.lisp
  ; in: DEFUN CANONICALIZE-RESULT-TYPES
  ;     (SQLITE:SQLITE-AREF CLSQL-SQLITE::COL-NAMES CLSQL-SQLITE::J)
  ; 
  ; caught WARNING:
  ;   The function was called with two arguments, but wants exactly three.

More of a log is here:

  http://report.quicklisp.org/2014-11-25/failure-report/clsql.html#clsql-sqlite

Zach
Russ Tyndall | 10 Jun 19:32 2014
Picon

Makefile Change for db-mysql backend

Hello,

Something apparently changed in the output of `dpkg-buildflags --get 
LDFLAGS` that caused this makefile to output invalid command line 
arguments to `ld`.  I made a change that I think is backwards compatible 
and should result
Mackram Raydan | 12 Apr 12:51 2014
Picon

Patch for the handling of symbols in clsql

Hey everyone,

Based on a previous thread, I have submitted a pull request to handle 
the output of symbols when saved with clsql. In line with the discussion 
with Russ, the functionality I submitted continues to use intern but 
makes checks on whether there are packages or not in the saved symbol 
and acts accordingly.

One thing I have missed is writing test cases because I was not sure how 
best to proceed (although I have done tests on my end to verify 
everything is in order). The current tests call directly the high level 
functions such as select or update and not the lower functions like 
read-sql-value. I was not sure if I should change some of the 
def-view-classes to add a symbol column, or to add a new def-view-class 
for this specific test or to basically put the tests that I did directly 
on read-sql-value. Any suggestions on what you would like me to do?

Finally I did the pull request to the git repository found at github.com 
even though the change is small (I am just used to pull requests), if 
someone prefers another method I have no problem in resubmitting in a 
different way.

Thank you

Mackram Raydan
Jussi Lahdenniemi | 8 Apr 16:16 2014
Picon
Picon

Problem with the new db-mysql makefile

Hello,

I just upgraded to the latest clsql with quicklisp, after which the 
db-mysql module failed to compile. Digging into the problem, the culprit 
was the new Makefile with its logic for finding out the ld flags:

LDFLAGS:=$(LDFLAGS) $(shell dpkg-buildflags --get LDFLAGS | sed 
"/-Wl,\(.*\)/ s//\1/g")

I was building clsql in the AWS EC2 environment; there dpkg-buildflags 
--get LDFLAGS results in the following:

-Wl,-Bsymbolic-functions -Wl,-z,relro

The regex above removes the first -Wl, but not the second one, which 
makes the linker unhappy. I fixed this by changing the regex to 
"/-Wl,\([^ ]*\)/ s//\1/g", you might want to incorporate something 
similar into the official version as well.

--

-- 
Jussi Lahdenniemi
Mackram Raydan | 8 Apr 15:08 2014
Picon

Possible new issue introduced with 20140316 release

Hey Everyone,

I would like to point out that during the release of 20140316 which was pushed to quicklisp as the most recent clsql implementation, a new behavior is taking place for the treatment of symbols . This could introduce some bugs in the running code of people if not pointed out, let me illustrate.

In the new version file oodml.lisp line number 624 will read a string from the db and translate into a symbol using the following function:
(intern (symbol-name-default-case val))

Previous version of clsql used to translate a symbol using the following function. Please note this is taken from oodml.lisp line number 690 version 20131211
(read-from-string val)

These two behaviours are quite different from each other specifically consider a function hello-world defined in package alpha if I were to save the symbol 'alpha::hello-world during the previous versions then I would be able to call that function as the returned symbol would be alpha::hello-world however in the new version it would be the symbol common-lisp-user:|alpha::hello-world| which is not callable as a function since it is not defined.

Can someone please help by shedding some light on why the change was done?

Thank you.

_______________________________________________
CLSQL mailing list
CLSQL@...
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql
Nicolas Neuss | 20 Feb 17:14 2014
Picon

Bug in sql/oodml.lisp

Hello,

I got bitten by the following problem: When I have
*print-length* set to some number for preventing output of undesired
length elsewhere, lists longer than that number are not written
correctly to the database when using UPDATE-RECORDS-FROM-INSTANCE.

The correct remedy for this special problem is probably to change the
PROGV special variable list in certain method definitions of
DATABASE-OUTPUT-SQL-AS-TYPE in the file "sql/oodml.lisp" to include also
setting *PRINT-LENGTH* to NIL, i.e.

(defmethod database-output-sql-as-type ((type (eql 'list)) val database db-type)
  (declare (ignore database db-type))
  (progv '(*print-circle* *print-array*) '(t t)
  ...))

becomes

(defmethod database-output-sql-as-type ((type (eql 'list)) val database db-type)
  (declare (ignore database db-type))
  (progv '(*print-circle* *print-array* *print-length*) '(t t nil)
  ...))

Note that the same change has to be performed for the specializations of
this generic function to vectors and arrays later in that file:

  (defmethod database-output-sql-as-type ((type (eql 'vector)) val ...) ...)
  (defmethod database-output-sql-as-type ((type (eql 'array)) val ...) ...)

Yours,

Nicolas

P.S.: What about *PRINT-BASE*?

Gmane