View previous topic :: View next topic |
Author |
Message |
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Sun Jan 14, 2007 14:40 Post subject: COMMIT |
|
|
In nwnx4 MySQL connection, is it necessary to use SQLExecDirect("BEGIN TRANSACTION;") AND SQLExecDirect("COMMIT;"); in scripts ?
In which case ?
Mostal |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Jan 14, 2007 23:18 Post subject: |
|
|
The generic answer to this question would be: NWNX4 does not do anything special to your database connection. Transaction handling is like it would be without NWNX.
The longer answer from http://dev.mysql.com/doc/refman/5.0/en/commit.html:
Quote: | By default, MySQL runs with autocommit mode enabled. This means that as soon as you execute a statement that updates (modifies) a table, MySQL stores the update on disk.
If you are using a transaction-safe storage engine (such as InnoDB, BDB, or NDB Cluster), you can disable autocommit mode with the following statement:
SET AUTOCOMMIT=0;
|
So the answer would be: It's not necessary to commit, unless you are handling transaction on your own by disabling autocommit mode like in the example above. _________________ Papillon |
|
Back to top |
|
|
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Mon Jan 15, 2007 11:55 Post subject: |
|
|
thanks Papillon |
|
Back to top |
|
|
|