RE: Re[2]: Start Transaction in InnoDB

2002-10-30 Thread Fernando Grijalba
This is what I think.

When Autocommit is set you DO NOT have to enter COMMIT after you update your
DB (Update, Insert Delete), but you will be changing the DB after every
statement, therefore you cannot change your mind after the command is
execute.

Now as for BEGIN, it will begin a Transaction regardless of the Autocommit
value.  Therefore if you have Autocommit set, but you do:
BEGIN;
SQLCOMMANDS;
COMMIT OR ROLLBACK;

The changes will be save only at the COMMIT or if you do not want the
changes to take effect you can ROLLBACK.

When Autocommit is not set you MUST COMMIT after your SQL statement in order
for the changes to be written into the DB regardless as to you start or not
with BEGIN.

HTH

JFernando
*** sql ***

-Original Message-
From: Peter Brawley [mailto:peter.brawley@;artfulsoftware.com]
Sent: October 30, 2002 12:38
To: Dyego Souza do Carmo; Egor Egorov
Cc: [EMAIL PROTECTED]
Subject: Re: Re[2]: Start Transaction in InnoDB


Dyego,

BEGIN, not set begin. My understanding is that BEGIN is a synonym for SET
autocommit=0.

PB

-

> AB>> I would like to know, how can I start a new transaction using InnoDB
Tables?
>
> EE> Use BEGIN statement:
> EE> http://www.mysql.com/doc/en/COMMIT.html
>
> EE> Don't forget to SET AUTOCOMMIT=0;
>
>
> What is the diference of SET AUTOCOMMIT=0;
>
> and set BEGIN; ?
>
> If I start the transaction with "BEGIN" and without "SET AUTOCOMMIT=0"
what will happen ?
>
> what is the diference ?




-
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




Re: Re[2]: Start Transaction in InnoDB

2002-10-30 Thread Peter Brawley
Dyego,

BEGIN, not set begin. My understanding is that BEGIN is a synonym for SET
autocommit=0.

PB

-

> AB>> I would like to know, how can I start a new transaction using InnoDB
Tables?
>
> EE> Use BEGIN statement:
> EE> http://www.mysql.com/doc/en/COMMIT.html
>
> EE> Don't forget to SET AUTOCOMMIT=0;
>
>
> What is the diference of SET AUTOCOMMIT=0;
>
> and set BEGIN; ?
>
> If I start the transaction with "BEGIN" and without "SET AUTOCOMMIT=0"
what will happen ?
>
> what is the diference ?




-
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




Re[2]: Start Transaction in InnoDB

2002-10-30 Thread Dyego Souza do Carmo
DobrĂ½ den,
quarta-feira, 30 de outubro de 2002, 13:09:01, napsal jste:

EE> Alexander,
EE> Wednesday, October 30, 2002, 1:40:11 PM, you wrote:

AB>> I would like to know, how can I start a new transaction using InnoDB Tables?

EE> Use BEGIN statement:
EE> http://www.mysql.com/doc/en/COMMIT.html

EE> Don't forget to SET AUTOCOMMIT=0;


What is the diference of SET AUTOCOMMIT=0;

and set BEGIN; ?

If I start the transaction with "BEGIN" and without "SET AUTOCOMMIT=0" what will 
happen ?

what is the diference ?



-
  ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento   
-
 E S C R I B A   I N F O R M A T I C A
-
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
-- 
$ look into "my eyes"
look: cannot open my eyes
-
   Reply: [EMAIL PROTECTED]



-
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