Re: [Firebird-devel] [FB-Tracker] Created: (CORE-5507) Wrong value of the new field at the old records, created before that new field was added.

2017-03-23 Thread Vlad Khorsun
24.03.2017 1:29, Mark Rotteveel wrote:
> To me the behavior described under "actual" intuitively sounds like the 
> correct behavior. Why do you expect that the column value
> would change to 'ABC'?

   Because Firebird doesn't update old records when new field was created.

> The column was created with a default, which means that existing rows will 
> get that value,

   Engine doesn't assing values to a new field, i.e. there is no implicit 
UPDATE of
the existing records. This is strong point of the engine, btw.

> afaik it shouldn't change if the default
> later is changed. Is there a requirement in the SQL standard that supports 
> your expectation?

   I doubt SQL standard describes Firebird multiversion metadata handling

Regards,
Vlad

PS Avoid dumb overquoting


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [FB-Tracker] Created: (CORE-5507) Wrong value of the new field at the old records, created before that new field was added.

2017-03-23 Thread Adriano dos Santos Fernandes
Em 23/03/2017 20:29, Mark Rotteveel escreveu:
> To me the behavior described under "actual" intuitively sounds like the
> correct behavior. Why do you expect that the column value would change
> to 'ABC'? 
> 
> The column was created with a default, which means that existing rows
> will get that value, afaik it shouldn't change if the default later is
> changed. Is there a requirement in the SQL standard that supports your
> expectation?
> 

I agree with you, Mark, that the current behavior is correct unless
someone quotes the standard saying the contrary.


Adriano

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [FB-Tracker] Created: (CORE-5507) Wrong value of the new field at the old records, created before that new field was added.

2017-03-23 Thread Mark Rotteveel
To me the behavior described under "actual" intuitively sounds like the correct 
behavior. Why do you expect that the column value would change to 'ABC'? 
The column was created with a default, which means that existing rows will get 
that value, afaik it shouldn't change if the default later is changed. Is there 
a requirement in the SQL standard that supports your expectation?

Mark

PS I will see if I can find something to back up my claim, but that will have 
to wait until Saturday.

- Bericht beantwoorden -
Van: "Vlad Khorsun (JIRA)" 
Aan: 
Onderwerp: [Firebird-devel] [FB-Tracker] Created: (CORE-5507) Wrong value of 
the new field at the old records, created before that new field was added.
Datum: do, mrt. 23, 2017 23:11

Wrong value of the new field at the old records, created before that new field 
was added.
-

Key: CORE-5507
URL: http://tracker.firebirdsql.org/browse/CORE-5507
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 3.0.2
Reporter: Vlad Khorsun


RECREATE TABLE T (ID INT NOT NULL, DESCR VARCHAR(32) NOT NULL);
COMMIT;

INSERT INTO T (ID, DESCR) VALUES (1, 'No F1 field');
COMMIT;

ALTER TABLE T ADD F1 VARCHAR(16) DEFAULT 'XYZ' NOT NULL;
COMMIT;

INSERT INTO T (ID, DESCR) VALUES (2, 'F1 field, default XYZ');
COMMIT;

SELECT * FROM T;
COMMIT;

ALTER TABLE T ALTER COLUMN F1 SET DEFAULT 'ABC';
COMMIT;

INSERT INTO T (ID, DESCR) VALUES (3, 'F1 field, default ABC');
COMMIT;

SELECT * FROM T;
COMMIT;


After the first select all is as expected:

ID DESCRF1
  
1 No F1 field  XYZ
2 F1 field, default XYZXYZ

after the second select
expected

ID DESCRF1
  
1 No F1 field  ABC
2 F1 field, default XYZXYZ
3 F1 field, default ABCABC

actual

ID DESCRF1
  
1 No F1 field  XYZ
2 F1 field, default XYZXYZ
3 F1 field, default ABCABC

Note value of the field F1 at the first record: it is expected that is should 
be the same as latest DEFAULT value.
Also note that 2nd and 3rd INSERTs assigns correct value to the omitted field - 
same as latest DEFAULT value.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5507) Wrong value of the new field at the old records, created before that new field was added.

2017-03-23 Thread Vlad Khorsun (JIRA)
Wrong value of the new field at the old records, created before that new field 
was added.
-

 Key: CORE-5507
 URL: http://tracker.firebirdsql.org/browse/CORE-5507
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.2
Reporter: Vlad Khorsun


RECREATE TABLE T (ID INT NOT NULL, DESCR VARCHAR(32) NOT NULL);
COMMIT;

INSERT INTO T (ID, DESCR) VALUES (1, 'No F1 field');
COMMIT;

ALTER TABLE T ADD F1 VARCHAR(16) DEFAULT 'XYZ' NOT NULL;
COMMIT;

