1. 04 Jul, 2016 1 commit
  2. 23 Jun, 2016 2 commits
  3. 14 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4275] Brought Postgresql schema up to MySQL 4.1 content · 67e12a02
      Thomas Markwalder authored
      Postresql schema now supports host reservations with options,
      and lease6 table now includes hardware address and source
      
      src/share/database/scripts/pgsql/dhcpdb_create.pgsql
          Added Schema 3.0 upgrade section:
          - new tables: hosts, dhcp4_options, dhcp6_options,
            ipv6_reservations, lease_hwaddr_source
      
          - lease4Dumpdata() - results now sorted by lease address
      
          - lease6 table - added columns hwaddr, hwtype, hwaddr_source
      
          - lease6DumpHeader() - added labels for new columns
          - lease6DumpData() - added new columns, results now sorted by
            lease address
      
          - schema_vesion - bumped version to 3
      
      src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
          Added drops of new tables
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          - PgSqlLeaseMgr::PgSqlLeaseMgr() - added logic to detect schema
          mismatch between the code and configured database
      
      src/lib/dhcpsrv/pgsql_lease_mgr.h
          - Bumped PG_CURRENT_VERSION from 2 to 3
      
      src/bin/admin/tests/data/pgsql.lease6_dump_test.reference.csv
          - Reordered entries to account for dump function sort order
          - Added values for new columns on lease6 table
      
      src/bin/admin/tests/pgsql_tests.sh.in
          - pgsql_lease_version_test() - changed expected version to 3.0
          - pgsql_lease6_dump_test() - added new column values to inserted rows
      67e12a02
  4. 18 May, 2016 2 commits
  5. 17 May, 2016 1 commit
  6. 16 Dec, 2015 1 commit
  7. 23 Oct, 2015 1 commit
    • Thomas Markwalder's avatar
      [3780] MySQL and Postgres lease managers now exit on fatal error detection · be964a2b
      Thomas Markwalder authored
      src/lib/dhcpsrv/dhcpsrv_messages.mes
          added messages DHCPSRV_MYSQL_FATAL_ERROR, DHCPSRV_PGSQL_FATAL_ERROR
      
      src/lib/dhcpsrv/mysql_lease_mgr.cc
          added MySQL client error code include
      
          MySqlLeaseMgr::checkError() - method is no longer inlined in
          the header.  Expanded to detect unrecoverable errors, log
          them and call exit().
      
      src/lib/dhcpsrv/mysql_lease_mgr.h
          Removed inline implemenation of MySqlLeaseMgr::checkError(),
          and expanded commentary
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          PgSqlLeaseMgr::addLeaseCommon() - now uses checkStatementError()
      
          PgSqlLeaseMgr::checkStatementError() - Expanded to detect
          unrecoverable errors, log them and call exit().
      
      src/lib/dhcpsrv/pgsql_lease_mgr.h
          Expanded commentary for PgSqlLeaseMgr::checkStatementError()
      be964a2b
  8. 13 Oct, 2015 1 commit
  9. 03 Sep, 2015 1 commit
  10. 21 Aug, 2015 2 commits
  11. 20 Aug, 2015 1 commit
  12. 25 Jun, 2015 1 commit
    • Tomek Mrugalski's avatar
      [3681] DataSource class added. · 373aa0a4
      Tomek Mrugalski authored
       - code refactoring after last commit, clean-up, compilation fixes
       - Makefile updates
       - Added new unit-tests for DataSource (mostly moved from LeaseMgr
         unit-tests)
      373aa0a4
  13. 19 Jun, 2015 1 commit
  14. 20 Mar, 2015 1 commit
  15. 21 May, 2014 1 commit
  16. 20 May, 2014 1 commit
  17. 01 May, 2014 3 commits
    • Thomas Markwalder's avatar
      [3382] Replaced hard coded column types with constants · 7bd56487
      Thomas Markwalder authored
      Replaced hard coded numbers for column types in tagged_statements[]
      initialization.
      Replaced test of error message text for duplicate key violations with
      test of the SQL state code.  This is the recommended mechanism as
      error text can be affected by localization and is subject to content
      change.
      7bd56487
    • Thomas Markwalder's avatar
      [3328] Removed use of PgSqlStatementBind · 6d4aff17
      Thomas Markwalder authored
      Unlike, MySQL, PostgreSQL does not return anything to the caller when
      preparing an SQL statement, rather one uses its text name to execute it.
      PgSqlStatementBind was an unecessary duplication of data already available
      in tagged_statements.  This also resolved the unused member complaint from
      cppcheck regarding TaggedStatement::index.
      
      Also corrected two cppchecks in unit tests.
      6d4aff17
    • Thomas Markwalder's avatar
      [3382] Replaced remaining uses of PgSqlParam with PsqlBindArray · 1c6229d0
      Thomas Markwalder authored
      Replaced use of PgSqlParam with PsqlBindArray throughout.
      Updated commentary and general clean up.
      1c6229d0
  18. 30 Apr, 2014 1 commit
  19. 29 Apr, 2014 1 commit
  20. 29 Mar, 2014 1 commit
    • Thomas Markwalder's avatar
      [3080] Replaced use of CURSORs with single step selects · e954809f
      Thomas Markwalder authored
          Changed the SQL statements used to retrieve data to be simple selects
          rather than declared as cursors.  This allows the selects to be executed
          with a single statemen execution, eliminating the need for BEGIN and END
          blocks.
      
          Other minor clean up.
      e954809f
  21. 28 Mar, 2014 1 commit
    • 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
  22. 14 Mar, 2014 1 commit
  23. 11 Mar, 2014 1 commit
    • Tomek Mrugalski's avatar
      [3080] Initial PostgreSQL patch · a3d6102c
      Tomek Mrugalski authored
       - patch contributed by David Carlier (thanks!)
       - updated to current master
       - fixed compliation issues
       - written developer's guide (pgsql setup steps)
       - many smaller changes
       - still WIP
      a3d6102c