Skip to content
Snippets Groups Projects
  1. Sep 25, 2014
  2. Sep 23, 2014
    • Bertrand Bellenot's avatar
      From Oliver Freyermuth: Fix a small issue in TSQLiteStatement · 34e10f62
      Bertrand Bellenot authored
      Fix Jira issue #ROOT-6511 TSQLiteStatement: Missing / wrong check for column index, failing IsNull(), as reported by Oliver Freyermuth:
      Finally, my colleagues managed to uncover a small issue in my TSQLiteStatement implementation:
      "IsNull()" checked the column-count in the wrong way (it used the number of bound columns which is only valid in prepared inserts).
      I have done the following changes to TSQLiteStatement in the attached patch:
      1. In fNumPars, I now store either the "bind" columns for a prepared statement with bound parameters, or the number of returned columns for a simple select without binding. This also simplifies error handling and TSQLiteStatement::GetNumFields() now just returns the variable which is correct in both working modes.
      2. All Get'ters now check the column-number consistently, as the SQLite-documentation states that "get"ting an invalid column number returns undefined results. Note that for bound parameters, SQLite behaves differently and does the error handling itself (which I already check in TSQLiteStatement).
      34e10f62
  3. Aug 05, 2014
  4. Jun 06, 2014
  5. Apr 29, 2014
  6. Feb 12, 2014
  7. Jan 31, 2014
    • Danilo Piparo's avatar
      Fix the CMake build · 880fe6d6
      Danilo Piparo authored
      now the library names in the rootmaps are sane.
      In addition, the creation of the tmva and genvector dicts was
      simplified.
      880fe6d6
  8. Jan 21, 2014
  9. Jan 17, 2014
  10. Jan 15, 2014
  11. Jan 12, 2014
  12. Jan 09, 2014
  13. Dec 17, 2013
  14. Dec 05, 2013
  15. Nov 25, 2013
  16. Nov 18, 2013
  17. Oct 30, 2013
  18. Sep 13, 2013
  19. Aug 16, 2013
  20. Aug 01, 2013
    • Philippe Canal's avatar
      Fix Memory leaks when using TPgSQLStatement. See JIRA ROOT-5393 · 055ff090
      Philippe Canal authored
      when recently valgrinding our analysis-software again, I found two leaks stemming from lost pointers to prepared PgSQL-statements in TPgSQLStatement (we just started using the TSQLStatement more often some weeks ago).
      The problem is that the TPgSQLServer already prepares a PGresult and adds a pointer to it to the stmt-structure which is passed to TPgSQLStatement.
      The TPgSQLStatement creates a new prepared statement in its constructor and overrides this pointer with it.
      In TPgSQLStatement:Process(), this pointer is overwritten again.
      
      To not break any existing usecases of this, the attached patch fixes this problem by first PQclear'ing the prepared result if it is not NULL. This fixes both leaks (and at the moment, I do not observe more leaks in our usage of the TPgSQLStatement).
      
      [From Oliver Freyermuth]
      055ff090
  21. Jul 18, 2013
  22. Jul 01, 2013
  23. Jun 30, 2013
    • Fons Rademakers's avatar
      More correct storage format for timestamps. Fix ROOT-5331. · 90dcc10e
      Fons Rademakers authored
      Solution attached as patch:
      - SetTimestamp() writes timestamps of the format "2013-06-30 05:11:01.021"
        to the database and communicates the 3-digit precision (i.e., milliseconds)
        to the user in its comment. 3 digit precision is also what the strftime /
        datetime methods of sqlite use, all other digits are ignored by those methods.
      - GetTimestamp() reads such timestamps, also limiting the fraction-precision
        to 3 digits and communicating that to the user from within the comment.
      
      Patch by Oliver Freyermuth.
      90dcc10e
    • Fons Rademakers's avatar
      More correct storage format for timestamps. Fix ROOT-5330. · 67fcf244
      Fons Rademakers authored
      Solution attached as patch:
      - SetTimestamp() writes timestamps of the format "2013-06-30 05:11:01.021"
        to the database and communicates the 3-digit precision (i.e., milliseconds)
        to the user in its comment. 3 digit precision is also what the strftime /
        datetime methods of sqlite use, all other digits are ignored by those methods.
      - GetTimestamp() reads such timestamps, also limiting the fraction-precision
        to 3 digits and communicating that to the user from within the comment.
      
      Patch by Oliver Freyermuth.
      67fcf244
  24. Jun 28, 2013
  25. Jun 27, 2013
    • Fons Rademakers's avatar
      TSQLite-classes to access sqlite3-databases. See ROOT-5256. · 1ecf8815
      Fons Rademakers authored
      The attached patches add the following classes:
      TSQLiteResult
      TSQLiteRow
      TSQLiteServer
      TSQLiteStatement
      and corresponding integration into both the ROOT-buildsystem and cmake.
      Naturally, also the macro for the plugin-manager is included.
      Patches supplied for ROOT 5.34.08 and current master (as SQL-part is
      rarely changing, this statement should stay valid at least for some months).
      
      Some usage notes:
      
      * The handed path is evaluated as URI by sqlite3, which means it can be
        a relative or absolute path and can even contain additional settings
        as "URI" parameters, which are described in the SQLite-documentation.
      * Functions "{Create,Select,Drop}
        DataBase(s)", "Reload", "Shutdown" are not implemented as SQLite
        operates on one DB per file only. The implemented stub methods return
        appropriate error results.
      * "TSQLiteServer::GetColumns()" is not implemented (i.e. returns error
        and value 0): This is sadly not possible via a query in SQLite by
        their API design. This also means the TableInfo-objects cannot be queried.
      * The result-row-count of a TSQLiteResult is always -1, as SQLite does
        not know the number of result rows before all have been retrieved
        (a valid optimization for a file-only DBMS).
      
      For the person reviewing this patch, please note that the indices of
      bind_parameters in SQLite start from 1, while those for the result-columns
      start from 0.
      
      As this is a rather large featureset to cover and the software of our
      experiment currently only uses a small subset of it (only 'reading'
      statements, and no prepared statements), I also wrote a very simple
      testing-tool which creates a new database with a table with 10 columns
      of very different type, inserts some example data, and rereads that
      data both using a simple Query() and using a prepared Statement().
      This tool and a very short makefile to build it are also attached if
      needed for the review-process. The tool uses the commands described
      in the documentation of the abstract baseclass TSQLStatement to
      simulate real-life behaviour.
      Please note that tool is rather hacked-together without real error-handling,
      as it is not meant for long-term usage, but might be helpful in the
      review-process / adapted to a unit-test.
      
      Apart from the mentioned specifics, nothing is really SQLite-only,
      thus I did not change the documentation of the baseclass in the patch
      (this documentation also lists all SQL-implementations). At least this
      list in the documentation might be extended to make users aware of the
      new implementation.
      
      SQlite plugin provided by Oliver Freyermuth (o.f@cern.ch).
      1ecf8815
  26. Jun 14, 2013
  27. Jun 12, 2013
  28. Jun 11, 2013
  29. Jun 09, 2013
  30. May 29, 2013
  31. May 28, 2013
Loading