database - MySQL multiple processes writing -


i trying build database used store results on tests. problem these tests run in parallel , separate processes , after each 1 of them finishes commit results database. know mysql designed handle such situations , engines innodb can achieve row level locking.

  1. if process access locked table or entry, process blocked , poll until table or entry unlocked or query cached , process can terminate ?
  2. when process try connect server when down, happen or me handle ?

any highly appreciated.

the number 2 you, when mysql_connect() or whatever use connect database throw exception. number 1 issue resolved @ mysql level, depending on process require locked table or row. results in temporary delay query access data in locked areas, can return out-of-time error, should other process lock table/row extended period of time. mutual lock possible, process locks row 1, , process b locks row 2, , wants data row 2 , b wants data row 1. named "deadlocking", , 1 of processes chosen deadlock victim , query returns failure.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -