Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Michal Kubecek
On Fri, Mar 25, 2016 at 10:24:57PM +0300, Dmitry Yemanov wrote:
> 25.03.2016 22:19, Michal Kubecek wrote:
> 
> >timestamp='$Format:%ct$'
> >if [ "${timestamp:0:1}" = '$' ]; then
> >ts=`git log -1 --pretty='%ct'`
> >fi
> >build_num=$[timestamp / 86400 - 16811]
> 
> This gives us a buildno counted in days, not in commits (as now).

Yes, but I'm not sure if it's really a problem.

One thing I had to learn when I started to work on projects using git
was that with nonlinear git history, the idea of a linear version
counter can be approximated to some extent but it can't really work in
general. And that the only reliable identifier of a point in a git tree
is the commit id.

We might combine the date based build number that would be backward
compatible and would nicely identify the daily snapshots with
(abbreviated) commit id of the actual source version which would give
precise identification for

  - daily snapshots
  - snapshots downloadad from Github web interface
  - snapshots generated locally with "git archive"
  - builds directly from (local) git repository

This woudln't, of course, work for builds from commits outside the main
branch but at least it would be easy to see this is the case.

 Michal Kubecek

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Adriano dos Santos Fernandes
Em 25/03/2016 16:24, Dmitry Yemanov escreveu:
> 25.03.2016 22:19, Michal Kubecek wrote:
> 
>>timestamp='$Format:%ct$'
>>if [ "${timestamp:0:1}" = '$' ]; then
>>ts=`git log -1 --pretty='%ct'`
>>fi
>>build_num=$[timestamp / 86400 - 16811]
> 

Now I understood what Michal mean and is the same as me. :)


> This gives us a buildno counted in days, not in commits (as now).
> 

In practive it's not different.

Doesn't the script is running per day like was in svn?

Right, that means the snapshot build has a "perfect" buildno, but the
people who download zip does not.

With the solution above, we can make snapshot builds to checkout tree or
00:00 hour of the given date, so it can have a perfect buildno that we
can convert to date as well.


Adriano

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Adriano dos Santos Fernandes
Em 25/03/2016 16:19, Michal Kubecek escreveu:
> On Fri, Mar 25, 2016 at 09:58:19PM +0300, Dmitry Yemanov wrote:
>> 25.03.2016 21:35, Adriano dos Santos Fernandes wrote:
>>>
 Can we call git from the filter and expect the repository directory
 being the current one? What about multiple shell commands?
>>>
>>> I think no. But now we have a build number for each date, so with the
>>> date we can simulate the same per-day buildno we have now.
>>
>> Sorry for being absolutely dumb, but HOW? :-) I'm obviously missing the 
>> point.
> 
> You can set the export-subst attribute for a script which would use e.g.
> 
>   ...
>   timestamp='$Format:%ct$'
>   if [ "${timestamp:0:1}" = '$' ]; then
>   ts=`git log -1 --pretty='%ct'`
>   fi
>   build_num=$[timestamp / 86400 - 16811]
>   ...
> 

This one I'm not aware.

I talk about simple calculation:

Base date = 2016-03-05
Date exported by git = 2016-03-25
Build no = 25 - 05 + 1 = 21

It will make vacuum between build numbers when there is no commit in
some days, but I think this is not a problem.

We may have a simple script that transform back build number to date for
our use when someone report a problem.


Adriano

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Dmitry Yemanov
25.03.2016 22:19, Michal Kubecek wrote:

>timestamp='$Format:%ct$'
>if [ "${timestamp:0:1}" = '$' ]; then
>ts=`git log -1 --pretty='%ct'`
>fi
>build_num=$[timestamp / 86400 - 16811]

This gives us a buildno counted in days, not in commits (as now).


Dmitry



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Michal Kubecek
On Fri, Mar 25, 2016 at 09:58:19PM +0300, Dmitry Yemanov wrote:
> 25.03.2016 21:35, Adriano dos Santos Fernandes wrote:
> >
> >> Can we call git from the filter and expect the repository directory
> >> being the current one? What about multiple shell commands?
> >
> > I think no. But now we have a build number for each date, so with the
> > date we can simulate the same per-day buildno we have now.
> 
> Sorry for being absolutely dumb, but HOW? :-) I'm obviously missing the 
> point.

