Re: Table Lock

2008-12-18 Thread Joerg Bruehe
Hi!


sangprabv wrote:
 Hi,
 Is that true that MySQL lock table on each query? Does it means will
 cause slow speed? Then how to avoid table lock and speed up MySQL? TIA.

You need to read up about the different table handlers available.

They have different properties, including the locking behavior.

Check the manual for the version you are using.


Jörg

-- 
Joerg Bruehe,  MySQL Build Team,   joerg.bru...@sun.com
Sun Microsystems GmbH,   Sonnenallee 1,   D-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering Muenchen: HRB161028


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: table lock

2008-03-07 Thread Raj Shekhar
Eli Shemer wrote:

  
 
 The web site on the other end reads all the data from the table and
 generates standard html/css code with the information from the table.

 How can I make all of the apache child processes wait for the external
 script to complete its operation once it has started?

Alternatively,

Create  a new table which has similar table definition as the one to which
your script is writing the data.  
'
CREATE TABLE new_tbl LIKE orig_tbl;
'

populate new_tbl with your data and then rename it to orig_tbl - 'rename
table new_tbl to orig_tbl'  (rename is atomic operation)




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: table lock

2008-03-02 Thread Martin Gainty
Good Morning Eli

I would consider implementation of mpm_common more specifically enabling
inter process communication with mutex's such as what you see at
http://httpd.apache.org/docs/2.0/mod/mpm_common.html#acceptmutex

and then utilising the flock directive to either lock/unlock a file such
such as described here
http://httpd.apache.org/docs/2.0/mod/mpm_common.html#lockfile

Martin

