On Fri, Feb 27, 2004 at 01:54:13PM +0200, Egor Egorov wrote: > > Ok, thanks for the response. > > > > The problem with first doing a select, and then an insert, is that > > there exists a race condition. Between the select and insert, someone > > else could insert a row which might cause a duplication. > > > > I have another solution, in which I use a transaction to avoid this > > problem. But this means I have to change to mysql 4 or postgresql. > > Fedora core is still shipping mysql 3.23.58 :( > > If you use MyISAM table type you can lock table with LOCK TABLES > statement. Take a look at: > http://www.mysql.com/doc/en/LOCK_TABLES.html > > Transactional table InnoDB and BDB are available in 3.23.58 if MySQL > server was configured with --with-innodb/--with-bdb option.
Hi Egor, Thank you very much for the pointer to use locking, and for the pointer to InnoDB and BDB. I didn't know about those options. -- Anand Buddhdev Celtel International -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]