You can set the export-subst attribute for a script which would use e.g.

  ...
  timestamp='$Format:%ct$'
  if [ "${timestamp:0:1}" = '$' ]; then
  ts=`git log -1 --pretty='%ct'`
  fi
  build_num=$[timestamp / 86400 - 16811]
  ...

plus some fallback to handle the case "git log" fails, i.e. we have
neither source exported using "git archive" nor a git repository.

 Michal Kubecek


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Dmitry Yemanov
25.03.2016 21:35, Adriano dos Santos Fernandes wrote:
>
>> Can we call git from the filter and expect the repository directory
>> being the current one? What about multiple shell commands?
>
> I think no. But now we have a build number for each date, so with the
> date we can simulate the same per-day buildno we have now.

Sorry for being absolutely dumb, but HOW? :-) I'm obviously missing the 
point.


Dmitry


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Adriano dos Santos Fernandes
Em 25/03/2016 14:58, Dmitry Yemanov escreveu:
> 25.03.2016 20:25, Adriano dos Santos Fernandes wrote:
>>
>> Looks like I found a good workaround for github "download zip" (or git
>> archive).
>>
>> Look at my test repository to see the simple solution which we can work on:
>>
>> https://github.com/asfernandes/test1
>>
>> Used this info to build it:
>>
>> https://git-scm.com/book/uz/v2/Customizing-Git-Git-Attributes
> 
> Can we call git from the filter and expect the repository directory 
> being the current one? What about multiple shell commands?

I think no. But now we have a build number for each date, so with the
date we can simulate the same per-day buildno we have now.


> Does it work also for checkouts or only for downloads?
> 

Does not work for checkout.

So our build must check the file. If it have the git tags unexpanded,
it's a git repository so build tool can use a local git command to
generate this number (in a not version-controlled file).


Adriano

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Michal Kubecek
On Fri, Mar 25, 2016 at 02:25:02PM -0300, Adriano dos Santos Fernandes wrote:
> 
> Looks like I found a good workaround for github "download zip" (or git
> archive).
> 
> Look at my test repository to see the simple solution which we can work on:
> 
> https://github.com/asfernandes/test1
> 
> Used this info to build it:
> 
> https://git-scm.com/book/uz/v2/Customizing-Git-Git-Attributes

Looks great.  Good to know that Github either uses "git archive" or at
least honors export attributes. Another nice effect is that it's also
going to work for local "git archive" which is probably what most people
use to export contents from git repository.

Funny thing that few days ago I set export-ignore attribute locally for
extern/SfIO but still didn't realize now that export-subst was created
exactly for this purpose.

 Michal Kubecek


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Dmitry Yemanov
25.03.2016 20:25, Adriano dos Santos Fernandes wrote:
>
> Looks like I found a good workaround for github "download zip" (or git
> archive).
>
> Look at my test repository to see the simple solution which we can work on:
>
> https://github.com/asfernandes/test1
>
> Used this info to build it:
>
> https://git-scm.com/book/uz/v2/Customizing-Git-Git-Attributes

Can we call git from the filter and expect the repository directory 
being the current one? What about multiple shell commands? Does it work 
also for checkouts or only for downloads?


Dmitry


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Adriano dos Santos Fernandes
Hi!

Looks like I found a good workaround for github "download zip" (or git
archive).

Look at my test repository to see the simple solution which we can work on:

https://github.com/asfernandes/test1

Used this info to build it:

https://git-scm.com/book/uz/v2/Customizing-Git-Git-Attributes


Adriano

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5172) False triggering of FOREIGN KEY constraint on 7th (seventh) iteration when script infinitely does recreate tables with PK and FK, add data, update it

2016-03-25 Thread Pavel Zotov (JIRA)
False triggering of FOREIGN KEY constraint on 7th (seventh) iteration when 
script infinitely does recreate tables with PK and FK, add data, update it and 
then drop tables
--

 Key: CORE-5172
 URL: http://tracker.firebirdsql.org/browse/CORE-5172
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 4.0 Initial, 3.0 RC2, 2.5.5
Reporter: Pavel Zotov
 Attachments: false-FK-triggering-on-seventh-iter.7z

When attempted to implement test for very old CORE-77 I've encountered that if 
script from this ticket is applied several times than metadata become in some 
strange state that prevents from normal data modification. 

