<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I see now. I misunderstood what the 3.2-fixes branch was for.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks to everyone who replied.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Marsupilami79 <marsupilami79@gmx.de><br>
<b>Sent:</b> Tuesday, April 1, 2025 12:42 PM<br>
<b>To:</b> fpc-devel@lists.freepascal.org <fpc-devel@lists.freepascal.org><br>
<b>Cc:</b> Michael Roland <csg@ocmulgeeemc.com><br>
<b>Subject:</b> Re: [fpc-devel] Wrong version of db.pas in the fixes_3_2 branch?</font>
<div> </div>
</div>
<div>Hello Michael,<br>
<br>
this has been fixed in the 8.0-patches branch of Zeos. Please check the SVN:<br>
<a class="x_moz-txt-link-freetext" href="https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/branches/8.0-patches/">https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/branches/8.0-patches/</a><br>
or GIT repository:<br>
<a class="x_moz-txt-link-freetext" href="https://github.com/marsupilami79/zeoslib/tree/8.0-patches">https://github.com/marsupilami79/zeoslib/tree/8.0-patches</a><br>
<br>
Zeos 8.0, as you can download it, is only meant for FPC 3.2.2, not for the 3.2-fixes branch.<br>
<br>
Best regards,<br>
<br>
Jan<br>
<br>
<div class="x_moz-cite-prefix">Am 31.03.2025 um 23:47 schrieb Michael Roland via fpc-devel:<br>
</div>
<blockquote type="cite">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Aptos}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif}
span.x_EmailStyle17
{font-family:"Aptos",sans-serif;
color:windowtext}
.x_MsoChpDefault
{}
div.x_WordSection1
{}
-->
</style>
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:11.0pt">Is the wrong version of the db.pas in fixes_3_2 branch?</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The current version of db.pas in fixes_3_2 seems to be from the 3.3.1 branch instead of the 3.2.3 branch.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The 3.3.1 db.pas adds a new enum value ftSingle to TFieldType.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">This causes the compilation of ZeosDb 8.0 ZAbstractRODataset.pas to fail with the error</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">Error: Expected another 1 array elements.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The ZeosDb source code creates an array of TFieldType, then fills the array with values.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">line 5901 of zeosdbo-8.0.0-stable/src/component/ZAbstractRODataset.pas</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">"BaseFieldTypes: array[TFieldType] of TFieldType = ("</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The error occurs because ZeosDb in not expecting the extra ftSingle element in free pascal version 3.2, so a value for ftSingle is not added to the array. The missing ftSingle value produces the array error.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">However, ZeosDb does add the ftSingle value for free pascal version 3.3 or higher.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">zeosdbo-8.0.0-stable/src/component/ZAbstractRODataset.pas</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The ZeosDb source code is checking to see if the extra value ftSingle is needed in TFieldType (line 5914). If so, it adds and ftSingle entry to TFieldType.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> {$IFDEF WITH_FTSINGLE}</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> , ftSingle</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> {$ENDIF}</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The file zeosdbo-8.0.0-stable/src/ZeosLazarus.inc defines WITH_FTSINGLE as</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">{$IF FPC_FULLVERSION >= 30300}</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">{$DEFINE WITH_FTSINGLE}</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">{$DEFINE WITH_FTSHORTINT}</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">{$IFEND}</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">So ZeosDb is doing the correct thing.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The fixes_3_2 branch has the correct version in FPCSource/compiler/version.pas</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> { version string }</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> version_nr = '3';</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> release_nr = '2';</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> patch_nr = '3';</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> minorpatch = '';</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The current db.pas file seems like a breaking change to make in the fixes_3_2 branch. Was the current db.pas file added to the fixes_3_2 branch for a reason, or was it added unintenionally?</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">Are any other files from the 3.3.1 branch in the fixes_3_2 branch?</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">A git bisect of branch fixes_3_2 shows this commit as the source of the changed db.pas file.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">b907920ef392d6b3a2ae02e489577ff869ede235 is the first bad commit</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">commit b907920ef392d6b3a2ae02e489577ff869ede235</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">Author: Michaël Van Canneyt
<a class="x_moz-txt-link-rfc2396E" href="mailto:michael@freepascal.org"><michael@freepascal.org></a></span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">Date: Mon Feb 14 09:15:30 2022 +0100</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> * Patch from Laco to add TSingleField</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> (cherry picked from commit c46b45bf72ed7e4522e69611d0a5c5c2f44739c9)</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/bufdataset.pas | 4 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/db.pas | 56 ++++++-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/dsparams.inc | 23 ++-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/fields.inc | 178 +++++++++++++++++++--</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/xmldatapacketreader.pp | 5 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/codegen/fpddcodegen.pp | 2 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/datadict/fpdatadict.pp | 2 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/dbase/dbf_fields.pas | 4 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/export/fpfixedexport.pp | 5 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/export/fprtfexport.pp | 2 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/export/fptexexport.pp | 2 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/memds/memds.pp | 2 +</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/odbc/odbcconn.pas | 22 ++-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/postgres/pqconnection.pp | 3 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/sqldb.pp | 1 +</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/sqlite/sqlite3conn.pp | 14 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/bufdatasettoolsunit.pas | 2 +</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/memdstoolsunit.pas | 2 +</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/sqldbtoolsunit.pas | 3 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/testdbbasics.pas | 43 +++--</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/testdbexport.pas | 8 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/toolsunit.pas | 4 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-sdo/src/das/sdo_das_utils.pas | 17 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">packages/fcl-web/src/restbridge/sqldbrestschema.pp | 3 +-</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">24 files changed, 340 insertions(+), 67 deletions(-)</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
</div>
<br>
<fieldset class="x_moz-mime-attachment-header"></fieldset>
<pre class="x_moz-quote-pre">_______________________________________________
fpc-devel maillist - <a class="x_moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="x_moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
<br>
<div style="display:block; background-color:#FAFAD2; border-left:6px solid red; padding:4px; margin-top:2em">
CAUTION: This email originated from outside of Ocmulgee EMC! Do not click links, open attachments or reply, unless you recognize the sender's email address and know the content is safe!
</div>
</div>
</body>
</html>