- Original Message -
From: Eli Shemer [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Sunday, March 02, 2008 10:06 AM
Subject: table lock


 Hey there



 I have an external script that generates a lot of data and dumps it into a
 table.

 Prior to this ,it removes all the data in this specific table.

 It requires both read and write privileges.



 The web site on the other end reads all the data from the table and
 generates standard html/css code with the information from the table.



 How can I make all of the apache child processes wait for the external
 script to complete its operation once it has started?

 What would be the best way for this ?



 Thanks!




 Internal Virus Database is out-of-date.
 Checked by AVG Free Edition.
 Version: 7.5.503 / Virus Database: 269.16.4/1146 - Release Date:
22/11/2007
 18:55




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Table Lock issue on insert

2006-01-03 Thread Heikki Tuuri

John,

this SQL statement:


INSERT INTO USERS_PER_HOUR SELECT count( DISTINCT (

CUID

) ),`TV_LOG_DATE`,`TV_LOG_TIME`, INTERFACE_ID

FROM `TV_LOG_ALL`

group by 2,3;


sets locks on all the records it scans in TV_LOG_ALL. If you have a small 
buffer pool, then the InnoDB lock table may indeed grow so big that it does 
not fit in the buffer pool. The default size of the buffer pool is just 8 
MB.


Fix: modify my.cnf and increase innodb_buffer_pool_size. But do not make it 
bigger than about 70 % of your computer's RAM.


Best regards,

Heikki

Oracle Corp./Innobase Oy
InnoDB - transactions, row level locking, and foreign keys for MySQL

InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM 
tables

http://www.innodb.com/order.php


- Original Message - 
From: Danny Stolle [EMAIL PROTECTED]

Newsgroups: mailing.database.myodbc
Sent: Monday, January 02, 2006 9:31 PM
Subject: Re: Table Lock issue on insert



Hi John,

I have looked around a bit and you might be interested in this part:

InnoDB: Do not intentionally crash mysqld  if the buffer pool is
exhausted by the lock table; return error 1206 instead ...

check this link: http://dev.mysql.com/doc/refman/4.1/en/news-4-1-8.html

it is quite interesting and i am trying to get this error on my mysql
databases by changing the bufferpool and inserting a lot of data;

Best regards,

Danny

Brittingham, John wrote:

They are InnoDB and max_write_lock_count=4294967295.
The same thing happens when I create a copy of the table.

-Original Message-
From: Danny Stolle [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 31, 2005 2:59 AM
To: Brittingham, John; mysql@lists.mysql.com
Subject: Re: Table Lock issue on insert

Hi John,

What kind of engine are you using on your table? MyIsam or InnoDB or are

you using merged tables?
If you query your system variables what is your max_write_lock_count?

If you create a copy of the table: mysqlcreate table cp1 like
USERS_PER_HOUR; and you try the insert again; is the error gone?

Danny



Brittingham, John wrote:


I am having trouble with table lock.

The query is as follows:

INSERT INTO USERS_PER_HOUR SELECT count( DISTINCT (

CUID

) ),`TV_LOG_DATE`,`TV_LOG_TIME`, INTERFACE_ID

FROM `TV_LOG_ALL`

group by 2,3;



I keep getting this error: #1206 - The total number of locks exceeds


the


lock table size



How do I fix this?










--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: 
http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Table Lock issue on insert

2006-01-02 Thread Danny Stolle

Hi john,

When did you start getting this error message?
There aren't any trouble with MyIsam tables?

Danny

Brittingham, John wrote:

They are InnoDB and max_write_lock_count=4294967295.
The same thing happens when I create a copy of the table.

-Original Message-
From: Danny Stolle [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 31, 2005 2:59 AM

To: Brittingham, John; mysql@lists.mysql.com
Subject: Re: Table Lock issue on insert

Hi John,

What kind of engine are you using on your table? MyIsam or InnoDB or are

you using merged tables?
If you query your system variables what is your max_write_lock_count?

If you create a copy of the table: mysqlcreate table cp1 like 
USERS_PER_HOUR; and you try the insert again; is the error gone?


Danny



Brittingham, John wrote:


I am having trouble with table lock.

The query is as follows:

INSERT INTO USERS_PER_HOUR SELECT count( DISTINCT (

CUID

) ),`TV_LOG_DATE`,`TV_LOG_TIME`, INTERFACE_ID

FROM `TV_LOG_ALL`

group by 2,3;



I keep getting this error: #1206 - The total number of locks exceeds


the


lock table size



How do I fix this?










--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Table Lock issue on insert

2006-01-02 Thread Danny Stolle

Hi John,

I have looked around a bit and you might be interested in this part:

InnoDB: Do not intentionally crash mysqld  if the buffer pool is 
exhausted by the lock table; return error 1206 instead ...


check this link: http://dev.mysql.com/doc/refman/4.1/en/news-4-1-8.html

it is quite interesting and i am trying to get this error on my mysql 
databases by changing the bufferpool and inserting a lot of data;


Best regards,

Danny

Brittingham, John wrote:

They are InnoDB and max_write_lock_count=4294967295.
The same thing happens when I create a copy of the table.

-Original Message-
From: Danny Stolle [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 31, 2005 2:59 AM

To: Brittingham, John; mysql@lists.mysql.com
Subject: Re: Table Lock issue on insert

Hi John,

What kind of engine are you using on your table? MyIsam or InnoDB or are

you using merged tables?
If you query your system variables what is your max_write_lock_count?

If you create a copy of the table: mysqlcreate table cp1 like 
USERS_PER_HOUR; and you try the insert again; is the error gone?


Danny



Brittingham, John wrote:


I am having trouble with table lock.

The query is as follows:

INSERT INTO USERS_PER_HOUR SELECT count( DISTINCT (

CUID

) ),`TV_LOG_DATE`,`TV_LOG_TIME`, INTERFACE_ID

FROM `TV_LOG_ALL`

group by 2,3;



I keep getting this error: #1206 - The total number of locks exceeds


the


lock table size



How do I fix this?










--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Table Lock issue on insert

2005-12-31 Thread Danny Stolle

Hi John,

What kind of engine are you using on your table? MyIsam or InnoDB or are 
you using merged tables?

If you query your system variables what is your max_write_lock_count?

If you create a copy of the table: mysqlcreate table cp1 like 
USERS_PER_HOUR; and you try the insert again; is the error gone?


Danny



Brittingham, John wrote:

I am having trouble with table lock.

The query is as follows:

INSERT INTO USERS_PER_HOUR SELECT count( DISTINCT (

CUID

) ),`TV_LOG_DATE`,`TV_LOG_TIME`, INTERFACE_ID

FROM `TV_LOG_ALL`

group by 2,3;

 


I keep getting this error: #1206 - The total number of locks exceeds the
lock table size

 


How do I fix this?

 





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Table Lock Delays and Connection Pooling

2004-10-18 Thread Eric Bergen
Every new connection is considered a client. It's a bad idea to try to
do your own scheduling client side to try to defeat table locks
because MySQL can proceed with other clients as soon as the locks are
freed vs your application waiting for a complete result set to return
before proceeding with another query from a different client. Not to
mention the over head of scheduling on the client side. If  you have
enough lock contention for table locks to be a problem you should
switch to the  InnoDB storage engine.


-- 
Eric Bergen
[EMAIL PROTECTED]


On Mon, 18 Oct 2004 16:58:04 -0700, Aaron [EMAIL PROTECTED] wrote:
 Hi all ,
 
 I have a quick question regarding table locking.
 
 This is a snippet referring to  when table locking is disadvantageous:
 Another client issues another SELECT statement on the same table. Because UPDATE 
 has higher priority than SELECT, this SELECT will wait for the UPDATE to finish. It 
 will also wait for the first SELECT to finish!
 
 So what constitutes a new client exactly? We use Perl and DBI to connect to MySQL. 
 Does this mean that everytime we connect to the DBase it is considered a new client? 
 If so , would some form of connection pooling/caching help reduce the lock delays on 
 a slow SELECT statement?
 
 Thanks !
 Aaron
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Table lock problem on INSERT with FULLTEXT index?

2004-04-12 Thread Don MacAskill
FWIW, I'm still having this problem.

I've completely dropped the table and re-built it from the ground up. 
It's a bizarre problem...  The table is totally simple.  A primary key, 
and then three varchar fields.  The FULLTEXT index spans the 3 varchar 
fields.  There are only 6500+ rows, so it's pretty tiny.

A mysqldump of the table is only 442K.

Has no-one else seen anything like this?  I can't imagine I'm the only one.

Thanks,

Don



Don MacAskill wrote:

Hi there,

I've got a bizarre problem I can't seem to solve.  I have a small MyISAM 
table (6533 rows) with a small FULLTEXT index (3 columns per row, an 
average of 1 word per column).  When I do an INSERT on the table, many 
times the thread gets stuck perpetually in Query | update.  Future 
reads from other threads, of course, stay Locked.

When I try to kill the thread using mysqladmin, the thread sticks around 
for thousands of seconds in Killed | update until I finally just have 
to kill mysqld manually and let it restart.

I've tried REPAIR, ANALYZE, and OPTIMIZE on the table, both using mysql 
and myisamchk.  Tried all the options, such as extended and force and 
the like.

I've even tried wrapping the INSERT with LOCK TABLE table WRITE and 
UNLOCK TABLES.  Still no dice, the INSERT still hangs sometimes.  I 
haven't bothered trying INSERT DELAYED since LOCK TABLE seems more 
drastic anyway and it didn't work.

This happens both on 4.0.17 and 4.0.18.  This is a RHEL3 WS dual AMD64 
box w/8GB of RAM.

Strangely enough, I have another MyISAM table with 1,285,742 rows and a 
larger FULLTEXT index, and it never locks this way.

I have a third MyISAM table with 61,834 rows and a larger FULLTEXT index 
that locked on me once like this last night, but then I ran through and 
updated nearly every row overnight, and inserted a few hundred new ones, 
and it didn't lock at all.

FWIW, it only seems to hang on INSERT, not on UPDATE.  I haven't tried 
DELETE yet.

I'm stumped.  Any help would be greatly appreciated!

Thanks,

Don


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Table lock statistics by TABLE not just server,db

2004-01-09 Thread Jeremy Zawodny
On Fri, Jan 09, 2004 at 01:43:53PM -0800, trevor%tribenetwork.com wrote:
 Mysqlians,
 I am trying to determine in some of my database tables should be
 converted from MyISAM to Innodb.  I have read that a collusion on 10-20% is
 the threshold at which one should convert( current # around .3%).  However
 the table_locks_waited and table_locks_immediate counters only give
 information on a server level.  I want to examine this data per table.  Does
 anyone know how to do this?

MySQL doesn't yet provide locking data more granular than that.

Perhaps using a very low long query time and enabling the slow query
log would help?

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.15-Yahoo-SMP: up 118 days, processed 510,213,828 queries (50/sec. avg)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: table lock - which connection id own's it

2002-04-25 Thread Jeremy Zawodny

On Wed, Apr 24, 2002 at 12:45:43PM +0300, Michael Widenius wrote:
 
 I will add to our TODO to add to SHOW OPEN TABLES a list of threads
 that has locks on the table (or maybe a SHOW LOCKS command) to
 better cover this case in the future.

Could it be SHOW TABLE LOCKS?  That way it is not confused with the
GET_LOCK()/RELEASE_LOCK() stuff?  Or at least provide a simple way to
differentiate between the two types of locks.  I'd like to be able to
see table locks some times and the other locks at other times.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.47-max: up 77 days, processed 2,021,067,761 queries (303/sec. avg)

-
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




RE: table lock - which connection id own's it

2002-04-24 Thread Michael Widenius


Hi!

 Lopez == Lopez David E-r9374c [EMAIL PROTECTED] writes:

cut

Lopez If no row is returned, then the following happens:
Lopez   1) lock table ...
Lopez   2) select ...
Lopez   3) if no row is returned, 
Lopez   4)insert ...
Lopez   5)use LAST_INSERT_ID() to get the value of the key
Lopez   6) else get the key-value pair
Lopez   7) unlock table
Lopez   8) put key-value pair in RAM hash
Lopez   9) insert row in main table (using new key-value pair)

