Mysql shouldn't segfault in database-query when running a command with no resultset.
authorNathan Bird <nathan@acceleration.net>
Tue, 19 Jan 2010 18:59:52 +0000 (13:59 -0500)
committerNathan Bird <nathan@acceleration.net>
Mon, 1 Feb 2010 18:36:50 +0000 (13:36 -0500)
commitb46ac7dbb45a94f36d1cbd9b791df91b1d1af4ac
tree9e2664e2967fe7ad6ccc5b15ee4385b7b31c370f
parent2e4aa59540392e40168a6d83c858edd8514ba086
Mysql shouldn't segfault in database-query when running a command with no resultset.
From docs at http://dev.mysql.com/doc/refman/5.0/en/mysql-real-query.html and
http://dev.mysql.com/doc/refman/5.0/en/mysql-field-count.html after performing the query
and attempting to get a result set, the RS ptr should be checked for null and
if it is check mysql_errno to see if there actually was an error, or just no result.

This patch makes database-query return NIL if there was no resultset.
db-mysql/mysql-sql.lisp