Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 1478
Status: resolved
Priority: 0/
Queue: SQL-Statement

People
Owner: JZUCKER [...] cpan.org
Requestors: chromatic [...] wgz.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.004
Fixed in: (no value)



Subject: Allow '0' As a Value in Set Clauses
Running the following SQL query produced the error 'Incomplete SET clause!'. The problem is testing for truthness instead of definedness. With the attached patch, my operation succeeds. UPDATE session SET lock = 0 WHERE user_id = ?
--- SQL/Parser.pm~ Tue Aug 27 08:30:56 2002 +++ SQL/Parser.pm Tue Aug 27 08:30:16 2002 @@ -601,7 +601,8 @@ my(@cols,@vals); for(@sets) { my($col,$val) = split / = /,$_; - return $self->do_err('Incomplete SET clause!') if !$col or !$val; + return $self->do_err('Incomplete SET clause!') + unless defined $col and defined $val; push @cols, $col; push @vals, $val; }
Assigned to Jeff Zucker, the module owner.
RT-Send-CC: JZUCKER [...] cpan.org
Assigned to JZUCKER, the module owner.