Forum: Italian Ruby user group bug fb_adapter / fb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3ee5cbf98593335336c1ee2152ba8eb2?d=identicon&s=25 Mariarosaria Trovato (mariaerre)
on 2009-05-16 15:33
s.o.linux ubuntu server 9.0.4
firebird version 2.1.2.18118
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 <=
'2009/01/02'

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 (1.0.0.9250)
fireruby (0.4.3)
rails 2.3.2
firebird version 2.0.3.12981
funziona bene

Le gems per firebird version 2.1.2.18118
ci sono solo per linux quindi non posso provare firebird version
2.1.2.18118
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.
3ee5cbf98593335336c1ee2152ba8eb2?d=identicon&s=25 Mariarosaria Trovato (mariaerre)
on 2009-05-25 08:39
Confermato:
Data: 23/05/2009 11:33
Mittente: Brent Rowland

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.

Brent
http://rubyforge.org/tracker/index.php?func=detail...
This topic is locked and can not be replied to.