On Mon, Sep 18, 2006 at 05:05:52PM -0400, Sam Tregar wrote: > On Mon, 18 Sep 2006, Sam Tregar wrote: > > >On Mon, 18 Sep 2006, Sam Tregar wrote: > > > >>Looks like it turns PrintError off, huh? Actually, as far as I can > >>tell it turns it on. The relevent C code is (from dbih_set_attr_k): > >> > >> else if (strEQ(key, "PrintError")) { > >> DBIc_set(imp_xxh,DBIcf_PrintError, on); > > > >Sheesh, ignore me. I see that's using "on", which should toggle it on > >and off. I wonder why it doesn't seem to be working. > > Is it possible that connect_cached() resets PrintError if it's not > explicitely set in the options hash? That would explain what I'm > seeing. I can set PrintError off and see its effect, but as soon as > some other code gets the same handle via connect_cached() PrintError > is on again.
Yes, and the same applies to AutoCommit. Whether it's a good thing or not is debatable but it's been that way forever. The 'workaround' is to explicitly state the attributes you want. (But even then some would argue that it's unreasonable for connect/connect_cached to re-apply those attribute settings to an already cached handle. You can argue that one either way.) Tim.