Please see attached .7z and run script  "c0077-run.sql" like this: isql -q -i 
c0077-run.sql 1>log 2>&1
(but do not forget first to open this script in editor and correct path to 
database!)

You will see every time following tail in log:

===
# iter N 7 #
set term ^;
execute block as
begin
begin
execute statement 'alter table department drop constraint 
fk_employee_department';
when any do begin end
end
begin
execute statement 'alter table usr drop constraint 
fk_department_usr';
when any do begin end
end
begin
execute statement 'alter table usr drop constraint fk_employee_usr';
when any do begin end
end
end
^
set term ;^
commit;

. . . . . . . . .

--8) try to update employee

update employee set empl_name = 'foo'
where empl_name = 'bar'; 
Statement failed, SQLSTATE = 23000
violation of FOREIGN KEY constraint "FK_DEPARTMENT_USR" on table "USR"
-Foreign key reference target does not exist
-Problematic key value is ("EMPLOYEE" = 'foo', "DEPARTMENT" = 'administrative')
-At trigger 'CHECK_21'
After line 118 in file c0077-chk.sql
===


-- 
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



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Michal Kubecek
On Fri, Mar 25, 2016 at 03:25:21PM +0100, Mark Rotteveel wrote:
> On 25-3-2016 10:59, Dmitry Yemanov wrote:
> >
> > We considered not storing buildno in the repo, but no good solution was
> > found.
> >
> > I don't want to pollute our build scripts with "check whether git is
> > installed and available in the path", "check whether sources contain
> > .git inside", etc. But without that, we cannot enforce outside builders
> > to generate the buildno properly. I don't care what code you build for
> > yourself, but for non-official snapshot builds and Linux ports this
> > becomes a problem. I don't want to scratch my head every time someone
> > says "I'm using FB v3.4.5.0 and it crashes."
> >
> > If you have some clever idea, I'm all ears.
> 
> I suggested using tags for this. What is the problem with doing that?

When you export the sources for build, the information about tag is lost
so that you still don't see what commit does the tarball come from. If
the reporter knows the tarball was created from, say, tag v3.0.0.54321,
he can also know the commit id it was created from; but neither is an
information that would be automatically preserved on export.

On the other hand, passing the commit id can be easily automated for
official daily snapshots and users building Firebird themselves from the
repository could be taught to note and report the commit id used for
their builds - as they do in many other projects.

  Michal Kubecek


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Mark Rotteveel
On 25-3-2016 10:59, Dmitry Yemanov wrote:
> 25.03.2016 12:43, Dimitry Sibiryakov wrote:
>
>> Because nighty commits weren't in ChangeLog and nobody cared about native 
>> SVN log. Now,
>> when ChangeLog is out of business, GIT log is the only source of list of 
>> changes, so it is
>> better to keep it short and clean. Merge commits are unpleasant, but daily 
>> BN increments
>> are worse.
>
> We considered not storing buildno in the repo, but no good solution was
> found.
>
> I don't want to pollute our build scripts with "check whether git is
> installed and available in the path", "check whether sources contain
> .git inside", etc. But without that, we cannot enforce outside builders
> to generate the buildno properly. I don't care what code you build for
> yourself, but for non-official snapshot builds and Linux ports this
> becomes a problem. I don't want to scratch my head every time someone
> says "I'm using FB v3.4.5.0 and it crashes."
>
> If you have some clever idea, I'm all ears.

I suggested using tags for this. What is the problem with doing that?

Mark
-- 
Mark Rotteveel

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5171) Server crash on bugs.core_2890 in developer build

2016-03-25 Thread Roman Simakov (JIRA)
Server crash on bugs.core_2890 in developer build
-

 Key: CORE-5171
 URL: http://tracker.firebirdsql.org/browse/CORE-5171
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 4.0 Initial
 Environment: Ubuntu 15.10 AMD64
Server mode: Superm SuperClassic
./autogen.sh --enable-developer
Reporter: Roman Simakov


