Trigger/Locking question--

2007-11-14 Thread bruce
Hi... I'm trying to get me head around a possible situation involving locks/triggers. Suppose I have two tables: FooTBL CatTBL in FooTBL, I have a trigger that operates such that whenever a new row is added to FooTBL, it's immeadiately copied to CatTBL. I'm trying to understand what happens

Re: Newbie Locking Question

2006-04-26 Thread nigel wood
David T. Ashley wrote: Nigel wrote: mod_php will persist the MySQL connection holding open any lock or syncronisation token obtained through any of the three methods : begin/commit, lock/unlock tables or get_lock/release_lock. PHP does ensure that even in the event of timeouts or fatal

RE: Newbie Locking Question

2006-04-25 Thread David T. Ashley
Nigel wrote: mod_php will persist the MySQL connection holding open any lock or syncronisation token obtained through any of the three methods : begin/commit, lock/unlock tables or get_lock/release_lock. PHP does ensure that even in the event of timeouts or fatal errors any shutdown

Newbie Locking Question

2006-04-22 Thread David T. Ashley
Hi, I'm doing a PHP application, and there are just a few instances where I need to do atomic operations on more than one table at a time and I can't express what I want to do as a single SQL statement. What I'm trying to guard against, naturally, is race conditions when more than one process is

Re: Newbie Locking Question

2006-04-22 Thread nigel wood
David T. Ashley wrote: Hi, I'm doing a PHP application, and there are just a few instances where I need to do atomic operations on more than one table at a time and I can't express what I want to do as a single SQL statement. What I'm trying to guard against, naturally, is race conditions

RE: Newbie Locking Question

2006-04-22 Thread David T. Ashley
Nigel wrote: If you can't or won't do this properly by using a transactional table and begin/commit at least look at using get_lock() based guard conditions which only lock a string leaving the database accessable. Whatever you do if you client is php install a shutdown handler to clean up

Re: Newbie Locking Question

2006-04-22 Thread nigel wood
David T. Ashley wrote: Nigel wrote: If you can't or won't do this properly by using a transactional table and begin/commit at least look at using get_lock() based guard conditions which only lock a string leaving the database accessable. Whatever you do if you client is php install a

Re: General Table Locking Question

2005-03-31 Thread Gleb Paharenko
Hello. Every thing depends on logic of your application. But I don't see a big gain of using table-level locks on InnoDB. Among others this might be helpful: http://dev.mysql.com/doc/mysql/en/internal-locking.html Scott Klarenbach [EMAIL PROTECTED] wrote: I've got a good

General Table Locking Question

2005-03-30 Thread Scott Klarenbach
I've got a good deal of experience using mysql, but never in a large production environment with many concurrent users. Using the InnoDB engine, what is the general practice for ensuring data integrity when multiple users are writing to the same table? Should I explicitly lock the table before I

Re: InnoDB, record locking question

2005-01-27 Thread Gleb Paharenko
Hello. Use: set autocommit=0; or begin a transaction before executing 'select ... lock in share mode'. Commit the tramsaction to release lock. Mojtaba Faridzad [EMAIL PROTECTED] wrote: Hi, I am trying to learn more about InnoDB to convert MyISAM to InnoDB. according to MySQL

InnoDB, record locking question

2005-01-26 Thread Mojtaba Faridzad
Hi, I am trying to learn more about InnoDB to convert MyISAM to InnoDB. according to MySQL document, I can lock a record like this: SELECT * FROM mytable WHERE id = '100' LOCK IN SHARE MODE; I run this query and showed a message to stop the screen (waiting) and on the other computer I run the

Locking question

2004-12-02 Thread Emmett Bishop
Howdy all, quick question about how INNODB handles locks. If autocommit is off and I perform a select statement without then issuing a commit, will INNODB remove any read locks that it issued? I would assume that the locks would be removed when the statement finished. Just want to verify that

Re: row-level locking question...

