Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 97541
Status: resolved
Priority: 0/
Queue: DBD-mysql

Owner: Nobody in particular
Requestors: mail [...]

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

Subject: mysql_bind_type_guessing fails on single "special" character
Date: Sun, 27 Jul 2014 13:10:30 +0200
To: bug-DBD-mysql [...]
From: Oliver Welter <mail [...]>
Hi, this is a followup on #48242 ( mysql_bind_type_guessing detects a value which consists of only a single character (plus,minus,dot,e) as a number, resulting in an invalid mysql statement. Reproduce: my $sth = $dbh->prepare('insert into test (test) values (?)'); $sth->execute(('+')); $sth->execute(('.')); $sth->execute(('-')); $sth->execute(('e')); Causes "syntax error near ')'" resp. " Unknown column 'e' in 'field list". Reason: Parts of the patch to solve 48242 have been reverted later, see github commits: 6e296abd - introduces "seen_digit" 1474dcb0 - removes the flag by commenting it + /* Not sure why this was changed */ + /* seen_digit= 1; */ + /* Need to revisit this */ + /*if (len == 0 || cp - string < (int) len || seen_digit == 0) {*/ + if (len == 0 || cp - string < (int) len) { I did not have a full view on the code, but reactivating these lines SHOULD fix the issue without any side effects. Oliver -- Protect your environment - close windows and adopt a penguin!
Download smime.p7s
application/pkcs7-signature 3.9k

Message body not shown because it is not plain text.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to