Hi
I've got a really trivial app, based almost line for line on one of the mysql++ samples.
The logic is in a procedure that I call from main.
If I call this procedure twice in a row I get a seg fault on the second call.
If I code the app to call the routine once, but run the whole application two times in a
row, all is well.
This leads me to believe some resource is getting cleaned up after the app exists that's
not getting cleaned up when my proc exits. Any input would be greatly appreciated!
Here's the proc:
try {
Connection conn(DATABASE,HOST,USER,PASSWORD,use_exceptions);
Query query = conn.query();
query << "select server_name_tx from tblTabServer";
Result res = query.store();
Row row;
Result::iterator i;
for (i = res.begin(); i < res.end(); i++) {
row = *i;
cout << row[0] << endl;
}
}
catch(exception &e) {
cout << e.what() << endl;
exit(-1);
}
By the way, I compiled this under RH 7.2 using the g++3 compatibility library.