BIND 10 #3382: Rework marshaling/unmarshaling logic in PgSqlLeaseManager to use Postgesql bind types

BIND 10 Development do-not-reply at isc.org
Tue Apr 1 12:13:47 UTC 2014


#3382: Rework marshaling/unmarshaling logic in PgSqlLeaseManager to use Postgesql
bind types
--------------------------------------+------------------------------------
                   Reporter:  tmark   |                 Owner:
                       Type:  defect  |                Status:  new
                   Priority:  medium  |             Milestone:  DHCP-Kea0.9
                  Component:  dhcpdb  |              Keywords:
               CVSS Scoring:          |             Sensitive:  0
            Defect Severity:  N/A     |           Sub-Project:  DHCP
Feature Depending on Ticket:          |  Estimated Difficulty:  0
        Add Hours to Ticket:  0       |           Total Hours:  0
                  Internal?:  0       |
--------------------------------------+------------------------------------
 The code to populate the bind arrays for marshaling data to and from
 Postgresql should be restructured.  To build bind arrays to send to
 Postgresql, it first builds a list of PgSqlParams by converting all input
 parameters to std::strings (except hwaddr, client_id, and duid), and binds
 them to c_str() values of these strings.  This causes each parameter to be
 converted first by us to a string and then back to binary by Postgresql.
 Similarly, when retrieving data from the database, it is received as
 string values and then converted.  Heavy use of stringstream is used in
 both directions.

 The code should be structured similar to the MySQL implementation which
 builds the bind arrays directly and uses the MY_SQL data types.  This
 would eliminate the PgSqlParam layer as well as needless conversions to
 and from strings.

-- 
Ticket URL: <http://bind10.isc.org/ticket/3382>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list