Merge lp:~vkolesnikov/pbxt/pbxt-xtstat-windows into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-xtstat-windows
Merge into: lp:pbxt
Diff against target: None lines
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-xtstat-windows
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+9425@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

we will need to update our web-site documentation to mention xtstat's CMakeLists.txt file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2009-07-22 08:35:24 +0000
+++ ChangeLog 2009-07-28 14:28:57 +0000
@@ -3,6 +3,8 @@
33
4------- 1.0.09 RC2 - Not released yet4------- 1.0.09 RC2 - Not released yet
55
6RN260: Updated xtstat to compile on Windows/MS Visual C++
7
6RN259: Fixed bug 377788: Cannot find index for FK, fixed buffer overflow8RN259: Fixed bug 377788: Cannot find index for FK, fixed buffer overflow
79
8RN258: updated xt_p_join implementation for Windows to check if a thread has already exited or has not yet started10RN258: updated xt_p_join implementation for Windows to check if a thread has already exited or has not yet started
911
=== added file 'bin/CMakeLists.txt'
--- bin/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ bin/CMakeLists.txt 2009-07-29 12:56:00 +0000
@@ -0,0 +1,34 @@
1# Copyright (c) 2008 PrimeBase Technologies GmbH
2#
3# PrimeBase XT
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#
19# 2006-03-22 Paul McCullagh
20#
21# H&G2JCtL
22#
23# This file is used to make the Windows version
24
25SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DDEBUG")
26SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DDEBUG")
27
28INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
29 ${CMAKE_SOURCE_DIR}/storage/pbxt/src)
30
31SET(PBXTSTAT_SOURCES xtstat_xt.cc)
32
33ADD_EXECUTABLE(xtstat_xt ${PBXTSTAT_SOURCES})
34TARGET_LINK_LIBRARIES(xtstat_xt mysqlclient_notls wsock32 pbxt)
035
=== modified file 'bin/xtstat_xt.cc'
--- bin/xtstat_xt.cc 2008-12-22 14:29:21 +0000
+++ bin/xtstat_xt.cc 2009-07-28 14:28:57 +0000
@@ -95,6 +95,10 @@
95 { OPT_NONE, 0, NULL, 0, NULL, 0, false }95 { OPT_NONE, 0, NULL, 0, NULL, 0, false }
96};96};
9797
98#ifdef XT_WIN
99#define atoll _atoi64
100#endif
101
98void add_statistic(int stat)102void add_statistic(int stat)
99{103{
100 /* Check if column has already been added: */104 /* Check if column has already been added: */
@@ -741,19 +745,17 @@
741 else if (meta->sm_flags & XT_STAT_PERCENTAGE) {745 else if (meta->sm_flags & XT_STAT_PERCENTAGE) {
742 double perc = 100;746 double perc = 100;
743 switch (stat) {747 switch (stat) {
744 case XT_STAT_REC_CACHE_USAGE: perc = record_cache_size; break;748 case XT_STAT_REC_CACHE_USAGE: perc = (double)record_cache_size; break;
745 case XT_STAT_IND_CACHE_USAGE: perc = index_cache_size; break;749 case XT_STAT_IND_CACHE_USAGE: perc = (double)index_cache_size; break;
746 case XT_STAT_XLOG_CACHE_USAGE: perc = log_cache_size; break;750 case XT_STAT_XLOG_CACHE_USAGE: perc = (double)log_cache_size; break;
747 }751 }
748 format_percent_value(str_value, value, perc);752 format_percent_value(str_value, value, perc);
749 len = 4;753 len = 4;
750 }754 }
751 else if (meta->sm_flags & XT_STAT_DATE) {755 else if (meta->sm_flags & XT_STAT_DATE) {
752 time_t ticks = (time_t) value;756 time_t ticks = (time_t) value;
753 struct tm ltime;757 const struct tm *ltime = localtime(&ticks);
754758 strftime(str_value, 99, "%y%m%d %H:%M:%S", ltime);
755 localtime_r(&ticks, &ltime);
756 strftime(str_value, 99, "%y%m%d %H:%M:%S", &ltime);
757 len = 15;759 len = 15;
758 }760 }
759 else if (meta->sm_flags & XT_STAT_BYTE_COUNT)761 else if (meta->sm_flags & XT_STAT_BYTE_COUNT)

Subscribers

People subscribed via source and target branches