in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

1.0.60 Not Returning The Correct Data

Last post 11-21-2008 4:27 AM by freshj. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-12-2008 12:41 PM

    1.0.60 Not Returning The Correct Data

    When attempting to execute the sql below in version 1.0.60 only one row is returned which is NOT valid.  I downgraded to 1.0.56 and using the same code was able to succesfully retrieve the correct number of row (2030).  Any ideas on what could be the issue?  I did not change a line of code other than that in a config file to point Spring.Net to the 1.0.56 provider.  Thanks.

    SELECT position_id AS 'Position ID', transaction_id AS 'Transaction ID', notional AS 'Notional', locale_short_name AS 'Locale', trade_id AS 'Trade ID', counterparty_name AS 'Counterparty', risk_element_name AS 'Index Name', currency_code AS 'Currency', tenor AS 'Tenor', maturity_date AS 'Maturity', book_name AS 'Book', trader_name AS 'Trader', domain_name AS 'Domain', cluster_name AS 'Cluster', desk_name AS 'Desk', book_type_name AS 'BookType', payment_freqency AS 'Payment Frequency', product_type_code AS 'Product' FROM vw_report_IRS_position_detail WHERE ((book_name = '') AND (product_type_code = 'IRS'))

     

  • 11-12-2008 12:43 PM In reply to

    Re: 1.0.60 Not Returning The Correct Data

    Probably a bug in SQLite that may already be fixed.  I plan on putting build 61 out next week with the latest 3.6.5 engine.

    Until then, try the same query using the sqlite3.exe command-line utility from sqlite.org

     

  • 11-12-2008 5:24 PM In reply to

    Re: 1.0.60 Not Returning The Correct Data

    ok.

    I ran the sql through sqliteman and sqlite maestro to determine the number of rows to be returned.

  • 11-20-2008 2:40 AM In reply to

    Re: 1.0.60 Not Returning The Correct Data

     I alos get wrong results. I tried to isolate it. We have two tables (Tag and TagAssignment) which are joined by a join table (Tag_To_TagAssignment).

    Correct results (showing the data in the database):

    SELECT DBID FROM TagAssignment
    ----------
    1   
    2   
    ----------
    SELECT DBID FROM Tag
    ----------
    1   
    2   
    ----------
    SELECT TagAssignment_FK, Tag_FK FROM Tag_To_TagAssignment
    ----------
    1    2   
    1    1   
    2    1   
    ----------
    NHibernate: SELECT TagAssignment.DBID, Tag_To_TagAssignment.TagAssignment_FK
    FROM
      TagAssignment
        inner join Tag_To_TagAssignment
          on TagAssignment.DBID = Tag_To_TagAssignment.TagAssignment_FK
    WHERE Tag_To_TagAssignment.Tag_FK = '1'
    ----------
    1    1   
    2    2   
    ----------
    NHibernate: SELECT Tag_To_TagAssignment.Tag_FK, Tag.DBID
    FROM
      Tag_To_TagAssignment
        inner join Tag
          on Tag_To_TagAssignment.Tag_FK = Tag.DBID
    WHERE Tag.DBID = '1'
    ----------
    1    1   
    ----------

    Wrong Result:

    NHibernate: SELECT TagAssignment.DBID, Tag_To_TagAssignment.TagAssignment_FK, Tag_To_TagAssignment.Tag_FK, Tag.DBID
    FROM
      TagAssignment
        inner join Tag_To_TagAssignment
          on TagAssignment.DBID=Tag_To_TagAssignment.TagAssignment_FK
        inner join Tag
          on Tag_To_TagAssignment.Tag_FK=Tag.DBID
    WHERE Tag.DBID = '1'
    ----------
    2    2    1    1

    One row is missing.

    Result of same query on 1.0.48.0

    ----------
    1    1    1    1   
    2    2    1    1   
    Filed under: ,
  • 11-20-2008 7:40 AM In reply to

    Re: 1.0.60 Not Returning The Correct Data

    These kinds of problems are typically engine problems rather than wrapper problems and can be confirmed using the command-line version of sqlite3.exe, executing queries directly against the engine.  You can also verify quickly whether or not it was fixed in a subsequent release of the sqlite3 engine when the wrapper falls a version or two behind.

    As it is, the release schedule is a little tweaked right now, since Dr. Hipp just announced SQLite 3.6.6 was going to be pushed at an accelerated timetable.

  • 11-21-2008 2:26 AM In reply to

    Re: 1.0.60 Not Returning The Correct Data

    It was just released the day before yesterday :-)

    I wait until it is included in System.Data.Sqlite.dll, then I can easily find out if the issue is fixed using our current infrastructure. Until then, we stay on the old version we're using.

  • 11-21-2008 4:27 AM In reply to

    Re: 1.0.60 Not Returning The Correct Data

    OK great. Thanks for the follow up.

Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems