1. The snippet of C code below sometimes produces the following error: ERROR 2008 (HY000): MySQL client ran out of memory if (!mysql_query(mh, "SELECT * FROM absences WHERE district_id IN 
(37,918,11)")) 

res = mysql_store_result(mh); 
if (res) 

while (ro= mysql_fetch_row(res)) 

printf("%s: %s %s\n", ro[0], ro[1], ro[7]); 



if (mysql_errno(mh)) puts(mysql_error(mh)); Identify probable causes and solutions. 
在查询到的记录是海量的情况下,结果先存储在缓存中,这个操作没有进行判断,所以会造成内存的溢出。是这样理解的吧