Overview
Artifact ID: | f30f248cce8c3e1f469725661c14ca2902cf487afe10a6d5fab3275304ee0c33 |
---|---|
Ticket: | eab08a87eddde94ba8998f018d876e70a96e35d4
A Connection with options can't be duplicated. |
User & Date: | anonymous 2018-05-23 14:44:59 |
Changes
- foundin changed to: "3.2.2+pristine-2ubuntu3"
- icomment:
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.
- login: "anonymous"
- mimetype: "text/x-fossil-plain"
- private_contact changed to: "35b1faba21feb11a7c4f02d66fbf280c2fbfa91e"
- severity changed to: "Important"
- status changed to: "Open"
- title changed to: "A Connection with options can't be duplicated."
- type changed to: "Code Defect"