Error in Sql.Sql()->list_fields() when using wildcard.
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3146
Reported by Anders Johansson anders@roxen.com
From William Welliver:
I found a bug in pike 7.2.308 and 364 in the Sql module. Apparently using a wildcard in a call to list_fields throws an error. Replacing the existing filter call with the following around line 505 should fix the problem.
Sorry for not having a patch, I don't have easy access to the non-fixed code right now.
Bill
if (wild) {
res = filter(res, lambda(mapping row){
return Regexp(replace(wild, ({"%", "_"}), ({".*", "."})))
->match(row->name);
}
);
}
--
H. William Welliver / Fairchild Semiconductor Mountain Top Systems
email: bill.welliver@fairchildsemi.com / phone: 570.474.6761 x4445 cell:
570.262.7151