Subject: | arrayref in insert bug in version 1.81 |
Date: | Fri, 4 Mar 2016 02:31:37 +0200 |
To: | bug-SQL-Abstract [...] rt.cpan.org |
From: | Ilarion Valetskyy <i.valetskyy [...] gmail.com> |
Hello,
If arrayref in insert has more than 26 values returned binds are incorrect.
Simple test case:
perl -MData::Dumper -MSQL::Abstract -E 'say Dumper [
SQL::Abstract->new()->insert("t",[0..26]) ]'
$VAR1 = [
'INSERT INTO t VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )',
0,
26,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
];
I bet that the fix should be applied here:
https://metacpan.org/source/RIBASUSHI/SQL-Abstract-1.81/lib/SQL/Abstract.pm#L267
as at least my $i = "aa";
Regards,
Ilarion