summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-11-12 18:08:12 +0100
committerSergei Golubchik <sergii@pisem.net>2011-11-12 18:08:12 +0100
commit557f0d3ad04111e274d709de5fd9879961772210 (patch)
treed7d1767519b4631349ca244a988478f808163919 /plugin
parentdb0aed93482759844af7b39c9bf6e7fe141f28f6 (diff)
parent27095a24f6cb0e8c859c1a3f76050e6b5a6434c6 (diff)
downloadmariadb-git-557f0d3ad04111e274d709de5fd9879961772210.tar.gz
5.2->5.3 merge
Diffstat (limited to 'plugin')
-rw-r--r--plugin/feedback/utils.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc
index f32b527c052..48bbd72d530 100644
--- a/plugin/feedback/utils.cc
+++ b/plugin/feedback/utils.cc
@@ -188,24 +188,24 @@ int fill_plugin_version(THD *thd, TABLE_LIST *tables)
*/
static ulonglong my_getphysmem()
{
+#ifdef _WIN32
+ MEMORYSTATUSEX memstatus;
+ memstatus.dwLength= sizeof(memstatus);
+ GlobalMemoryStatusEx(&memstatus);
+ return memstatus.ullTotalPhys;
+#else
ulonglong pages= 0;
+
#ifdef _SC_PHYS_PAGES
pages= sysconf(_SC_PHYS_PAGES);
-#else
- return 0;
#endif
#ifdef _SC_PAGESIZE
return pages * sysconf(_SC_PAGESIZE);
-#endif
-#ifdef _WIN32
- MEMORYSTATUSEX memstatus;
- memstatus.dwLength= sizeof(memstatus);
- GlobalMemoryStatusEx(&memstatus);
- return memstatus.ullTotalPhys;
#else
return pages * my_getpagesize();
#endif
+#endif
}
/* get the number of (online) CPUs */
@@ -356,6 +356,7 @@ int fill_misc_data(THD *thd, TABLE_LIST *tables)
INSERT1("Cpu_count", (my_getncpus(), UNSIGNED));
#endif
INSERT1("Mem_total", (my_getphysmem(), UNSIGNED));
+ INSERT1("Now", (thd->query_start(), UNSIGNED));
return 0;
}