List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:February 20 2007 12:19pm
Subject:Re: Two bugs in 2.2.0
View as plain text  
Joseph Artsimovich wrote:
> 
> char*
> Query::preview_char()
> {
> 	std::string const str(sbuffer_.str());
>         char* s = new char[str.size() + 1];
>         memcpy(s, str.c_str(), str.size() + 1);
> }

This makes one more copy than is necessary.  Please try the code 
currently in svn, as it should accomplish the same end without the 
double copy.

> 2. Connection copy constructor doesn't work, because it doesn't initialize 
> is_connected_ member, which is then accessed here:
> -----------------------------------
> void
> Connection::copy(const Connection& other)
> {
>         if (connected()) {
>                 disconnect();
>         }

Thanks for letting me know.  It should be fixed in svn now.
Thread
Two bugs in 2.2.0Joseph Artsimovich12 Feb
  • Column sizesgary clark12 Feb
    • Re: Column sizesWarren Young13 Feb
      • Re: Column sizesgary clark16 Feb
        • Re: Column sizesWarren Young16 Feb
          • Re: Column sizesgary clark16 Feb
            • UPDATE routine giving exceptiongary clark16 Feb
              • Re: UPDATE routine giving exceptionJonathan Wakely17 Feb
                • Re: UPDATE routine giving exceptiongary clark18 Feb
                  • Re: UPDATE routine giving exceptionJames Vanns19 Feb
                    • Re: UPDATE routine giving exceptiongary clark19 Feb
                      • Re: UPDATE routine giving exceptiongary clark23 Feb
                        • Re: UPDATE routine giving exceptionWarren Young23 Feb
                          • Re: UPDATE routine giving exceptiongary clark23 Feb
                            • Re: UPDATE routine giving exceptionWarren Young24 Feb
                              • Re: UPDATE routine giving exceptionIan Miller24 Feb
                              • Re: UPDATE routine giving exceptiongary clark24 Feb
                                • Re: UPDATE routine giving exceptiongary clark28 Feb
                                  • Re: UPDATE routine giving exceptionWarren Young1 Mar
                                    • Re: UPDATE routine giving exceptiongary clark1 Mar
                                    • Re: UPDATE routine giving exceptiongary clark19 Mar
                                      • Re: UPDATE routine giving exceptionWarren Young19 Mar
                                        • Re: UPDATE routine giving exceptiongary clark19 Mar
                                          • Re: UPDATE routine giving exceptionWarren Young19 Mar
                                            • Re: UPDATE routine giving exceptiongary clark20 Mar
  • Re: Two bugs in 2.2.0Warren Young20 Feb
    • Re: Two bugs in 2.2.0Joseph Artsimovich20 Feb
      • Re: Two bugs in 2.2.0Jonathan Wakely20 Feb
        • Re: Two bugs in 2.2.0Joseph Artsimovich20 Feb
          • Re: Two bugs in 2.2.0Jonathan Wakely20 Feb
            • Re: Two bugs in 2.2.0Joseph Artsimovich20 Feb
              • Re: Two bugs in 2.2.0Jonathan Wakely20 Feb
        • Re: Two bugs in 2.2.0Warren Young20 Feb