Skip to content
  • Thomas Markwalder's avatar
    [3080] Fix build and unit test errors · 6adb8b73
    Thomas Markwalder authored
    Initial review and testing revealed build issues, unit test failures,
    and memory leaks.  With these changes it should build and pass unit testing.
    There are still runtime issues to address.
    
    Changed expire column type in lease tables to be "TIMESTAMP WITH TIME ZONE",
    and added methods to convert to and from such fields to LeaseExchange. This
    corrects mismatched time conversion to and from database which was causing unit tests to fail.
    
    Added constructors to PgSqlParam to eliminate use of ".value" initializers and
    to provide a safe, uniform way to create parameters for binary data. Prior to
    this valgrind was reporting invalid reads when vectors were statically cast
    to char*.
    
    Removed superflous BOOST_STATIC_ASSERT and corrected values tested in remaining
    check.
    
    Removed use of "SET AUTOCOMMIT TO" as it is no longer supported in PostgreSQL.
    
    Altered failure logic in PgSqlLeaseMgr::openDatabase() to release connection
    if it is not NULL. This was causing memory leak in unit tests.
    
    Added PQfinish call to createSchema() function to release the connection to fix
    memory leaks during unit testing.
    
    Cleaned most cppcheck complaints.
    6adb8b73