-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm a regular mysql user, and a very newbie to innodb. :)

I would like to use innodb because of its row-level locking feature.
Presently I have to use table locks, and they're causing lots of speed
problems. (I've tried Gemini tables, but mysql always crashed even with
the simplest tests. Innodb seems to be very stable so far.)

I could not find anything in the docs about whether or not the following
can be done:

I have 2 tables, one with data about users, and one with "market data".
(This is a game, and users can buy and sell their stuff.)

The market database has the following relevant columns: good, quantity,
price, owner.

When someone buys a particular type of good, I would like to lock those
rows from the table, but since the quantity will change, I don't even want
other users to see these rows until I'm finished. When I lock the entire
table, I can do this. When I use "for update", or "lock in share mode",
other threads cannot update, but they can still see these rows.

Is there a way to lock ROWS, so they're not VISIBLE until the first thread
is done with them? I would like to be able to use other rows though from
other threads.

At this point, it seems to me that I can only do this by locking the
entire table.

Any suggestions?

Thanks,

Attila

...........................................................................
Even if you're on the right track, you still get run over if you don't keep
moving.

- ---
Public key: http://civ.hu/attila.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7+TpvDeyfLhmXxQwRAvTkAJ9gsThDTNhJPwwJV2nhraQSmTK+iQCffXbl
AjS3/1Qk9G+TLMll+Nve+aM=
=nQJU
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to