On Thu, Jun 14, 2001 at 08:16:01AM +0100, Dvořáček Michal wrote:
> Hi there,
> 
> little problem. I have program (like phorums) and there is command
> mark all posts as readed. On one board is about 4000 posts, and if
> is new user and want mark all posts as readed - it's problem (big).
> 
> All is written in ANSI C (using C API functions). And here is main
> problem: when i execute "marking" thread (most of mysql code run as
> separately threads) and someone wants list this board (list thread)
> nothing happens. After about 15 seconds program show results. And if
> you type show command for two times program crashed. I'm not using
> locking tables. And question: is possible that SELECT will wait on
> previously or currently running INSERT and how is it multithread
> programs, where some threads are using same table (to avoid error
> like Out of synchronization, Query cannot be executed now, ....)

You are running into contention on table locks. MySQL will put a READ
lock on a table anytime you are reading from it. Similarly it will put
a WRITE lock on a table when you update it.

You might want to look at a table type which has more granular
locking, such as BDB or InnoDB (or Gemini, if you can wait for
it). They're described in the manual, of course.

> P.S. Sorry for my English, it's terrible i know, but i'm working on
> it :)

You write better than some "native" speakers I know!

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 19 days, processed 136,412,594 queries (79/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

Reply via email to