Gisella,

>Heikki,
>
>thanks for the reply.  Regarding the trace output, My test has been
>"bombarding" the db server with 15 simultaneous clients, each
>generating up to 1000 transaction sets.

this is strange. When you start the server from
the command promp, does it then print something
to the command prompt window?

If you look at the mysqld error log, does it contain
something? Does

mysql>show table status from yourdatabasename;

show the innodb_monitor table as created and of type
InnoDB? What if you drop the table innodb_monitor
and create it again? 

>I still do not get any output from Innodb Monitor.  
>I created table innodb_monitor in the database that I'm accessing.
>Should it be created instead in the database "mysql"??

No, it does not matter in which database you create it.

Here is a sample session I ran in NT:

mysql client:
........
C:\mysql4\bin>mysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.37-debug-log

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

mysql> create table innodb_monitor(a int) type = innodb;
Query OK, 0 rows affected (4.01 sec)


mysqld server:
...........
C:\trybuild\client_debug>mysqld --standalone
011031  9:04:17  InnoDB: Started
mysqld: ready for connections
=====================================
011031 20:54:27 INNODB MONITOR OUTPUT
=====================================
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 4, signal count 4
Mutex spin waits 15, rounds 260, OS waits 2
RW-shared spins 4, OS waits 2; RW-excl spins 0, OS waits 0
------------
TRANSACTIONS
------------
Trx id counter 0 697601
Purge done for trx's n:o < 0 0 undo n:o < 0 0
Total number of lock structs in row lock hash table 0
---TRANSACTION 0 697600, OS thread id 179 creating index, active, runs or sleeps
, has 3 lock struct(s), undo log entries 3
--------
FILE I/O
--------
I/O thread 0 state: wait windows aio for n pages
I/O thread 1 state: wait windows aio for n pages
...................


>Is there any sample that I can look at regarding avoiding deadlock,
>like for the semaphore rows, and the predefined order of accessing
>tables that you mentioned?

A semaphore row can be:

CREATE TABLE semrows (a INT NOT NULL, b INT, PRIMARY KEY (a)) TYPE = INNODB;

INSERT INTO semrows VALUES (1, 0);
...

UPDATE semrows SET b = b + 1 WHERE a = 1;

The UPDATE sets an exclusive lock on the row.
If every transaction does this UPDATE at the
start, then the row acts as a "semaphore" which
serializes all transactions.

About predefined access order: try to think
a natural order in you will access your tables.
But that is easier said than done. Applications
have to be programmed so that they issue a
transaction again if a deadlock is encountered.
(3.23.44 will roll back the whole trx at deadlock,
.43 only rolled back the SQL statement.)

>Thanks,
>
>Gisella

Regards,

Heikki



---------------------------------------------------------------------
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