mysql: begin_work after commit fails

mysql: begin_work after commit fails

am 28.10.2005 18:17:22 von hjp

--4nn+A2p41ba1mxGd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I have a strange problem with mysql 4.1 (innodb engine) and
DBD::mysql 2.9006:

A dbh->begin_work immediately after a dbh->commit fails with=20
the error "Already in a transaction".

A level 2 trace shows that there are indeed no other DBI calls between
these two:

-> commit for DBD::mysql::db (DBI::db=3DHASH(0x872feb4)~0x8753170) thr#=
814bf18
<- commit=3D 1 at MySQL.pm line 141
-> begin_work in DBD::_::db for DBD::mysql::db (DBI::db=3DHASH(0x872feb=
4)~0x8753170) thr#814bf18
1 -> FETCH for DBD::mysql::db (DBI::db=3DHASH(0x8753170)~INNER 'AutoCommi=
t') thr#814bf18
1 <- FETCH=3D '' at DBI.pm line 1623
1 -> set_err in DBD::_::common for DBD::mysql::db (DBI::db=3DHASH(0x87531=
70)~INNER 1 'Already in a transaction') thr#814bf18
!! ERROR: 1 'Already in a transaction' (err#1)
1 <- set_err=3D undef at DBI.pm line 1623
!! ERROR: 1 'Already in a transaction' (err#1)
<- begin_work=3D undef at MySQL.pm line 336

How can this happen?

hp

--=20
_ | Peter J. Holzer | In our modern say,learn,know in a day
|_|_) | Sysadmin WSR | world, perhaps being an expert is an
| | | hjp@wsr.ac.at | outdated concept.
__/ | http://www.hjp.at/ | -- Catharine Drozdowski on dbi-users.

--4nn+A2p41ba1mxGd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQDQAwUBQ2JPElLjemazOuKpAQGjAgXSAmzXcz2zRe0wLQJSuatTt4vuEkM6 BhLD
tDBqHrK2CKfVu0TdMe0VGZXywH860dnTwh7jhpTpe94XV2AeD6GQYyTPFj5+ VDPB
8hoNZO91l56c99gPC1M9znqu4eqQpIvQwqPnN7gAXMzat4LmNmYfsRy/Xn05 qKAH
JaSqjyUfHbeIn3wH+4d+IemPQgI3PEFB+MVeyvz12jvIL+FQEdbkPpkDBZTn /qQy
vsqR2tmk1ofMWBjdw0TBy4sprQ==
=6QFm
-----END PGP SIGNATURE-----

--4nn+A2p41ba1mxGd--

Re: mysql: begin_work after commit fails

am 28.10.2005 19:12:34 von hjp

--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2005-10-28 18:17:22 +0200, Peter J. Holzer wrote:
> I have a strange problem with mysql 4.1 (innodb engine) and
> DBD::mysql 2.9006:
>=20
> A dbh->begin_work immediately after a dbh->commit fails with=20
> the error "Already in a transaction".

Reading the docs before posting wouldn't hurt:

If "AutoCommit" is already off when "begin_work" is called then
it does nothing except return an error.=20

Please excuse my while I stand a bit in the corner.

hp


--=20
_ | Peter J. Holzer | In our modern say,learn,know in a day
|_|_) | Sysadmin WSR | world, perhaps being an expert is an
| | | hjp@wsr.ac.at | outdated concept.
__/ | http://www.hjp.at/ | -- Catharine Drozdowski on dbi-users.

--MGYHOYXEY6WxJCY8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQDQAwUBQ2JcAlLjemazOuKpAQEuCgXRAUzGHTpFPIHyAWj2ptxvi8pJqPcw rPFA
J4fNgAgfJhxCM+4JK2jl5Tralw0E7Vk70nFX3w2ckZeaj8XbHFKu19hU9c14 vthp
PN9j84iQsUZ7r2xSnnRzBHtKt/IyDyg9+9Ruv6NYcGqDBxF7pvvhZRNACZEg h4hw
nzAxuLrkBPbS5Vm5anJo86/37HiVldhC+Y94dVhzr8UuCPSbXqtxkwrYpvRQ YQhS
Xk0265JGtbacm0fAVUSf+ma+iw==
=D+gv
-----END PGP SIGNATURE-----

--MGYHOYXEY6WxJCY8--