2003-11-19 Thread Heikki Tuuri
Andre, - Original Message - From: Andre Charbonneau [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Monday, November 17, 2003 5:11 PM Subject: row-level locking question... Hi, Let say that I have the following transaction: 1. Read value v1 from table t1. 2. Do some

row-level locking question...

2003-11-17 Thread Andre Charbonneau
Hi, Let say that I have the following transaction: 1. Read value v1 from table t1. 2. Do some computation using v1. 3. Update value v2 from table t2. If in the above I don't want any other concurrent transaction to read v2 until I'm done updating it, how should I put an exclusive lock on it?

Re: row-level locking question...

2003-11-17 Thread Jeremy Zawodny
On Mon, Nov 17, 2003 at 10:10:52AM -0500, Andre Charbonneau wrote: Hi, Let say that I have the following transaction: 1. Read value v1 from table t1. 2. Do some computation using v1. 3. Update value v2 from table t2. If in the above I don't want any other concurrent transaction to read

Re: Innodb row locking question

2002-12-08 Thread Heikki Tuuri
Mike, - Original Message - From: Mike Gohlke [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Saturday, December 07, 2002 6:44 PM Subject: Re: Innodb row locking question Benjamin Pflugmann wrote: Hello. On Fri 2002-12-06 at 10:28:23 -0600, [EMAIL PROTECTED] wrote

Re: Innodb row locking question

2002-12-07 Thread Benjamin Pflugmann
Hello. On Fri 2002-12-06 at 10:28:23 -0600, [EMAIL PROTECTED] wrote: Heikki and all, I've got a quick question which may be more general sql related but since I'm using innodb tables specifically for the row locking. The following process description is specifically designed to prevent

Re: Innodb row locking question

2002-12-07 Thread Mike Gohlke
Benjamin Pflugmann wrote: Hello. On Fri 2002-12-06 at 10:28:23 -0600, [EMAIL PROTECTED] wrote: Heikki and all, I've got a quick question which may be more general sql related but since I'm using innodb tables specifically for the row locking. The following process description is

Re: Innodb row locking question

2002-12-07 Thread Benjamin Pflugmann
Hello. On Sat 2002-12-07 at 10:36:00 -0600, [EMAIL PROTECTED] wrote: [...] Why do you repeat job_id = 111 and thread_id = 0? If you are using a transaction seperation level of at least REPEATABLE READ (which is the default), InnoDb assures that you always see the same rows within one

Innodb row locking question

2002-12-06 Thread Mike Gohlke
Heikki and all, I've got a quick question which may be more general sql related but since I'm using innodb tables specifically for the row locking. The following process description is specifically designed to prevent duplicates. My current process: select * from run where job_id = 111 and

Re: MyISAM/InnoDB/Oracle comparison, and a InnoDB table locking question

2002-01-02 Thread Michael T. Babcock
On Wed, Dec 26, 2001 at 04:23:46PM -0600, Philip Molter wrote: Are there guides out there for configuring these things? What is a big enough log file? Honestly, on a lot of stuff, I'm just guessing, but it takes a lot of time to fiddle with values, clean out the database, and then shove in

RE: MyISAM/InnoDB/Oracle comparison, and a InnoDB table locking question

2001-12-27 Thread Weaver, Walt
:[EMAIL PROTECTED]] Sent: Wednesday, December 26, 2001 3:19 PM To: [EMAIL PROTECTED] Subject: Re: MyISAM/InnoDB/Oracle comparison, and a InnoDB table locking question Walt, thank you for the test! This post is partially a reply to a request to share my MyISAM/InnoDB/Oracle comparison testing

MyISAM/InnoDB/Oracle comparison, and a InnoDB table locking question

2001-12-26 Thread Weaver, Walt
This post is partially a reply to a request to share my MyISAM/InnoDB/Oracle comparison testing with you guys. In addition, I have a question about locking mechanisms in InnoDB which I'll ask at the end of the post. I've been comparison testing MyISAM, InnoDB, and Oracle for the past two weeks

Re: MyISAM/InnoDB/Oracle comparison, and a InnoDB table locking question

2001-12-26 Thread Heikki Tuuri
Walt, thank you for the test! This post is partially a reply to a request to share my MyISAM/InnoDB/Oracle comparison testing with you guys. In addition, I have a question about locking mechanisms in InnoDB which I'll ask at the end of the post. I've been comparison testing MyISAM, InnoDB, and

Re: MyISAM/InnoDB/Oracle comparison, and a InnoDB table locking question

2001-12-26 Thread Philip Molter
On Thu, Dec 27, 2001 at 12:18:38AM +0200, Heikki Tuuri wrote: : The MyISAM table obviously fit in the OS file cache, otherwise 1750 inserts : per second would not be possible. Did the table fit in the buffer pool of : InnoDB or the SGA of Oracle? Did you commit each insert individually in :

Re: MyISAM/InnoDB/Oracle comparison, and a InnoDB table locking question

2001-12-26 Thread Heikki Tuuri
Philip, On Thu, Dec 27, 2001 at 12:18:38AM +0200, Heikki Tuuri wrote: : The MyISAM table obviously fit in the OS file cache, otherwise 1750 inserts : per second would not be possible. Did the table fit in the buffer pool of : InnoDB or the SGA of Oracle? Did you commit each insert individually

Re: locking question

2001-08-21 Thread Ken Guest
On 19 Aug 2001 19:29:17 +0100, Wesley Darlington wrote: Hi, Howdy. On Thu, Aug 16, 2001 at 02:04:25PM +0100, Ken Guest wrote: At the moment, what I am doing is: execute LOCK TABLES foo READ select info from foo //next lock implictly unlocks previous one //as it's

Re: locking question

2001-08-19 Thread Wesley Darlington
Hi, On Thu, Aug 16, 2001 at 02:04:25PM +0100, Ken Guest wrote: At the moment, what I am doing is: execute LOCK TABLES foo READ select info from foo //next lock implictly unlocks previous one //as it's done by the same thread/process //chances of conflicts

Re: locking question

2001-08-18 Thread Benjamin David Hildred
On Thu, Aug 16, 2001 at 02:04:25PM +0100, Ken Guest wrote: hi, I'm new to this list, but not so new to using MySQL and have a question about locking. (This is my first foray into datalocking with MySQL.) I'd like to lock a table (a row in that table would be better) for read and write

locking question

2001-08-16 Thread Ken Guest
hi, I'm new to this list, but not so new to using MySQL and have a question about locking. (This is my first foray into datalocking with MySQL.) I'd like to lock a table (a row in that table would be better) for read and write access to prevent mishaps from occurring during data manipulation.