MySQL Lists are EOL. Please join:

List:MySQL++« Previous MessageNext Message »
From:Dmitry Selin Date:April 26 2011 11:45pm
Subject:crash when using blob on empty table
View as plain text  
i have 3 computers under debian (lenny/sqeezy)
and on one of them latest mysql++ crashes when i'm trying to fetch blob data from empty

code is smth like this

sql_create_4(filesystem,1,4,sql_int,id,sql_blob, fs, sql_tinyint, full_fs,sql_int, ts);
SimFSForDB myDatabase::GetSimFS(IDTYPE simid)
<------>boost::lock_guard<boost::mutex> guard(m_mutexCon);
<------><------><------>Query query = m_Con.query();
<------><------><------>query<<"SELECT id,fs,full_fs,ts FROM
sim_filesystems WHERE id="<<simid<<" AND status>0";
<------><------><------>UseQueryResult res = query.use(); //
Query::store() executes the query and returns the results.
<------><------><------>    Row r = res.fetch_row();//**
<------><------><------>    if(!r.empty()) //**
<------><------><------>    {
<------><------><------><------>filesystem fss = r;//**
<------><------><------><------>return SimFSForDB(simid,
std::string(, fss.fs.size()), fss.full_fs,0, fss.ts);//**
<------><------><------>   }
<------>return SimFSForDB();

i receive "bb" and "cc" messages and no "dd" message. same for no exception (MYCATCH is
macro for all 3 types of exceptions from examples)

and i receive segmentation fault and no exception ...
i receive segfaul even if i comment out  lines marked with **
i think the problem is in UseQueryResult. 
once i change it too StoreQueryResult and query.use() to everything works

-- реклама -----------------------------------------------------------
Никогда не покупали в интернете?
Лучшее место для покупок онлайн -

crash when using blob on empty tableDmitry Selin27 Apr
  • Re: crash when using blob on empty tableWarren Young27 Apr