diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-11-12 16:47:14 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-11-12 16:47:14 +0100 |
commit | 27095a24f6cb0e8c859c1a3f76050e6b5a6434c6 (patch) | |
tree | 793f6a4bbb8edbc49c12ffb28526ce7f885ca3bb /plugin | |
parent | 755cd443f95f8e6d064b18af3fb0c496b82abfe7 (diff) | |
parent | 5c7aa5f2ae533d395b4c7460d8a388b6326a5add (diff) | |
download | mariadb-git-27095a24f6cb0e8c859c1a3f76050e6b5a6434c6.tar.gz |
5.1 merge
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/feedback/utils.cc | 17 |
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; } |