INSERT INTO T (ID, DESCR) VALUES (2, 'F1 field, default XYZ');
COMMIT;

SELECT * FROM T;
COMMIT;

ALTER TABLE T ALTER COLUMN F1 SET DEFAULT 'ABC';
COMMIT;

INSERT INTO T (ID, DESCR) VALUES (3, 'F1 field, default ABC');
COMMIT;

SELECT * FROM T;
COMMIT;


After the first select all is as expected:

  ID DESCRF1
  
   1 No F1 field  XYZ
   2 F1 field, default XYZXYZ

after the second select
expected

  ID DESCRF1
  
   1 No F1 field  ABC
   2 F1 field, default XYZXYZ
   3 F1 field, default ABCABC

actual

  ID DESCRF1
  
   1 No F1 field  XYZ
   2 F1 field, default XYZXYZ
   3 F1 field, default ABCABC

Note value of the field F1 at the first record: it is expected that is should 
be the same as latest DEFAULT value.
Also note that 2nd and 3rd INSERTs assigns correct value to the omitted field - 
same as latest DEFAULT value.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] x64 fblient.dll ISC_STATUS data type vs. lib version

2017-03-23 Thread Vlad Khorsun
23.03.2017 22:47, malloc meyer wrote:
>
>
> Dear,
>
> I am developing with IBPP on x64 linux and windows hosts. Using IBPP on a x64 
> windows LLP64 system leads to exceptions.
 > The reason is a wrong definition of ISC_STATUS in the IBPP headers. IBPP 
 > defines ISC_STATUS for a LLP64 windows target
 > only 32 bits width, but the fbclient API defines it 64 bit witdth.
>
> My question ist, was there any version in past of the fbclient API for x64 
> windows which defines ISC_STATUS as a 32 bit integer ?

   Git show that it was defined as intptr_t since 2006-07-24, before that is 
was defined as long

> I can't belive that the current IBPP release source from 2007-02-21 has this 
> bug in it since 10 years?

   It happens

Regards,
Vlad


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] x64 fblient.dll ISC_STATUS data type vs. lib version

2017-03-23 Thread Dimitry Sibiryakov
23.03.2017 21:47, malloc meyer wrote:
> My question ist, was there any version in past of the fbclient API for x64 
> windows which defines ISC_STATUS as a 32 bit integer ?

   No. Status array contains (among other information) also pointers.


-- 
   WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Where is Android port?

2017-03-23 Thread Alex Peshkoff
On 03/23/17 18:30, Dmitry Yemanov wrote:
> 23.03.2017 17:53, Alex Peshkoff wrote:
>
>>> To be published, I'd want it to be rebuilt from the 3.0.2 codebase. The
>>> latest Android binaries are v3.0.0, not something to be put on the
>>> v3.0.2 download page.
>> What problems do we have buildig it? Any help needed?
> We just need someone who builds the package ;-)

It's in prerelease area.

http://web.firebirdsql.org/download/prerelease/android/

Unfortunately absolutely untested.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] unix2dos

2017-03-23 Thread Alex Peshkoff
On 03/23/17 18:05, Dimitry Sibiryakov wrote:
> 23.03.2017 15:58, Alex Peshkoff wrote:
>> Occasionally BuildExecutableInstall.bat itself was wrongly committed to
>> git - checked outon linux it has CR-LF lineend instead just LF. I.e.
>> itself needs unix2dos ;) Luckily it does not actually matter.
> Actually, it does matter. Stupid Windows command line processor works 
> with "LF-only"
> files incorrectly. And because git's default for .cmd files is "checkout as 
> is", it must
> be kept in repository with "CR-LF" EOL mark.
>
>

What? git unable to treat .bat file as normal text and can't checkout it 
according to OS rules?
(like it does for .cpp, .h and a lot of other files)
Sorry, hard to believe... Sooner that's our configuration error somewhere.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] unix2dos

2017-03-23 Thread Paul Reeves
On Thu, 23 Mar 2017 15:04:56 +0100 Dimitry Sibiryakov wrote

>Hello, All.
> 
>What version/build of subj supports '-D' switch 

Good question. If unix2dos is not found then an error will be thrown.
It is not clearly documented but in the HELP screen there will be this:

@echo o sed is required for packaging. Use the sed provided by
@echo   gnuwin32. The cygwin one is not guaranteed to work.

Basically, if sed is available then unix2dos _ought_ to be available
and the clue is in the 'provided by gnuwin32'

If you google gnuwin32 you will arrive here

  http://gnuwin32.sourceforge.net/

that ought to be enough but I used

https://sourceforge.net/projects/getgnuwin32/

