From: Warren Young Date: April 20 2007 2:45pm Subject: Re: Differences between query constructors List-Archive: http://lists.mysql.com/plusplus/6545 Message-Id: <4628D1FD.2090501@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Joel Fielder wrote: > > Just wondered why there is a difference between the query constructors: No good reason. Probably just because few people actually use the Query copy ctor, so it isn't causing real problems in the field. It's fixed now. > Also, in the first constructor, if success_ is meant to indicate whether > the last query was successful, shouldn't it be left initialised at false > rather than set to true after calling init, assuming that no query took > place? No. Query::success_ indicates more than the result of the last query. It's a flag to indicate whether _anything_ has gone wrong with the object. Notice that you basically get this flag's value when casting Query to bool. The semantics are: Query q; if (q) { // life is good... } else { // panic!! }