RE: [phplib] ct_split_sql question From: Chris Johnson (chris <email protected>)
Date: 07/30/01

Removing the begin/end transaction pair means that you run the risk of
corrupted data. The risk is fairly small. The data would get corrupted
if for some reason the function ac_store() did not finish completely.

Begin/end transaction makes sure that if any of the SQL statements in
between fail, all of the SQL statements are rolled back. That means,
all changes are undone, so that it is like they were never done.
Another way to say this is, all SQL statements in between a Begin/End
pair must succeed, or all will be cancelled.

MySQL 3.23 released versions support transactions when built with either
of these two table types: Berkeley DB and InnoDB. Tables must be
created as one of those types, as well. Usually, the default with by
MYISAM type tables, which are also supported in 3.23, but these do not
support transactions.

> -----Original Message-----
> From: Jakob [mailto:jakob <email protected>]

> I had to switch from using ct_sql to ct_split_sql as my
> container class, as I was getting session errors due to
> the size of my session.
>
> here's my question: I had to comment out the following
> two lines as they generated sql error messages:
>
> ct_split_sql.inc:
> $this->db->query("BEGIN TRANSACTION"); //(l. 67)
> // while loop saving the session into rows
> $this->db->query("END TRANSACTION"); // (l. 88)
>
> it does work now, but i am wondering about the
> implications of this modification.
>
> i should add that i am using mysql which, to my
> knowledge doesn't support transactions (yet).

-- 
Abbestellen mit Mail an:   phplib-unsubscribe <email protected>
Kommandoliste mit Mail an: phplib-help <email protected>