7 messages in com.mysql.lists.plusplusRe: Query returns substrings and zero...| From | Sent On | Attachments |
|---|---|---|
| mysql++ | 10 Oct 2004 09:42 | |
| Chris Frey | 10 Oct 2004 10:14 | |
| Tobias Bergmann | 11 Oct 2004 00:41 | |
| Chris Frey | 11 Oct 2004 13:50 | |
| Warren Young | 11 Oct 2004 13:58 | |
| Tobias Bergmann | 21 Oct 2004 07:23 | |
| Warren Young | 21 Oct 2004 14:12 |
| Subject: | Re: Query returns substrings and zero-ints![]() |
|---|---|
| From: | Chris Frey (cdf...@netdirect.ca) |
| Date: | 10/11/2004 01:50:30 PM |
| List: | com.mysql.lists.plusplus |
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: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=cdf...@netdirect.ca




