Ben,

----- Original Message -----
From: "Ben Goswami" <[EMAIL PROTECTED]>
To: "Heikki Tuuri" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 4:40 PM
Subject: Re: how to set autocommit


> Heikki ,
> Thanks for your reply.  So what should I do in the mean time.  Is there a
> work around.
>
> 1. Can I put in the connect string?
> like
> DBI->connect("DBI:mysql:database=devdb;host=localhost",
>                              {'RaiseError' => 1, 'AutoCommit => 0});
> This does not work.
>
> 2. Should I use begin like ($sth is the the DB handle)
>
> $sth->do("begin")
> $sth->do("insert into...")
> $sth->rollback()
>
> or anything else.
> I tried from setting up a mysql prompt, and still does not take it like
> mysql>set autocommit=0
> mysql>insert into...
> mysql>rollback
>
> when I do that it says Error 1196 Warning:  Some non-transactional changed
> tables couldn't be rolled back

SET AUTOCOMMIT = 0 is the right way to do this.

But are you doing changes to MyISAM type tables? They are non-transactional.
Please check with SHOW CREATE TABLE that your tables are of the InnoDB type.

>
> Thanks
> Ben

Regards,

Heikki

> ----- Original Message -----
> From: "Heikki Tuuri" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, July 28, 2002 11:37 PM
> Subject: Re: how to set autocommit
>
>
> > Ben,
> >
> > I have added the following item to the TODO list of September 2002. I
> guess
> > it will appear only in the MySQL-4.0 branch, as 4.0 will be the new
stable
> > branch within a few months.
> >
> > ...
> > September, 2002:
> > Add a global MySQL my.cnf option autocommit_default=0.
> > ...
> >
> > Best regards,
> >
> > Heikki Tuuri
> > Innobase Oy
> > ---
> > InnoDB - transactions, hot backup, and foreign key support for MySQL
> > See http://www.innodb.com, download MySQL-Max from http://www.mysql.com
> >
> > ----- Original Message -----
> > From: ""Ben Goswami"" <[EMAIL PROTECTED]>
> > Newsgroups: mailing.database.mysql
> > Sent: Monday, July 29, 2002 7:52 AM
> > Subject: how to set autocommit
> >
> >
> > > Hi,
> > > Where should I change the autocommit setting to 0 (i.e no Autocommit).
> > I'm
> > > inserting row from perl script using DBI. I would like to bring up
mySQL
> > > server with autocommit false, so that I can explicitly commit from the
> > front
> > > end.  But with lot of research in various docs I could not find where
to
> > > changer the settings.  If I supply it in the connect string, it does
not
> > > take it.
> > > Any help is appreciated
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Before posting, please check:
> > >    http://www.mysql.com/manual.php   (the manual)
> > >    http://lists.mysql.com/           (the list archive)
> > >
> > > To request this thread, e-mail <[EMAIL PROTECTED]>
> > > To unsubscribe, e-mail
> > <[EMAIL PROTECTED]>
> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to