Forum: Italian Ruby user group bug fb_adapter / fb

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Mariarosaria T. (Guest)
on 2009-05-16 17:33
s.o.linux ubuntu server 9.0.4
firebird version
rails 2.3.2
ruby 1.8.7 patchlevel 72
rake 0.8.5
fb_adapter 0.5.8
fb 0.5.9
passenger 2.2.2
nginx 0.6.36

query from isql
select sum(val_emessi) from g1_items where licence_id = 6 and tipogioco
= 'SPORT QF' AND TIPO = 'A' AND DATA >= '2009/01/02' AND DATA <=

result => 2837.00 ...giusto

query from rails

condizioni = "data >= '#{from_date}' and
              data <= '#{to_date}' and
              licence_id = '#{session[:licence_id]}' and
              tipogioco = '#{tipogioco}' and
              tipo = '#{modo}'"
    @emessi = G1Item.sum('val_emessi', :conditions => condizioni)

result => 283700.00 .... errato

In windows
activerecord-firebird-adapter (
fireruby (0.4.3)
rails 2.3.2
firebird version
funziona bene

Le gems per firebird version
ci sono solo per linux quindi non posso provare firebird version
su windows.
Suppongo che il problema sia di fb o fb_adapter.
Qualcuno ha qualche notizia in merito?
Dove posso inviare la segnalazione di errore?

Ciao e grazie per le eventuali risposte.
Mariarosaria T. (Guest)
on 2009-05-25 10:39
Data: 23/05/2009 11:33
Mittente: Brent R.

I can confirm there is a bug interpreting the results of aggregate
operators such as SUM and AVG. I suggest performing these operations
in code, rather than in the database, until a fix can be made.

This topic is locked and can not be replied to.