<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"Preformattato HTML Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.StileMessaggioDiPostaElettronica19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.PreformattatoHTMLCarattere
        {mso-style-name:"Preformattato HTML Carattere";
        mso-style-priority:99;
        mso-style-link:"Preformattato HTML";
        font-family:"Courier New";
        mso-fareast-language:IT;}
span.hl
        {mso-style-name:hl;}
span.comment-copy
        {mso-style-name:comment-copy;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="IT" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Thanks for your answer.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">libdbi 0.9.0 compilation error is following: <i>libdbi-drivers-0.8.3-1/drivers/mysql/dbd_mysql.c:232:5: error: conflicting types for 'dbd_goto_row' . <o:p></o:p></i></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Looking at its bitbake recipe on the OpenEmbedded online git you can find previous error is stated as a comment in the recipe itself (you can find it at this link <a href="http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libdbi/libdbi-drivers_0.8.3-1.bb">http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libdbi/libdbi-drivers_0.8.3-1.bb</a>).<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">After some other tests it seems that modifying sql statement ‘SELECT * FROM tableName WHERE 0=1’ into ‘SELECT * FROM tableName’ allow use of the log database: Syslog-ng doesn’t write anything into the db if it’s empty when logger started, but it works fine if I write a dummy record into the db so it’s not empty. But this is not the right way it should works, it’s a bad trick to bypass this issue.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Analyzing more in depth function calls tree, it seems that dbi structure for sql statement result doesn't contain any information about fields (columns) after quering "SELECT * FROM tableName WHERE 1=0". <o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Tried to mail this question to libdbi developers but no significant answer.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">I’m gonna check for patch or other solution could fix this issue on the Balabit GitHub.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Many thanks</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span lang="EN-US" style="font-size:11.0pt;line-height:106%;font-family:"Calibri",sans-serif"><br>
</span><i><span lang="EN-US" style="font-size:9.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black">Please be informed that our offices will be closed for National Holidays from Monday 31/10/16 to Tuesday 01/11/16 included.
</span></i><i><span style="font-size:9.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black">We will be back on Wednesday 02/11/16.<br>
<br>
Vi ricordiamo che saremo chiusi per festività i giorni lunedì 31/10/16 e martedì 01/11/16. Saremo nuovamente operativi da mercoledì 02/11/16.<br>
</span></i><span style="font-size:9.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black"><br>
<br>
</span><b><span style="font-size:10.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black">Andrea Laini<br>
<br>
</span></b><span style="font-size:8.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black">Email:
<a href="mailto:andrea.laini@claypaky.it" title="andrea.laini@claypaky.it"><span style="color:black;text-decoration:none">andrea.laini@claypaky.it</span></a><br>
</span><b><span style="font-size:11.0pt;line-height:106%;font-family:"Arial",sans-serif;color:#FFCC00">_________________________________</span></b><span style="font-size:10.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black"><br>
<b>Clay Paky S.p.A.<br>
</b></span><span style="font-size:8.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black">Via Pastrengo, 3/b - 24068 Seriate (BG) - ITALY<br>
Phone: +39 - 035.654.311 - Fax: +39 - 035.30.18.76<br>
Web: <a href="http://www.claypaky.it/" title="Clay Paky Home Page"><span style="color:black;text-decoration:none">www.claypaky.it</span></a><br>
</span><b><span style="font-size:11.0pt;line-height:106%;font-family:"Arial",sans-serif;color:#FFCC00">_________________________________</span></b><span style="font-size:10.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black"><br>
<a href="http://www.claypaky.it/disclaimer/index.html" title="Read our Disclaimer @  www.claypaky.it/disclaimer"><span style="font-size:8.0pt;line-height:106%;color:black;text-decoration:none">Read our Disclaimer @  www.claypaky.it/disclaimer</span></a></span><span style="font-size:8.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black"><br>
<br>
</span><span style="font-size:10.0pt;line-height:106%;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Da:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> syslog-ng [mailto:syslog-ng-bounces@lists.balabit.hu]
<b>Per conto di </b>Scheidler, Balázs<br>
<b>Inviato:</b> martedì 18 ottobre 2016 22:12<br>
<b>A:</b> Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu><br>
<b>Oggetto:</b> Re: [syslog-ng] syslog-ng fails logging to existing sqlite database<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p>I vaguely remember having to apply a patch to libdbi drivers to make that column detection trick work with SQLite.<o:p></o:p></p>
<p>I also remember submitting it upstream but i don't know which version it was.<o:p></o:p></p>
<p>Hmm can you show the compilation problem with 0.9.0?<o:p></o:p></p>
<p>Also, balabit has a somewhat stale fork of libdbi and drivers on GitHub, those should definitely have that patch.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Oct 13, 2016 2:48 PM, "Andrea Laini" <<a href="mailto:andrea.laini@claypaky.it">andrea.laini@claypaky.it</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Hello everybody,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">I would like to ask you a question about libdbi (version 0.8.4.1 with libdbi-drivers 0.8.3).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">I’m using syslog-ng 3.5.4.1 on my Yocto Poky 1.7 Linux distro. I need to log my data into a sqlite3 database and everything works fine, but the database has not
 be written: no log data stored.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">According to debug infos, it seems that syslog-ng recognizes that the database exists, connects to it, found (with the sql statement “SELECT * FROM tableName
 WHERE 0=1) that the table named “tableName” exists but it gets an error when verifying columns’ names; so it tries to add a column with that name to the table, but the operation fails since this column already exists.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">I’ve googled and search on the web, but I’ve found nothing interesting. Trying syslog-ng 3.6.4 doesn’t change anything, while using libdbi 0.9.0 returns an error
 when compiling due to mismatch between function signature in the source and header file.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Have you any suggestions?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Thanks in advance,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Regards</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Andrea</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;line-height:105%">
