Hey Warren,
I ran some tests and am a wee' bit confused on the
outcomes.
Basically I've been trying to track down a problem
which is causing a crash on a Windows XP box using
2.1.1 build.
I'm creating a table with two columns:
guid, VARCHAR(256)
messageData, VARCHAR(20000)
I then populate the table using row:
sql_create_2(clienttransfer,
1,2,
string,guid,
string,messageData)
/**************************************/
clienttransfer row(guid,buffer);
try{
mysqlpp::Query query = _con.query();
query.insert(row);
query.execute();
}
catch (const mysqlpp::Exception & er) {
cout << "Bad Entry::"<<er.what() << endl;
return 1;
}
return SUCCESS;
}
No problem so far. I examine the table and everything
is good.
The problem comes when I attempt to retrieve the data:
mysqlpp::Query query = _con.query();
query << "select * from clienttransfer";
vector<clienttransfer> res;
vector<clienttransfer>::iterator it;
query.storein(res);
The first time function is called all data is accessed
correctly. The second time I access it I get
a crash. I'm storing 8500 bytes in the messageData
column.
at mysqlpp.Query.use(Query *, ResUse *, SByte *)
at mysqlpp.Query.storein_sequence(class
std::vector(struct clienttransfer,class
std::allocator<struct clienttransfer>>>
When I use 8000 bytes for messageData I dont see this
crash.
Ok, so I wanted to isolate the problem. Basically take
the essence of what I'm doing i.e adding and
retrieving the column data and push that into a
separate test project.
I could not recreate the problem. However I think what
is happening is that the second time I access the
table something is not being freed and causing
the crash to happen. If anybody has some idea on how
to isolate the problem that would be great. Since I
dont see a leak, it looks to me like I'm hitting a
memory boundary or something is not being freed in
mysql after first obtaining the data? Any ideas on how
to tackle this would be greatly appreciated.
Thanks,
Garyc
--- Warren Young <mysqlpp@stripped> wrote:
> gary clark wrote:
> > Exceeding that limit caused it to break.
>
> You're going to have to provide a test case for
> this. With this vague
> report of yours, I don't even know what "it" is, or
> what constitutes
> this "break". I can think of a dozen questions I
> could ask to clarify
> this, but I'd rather just see it here.
>
> > Could somebody please enlighten me on the maximum
> > sizes of column types.
>
> MySQL++ imposes no explicit size limitations. If
> something's breaking,
> my instinct is that it's a MySQL limitation, or
> you're running out of
> memory somewhere. If you have the memory and MySQL
> allows you to store
> it, MySQL++ should allow you to access it.
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
>
http://lists.mysql.com/plusplus?unsub=1
>
>