← Back to team overview

maria-developers team mailing list archive

Re: Query cache information plugin - MDEV-4516

 

ops :( i done tab-space conversion and sql_cache.cc and sql_cache.h are
very big now :(
sending the patch now again


2013/5/25 Roberto Spadim <roberto@xxxxxxxxxxxxx>

> updated files at
> https://mariadb.atlassian.net/browse/MDEV-4581
> too  =)
> i will study lauchpad in some time now, but if possible review the patch
> could be nice
> i don't know if string concats are ok, and if i done some overflow, or bad
> casts... must test
>
> thank :)
>



-- 
Roberto Spadim
SPAEmpresarial

Attachment: diff_sql_cache.cc
Description: Binary data

--- sql_cache.old.h	2013-05-25 20:16:28.882452915 -0300
+++ sql_cache.h	2013-05-25 19:56:04.952276314 -0300
@@ -158,10 +158,22 @@
   ulong len;
   uint8 tbls_type;
   unsigned int last_pkt_nr;
+  ulonglong query_hits_counter;
+  ulonglong cache_insert_time;
+  ulonglong select_expend_time;
+  ulonglong select_lock_time;
+  longlong select_rows_read;
+
 
   Query_cache_query() {}                      /* Remove gcc warning */
   inline void init_n_lock();
   void unlock_n_destroy();
+  inline ulonglong query_expend_time()     { return select_expend_time; }
+  inline ulonglong query_lock_time()       { return select_lock_time; }
+  inline longlong query_rows_read()        { return select_rows_read; }
+  inline longlong query_insert_time()      { return cache_insert_time; }
+  inline ulonglong query_hits()            { return query_hits_counter; }
+  inline void query_hits_add()             { query_hits_counter+=1; }
   inline ulonglong found_rows()            { return limit_found_rows; }
   inline void found_rows(ulonglong rows)   { limit_found_rows= rows; }
   inline Query_cache_block *result()       { return res; }

Follow ups

References