Why not instead do as follows:
(This assumes you have an unique index on the thing you are selecting
on)

select ...
if no row is returned, 
   insert ...
   if insert works without a duplicate key error:
 use LAST_INSERT_ID() to get the value of the key
   else
 select to find the row some other thread inserted
put key-value pair in RAM hash
insert row in main table (using new key-value pair)

cut

Lopez Hope that clears the insertion process on the hash tables. I'm
Lopez glad that if a connection is lost in steps 2-6, mysql would
Lopez automatically unlock the tables. That will satisfy the db
Lopez specification nicely. The architecture for our db came
Lopez from the optimization chapter in the manual. Thanks!

If the connection dies on the client side, the server will notice it
as once. The thing you will not notice if a client goes into an
endless loop and will not release the connection to the MySQL server.

I will add to our TODO to add to SHOW OPEN TABLES a list of threads
that has locks on the table (or maybe a SHOW LOCKS command) to better
cover this case in the future.

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Michael Widenius [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
   ___/   www.mysql.com


-
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




RE: table lock - which connection id own's it

2002-04-23 Thread Lopez David E-r9374c

Monty

BTW, it's a thrill to hear from the CTO.

The procedure for locking a table is more complex but will
attempt to describe it further for you. Any of the 150 daemons
can insert to the hash tables. The data in the row can be used
by all 150 daemons. The primary key in hash table is the 
id field which is an auto-increment type. This id field
is the hash value inserted in the main table as foreign key.

When a daemon starts up, it reads the hash table with each
entry a key-value pair. The value is the id field. During
the course of logging info to the main table, it may find
an entry that is not in it's local hash in RAM. When this 
occurs, it does a sql select on the hash. If a row is returned,
it will insert the key-value pair into the it's hash and 
insert an entry into the main table. 

If no row is returned, then the following happens:
  1) lock table ...
  2) select ...
  3) if no row is returned, 
  4)insert ...
  5)use LAST_INSERT_ID() to get the value of the key
  6) else get the key-value pair
  7) unlock table
  8) put key-value pair in RAM hash
  9) insert row in main table (using new key-value pair)

