<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>I changed some
values in some threaded code from using constants to looking up the values
from a database and I have been getting errors all the time, that values which
are present in the database are missed by the sequential scan. I have been
getting some Externa SIGSEGVs a lot.</DIV></BLOCKQUOTE>
<DIV class=OutlookMessageHeader lang=fr align=left><SPAN
class=953551906-03102011><FONT face=Arial color=#0000ff size=2>The minimum
requirement for multithreaded db access is to use a separate db connection for
every thread and transaction isolation.</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left><SPAN
class=953551906-03102011> </SPAN><BR>I am not sure if the database
library code is faulty or looking up the values in a thread is the
problem<BR><SPAN class=953551906-03102011><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV></BLOCKQUOTE>
<DIV class=OutlookMessageHeader lang=fr align=left><SPAN
class=953551906-03102011><FONT face=Arial color=#0000ff size=2>Some database
client libraries have problems with multithreading or have threadsafe
versions (fe. libmysql.dll is not threadsafe in the standard version).
</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left><SPAN
class=953551906-03102011> </SPAN><BR>The database lookup code is in a
data module running in the main thread. Do I have to use a critical section in
data module containing the threads to the database lookup?<BR><SPAN
class=953551906-03102011><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV></BLOCKQUOTE>
<DIV class=OutlookMessageHeader lang=fr align=left><SPAN
class=953551906-03102011><FONT face=Arial color=#0000ff size=2>No. That is
trying to solve the problem in the wrong place.</FONT></SPAN></DIV>
<DIV class=OutlookMessageHeader lang=fr align=left><SPAN
class=953551906-03102011><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV class=OutlookMessageHeader lang=fr align=left><SPAN
class=953551906-03102011><FONT face=Arial color=#0000ff
size=2>Ludo</FONT></SPAN></DIV></BODY></HTML>