<span lang="EN-US"><br>
</span><i><span lang="EN-US" style="font-size:9.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black">Please be informed that our offices will be closed for National Holidays from Monday 31/10/16 to Tuesday 01/11/16 included.
</span></i><i><span style="font-size:9.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black">We will be back on Wednesday 02/11/16.<br>
<br>
Vi ricordiamo che saremo chiusi per festività i giorni lunedì 31/10/16 e martedì 01/11/16. Saremo nuovamente operativi da mercoledì 02/11/16.<br>
</span></i><span style="font-size:9.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black"><br>
<br>
</span><b><span style="font-size:10.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black">Andrea Laini<br>
<br>
</span></b><span style="font-size:8.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black">Email:
<a href="mailto:andrea.laini@claypaky.it" target="_blank" title="andrea.laini@claypaky.it">
<span style="color:black;text-decoration:none">andrea.laini@claypaky.it</span></a><br>
</span><b><span style="font-family:"Arial",sans-serif;color:#FFCC00">_________________________________</span></b><span style="font-size:10.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black"><br>
<b>Clay Paky S.p.A.<br>
</b></span><span style="font-size:8.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black">Via Pastrengo, 3/b - 24068 Seriate (BG) - ITALY<br>
Phone: +39 - 035.654.311 - Fax: +39 - 035.30.18.76<br>
Web: <a href="http://www.claypaky.it/" target="_blank" title="Clay Paky Home Page">
<span style="color:black;text-decoration:none">www.claypaky.it</span></a><br>
</span><b><span style="font-family:"Arial",sans-serif;color:#FFCC00">_________________________________</span></b><span style="font-size:10.0pt;line-height:105%;font-family:"Arial",sans-serif;color:black"><br>
<a href="http://www.claypaky.it/disclaimer/index.html" target="_blank" title="Read our Disclaimer @  www.claypaky.it/disclaimer"><span style="font-size:8.0pt;line-height:105%;color:black;text-decoration:none">Read our Disclaimer @  www.claypaky.it/disclaimer</span></a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">
https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">
http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>