MySQL++

Ticket Change Details
Login
Overview

Artifact ID: f30f248cce8c3e1f469725661c14ca2902cf487afe10a6d5fab3275304ee0c33
Ticket: eab08a87eddde94ba8998f018d876e70a96e35d4
A Connection with options can't be duplicated.
User & Date: anonymous 2018-05-23 14:44:59
Changes

  1. Change foundin to "3.2.2+pristine-2ubuntu3"
  2. Change icomment to:

    If you call Connection::set_option(Option*), then Connection::connect(), then copy the Connection, the copy constructor for the new Connection object will try to connect. However, the connection attempt will likely fail.

    Connection's copy constructor calls DBDriver's copy constructor, which calls DBDriver::copy().

    DBDriver::copy() calls DBDriver::connect(MYSQL&), which calls DBDriver::connect_prepare().

    DBDriver::connect_prepare() tries to apply any pending options. However, if the original Connection has already connected, it discarded the pending options in its DBDriver, so the new Connection's DBDriver will not have any options applied. This makes it very likely that the new object's connect() will fail.

  3. Change login to "anonymous"
  4. Change mimetype to "text/x-fossil-plain"
  5. Change private_contact to "35b1faba21feb11a7c4f02d66fbf280c2fbfa91e"
  6. Change severity to "Important"
  7. Change status to "Open"
  8. Change title to "A Connection with options can't be duplicated."
  9. Change type to "Code Defect"