Recent

Author Topic: bug 26068 stil present in Lazarus 1.2.4 and 1.2.6 - Firebird VarChar Field  (Read 9700 times)

bambamns

  • Full Member
  • ***
  • Posts: 223
Hi,

Just to notify - first problem in bug 26068 is still present in Lazarus 1.2.4 (and 1.2.2 , too).

If you have VarChar field in Firebird , with few hundreds or thousands characters (e.g. VarChar(5000) ) when you commit data it writes only first char.

As I can notice , it is bug in FPC 2.6.4 and it will be fixed in FPC 2.6.5 , but FPC 2.6.5 will never be  published :'( .
« Last Edit: November 07, 2014, 06:05:35 am by bambamns »
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8752
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #1 on: June 22, 2014, 06:54:44 am »
As I can notice , it is bug in FPC 2.6.4 and it will be fixed in FPC 2.6.5 , but FPC 2.6.5 will never be  published :'( .
Just download and use it. As a fixes branch, despite it's updated everyday, it won't contain new bugs because no new features are added.

LacaK

  • Hero Member
  • *****
  • Posts: 691
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #2 on: June 23, 2014, 02:40:07 pm »
2.6.5 also does not contains this fix, because backporting is no more performed
(which is in this case loss IMO)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #3 on: June 23, 2014, 02:43:06 pm »
That said, the workaround mentioned in the bug report will still work.

What also will work is replacing the files in your FPC source dir with those in the bug report, rebuilding FPC and recompiling Lazarus with the new FPC.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

bambamns

  • Full Member
  • ***
  • Posts: 223
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #4 on: July 29, 2014, 05:59:29 am »
Hi,

I had recompiled FPC and replaced db.o and db.ppu with new recompiled versions for i386-win32, and it works.

How to recompile FPC for arm-wince to fix this problem on WinCe ?
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #5 on: July 29, 2014, 11:45:53 am »
Why not, blob sub_type 1(text)?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11421
  • FPC developer.
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #6 on: July 29, 2014, 05:11:38 pm »
2.6.5 also does not contains this fix, because backporting is no more performed

Not automatically anymore. If Lazarus considers out bringing out a 2.6.5 based Lazarus and has list of reports for me to look into, I'll certainly see what I can do.

bambamns

  • Full Member
  • ***
  • Posts: 223
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #7 on: July 30, 2014, 05:58:43 am »
Quote
Why not, blob sub_type 1(text)?

Because Firebird have an open issue when blob field type is filled with data on stored procedure (database expand rapidly), so I have to use VarChar field type with large number of characters.

On WinCE I have problem with second part of bug report bug 26068, so I need to recompile FPC for Arm-WinCE (as I did for Win32).
How to do it ?
« Last Edit: July 30, 2014, 06:04:41 am by bambamns »
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #8 on: July 30, 2014, 07:45:34 am »

Because Firebird have an open issue when blob field type is filled with data on stored procedure (database expand rapidly)

Thanks!

sin_dragan

  • Full Member
  • ***
  • Posts: 127
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #9 on: October 09, 2014, 07:52:57 am »
Can someone explain me how to compile laz 1.2.4 with 2.6.4 to solve this. I read the bug report but I don't know how to get db.o and db.ppu which is bambamns talking about.

My question is: Is there a way to compile Lazarus so I don't have to put the files from db into project directory? Sorry if I misunderstood something.

EDIT: I tried to add fields.inc (whic has one line changed) and rebuild lazarus and it's the same.
« Last Edit: October 09, 2014, 07:58:02 am by sin_dragan »
Windows 7 64 bit
Lazarus 1.4.1 (w/fixes) FPC 2.6.4 win32

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #10 on: October 09, 2014, 08:53:43 am »
My question is: Is there a way to compile Lazarus so I don't have to put the files from db into project directory? Sorry if I misunderstood something.

As the issue is with fpc code, the answer is no.    No simple rebuild of Lazarus will solve the problem.  Reineir's workaround of putting files into the project folder was so your project would use those files instead of the fpc files.  It's a workaround only.

Can someone explain me how to compile laz 1.2.4 with 2.6.4 to solve this. I read the bug report but I don't know how to get db.o and db.ppu which is bambamns talking about.

EDIT: I tried to add fields.inc (whic has one line changed) and rebuild lazarus and it's the same.

Well... the below steps are what I would do...   

The tool I use is fpcup
http://wiki.lazarus.freepascal.org/fpcup
https://bitbucket.org/reiniero/fpcup

*  Configure and use that to get yourself Lazarus 1.2.4 / fpc 2.6.4 (this means you'll have two copies on your system - the one you installed originally, and a new instance built by fpcup - the configuration step is important as out of the box fpcup will get you Lazarus Trunk/fpc Trunk)
*  Apply the patch from the bugtracker to the new fpc sources.
*  Configure fpcup as per the steps here: http://forum.lazarus.freepascal.org/index.php/topic,25027.msg151310.html#msg151310
*  Re-run fpcup with -buildall.

Or...   Do you have to use Lazarus 1.2.4/fpc2.6.4?    If you don't mind using trunk (where apparently this issue has been resolved) you can simplify all the above to:

*  Download and run fpcup.

If you go down either of these paths, please google/forum search rebuilding fpc.  Problems are likely to be encountered, and chances are good you won't be the first to have the problem you encounter.  I'd hate for you to ask a question that's been asked a million times before :-)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

sin_dragan

  • Full Member
  • ***
  • Posts: 127
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #11 on: October 10, 2014, 09:36:01 am »
Thanks mike, your explanation is thorough, I prefer to use the stable release, so I'll put files in project directory. I'll try to use fpcup as you suggested and let post back my results.
Windows 7 64 bit
Lazarus 1.4.1 (w/fixes) FPC 2.6.4 win32

hy

  • Full Member
  • ***
  • Posts: 221
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #12 on: October 10, 2014, 08:06:12 pm »
so this means without customizing a lot you can not securely use firebirds VarChar Fields?
I was just about to switch an existing application to firebird. But if that is the case I'd rather not...
_____
***hy
OS: debian sid(64bit)  [fpc 3.20] Lazarus 2.0.12

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #13 on: October 11, 2014, 12:25:00 am »
so this means without customizing a lot you can not securely use firebirds VarChar Fields?

Yes.

2.6.5 also does not contains this fix, because backporting is no more performed

Not automatically anymore. If Lazarus considers out bringing out a 2.6.5 based Lazarus and has list of reports for me to look into, I'll certainly see what I can do.

Since many people are already using FPC 2.7.1 (unstable), should not Lazarus 1.2.6 has a second download option with FPC 2.7.1 to help beginners?

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: bug 26068 stil present in Lazarus 1.2.4 - Firebird VarChar Field
« Reply #14 on: October 11, 2014, 12:54:20 am »
Does anybody can help us with estimated‎ dates on FPC schedulling for 2.8.0 or 3.0.0?

 

TinyPortal © 2005-2018