innodb transaction not works

2008-03-21 Thread Saravanan
Hi lists, We are running database with mixed tables myisam and innodb. I know that innodb supports transactions. My server is running with default transaction-isolation=REPEATABLE READ Whenever our cron runs stats updation scripts. It locks whole table and make other sql statements which

RE: innodb transaction not works

2008-03-21 Thread Rajesh Mehrotra
Hi Saravanan, Please check http://forums.mysql.com/read.php?97,18003,18003 -Raj. -Original Message- From: Saravanan [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2008 1:59 PM To: mysql@lists.mysql.com Subject: innodb transaction not works Hi lists, We are running database

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-29 Thread Nico Sabbi
Mike Kruckenberg wrote: mysql SET @staff_id = LAST_INSERT_ID(); Query OK, 0 rows affected (0.01 sec) I don't know if this behaviour has changed in later versions of mysql, but using session variables, although lovely, was the quickest way to break replication (at least up to and including

InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Andre Matos
Hi List, Let's suppose I have these two tables: CREATE TABLE `changes` ( `ID` int(12) unsigned NOT NULL auto_increment, `Key` varchar(25) collate latin1_general_cs NOT NULL default '', `Table` varchar(25) collate latin1_general_cs NOT NULL default '', `Value` text collate

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Mike Kruckenberg
Andre Matos wrote: The idea is to have a audit trail to record the changes made. So, I want to insert a new record in the staff table and right after this, insert a record in the changes table. SET AUTOCOMMIT=0; START TRANSACTION; INSERT INTO staff (`Name`) VALUES ('ABC'); INSERT INTO changes

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Mike Kruckenberg
Andre Matos wrote: SET AUTOCOMMIT=0; START TRANSACTION; INSERT INTO staff (`Name`) VALUES ('ABC'); INSERT INTO changes (`Key`, `Table`, `Value`) VALUES (LAST_INSERT_ID(), 'staff', 'ABC'); COMMIT; SET AUTOCOMMIT=1; This works fine in my test environment, however what about many users doing at

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Andre Matos
Thanks Mike. I understand the possible gaps that I might have if I use the ROLLBACK. This is acceptable in my case. What I really want to avoid is what I am doing now: open one transaction to insert, or update, or delete certain information and close with the commit. Then, I get the

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Mike Kruckenberg
Andre Matos wrote: Thanks Mike. I understand the possible gaps that I might have if I use the ROLLBACK. This is acceptable in my case. What I really want to avoid is what I am doing now: open one transaction to insert, or update, or delete certain information and close with the commit. Then,

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Andre Matos
Thanks for all your help Mike. Problem solved. I divided to process in two parts: one write the insert/update/delete and then write the changes in the audit trail. All this inside one transaction. If the first part fails, ROLLBACK. If the second part fails, ROLLBACK, otherwise, if both were done

Question: InnoDB transaction and table changes

2005-02-04 Thread Ville Karjalainen
Greetings, I created a table during transaction and was surprised to find out it still existed after I did a ROLLBACK. The same seems to apply to changes made using ALTER TABLE statements. Is there a simple logical explanation to this behaviour? Any help would be appreciated. Demonstration

RE: Question: InnoDB transaction and table changes

2005-02-04 Thread Mark Leith
: http://dev.mysql.com/doc/mysql/en/cannot-roll-back.html HTH Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk -Original Message- From: Ville Karjalainen [mailto:[EMAIL PROTECTED] Sent: 04 February 2005 13:59 To: mysql@lists.mysql.com Subject: Question: InnoDB transaction

Re: Question: InnoDB transaction and table changes

2005-02-04 Thread Philippe Poelvoorde
DDL cannot be rollback http://dev.mysql.com/doc/mysql/en/cannot-roll-back.html It also apply to many DB like Sybase for example... Ville Karjalainen wrote: Greetings, I created a table during transaction and was surprised to find out it still existed after I did a ROLLBACK. The same seems to apply

RE: INNODB transaction log size

2004-06-29 Thread Victor Pendleton
Keep in my mind that if something does go `wrong` you could possibly have to wait hours for all of your transactions to roll back. -Original Message- From: Michael Lee To: '[EMAIL PROTECTED] ' Sent: 6/28/04 9:35 PM Subject: RE: INNODB transaction log size Victor, Thanks for your reply

INNODB transaction log size

2004-06-28 Thread Michael Lee
Hi, I would like to migrate my DB from Sybase ASE to MySQL INNODB table. Data has been extracted and stored as a file. I want to use the command Load Data Infile to insert the data to MySQL. However, some table contains millions of rows. Can i control the batch size of the loading (e.g.

RE: INNODB transaction log size

2004-06-28 Thread Victor Pendleton
I do not believe this is currently an option in the `load data infile` syntax. One option would be to read the file programmatically and issue the commits after `x` number of inserts. -Original Message- From: Michael Lee To: [EMAIL PROTECTED] Sent: 6/28/04 1:21 AM Subject: INNODB

RE: INNODB transaction log size

2004-06-28 Thread Michael Lee
Victor, Thanks for your reply. Actually, i cannot find such an option and want to see if i have missed something. Referring to Innodb transaction log, I do some more searching and would like to confirm what i found from the web (this information is not available in MySQL documentation

innodb transaction

2003-07-07 Thread Bernhard Schmidt
hi all i started working with the innodb databasel. after reading the manual i am not sure how i shall use transctions. say i have the following case: SELECT read some row UPDATE depending on the select COMMIT to make the command sequence safe, the select has to lock the table. it would be

Re: innodb transaction

2003-07-07 Thread Heikki Tuuri
Benny, - Original Message - From: Bernhard Schmidt [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Monday, July 07, 2003 6:33 PM Subject: innodb transaction --=_NextPart_000_0144_01C344AD.CB5B11C0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding

Re: innodb transaction

2003-07-07 Thread Bernhard Schmidt
hi many thanks for that quick and precise answer - a big smile. i am very impressed by this user group, especially regarding the speed and quality of the answers. regards benny -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

innodb transaction not started

2002-12-16 Thread Liza Ortega
hi! i'm running mysql-max version 3.23.52-max on a windows xp machine with the apache web server. i'm trying to get innodb transactions to work using a php application. here is the transaction i am trying to run: set autocommit=0; begin work; select * from for update; update ...;

InnoDB transaction or LOCK TABLE?

2002-02-12 Thread Tibor Radvanyi
Hi Everyone, I'm newbie with MySQL with some programming experience. I'm about to implement an Internet shop. I would like to serve my customers at a high level with, amongst other features, making sure that every successful order will really be shipped due to a stock availability check at order

InnoDB transaction or LOCK TABLE?

2002-02-07 Thread Tibor Radvanyi
Hi Everyone, I'm newbie with MySQL with some programming experience. I'm about to implement an Internet shop. I would like to serve my customers at a high level with, amongst other features, making sure that every successful order will really be shipped due to a stock availability check at order