On Tue, Mar 29, 2005 at 11:46:28PM -0500, Stas Bekman wrote:
> In order to properly test take_imp_data implementation, one needs to be 
> able to test that when a second connect is issued and dbi_imp_data is 
> passed:
> 
>     my $dbh = DBI->connect($test_dsn, $test_user, $test_password,
>              { dbi_imp_data => $imp_data });
> 
> a new connection won't be opened. Any ideas how to write such a test?

Looking at 
http://search.cpan.org/~capttofu/DBD-mysql/lib/DBD/mysql.pm#DATABASE_HANDLES

I'd have thought that $threadId = $dbh->{'mysql_thread_id'}; is what
you're looking for. It corresponds to the mysql_thread_id() API function:

  http://dev.mysql.com/doc/mysql/en/mysql-thread-id.html

Tim.

Reply via email to