<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hello Michael,<br>
<br>
this has been fixed in the 8.0-patches branch of Zeos. Please check
the SVN:<br>
<a class="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="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="moz-cite-prefix">Am 31.03.2025 um 23:47 schrieb Michael
Roland via fpc-devel:<br>
</div>
<blockquote type="cite"
cite="mid:PH0PR11MB49174BA600FF4F9613695FF9B6AD2@PH0PR11MB4917.namprd11.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;}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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Is the wrong
version of the db.pas in fixes_3_2 branch?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The 3.3.1
db.pas adds a new enum value ftSingle to TFieldType.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This causes
the compilation of ZeosDb 8.0 ZAbstractRODataset.pas to fail
with the error<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Error:
Expected another 1 array elements.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The ZeosDb
source code creates an array of TFieldType, then fills the
array with values.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">line 5901 of
zeosdbo-8.0.0-stable/src/component/ZAbstractRODataset.pas<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">"BaseFieldTypes:
array[TFieldType] of TFieldType = ("<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">However,
ZeosDb does add the ftSingle value for free pascal version
3.3 or higher.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">zeosdbo-8.0.0-stable/src/component/ZAbstractRODataset.pas<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
{$IFDEF WITH_FTSINGLE}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> ,
ftSingle<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
{$ENDIF}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The file
zeosdbo-8.0.0-stable/src/ZeosLazarus.inc defines
WITH_FTSINGLE as<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">{$IF
FPC_FULLVERSION >= 30300}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">{$DEFINE
WITH_FTSINGLE}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">{$DEFINE
WITH_FTSHORTINT}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">{$IFEND}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">So ZeosDb is
doing the correct thing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The
fixes_3_2 branch has the correct version in
FPCSource/compiler/version.pas<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> {
version string }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
version_nr = '3';<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
release_nr = '2';<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
patch_nr = '3';<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
minorpatch = '';<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Are any
other files from the 3.3.1 branch in the fixes_3_2 branch?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">b907920ef392d6b3a2ae02e489577ff869ede235
is the first bad commit<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">commit
b907920ef392d6b3a2ae02e489577ff869ede235<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Author:
Michaël Van Canneyt <a class="moz-txt-link-rfc2396E" href="mailto:michael@freepascal.org"><michael@freepascal.org></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Date: Mon
Feb 14 09:15:30 2022 +0100<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> * Patch
from Laco to add TSingleField<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> (cherry
picked from commit c46b45bf72ed7e4522e69611d0a5c5c2f44739c9)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/bufdataset.pas
| 4 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/db.pas
| 56 ++++++-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/dsparams.inc
| 23 ++-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/fields.inc
| 178 +++++++++++++++++++--<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/base/xmldatapacketreader.pp
| 5 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/codegen/fpddcodegen.pp
| 2 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/datadict/fpdatadict.pp
| 2 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/dbase/dbf_fields.pas
| 4 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/export/fpfixedexport.pp
| 5 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/export/fprtfexport.pp
| 2 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/export/fptexexport.pp
| 2 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/memds/memds.pp
| 2 +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/odbc/odbcconn.pas
| 22 ++-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/postgres/pqconnection.pp
| 3 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/sqldb.pp
| 1 +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/src/sqldb/sqlite/sqlite3conn.pp
| 14 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/bufdatasettoolsunit.pas
| 2 +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/memdstoolsunit.pas
| 2 +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/sqldbtoolsunit.pas
| 3 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/testdbbasics.pas
| 43 +++--<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/testdbexport.pas
| 8 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-db/tests/toolsunit.pas
| 4 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-sdo/src/das/sdo_das_utils.pas
| 17 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">packages/fcl-web/src/restbridge/sqldbrestschema.pp
| 3 +-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">24 files
changed, 340 insertions(+), 67 deletions(-)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="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>
</body>
</html>