List:MySQL++« Previous MessageNext Message »
From:Joseph Artsimovich Date:February 20 2007 1:55pm
Subject:Re: Two bugs in 2.2.0
View as plain text  
> Why not use the best of both worlds, take a const-reference to the
> string returned by stringbuf::str and then you don't need to care how
> your strings are implemented:
>
> Query::preview_char()
> {
>      std::string const& str(sbuffer_.str());
>      char* s = new char[str.size() + 1];
>      memcpy(s, str.c_str(), str.size() + 1);
> }
That's not going to work, as stringbuf::str() returns by value.
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