Since 99% of the time, the data hash table information is
already stored in the daemon hash table on initial start up.
We wanted to lock the table so two different daemons would
not enter the same information in the hash tables. Extremely
unlikely, but the boss is paranoid. Or is it more experienced.

Hope that clears the insertion process on the hash tables. I'm
glad that if a connection is lost in steps 2-6, mysql would
automatically unlock the tables. That will satisfy the db
specification nicely. The architecture for our db came
from the optimization chapter in the manual. Thanks!

David


-Original Message-
From: Michael Widenius [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 12:59 AM
To: Lopez David E-r9374c
Cc: Mysql List (E-mail)
Subject: table lock - which connection id own's it



Hi!

 Lopez == Lopez David E-r9374c [EMAIL PROTECTED] writes:

Lopez AntiSpam - mysql, sql, query
Lopez Version: 3.23.49a, MyISAM, NT, Solaris

Lopez My app is 150 daemons writing logs to mysql. The main 
Lopez table is of fixed size but depends on four other tables
Lopez for foreign keys (hash tables). These tables are uploaded
Lopez once to the daemon at start-up. Occasionally, a new entry 
Lopez must be written into these hash tables. The procedure is
Lopez to lock the table, insert entry, get the key (auto-increment
Lopez field) and release the lock.

A better solution is to use LAST_INSERT_ID() and not use any locks at all.

Lopez But what if the connection dies during the update process.
Lopez If this happens, how can I tell which connection id has the 
Lopez lock so I can kill it? 

If a connection dies, the server will automaticly delete all temporary
tables and all table locks.

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Michael Widenius [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
   ___/   www.mysql.com

-
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




RE: table lock - which connection id own's it

2002-04-23 Thread Sinisa Milivojevic

Lopez David E-r9374c writes:
 Monty
 
 BTW, it's a thrill to hear from the CTO.
 
 The procedure for locking a table is more complex but will
 attempt to describe it further for you. Any of the 150 daemons
 can insert to the hash tables. The data in the row can be used
 by all 150 daemons. The primary key in hash table is the 
 id field which is an auto-increment type. This id field
 is the hash value inserted in the main table as foreign key.
 
 When a daemon starts up, it reads the hash table with each
 entry a key-value pair. The value is the id field. During
 the course of logging info to the main table, it may find
 an entry that is not in it's local hash in RAM. When this 
 occurs, it does a sql select on the hash. If a row is returned,
 it will insert the key-value pair into the it's hash and 
 insert an entry into the main table. 
 
 If no row is returned, then the following happens:
   1) lock table ...
   2) select ...
   3) if no row is returned, 
   4)insert ...
   5)use LAST_INSERT_ID() to get the value of the key
   6) else get the key-value pair
   7) unlock table
   8) put key-value pair in RAM hash
   9) insert row in main table (using new key-value pair)
 
 Since 99% of the time, the data hash table information is
 already stored in the daemon hash table on initial start up.
 We wanted to lock the table so two different daemons would
 not enter the same information in the hash tables. Extremely
 unlikely, but the boss is paranoid. Or is it more experienced.
 
 Hope that clears the insertion process on the hash tables. I'm
 glad that if a connection is lost in steps 2-6, mysql would
 automatically unlock the tables. That will satisfy the db
 specification nicely. The architecture for our db came
 from the optimization chapter in the manual. Thanks!
 
 David
 

