--- sql_cache.old.cc	2013-05-25 16:45:36.910881944 -0300
+++ sql_cache.cc	2013-05-25 17:35:31.561225960 -0300
@@ -1114,6 +1114,7 @@
 
   header->result(result);
   header->last_pkt_nr= pkt_nr;
+  header->query_hits_counter= 0;
   BLOCK_UNLOCK_WR(query_block);
   DBUG_EXECUTE("check_querycache",check_integrity(0););
 
@@ -1549,8 +1550,12 @@
 	inserts++;
 	queries_in_cache++;
 	thd->query_cache_tls.first_query_block= query_block;
-	header->writer(&thd->query_cache_tls);
+	header->query_hits_counter=0;
+	header->select_expend_time=0; /* TODO -> put select expent time to execute the query  */
+	header->select_rows_read  =0; /* TODO -> put rows read from disk to execute the query */
+        header->writer(&thd->query_cache_tls);
 	header->tables_type(tables_type);
+	
 
         unlock();
 
@@ -1914,11 +1919,12 @@
     goto err_unlock;
   }
   DBUG_PRINT("qcache", ("Query in query hash 0x%lx", (ulong)query_block));
-
+  
   /* Now lock and test that nothing changed while blocks was unlocked */
   BLOCK_LOCK_RD(query_block);
 
   query = query_block->query();
+  
   result_block= query->result();
 #ifndef EMBEDDED_LIBRARY
   first_result_block= result_block;
@@ -2041,6 +2047,7 @@
       DBUG_PRINT("qcache", ("handler allow caching %s,%s",
 			    table_list.db, table_list.alias));
   }
+  query->query_hits_add();
   move_to_query_list_end(query_block);
   hits++;
   unlock();
