"transactions not supported" error

"transactions not supported" error

am 21.07.2006 21:15:06 von Michael.Muratet

------_=_NextPart_001_01C6ACF9.F99A0C13
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Greetings

I have had (& reported) this problem before and managed work arounds, =
but now I've got no choice but to get transactions working through DBI. =
The following simple script always fails:

#!/usr/bin/perl -w

use DBI;
my $user =3D 'root';
my $pw =3D '';
DBI->trace(4);
my $dbh =3D DBI->connect("DBI:mysql:database=3Dtest;host=3D127.0.0.1", =
$user, $pw, { AutoCommit =3D> 0, RaiseError =3D> 0 });
die DBI::errstr unless $dbh;
$dbh->disconnect;

I am using perl 5.8.5 and mysql 5.0.21 on a Dell PE 6850 with qual =
dual-core Xeons and Red Hat Enterprise v4. I cleaned and rebuilt DBI per =
the instructions and cleaned and rebuild DBD-mysql per the instructions. =
I've checked the logs for mysqld and innodb is starting normally. I can =
create tables, start transactions, commit, rollback, etc etc from the =
command line.=20

I've tried to include the logs per the README, but they won't pass the =
50K input size limit on the list. I can send them separately if anyone =
is interested in taking this up.

Any help will be gratefully appreciated.

Thanks

Mike



------_=_NextPart_001_01C6ACF9.F99A0C13--

Re: "transactions not supported" error

am 21.07.2006 21:17:54 von Tyler

Michael Muratet US-Huntsville wrote:
> Greetings
>
> I have had (& reported) this problem before and managed work arounds, but
> now I've got no choice but to get transactions working through DBI. The
> following simple script always fails:

Where is it failing / what is the output of the script?

> the instructions and cleaned and rebuild DBD-mysql per the instructions.

If you want transactions, I'd suggest something other than MySQL...

- Tyler

Re: "transactions not supported" error

am 21.07.2006 21:37:53 von Martin.Evans

If it is failing with 'transactions not supported' as per your subject
then I can only suggest:

1) just because you built mysql with innodb support I'm not sure that
means your tables support transactions - you need to create the tables
with the innodb engine.
i.e you add a TYPE = INNODB to the end of the create table.

However, this is unlikely since you say it works from the command line.

2) I think there is a setting in your mysql.conf file you need to check
too.

as per 1)

3) have you tried leaving autocommit defaulted (on) and using:

$dbh->begin_work;
$dbh->commit | $dbh->rollback

I have transactions working with mysql, innodb, DBI 1.4* to 1.5* and
DBD::mysql 3.* so I know it works but I don't change AutoCommit.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

On Fri, 2006-07-21 at 14:15 -0500, Michael Muratet US-Huntsville wrote:
> Greetings
>
> I have had (& reported) this problem before and managed work arounds, but now I've got no choice but to get transactions working through DBI. The following simple script always fails:
>
> #!/usr/bin/perl -w
>
> use DBI;
> my $user = 'root';
> my $pw = '';
> DBI->trace(4);
> my $dbh = DBI->connect("DBI:mysql:database=test;host=127.0.0.1", $user, $pw, { AutoCommit => 0, RaiseError => 0 });
> die DBI::errstr unless $dbh;
> $dbh->disconnect;
>
> I am using perl 5.8.5 and mysql 5.0.21 on a Dell PE 6850 with qual dual-core Xeons and Red Hat Enterprise v4. I cleaned and rebuilt DBI per the instructions and cleaned and rebuild DBD-mysql per the instructions. I've checked the logs for mysqld and innodb is starting normally. I can create tables, start transactions, commit, rollback, etc etc from the command line.
>
> I've tried to include the logs per the README, but they won't pass the 50K input size limit on the list. I can send them separately if anyone is interested in taking this up.
>
> Any help will be gratefully appreciated.
>
> Thanks
>
> Mike
>
>