------=_Part_53_20076240.1113005132350
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi, I'm trying to get MySQL++ working but it keeps crashing.
The steps I followed are:
1) Install MySQL Server 4.1 (windows installation ~30 mbs) under "c:\mysql\=
"
2) Installed MySQL++ 1.7.32 under "c:\mysql++-1.7.32\"
3) Created a user with "all privileges" on mysql samples databases
4) Compiled without any problem all samples
5) Runned without problems the reset_db sample
But,
I get a crash with every sample when trying to get the result after a query=
..
On the sample side, it crashes on "mysqlpp::Result res =3D query.store();"
Here is the call stack after crash :
Quote:
msvcr71d.dll!strlen() Line 78 Asm
msvcp71d.dll!std::char_traits<char>::length(const char * _First=3D0x0000000=
|
0)=20
Line 442 + 0x9 C++
msvcp71d.dll!std::basic_string<char,std::char_trai ts<char>,std::allocator<c=
har>=20
Quote:
::assign(const char * _Ptr=3D0x00000000) Line 622 + 0x9 C++
msvcp71d.dll!std::basic_string<char,std::char_trai ts<char>,std::allocator<c=
|
har>=20
Quote:
: perator=3D(const char * _Ptr=3D0x00000000) Line 473 C++
simple1.exe!mysqlpp::ResUse::ResUse(st_mysql_res * result=3D0x00451380,=20
|
mysqlpp::Connection * m=3D0x00000000, bool te=3Dfalse) Line 32 + 0x1c C++
simple1.exe!mysqlpp::Result::Result(st_mysql_res * result=3D0x00451380, boo=
l=20
te=3Dfalse) Line 156 + 0x38 C++
simple1.exe!mysqlpp::Connection::store(const=20
std::basic_string<char,std::char_traits<char>,std: :allocator<char> > &=20
str=3D{...}, bool throw_excptns=3Dtrue) Line 237 + 0xe C++
simple1.exe!mysqlpp::Connection::store(const=20
std::basic_string<char,std::char_traits<char>,std: :allocator<char> > &=20
str=3D{...}) Line 140 + 0x16 C++
simple1.exe!mysqlpp::Query::store(mysqlpp::SQLQuer yParms & p=3D{...}) Line =
57=20
+ 0x49 C++
simple1.exe!mysqlpp::Query::store() Line 90 + 0x33 C++
simple1.exe!print_stock_table(mysqlpp::Query & query=3D{...}) Line 25 + 0xc=
=20
C++
simple1.exe!main(int argc=3D4, char * * argv=3D0x003566b8) Line 24 + 0xc C+=
+
simple1.exe!mainCRTStartup() Line 398 + 0x11 C
kernel32.dll!7c816d4f()=20
ntdll.dll!7c925b4f()=20
kernel32.dll!7c8399f3()=20
Looks like the problem begins with "operator=3D" with parameter NULL as cha=
r*,=20
it then tries to do a strlen on that NULL pointer and crashes.
The line calling this is under MySQL++ "result.cpp" file :"_table =3D=20
fields(0).table;"
I think this is the "operator=3D" called.
I'll keep looking into this but maybe some mysql++ developer can help me
Thanks a lot,
"SanctusAnimus"
Who hates debugging "stl" stuff
------=_Part_53_20076240.1113005132350--