Hi!

Still , locking a table is not necessary  as MySQL server remembers
LAST_INSERT_ID() value, for each connection (thread) separately.

Simply, this value is not (only) remembered on per-table basis, but
also for each thread (connection) separately.


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


-
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




Re: Table Lock

2002-01-28 Thread Tobias Kremer :: IT

Hi Hayan,


have a look at:

http://www.mysql.com/doc/L/O/LOCK_TABLES.html

for information on (un)locking tables.


At 11:48 28.01.02 +0300, you wrote:
Hi, Is there a way to lock a table so that only one user can change it and
then unlockit?
I need to do this coz I want visitors to retrieve some values from a
database but each value must be retrieved only by one user and then marked
up to be expired, so I don't want two users to retrieve the same value
Any suggestions

Best Regards
Hayan


-
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

urbia Grüße - best regards

Tobias Kremer
Webmaster / Software-Entwicklung

urbia.com AG
Hohe Str.115,  50667 Köln

tel:+49 (0)221 - 2949 154
fax:+49 (0)221 - 2949 599
e-mail: [EMAIL PROTECTED]

http://www.urbia.de - we are family
http://www.urbia.fr - votre espace famille
http://www.urbia.co.uk - the family site

Linux is like a wigwam. No gates, no windows
but an apache inside


-
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




RE: Table Lock

2002-01-28 Thread Vasoczki Ferenc

Yes, i need this too but for a whole database. i just thought, if there is a
power loss, and the database is get stuck, the users won't able to connect
again ...

Vaso

-Original Message-
From: Hayan Al Mamoun [mailto:[EMAIL PROTECTED]]
Sent: 2002. janu?r 28. 9:48
To: MYSQL MAILING LIST (E-mail)
Subject: Table Lock


Hi, Is there a way to lock a table so that only one user can change it and
then unlockit?
I need to do this coz I want visitors to retrieve some values from a
database but each value must be retrieved only by one user and then marked
up to be expired, so I don't want two users to retrieve the same value
Any suggestions

Best Regards
Hayan


-
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

-
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




RE: Table Lock

2002-01-28 Thread Egor Egorov

Vasoczki,

Monday, January 28, 2002, 12:20:21 PM, you wrote:

VF Yes, i need this too but for a whole database. i just thought, if there is a
VF power loss, and the database is get stuck, the users won't able to connect
VF again ...

It should be a very fanciful power failure and hardware failure in order to end up 
with a stuck database under MySQL...

So I can't get you - do you need to _lock_ the database in case of power failure OR 
you are afraid of such a possibility?

VF Vaso





-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com



-
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




Re: table lock

2002-01-28 Thread Jeremy Zawodny

On Mon, Jan 28, 2002 at 12:00:43PM -0500, bin cai wrote:
 Hi,

 I have one concern about multithread.  I am building online exam
 system. many students can get access to one table in one
 time. Should i use table lock every time when one student get access
 to the table. As i know, mysql is multithread,that means it already
 incorporate the table lock feature?  Thank you bin

MySQL handles it automatically.
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 25 days, processed 564,305,249 queries (252/sec. avg)

-
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