Fix annoying warnings on innocent looking MSSQL code
After several rounds of improvements in the retry logic (
84efb6d7, 729656c5)
MSSQL code non-fatally aborting due to clashing multiple active resultsets
would emit an annoying warning. Such warnings are especially baffling when
encountered in innocent-looking code like:
my $first_bar_of_first_foo = $schema->resultset('Foo')
->search({ foo => 'fa' })
->next
->related_resultset("bar")
->next;
Since no object destruction takes place until the = operator is executed, the
cursor returning "first foo matching fa" is still active when we run a second
search for the "bars". With default MSSQL settings (i.e. without an enabled
MARS[1] implementation) this leads to an exception on the second ->next().
The failed next() is properly retried, since we are not in transaction or some
similar complicating factor, and the entire thing executes correctly, except
the force-disconnect-before-reconnect-after-failed-ping warns about the first
cursor being still alive.
Add extra stack marker for this particular case, and teach the MSSQL driver to
hide the (at this stage spurious) warning
[1] http://p3rl.org/DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server#MULTIPLE-ACTIVE-STATEMENTS