0   __GI_raise  raise.c 55  0x7667d267  
1   __GI_abort  abort.c 89  0x7667eeca  
2   fb_assert_impl  gdsassert.h 48  0x7439d3e4  
3   Jrd::BlockNode::execute StmtNodes.cpp   652 0x7463d237  
4   EXE_looper  exe.cpp 13080x743fd0c4  
5   looper_seh  exe.cpp 14220x743fd53c  
6   execute_looper  exe.cpp 10390x743fbff3  
7   EXE_receive exe.cpp 645 0x743fabff  
8   Jrd::ProcedureScan::getRecord   ProcedureScan.cpp   186 
0x747ae822  
9   Jrd::Cursor::fetchNext  Cursor.cpp  160 0x7479fd04  
10  Jrd::ForNode::execute   StmtNodes.cpp   47150x746501b1  
11  EXE_looper  exe.cpp 13080x743fd0c4  
12  looper_seh  exe.cpp 14220x743fd53c  
13  execute_looper  exe.cpp 10390x743fbff3  
14  EXE_receive exe.cpp 645 0x743fabff  
15  JRD_receive jrd.cpp 75970x744c321f  
16  Jrd::DsqlDmlRequest::fetch  dsql.cpp280 0x7468e2a5  
17  Jrd::DsqlCursor::fetchNext  DsqlCursor.cpp  108 0x746a4bb9  
18  Jrd::JResultSet::fetchNext  jrd.cpp 46450x744b96a1  
19  Firebird::IResultSetBaseImpl::cloopfetchNextDispatcher  
IdlFbInterfaces.h   0x744dc409  
...   


-- 
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



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird.pas for the windows build

2016-03-25 Thread Alex Peshkoff
On 03/25/2016 12:48 PM, preeves wrote:
> On Thu, 24 Mar 2016 12:35:25 +0300
> Alex Peshkoff  wrote:
>
>> On 03/23/2016 06:39 PM, preeves wrote:
>>> Firebird.pas is generated in the posix builds but it is not
>>> generated in the windows builds. Posix builds generate it via this
>>> target:
>>>
>>> $(API_PAS_FILE): $(IDL_FILE) $(PASCAL_SOURCES) $(TMP_FUNCS)
>>>   $(CLOOP) $(IDL_FILE) pascal $@ Firebird --uses SysUtils \
>>>   --interfaceFile $(PAS_ROOT)/Pascal.interface.pas \
>>>   --implementationFile $(PAS_ROOT)/Pascal.implementation.pas
>>> \ --exceptionClass FbException \
>>>   --functionsFile $(TMP_FUNCS) \
>>>   --prefix I
>>>
>>> There seems to be more going on here than simple file
>>> concatenation.
>> Much more.
>>
>>> How are we meant to do this in the windows build?
>> Paul, I see 2 alternatives.
>> 1. (correct) Build cloop and execute same command.
>> 2. (simple) We can add firebird.pas to git and keep in sync with
>> firebird.idl (like now happens with IdlFbInterfaces.h).
> I think it might be easier to do simple instead of correct.

Simple is by definition easier ;)
Unfortunately it does not mean better...

> AFAICT a
> git push will pick up a changed Firebird.pas each time it is rebuilt on
> a posix host, so it won't be too difficult to keep it up-to-date.

Well, if nobody will provide strong arguments against this I will commit 
the generated file on Monday.


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Dimitry Sibiryakov
25.03.2016 10:59, Dmitry Yemanov wrote:
> I don't want to pollute our build scripts with "check whether git is
> installed and available in the path", "check whether sources contain
> .git inside", etc. But without that, we cannot enforce outside builders
> to generate the buildno properly. I don't care what code you build for
> yourself, but for non-official snapshot builds and Linux ports this
> becomes a problem. I don't want to scratch my head every time someone
> says "I'm using FB v3.4.5.0 and it crashes."
>
> If you have some clever idea, I'm all ears.

   If someone clone repo, it has git. In this case we can use post-checkout 
hook to 
generate version file. From this point on sources will have right build number 
even if 
copied anywhere.
   The only problem is the case when someone download sources as ZIP file from 
server. 
Actually, we could use the hook even in this case if Github had allowed 
server-side hooks. 
But it doesn't. Changing of the hoster is not an option?

-- 
   WBR, SD.

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] Add Visual Studio 2015 generated files to ignore (#4)

2016-03-25 Thread Dimitry Sibiryakov
25.03.2016 11:12, Dmitry Yemanov wrote:
> Does MSVC really store all these files in the root directory of the source 
> tree, not
> inside /builds/win32? We already have /builds/win32/.gitignore with:

   Root ignore list works also for every subdir. That's why I wonder why 
someone decided 
to use multiple .gitignore files at all.

-- 
   WBR, SD.

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Physical replication using NBACKUP

2016-03-25 Thread Vlad Khorsun
24.03.2016 11:27, Simonov Denis wrote:
> Vlad Khorsun  wrote Wed, 23 Mar 2016 17:43:23
> +0300:
>
>>
>> Let me show how it works. It is very simplified example, of course.
>>
>> Create database source.fdb.
>>
>> Create level-0 backup, as usual:
>> nbackup -B 0 source.fdb source-0.nbk
>>
>> Restore level-0 backup, as usual:
>>nbackup -R target.fdb source-0.nbk
>
> Why not combine these commands into one?
>   backup -COPY source.fdb target.fdb

   What if target host is not reachable for nbackup (and\or source) host ?
   What if one need to have N target databases ?

   If you worry about unnecessary file copying by nbackup -R, you may rename
source-0.nbk into target.fdb and use nbackup -F instead.

>> Every N minutes:
>> {
>> obtain backup GUID of target database:
>>   gstat -h target.fdb | findstr /C:"Database backup GUID:"
>>
>> create new incremental backup using GUID above:
>>   nbackup -B {93070E3C-E63F-4FB3-B89A-10C732BDEAC3} source.fdb
>> source-inc.nbk
>>
>> apply new increment to the target database:
>>   nbackup -INPLACE -R target.fdb source-inc.nbk
>> }
>>
>
> These commands can also be combined into one, such as
>   nbackup -MERGE -DATABASE source.fdb target.fdb [-INCREMENT
> source-inc.nbk]
>
> During the execution of this command, GUID could be read automatically
>   from target.fdb

   Same questions about multiply\not reachable target(s) as above.

   For single target database in the same network it could make sense, agree.
Note, to query GUID of target database, it should be directly available for the
nbackup host or Firebird server should run on target host.

Regards,
Vlad

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Physical replication using NBACKUP

2016-03-25 Thread Vlad Khorsun
23.03.2016 17:31, Dmitry Yemanov wrote:
> 23.03.2016 18:14, Vlad Khorsun wrote:
>>
>> Original patch contains just "-I" switch :) For me both "inplace" and "merge"
>> are ok, let decide what to use.
>
> My point was to replace two switches (-inplace -restore) with one
> (-merge or whatever).

   Got it, thanks. No objection from my side. Others ?

Regards,
Vlad

PS It will create incompatibility for patch donor (Red Soft) but i don't
know if it is a problem for them

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Physical replication using NBACKUP

2016-03-25 Thread Vlad Khorsun
24.03.2016 10:56, Dmitry Yemanov wrote:
> 24.03.2016 11:33, Vlad Khorsun wrote:
>
>>> May I suggest to add isc_info_* code to query the backup GUID via
>>> isc_database_info()? Parsing gstat output for it is very awful.
>>
>> I have same idea. I suppose it is better to return GUID in text
>> representation, not binary, agree ?
>
> I'm not that sure. API is for programmers and it's intended to work with
> binary data. Whoever able to call isc_database_info() may easily call
> (or implement) a function to format it into text.

   This is my worries - one could interpret GUID bytes order not in the same
way as Firebird does. Look at guid.h - we still have two formats for the
GUID's and nbackup currently used old one.

   If end user will use text GUID's converted to\from binary format by the
Firebird itself (gstat\nbackup) - it is consistent and thus safe.

Regards,
Vlad

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5170) CLONE -subselect with union and order by return wrong result.

2016-03-25 Thread IL (JIRA)
CLONE -subselect with union and order by return wrong result. 
--

 Key: CORE-5170
 URL: http://tracker.firebirdsql.org/browse/CORE-5170
 Project: Firebird Core
  Issue Type: Bug
 Environment: 2.5.3 windows
Reporter: IL


espectin 8, 7, 6, 5,  4 but order don't apply correct.
got 1,2,3,4,5,6

select first 5 xx
from
(select xx from
(select 1 as xx from rdb$database
union
select 2 from rdb$database
union
select 3 from rdb$database
union
select 4 from rdb$database
union
select 5 from rdb$database
union
select 6 from rdb$database
union
select 7 from rdb$database
union
select 8 from rdb$database
)
order by xx desc
)
order by xx

-- 
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



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Dmitry Yemanov
25.03.2016 12:43, Dimitry Sibiryakov wrote:

