<i>A Connection with options can't be duplicated.</i>.
by
anonymous
2018-05-23 14:44:59.
D 2018-05-23T14:44:59.742
J foundin 3.2.2+pristine-2ubuntu3
J icomment If\syou\scall\sConnection::set_option(Option*),\sthen\sConnection::connect(),\sthen\scopy\sthe\sConnection,\r\nthe\scopy\sconstructor\sfor\sthe\snew\sConnection\sobject\swill\stry\sto\sconnect.\r\nHowever,\sthe\sconnection\sattempt\swill\slikely\sfail.\r\n\r\nConnection's\scopy\sconstructor\scalls\sDBDriver's\scopy\sconstructor,\swhich\scalls\sDBDriver::copy().\r\n\r\nDBDriver::copy()\scalls\sDBDriver::connect(MYSQL&),\swhich\scalls\sDBDriver::connect_prepare().\r\n\r\nDBDriver::connect_prepare()\stries\sto\sapply\sany\spending\soptions.\s\r\nHowever,\sif\sthe\soriginal\sConnection\shas\salready\sconnected,\s\r\nit\sdiscarded\sthe\spending\soptions\sin\sits\sDBDriver,\s\r\nso\sthe\snew\sConnection's\sDBDriver\swill\snot\shave\sany\soptions\sapplied.\s\r\nThis\smakes\sit\svery\slikely\sthat\sthe\snew\sobject's\sconnect()\swill\sfail.
J login anonymous
J mimetype text/x-fossil-plain
J private_contact 35b1faba21feb11a7c4f02d66fbf280c2fbfa91e
J severity Important
J status Open
J title A\sConnection\swith\soptions\scan't\sbe\sduplicated.
J type Code\sDefect
K eab08a87eddde94ba8998f018d876e70a96e35d4
U anonymous
Z 652045332b11d8e31baefdf14ed549d6