You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experienced a segfault using DBI::Log with mysql, and reported it to DBD::mysql.
The segfault comes from the dereferencing of $sth->{ParamValues}, to copy its data for populating the placeholders, as the attribute is expected to return a hashref, where
keys of the hash are the 'names' of the placeholders, typically integers starting at 1. Returns undef if not supported by the driver
The segfault is obviously not the fault of DBI::Log.
However, DBI::Log should probably not be looking at the ParamValues attribute prior to execution, as some (many?) drivers won't support this:
Some drivers cannot provide valid values for some or all of these attributes until after $sth->execute has been successfully called. Typically the attribute will be undef in these situations
It might be a good idea to move the actual logging (in all cases, not just json) to the post_query function, since ParamValues is more likely to contain bound parameter values at that time. If this is acceptable, I will make a pull request.
(Working around the problematic behavior of the DBD::mysql driver that I reported, however, would require something further. I can also take a stab at that, if you're open to that.)
The text was updated successfully, but these errors were encountered:
I experienced a segfault using
DBI::Log
with mysql, and reported it toDBD::mysql
.The segfault comes from the dereferencing of
$sth->{ParamValues}
, to copy its data for populating the placeholders, as the attribute is expected to return a hashref, whereThe segfault is obviously not the fault of
DBI::Log
.However,
DBI::Log
should probably not be looking at theParamValues
attribute prior to execution, as some (many?) drivers won't support this:It might be a good idea to move the actual logging (in all cases, not just json) to the
post_query
function, sinceParamValues
is more likely to contain bound parameter values at that time. If this is acceptable, I will make a pull request.(Working around the problematic behavior of the
DBD::mysql
driver that I reported, however, would require something further. I can also take a stab at that, if you're open to that.)The text was updated successfully, but these errors were encountered: