Thanks, Miguel.

I understand.
If after killing a process, program of this process come to the end
incorrectly (fail), then the table remains locked.
Something like have than mysql.exe after killing process don't touch. Other
mysql.exe will wait for this process killed, but it doesn't kill while
mysql.exe executed.

Sorry for my English.
Nick.


At 12:26 05/07/2001 +0300, Nick Kostirya wrote:
Hi!
Nick I have interest how you did the lock and how
the table remains locked on NT. Below I show you
a sequence on Win2k machine and how you see after
a kill I was able to insert a new row to the table.

The client was put down without to close the connection ?

E:\mysql\bin>mysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 3.23.39-max-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> lock tables mm1 read;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into mm1 values ('',"more one test");
ERROR 1099: Table 'mm1' was locked with a READ lock and can't be updated
mysql> show processlist;
+----+--------+-----------+------+---------+------+-------+-----------------
-+
| Id | User   | Host      | db   | Command | Time | State | Info
|
+----+--------+-----------+------+---------+------+-------+-----------------
-+
|  1 | miguel | localhost | test | Sleep   | 0    |       | NULL
|
|  7 | ODBC   | localhost | test | Query   | 0    | NULL  | show processlist
|
+----+--------+-----------+------+---------+------+-------+-----------------
-+
2 rows in set (0.00 sec)

mysql> kill 7;
Query OK, 0 rows affected (0.00 sec)

mysql> unlock tables;
ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    8
Current database: test

Query OK, 0 rows affected (0.22 sec)

mysql> insert into mm1 values ('',"more one test");
Query OK, 1 row affected (0.05 sec)

mysql>

Regards,
Miguel
>Sorry. It's possibly a bug under WinNT (version 3.23.39).
>For Linux (debian) is OK (version 3.23.39).!
>Now "KILL id_process" executed and executed hitherto.
>
>----- Original Message -----
>From: Jeremy Zawodny <[EMAIL PROTECTED]>
>To: Nick Kostirya <[EMAIL PROTECTED]>
>Cc: mysql <[EMAIL PROTECTED]>
>Sent: Thursday, July 05, 2001 11:24 AM
>Subject: Re: Unlock tables when process has killed.
>
>
> > On Thu, Jul 05, 2001 at 10:55:33AM +0300, Nick Kostirya wrote:
> > > Hello, All.
> > >
> > > Help me.
> > >
> > > One process locks a table. Then it has been killed. The table
> > > remains locked.  How unlock the table if the process is not exist?
> >
> > If that's what happened, you've found a bug in MySQL. Can you reliably
> > reproduce it? What version are you using?
> >
> > Jeremy
> > --
> > Jeremy D. Zawodny, <[EMAIL PROTECTED]>
> > Technical Yahoo - Yahoo Finance
> > Desk: (408) 349-7878    Fax: (408) 349-5454    Cell: (408) 439-9951
> >
> > MySQL 3.23.29: up 18 days, processed 141,137,801 queries (86/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
> >
> >
>
>
>---------------------------------------------------------------------
>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

--
For technical support contracts, goto https://order.mysql.com/
    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /    Miguel A. Solórzano <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Mogi das Cruzes - Săo Paulo, Brazil
        <___/   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

Reply via email to