List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:October 11 2004 8:50pm
Subject:Re: Query returns substrings and zero-ints
View as plain text  
Truncation of data seems like a size or length or count issue that
could easily be 32-bit/64-bit related.  I'm not sure of course, but
to debug such a thing would require a person with a 64-bit setup
stepping through the code and checking the data at every level,
even into the mysql C lib possibly (although if the console client
works, it's likely only in mysql++).

Can you step through with gdb and see if you find anything obvious?
I'd start with your sample code you posted earlier, and step into
the .store() function, and then the operator[] functions.

- Chris

On Mon, Oct 11, 2004 at 09:42:21AM +0200, Tobias Bergmann wrote:
> My test code is nothing special, it does very basic things like the 
> examples. Only the cgi code is different, I wrote something like an own 
> c++ wrapper but the error is everywhere.
> Meanwhile I compiled mysql++ again with -l32 and -lib32 options. I did 
> not find docs for this but a friend told me this makes it 32 bit and 
> "make" accepted these options. I also compiled the test program again 
> after this but the error is still the same.
> The "mysql" console client and mysqlcc on windows work fine btw.
> I just wrote another test program and this gets really strange.
> The only difference is the query:
>     query << "SELECT \""<<argv[1]<<"\" as test";
> and it always works like it should:
> # ./sqltest2 "This is a test string"
> test = "This is a test string" = "This is a test string"
> # ./sqltest2 9283749283
> test = "9283749283" = "9283749283"
> # ./sqltest2 sdlkfjsdlksdflkdsjflksdjlkfj
> test = "sdlkfjsdlksdflkdsjflksdjlkfj" = "sdlkfjsdlksdflkdsjflksdjlkfj"
> Chris Frey wrote:
> >On Sun, Oct 10, 2004 at 06:43:20PM +0200, mysql++ wrote:
> >  
> >
> >>I am moving my mysql++ cgis to a new fedora core 2 64bit server where I 
> >>compiled and installed mysql++-1.7.17
> >>    
> >>
> >
> >I guess the first question to ask is whether the same code works on
> >a 32 bit system with the same library versions.
> >
> >If so, it might be a 64-bit platform porting bug, and someone with access
> >to such a machine would have to debug it.  (I don't have such access)
> >
> >- Chris
> >
> >
> >  
> >
> -- 
> MySQL++ Mailing List
> For list archives:
> To unsubscribe:
Query returns substrings and zero-intsmysql++10 Oct
  • Re: Query returns substrings and zero-intsChris Frey10 Oct
    • Re: Query returns substrings and zero-intsTobias Bergmann11 Oct
      • Re: Query returns substrings and zero-intsChris Frey11 Oct
        • Re: Query returns substrings and zero-intsWarren Young11 Oct
          • Re: Query returns substrings and zero-intsTobias Bergmann21 Oct
            • Re: Query returns substrings and zero-intsWarren Young21 Oct