which is supposed to simplify installation and maintenance of gnuwin32.

I haven't upgraded the versions I use in years and the version in the
help message doesn't correspond with the version in alt-Properties.

To be honest it is a real hassle that we need to install so much just
to have two small posix executables. Maybe things have changed with
modern versions of windows and we could eliminate them now. But once
the toolchain is installed it just works.

> and what it is supposed to do in installation build script? 

Its purpose is clearly documented in the batch file just above where
it is called, so I will not repeat it.

The reason we need it is because git seems to check (some) files out
with LF eols and we need to deploy all text files with CR LF eols. 


> If only to convert EOL marks, it is job for '-ascii' switch...
 
Yes, weirdly, gnuwin32 seems to implement non-standard parameters, at
least for unix2dos, inasmuch as the --ascii switch is not available.
OTOH, the --ascii switch on linux is the default and can be omitted.

And unix2dos on linux assumes that output will be in dos format - hence
the name. Why the gnuwin32 version doesn't make that assumption is
anyone's guess. So the -D (or --unix2dos in the long format ) is
required.



Paul

-- 
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird
 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] unix2dos

2017-03-23 Thread Dimitry Sibiryakov
23.03.2017 15:58, Alex Peshkoff wrote:
> Occasionally BuildExecutableInstall.bat itself was wrongly committed to
> git - checked outon linux it has CR-LF lineend instead just LF. I.e.
> itself needs unix2dos ;) Luckily it does not actually matter.

   Actually, it does matter. Stupid Windows command line processor works with 
"LF-only" 
files incorrectly. And because git's default for .cmd files is "checkout as 
is", it must 
be kept in repository with "CR-LF" EOL mark.


-- 
   WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Where is Android port?

2017-03-23 Thread Alex Peshkoff
On 03/23/17 11:54, Dmitry Yemanov wrote:
> 23.03.2017 05:19, Carlos H. Cantu wrote:
>
>> I see two mentions in the 3.02 ReleaseNotes about Android port
>> [(CORE-3885) and (CORE-5332)], but I can't find any Android link in
>> the download page.
>>
>> This needs to be fixed.
> To be published, I'd want it to be rebuilt from the 3.0.2 codebase. The
> latest Android binaries are v3.0.0, not something to be put on the
> v3.0.2 download page.
>

What problems do we have buildig it? Any help needed?



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] unix2dos

2017-03-23 Thread Dimitry Sibiryakov
23.03.2017 15:44, Alex Peshkoff wrote:
> I wonder - what scripts do you mean, grepping in our
> master/builds/install does not find unix2dos.

   B3_0_Release branch, install/arch-specific/win32/BuildExecutableInstall.bat


-- 
   WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] unix2dos

2017-03-23 Thread Alex Peshkoff
On 03/23/17 17:04, Dimitry Sibiryakov wrote:
> Hello, All.
>
> What version/build of subj supports '-D' switch

-D, --display-enc ENCODING
Set encoding of displayed text. Where ENCODING is one of: 
ansi, unicode, unicodebom, utf8, utf8bom with ansi being the
default.

This option is only available in dos2unix for Windows with 
Unicode file name support. This option has no effect on the
actual file names read and written, only on how they are 
displayed.


> and what it is supposed to do in
> installation build script? If only to convert EOL marks, it is job for 
> '-ascii' switch...
>

I wonder - what scripts do you mean, grepping in our 
master/builds/install does not find unix2dos.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Where is Android port?

2017-03-23 Thread Carlos H. Cantu
Thanks Dmitry, I hope it will not take too long to publish it...
probably we will have a lot of people visiting the download page in
the next days.

[]s
Carlos
http://www.firebirdnews.org
FireBase - http://www.FireBase.com.br

DY> 23.03.2017 05:19, Carlos H. Cantu wrote:

>> I see two mentions in the 3.02 ReleaseNotes about Android port
>> [(CORE-3885) and (CORE-5332)], but I can't find any Android link in
>> the download page.
>>
>> This needs to be fixed.

DY> To be published, I'd want it to be rebuilt from the 3.0.2 codebase. The
DY> latest Android binaries are v3.0.0, not something to be put on the 
DY> v3.0.2 download page.


DY> Dmitry


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Where is Android port?

2017-03-23 Thread Dmitry Yemanov
23.03.2017 05:19, Carlos H. Cantu wrote:

> I see two mentions in the 3.02 ReleaseNotes about Android port
> [(CORE-3885) and (CORE-5332)], but I can't find any Android link in
> the download page.
>
> This needs to be fixed.

To be published, I'd want it to be rebuilt from the 3.0.2 codebase. The 
latest Android binaries are v3.0.0, not something to be put on the 
v3.0.2 download page.


Dmitry


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel