[firebird-support] Truncated part of the previous message

2016-01-04 Thread patrick_mar...@yahoo.com [firebird-support]
[...]
if (PROCESSED_AMOUNT_INVOICES is null) then begin
   PROCESSED_AMOUNT_INVOICES = 0;
end

PROCESSED_AMOUNT_INVOICES = PROCESSED_AMOUNT_INVOICES + 
TempTargetAmount;
end
else begin
PROCESSED_AMOUNT_INVOICES = TempTargetAmount;
end

suspend;
end
end ^^
SET TERM ; ^^


SET TERM ^^ ;
CREATE OR ALTER PROCEDURE PROCESSABLE_INVOICE_POSITIONS returns (
  PROCESS_TYPE INTEGER,
  PROCESS_ID INTEGER,
  PROCESS_NO VARCHAR(   100),
  POSITION_PROCESS_CHAINID INTEGER,
  POSITION_ID INTEGER,
  POSITION_AMOUNT DOUBLE PRECISION,
  POSITION_PRODUCTID INTEGER,
  POSITION_PRODUCTNO VARCHAR(   100),
  POSITION_DESCRIPTION VARCHAR(50),
  POSITION_PRODUCT_LABEL VARCHAR(   255),
  POSITION_PRICE DOUBLE PRECISION,
  POSITION_PRODUCT_CATEGORY SMALLINT,
  PROCESSED_AMOUNT_OFFERS DOUBLE PRECISION,
  PROCESSED_AMOUNT_ORDERS DOUBLE PRECISION,
  PROCESSED_AMOUNT_DELIVERIES DOUBLE PRECISION,
  PROCESSED_AMOUNT_INVOICES DOUBLE PRECISION,
  PROCESSABLE_AMOUNT_OFFERS DOUBLE PRECISION,
  PROCESSABLE_AMOUNT_ORDERS DOUBLE PRECISION,
  PROCESSABLE_AMOUNT_DELIVERIES DOUBLE PRECISION,
  PROCESSABLE_AMOUNT_INVOICES DOUBLE PRECISION,
  PROCESS_STATE_OFFERS SMALLINT,
  PROCESS_STATE_ORDERS SMALLINT,
  PROCESS_STATE_DELIVERIES SMALLINT,
  PROCESS_STATE_INVOICES SMALLINT)
AS
declare variable TempTargetAmount double precision;
declare variable TempReferenceAmount double precision;
begin
for 
select
cast (3 as integer) as PROCESS_TYPE,
INVOICES_POSITIONS.INVOICEID as PROCESS_ID,
INVOICES_POSITIONS.INVOICENO as PROCESS_NO,
INVOICES_POSITIONS.PROCESS_CHAINID as POSITION_PROCESS_CHAINID,
INVOICES_POSITIONS.ID as POSITION_ID,
INVOICES_POSITIONS.AMOUNT as POSITION_AMOUNT,
INVOICES_POSITIONS.PRODUCTID as POSITION_PRODUCTID,
INVOICES_POSITIONS.PRODUCTNO as POSITION_PRODUCTNO,
INVOICES_POSITIONS.PRODUCT_DESCRIPTION as POSITION_DESCRIPTION,
case when (INVOICES_POSITIONS.PRODUCTID > 0) then 
cast('POSITION_PRODUCT_LABEL_WITH_NO ' || INVOICES_POSITIONS.PRODUCTNO || ' (' 
|| nullif(INVOICES_POSITIONS.PRODUCT_DESCRIPTION, '') || ')' as varchar(255)) 
else cast('POSITION_PRODUCT_LABEL ' || ' (' || 
nullif(INVOICES_POSITIONS.PRODUCT_DESCRIPTION, '') || ')' as varchar(255)) end 
as POSITION_PRODUCT_LABEL,
INVOICES_POSITIONS.PRICE as POSITION_PRICE,
PRODUCTS.CATEGORY as POSITION_PRODUCT_CATEGORY,
PROCESS_INFO_INVOICE_POSITIONS.PROCESSED_AMOUNT_OFFERS,
PROCESS_INFO_INVOICE_POSITIONS.PROCESSED_AMOUNT_ORDERS,
PROCESS_INFO_INVOICE_POSITIONS.PROCESSED_AMOUNT_DELIVERIES,
PROCESS_INFO_INVOICE_POSITIONS.PROCESSED_AMOUNT_INVOICES,
cast (0 as double precision) as PROCESSABLE_AMOUNT_OFFERS,
cast (0 as double precision) as PROCESSABLE_AMOUNT_ORDERS,
cast (0 as double precision) as PROCESSABLE_AMOUNT_DELIVERIES,
cast (0 as double precision) as PROCESSABLE_AMOUNT_INVOICES,
cast (3 as smallint) as PROCESS_STATE_OFFERS,
cast (3 as smallint) as PROCESS_STATE_ORDERS,
cast (3 as smallint) as PROCESS_STATE_DELIVERIES,
cast (3 as smallint) as PROCESS_STATE_INVOICES
from
INVOICES_POSITIONS
left join PRODUCTS on INVOICES_POSITIONS.PRODUCTID = PRODUCTS.ID
left join PROCESS_INFO_INVOICE_POSITIONS on 
INVOICES_POSITIONS.PROCESS_CHAINID = 
PROCESS_INFO_INVOICE_POSITIONS.PROCESS_CHAINID
where
(INVOICES_POSITIONS.ID > 0)

  into :PROCESS_TYPE, :PROCESS_ID, :PROCESS_NO, :POSITION_PROCESS_CHAINID, 