> Because nighty commits weren't in ChangeLog and nobody cared about native SVN 
> log. Now,
> when ChangeLog is out of business, GIT log is the only source of list of 
> changes, so it is
> better to keep it short and clean. Merge commits are unpleasant, but daily BN 
> increments
> are worse.

We considered not storing buildno in the repo, but no good solution was 
found.

I don't want to pollute our build scripts with "check whether git is 
installed and available in the path", "check whether sources contain 
.git inside", etc. But without that, we cannot enforce outside builders 
to generate the buildno properly. I don't care what code you build for 
yourself, but for non-official snapshot builds and Linux ports this 
becomes a problem. I don't want to scratch my head every time someone 
says "I'm using FB v3.4.5.0 and it crashes."

If you have some clever idea, I'm all ears.


Dmitry


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5169) subselect with union and order by return wrong result.

2016-03-25 Thread IL (JIRA)
subselect with union and order by return wrong result. 
---

 Key: CORE-5169
 URL: http://tracker.firebirdsql.org/browse/CORE-5169
 Project: Firebird Core
  Issue Type: Bug
 Environment: 2.5.3 windows
Reporter: IL


espectin 8, 7, 6, 5,  4 but order don't apply correct.
got 1,2,3,4,5,6

select first 5 xx
from
(select xx from
(select 1 as xx from rdb$database
union
select 2 from rdb$database
union
select 3 from rdb$database
union
select 4 from rdb$database
union
select 5 from rdb$database
union
select 6 from rdb$database
union
select 7 from rdb$database
union
select 8 from rdb$database
)
order by xx desc
)
order by xx

-- 
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



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird.pas for the windows build

2016-03-25 Thread preeves
On Thu, 24 Mar 2016 12:35:25 +0300
Alex Peshkoff  wrote:

> On 03/23/2016 06:39 PM, preeves wrote:
> > Firebird.pas is generated in the posix builds but it is not
> > generated in the windows builds. Posix builds generate it via this
> > target:
> >
> > $(API_PAS_FILE): $(IDL_FILE) $(PASCAL_SOURCES) $(TMP_FUNCS)
> >  $(CLOOP) $(IDL_FILE) pascal $@ Firebird --uses SysUtils \
> >  --interfaceFile $(PAS_ROOT)/Pascal.interface.pas \
> >  --implementationFile $(PAS_ROOT)/Pascal.implementation.pas
> > \ --exceptionClass FbException \
> >  --functionsFile $(TMP_FUNCS) \
> >  --prefix I
> >
> > There seems to be more going on here than simple file
> > concatenation.  
> 
> Much more.
> 
> >
> > How are we meant to do this in the windows build?  
> 
> Paul, I see 2 alternatives.
> 1. (correct) Build cloop and execute same command.
> 2. (simple) We can add firebird.pas to git and keep in sync with 
> firebird.idl (like now happens with IdlFbInterfaces.h).

I think it might be easier to do simple instead of correct. AFAICT a
git push will pick up a changed Firebird.pas each time it is rebuilt on
a posix host, so it won't be too difficult to keep it up-to-date.


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

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [firebird] increment build number (773c7bf)

2016-03-25 Thread Dimitry Sibiryakov
25.03.2016 10:37, Dmitry Yemanov wrote:
> We used exactly the same approach with SVN and nobody complained about 
> polluted changelog.

   Because nighty commits weren't in ChangeLog and nobody cared about native 
SVN log. Now, 
when ChangeLog is out of business, GIT log is the only source of list of 
changes, so it is 
better to keep it short and clean. Merge commits are unpleasant, but daily BN 
increments 
are worse.

-- 
   WBR, SD.

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird.pas for the windows build

2016-03-25 Thread Alex Peshkoff
On 03/24/2016 01:36 PM, Adriano dos Santos Fernandes wrote:
> On 24/03/2016 06:35, Alex Peshkoff wrote:
>> How are we meant to do this in the windows build?
>> Paul, I see 2 alternatives.
>> 1. (correct) Build cloop and execute same command.
>>
> Is the Windows guys doing manual editing of the generated file after API
> changes?

Being not absolutely sure what do they do I will answer - sooner of all not.
After RC2 two guys used to ask me - where is firebird.pas? They were 
both windows users. I had to suggest them to download linux binary 
package and take file from it. That file did not require any manual 
editing when put into linux package and looks like was OK for that users.



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel