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