:POSITION_ID, :POSITION_AMOUNT, :POSITION_PRODUCTID, :POSITION_PRODUCTNO, 
:POSITION_DESCRIPTION, :POSITION_PRODUCT_LABEL, :POSITION_PRICE, 
:POSITION_PRODUCT_CATEGORY,
:PROCESSED_AMOUNT_OFFERS, :PROCESSED_AMOUNT_ORDERS, 
:PROCESSED_AMOUNT_DELIVERIES, :PROCESSED_AMOUNT_INVOICES,
:PROCESSABLE_AMOUNT_OFFERS, :PROCESSABLE_AMOUNT_ORDERS, 
:PROCESSABLE_AMOUNT_DELIVERIES, :PROCESSABLE_AMOUNT_INVOICES,
:PROCESS_STATE_OFFERS, :PROCESS_STATE_ORDERS, 
:PROCESS_STATE_DELIVERIES, :PROCESS_STATE_INVOICES
do begin
TempTargetAmount = 0;

TempReferenceAmount = :POSITION_AMOUNT;
if (TempReferenceAmount is null) then begin
TempReferenceAmount = 1;
end

// Processable amount for offers
if (PROCESSED_AMOUNT_OFFERS > TempReferenceAmount) then begin
PROCESSABLE_AMOUNT_OFFERS = 0;
end
else begin
PROCESSABLE_AMOUNT_OFFERS = TempReferenceAmount - 
PROCESSED_AMOUNT_OFFERS;
end
// Process state for offers
if (PROCESSABLE_AMOUNT_OFFERS = 0) then begin
PROCESS_STATE_OFFERS = 2;
end
if ((PROCESSABLE_AMOUNT_OFFERS > 0) and (TempReferenceAmount > 
PROCES

[firebird-support] Can "forced writes" change application behaviour?

2016-01-04 Thread Tim Ward t...@telensa.com [firebird-support]

Hi,

We've got a system which does different things depending on whether 
"forced writes" is switched on or not (and, possibly, on /when/ it's 
switched on or off).


It seems to me that this is wrong - turning forced writes on or off 
should only affect performance, it shouldn't make an application follow 
different paths through the code?


So my first assumption is that in fact forced write state is not 
actually causing Firebird to behave in different ways, and that we've got


(a) some of our application code that is timing dependent, or
(b) something else wrong, and the repeatable changes in behaviour when 
switching forced writes on and off are just an amazing coincidence.


But just to eliminate the most unlikely explanation first, and get that 
out of the way, please can someone confirm to me very strenuously indeed 
that there is no possibility that


(c) switching forced writes on or off changes the logical behaviour of a 
Firebird application


whether through changing the outcome of multiple concurrent transactions 
or otherwise?


This is Firebird 2.5 running on 64 bit Linux. The application consists 
of a bunch of processes written in C/C++ accessing the database, partly 
direct queries and partly stored procedure calls, as well as user 
interface accesses via PHP. (Oh, and possibly some Python processes and 
other stuff, but it's the interaction between a couple of the C/C++ 
processes that is currently confusing us.)


--
Tim Ward



[firebird-support] Re: Install 2.5.5 on Debian 7 problem with APT

2016-01-04 Thread map...@gmail.com [firebird-support]
The ppa was created for Ubuntu but it can be used also in debian  

 http://www.webupd8.org/2014/10/how-to-add-launchpad-ppas-in-debian-via.html 
http://www.webupd8.org/2014/10/how-to-add-launchpad-ppas-in-debian-via.html  


 



Re: [firebird-support] Firebird Download Malware

2016-01-04 Thread Thomas Steinmaurer t...@iblogmanager.com [firebird-support]
>> I downloaded FB 2.5.5 from firebirdsql and my Microsoft Essentials
>> detected it as a malware.
>
> I am facing the same problem.
> The following file is affected:
> http://sourceforge.net/projects/firebird/files/firebird-win64/2.5.5-Release/Firebird-2.5.5.26952_0_x64.exe/download
>
> This seems to be a false alarm though.
> According to Virustotal, 54 different scan engines say the file is
> clean:
> https://www.virustotal.com/de/file/e4ce70fd1be17b07fd26554ef322ee14f65fef8d398aaa707df115530aa0f410/analysis/
>
> Funnily, the Microsoft scan engine at Virustotal also considers it as
> clean.

Avira Antivir locally does not report anything suspicious.



-- 
With regards,
Thomas Steinmaurer
http://www.upscene.com/

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/