[-]
[+]
|
Changed |
cego.changes
|
|
[-]
[+]
|
Changed |
cego.spec
^
|
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Cego 2.20.8.
+# Generated by GNU Autoconf 2.69 for Cego 2.20.9.
#
# Report bugs to <lemke@lemke-it.com>.
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='Cego'
PACKAGE_TARNAME='cego'
-PACKAGE_VERSION='2.20.8'
-PACKAGE_STRING='Cego 2.20.8'
+PACKAGE_VERSION='2.20.9'
+PACKAGE_STRING='Cego 2.20.9'
PACKAGE_BUGREPORT='lemke@lemke-it.com'
PACKAGE_URL=''
@@ -1326,7 +1326,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Cego 2.20.8 to adapt to many kinds of systems.
+\`configure' configures Cego 2.20.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1396,7 +1396,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Cego 2.20.8:";;
+ short | recursive ) echo "Configuration of Cego 2.20.9:";;
esac
cat <<\_ACEOF
@@ -1507,7 +1507,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Cego configure 2.20.8
+Cego configure 2.20.9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2051,7 +2051,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Cego $as_me 2.20.8, which was
+It was created by Cego $as_me 2.20.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2914,7 +2914,7 @@
# Define the identity of the package.
PACKAGE='cego'
- VERSION='2.20.8'
+ VERSION='2.20.9'
cat >>confdefs.h <<_ACEOF
@@ -16776,7 +16776,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Cego $as_me 2.20.8, which was
+This file was extended by Cego $as_me 2.20.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16842,7 +16842,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Cego config.status 2.20.8
+Cego config.status 2.20.9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/configure.ac
^
|
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([Cego], [2.20.8], [lemke@lemke-it.com])
+AC_INIT([Cego], [2.20.9], [lemke@lemke-it.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/samples/cgplustest/Makefile
^
|
@@ -164,13 +164,13 @@
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /Users/lemke/work/cego-2.20.8/missing aclocal-1.14
+ACLOCAL = ${SHELL} /Users/lemke/work/cego-2.20.9/missing aclocal-1.14
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = ar
-AUTOCONF = ${SHELL} /Users/lemke/work/cego-2.20.8/missing autoconf
-AUTOHEADER = ${SHELL} /Users/lemke/work/cego-2.20.8/missing autoheader
-AUTOMAKE = ${SHELL} /Users/lemke/work/cego-2.20.8/missing automake-1.14
+AUTOCONF = ${SHELL} /Users/lemke/work/cego-2.20.9/missing autoconf
+AUTOHEADER = ${SHELL} /Users/lemke/work/cego-2.20.9/missing autoheader
+AUTOMAKE = ${SHELL} /Users/lemke/work/cego-2.20.9/missing automake-1.14
AWK = awk
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -180,7 +180,7 @@
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
-CXXFLAGS = -DCGDEBUG
+CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
@@ -210,7 +210,7 @@
LIPO = lipo
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /Users/lemke/work/cego-2.20.8/missing makeinfo
+MAKEINFO = ${SHELL} /Users/lemke/work/cego-2.20.9/missing makeinfo
MANIFEST_TOOL = :
MKDIR_P = ../.././install-sh -c -d
NM = /usr/bin/nm
@@ -222,21 +222,21 @@
PACKAGE = cego
PACKAGE_BUGREPORT = lemke@lemke-it.com
PACKAGE_NAME = Cego
-PACKAGE_STRING = Cego 2.20.8
+PACKAGE_STRING = Cego 2.20.9
PACKAGE_TARNAME = cego
PACKAGE_URL =
-PACKAGE_VERSION = 2.20.8
+PACKAGE_VERSION = 2.20.9
PATH_SEPARATOR = :
RANLIB = ranlib
SED = /usr/bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
-VERSION = 2.20.8
-abs_builddir = /Users/lemke/work/cego-2.20.8/samples/cgplustest
-abs_srcdir = /Users/lemke/work/cego-2.20.8/samples/cgplustest
-abs_top_builddir = /Users/lemke/work/cego-2.20.8
-abs_top_srcdir = /Users/lemke/work/cego-2.20.8
+VERSION = 2.20.9
+abs_builddir = /Users/lemke/work/cego-2.20.9/samples/cgplustest
+abs_srcdir = /Users/lemke/work/cego-2.20.9/samples/cgplustest
+abs_top_builddir = /Users/lemke/work/cego-2.20.9
+abs_top_srcdir = /Users/lemke/work/cego-2.20.9
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
@@ -266,7 +266,7 @@
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = ${SHELL} /Users/lemke/work/cego-2.20.8/install-sh
+install_sh = ${SHELL} /Users/lemke/work/cego-2.20.9/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/samples/cgwraptest/Makefile
^
|
@@ -164,13 +164,13 @@
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /Users/lemke/work/cego-2.20.8/missing aclocal-1.14
+ACLOCAL = ${SHELL} /Users/lemke/work/cego-2.20.9/missing aclocal-1.14
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = ar
-AUTOCONF = ${SHELL} /Users/lemke/work/cego-2.20.8/missing autoconf
-AUTOHEADER = ${SHELL} /Users/lemke/work/cego-2.20.8/missing autoheader
-AUTOMAKE = ${SHELL} /Users/lemke/work/cego-2.20.8/missing automake-1.14
+AUTOCONF = ${SHELL} /Users/lemke/work/cego-2.20.9/missing autoconf
+AUTOHEADER = ${SHELL} /Users/lemke/work/cego-2.20.9/missing autoheader
+AUTOMAKE = ${SHELL} /Users/lemke/work/cego-2.20.9/missing automake-1.14
AWK = awk
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -180,7 +180,7 @@
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
-CXXFLAGS = -DCGDEBUG
+CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
@@ -210,7 +210,7 @@
LIPO = lipo
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /Users/lemke/work/cego-2.20.8/missing makeinfo
+MAKEINFO = ${SHELL} /Users/lemke/work/cego-2.20.9/missing makeinfo
MANIFEST_TOOL = :
MKDIR_P = ../.././install-sh -c -d
NM = /usr/bin/nm
@@ -222,21 +222,21 @@
PACKAGE = cego
PACKAGE_BUGREPORT = lemke@lemke-it.com
PACKAGE_NAME = Cego
-PACKAGE_STRING = Cego 2.20.8
+PACKAGE_STRING = Cego 2.20.9
PACKAGE_TARNAME = cego
PACKAGE_URL =
-PACKAGE_VERSION = 2.20.8
+PACKAGE_VERSION = 2.20.9
PATH_SEPARATOR = :
RANLIB = ranlib
SED = /usr/bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
-VERSION = 2.20.8
-abs_builddir = /Users/lemke/work/cego-2.20.8/samples/cgwraptest
-abs_srcdir = /Users/lemke/work/cego-2.20.8/samples/cgwraptest
-abs_top_builddir = /Users/lemke/work/cego-2.20.8
-abs_top_srcdir = /Users/lemke/work/cego-2.20.8
+VERSION = 2.20.9
+abs_builddir = /Users/lemke/work/cego-2.20.9/samples/cgwraptest
+abs_srcdir = /Users/lemke/work/cego-2.20.9/samples/cgwraptest
+abs_top_builddir = /Users/lemke/work/cego-2.20.9
+abs_top_srcdir = /Users/lemke/work/cego-2.20.9
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
@@ -266,7 +266,7 @@
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = ${SHELL} /Users/lemke/work/cego-2.20.8/install-sh
+install_sh = ${SHELL} /Users/lemke/work/cego-2.20.9/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/samples/chkdb/chkblow
^
|
@@ -1,3 +1,3 @@
#!/bin/bash
DBHOST=`hostname`
-../../src/cgblow --mode=insert --server=$DBHOST --port=2200 --iset=i:400000,s:8 --table=t1 --tableset=TS1 --user=lemke/lemke --append --interval=1000 --count=500000 --protocol=serial $@
+../../src/cgblow --mode=insert --server=$DBHOST --port=2200 --iset=i:400000,s:8 --table=t1 --tableset=TS1 --user=lemke/lemke --append --interval=1000 --count=50000000 --protocol=serial $@
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/samples/chkdb/chkup
^
|
@@ -4,7 +4,7 @@
export CGEXESHELL
CEGOPROG=../../src/cego
-POOLSIZE=1000
+POOLSIZE=1000000
if [ $# -eq 0 ]
then
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/samples/chkdb/mkdb
^
|
@@ -17,8 +17,8 @@
# PAGESIZE=16384
# PAGESIZE=131072
# PAGESIZE=32768
-# PAGESIZE=8192
-PAGESIZE=4096
+PAGESIZE=8192
+# PAGESIZE=4096
# PAGESIZE=2048
# PAGESIZE=1024
DBHOST=bigmac.local
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/samples/rc/README.FreeBSD
^
|
@@ -13,10 +13,12 @@
3. Copy the cego rc script from this directory to /usr/local/etc/rc.d
-4. Add the following entries to /etc/rc.conf
+4. Add the following sample entries to /etc/rc.conf
- # cego
cego_enable="YES"
- cego_profiles="mydb"
- cego_mydb_tablespc="mydb"
+ cego_profiles="litdb"
+ cego_litdb_conf=/serv/www/www.lemke-it.com/db/litdb
+ cego_litdb_root=/serv/www/www.lemke-it.com/db/litdb
+ cego_litdb_tablespc="lit,fico"
+ cego_litdb_user="lemke"
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/samples/rc/cego
^
|
@@ -31,22 +31,54 @@
flags="--mode=daemon"
-_pidprefix="/var/run/cego"
-pidfile="${_pidprefix}.pid"
+start_cmd="cego_start"
+stop_cmd="cego_stop"
+status_cmd="cego_status"
-command_arg="--mode=daemon"
-_pidprefix="/var/run/cego"
+cegoprog=/usr/local/bin/cego
-flags="--mode=daemon"
+cego_start()
+{
+ echo "Starting cego database ${profile} ..."
+ nohup $cegoprog $command_args &
+}
+
+cego_stop()
+{
+ echo "Stopping cego database ${profile} ..."
+ cgpid=`cat ${cego_root}/${profile}.pid`
+ /bin/echo -n " * Signaling PID:${myPID} ... "
+ kill -INT ${cgpid} || { echo "Failed to signal PID:${cgpid}."; exit 1; }
+ echo "Done."
+ echo " * Waiting for lockfile to clear ..."
+ echo ' This takes a few seconds. Please be patient!'
+ myTimeout=1;
+ while test -e ${cego_root}/${profile}.lck
+ do
+ test ${myTimeout} -ge 60 && { echo "Timeout reached. Exiting."; echo "This is NOT good."; exit 1; }
+ sleep 1
+ myTimeout=`expr ${myTimeout} + 1`;
+ done
+ echo " Lockfile cleared in ${myTimeout} seconds."
+ echo "Database shutdown complete."
+ echo ""
+}
+
+cego_status()
+{
+ if test -e ${cego_root}/${profile}.lck
+ then
+ echo "cego is up and running"
+ else
+ echo "cego is not running"
+ fi
+}
load_rc_config $name
if [ -n "$2" ]; then
profile="$2"
if [ "x${cego_profiles}" != "x" ]; then
- pidfile="${_pidprefix}.${profile}.pid"
-
- echo profile is $profile
eval cego_tablespc="\${cego_${profile}_tablespc:-}"
if [ "x${cego_tablespc}" = "x" ]; then
@@ -55,11 +87,12 @@
eval cego_conf="\${cego_${profile}_conf:-${cego_conf}}"
eval cego_root="\${cego_${profile}_root:-${cego_root}}"
+ eval cego_user="\${cego_${profile}_user:-${cego_user}}"
required_files="${cego_conf}/${profile}.xml"
eval cego_enable="\${cego_${profile}_enable:-${cego_enable}}"
- command_args="--dbxml=${required_files} --tableset=${cego_tablespc} --lockfile=${cego_root}/${profile}.lck --logfile=${cego_root}/${profile}.log"
- echo "Setting command_args $command_args"
+ command_args="--mode=daemon --dbxml=${required_files} --tableset=${cego_tablespc} --lockfile=${cego_root}/${profile}.lck --logfile=${cego_root}/${profile}.log --pidfile=${cego_root}/${profile}.pid"
+ # echo "Setting command_args $command_args"
else
warn "$0: extra argument ignored"
fi
@@ -99,10 +132,9 @@
fi
fi
-
cego_requirepidfile()
{
- if [ ! "0`check_pidfile ${pidfile} ${command}`" -gt 1 ]; then
+ if [ ! "0`check_pidfile ${cego_root}/${profile}.pid ${command}`" -gt 1 ]; then
err 1 "${name} not running? (check $pidfile)."
fi
}
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/src/CegoAdmin.cc
^
|
@@ -563,19 +563,20 @@
cout << " [b0] set logmng '<progname>' [ timeout <intval> ]" << endl;
cout << " [b1] list archlog for <tableset>" << endl;
cout << " [b2] enable archlog for <tableset>" << endl;
- cout << " [b3] disable archlog for <tableset>" << endl;
- cout << " [b4] add archlog <archid> path '<archpath>' to <tableset>" << endl;
- cout << " [b5] remove archlog <archid> from <tableset>" << endl;
- cout << " [b6] begin backup for <tableset> [ message 'system message' ]" << endl;
- cout << " [b7] end backup for <tableset> [ message 'system message' ] [ keep ticket ]" << endl;
- cout << " [b8] recover tableset <tableset> [ to <point in time> ]" << endl;
- cout << " [b9] export [ xml | binary | plain ] table <table> from <tableset> to '<filename>'" << endl;
- cout << " [b10] export [ xml | binary | plain ] tableset [ structure ] <tableset> to '<filename>'" << endl;
- cout << " [b11] import [ xml | binary | plain ] table <table> to <tableset> from '<filename>' [ nologging ]" << endl;
- cout << " [b12] import [ xml | binary | plain ] tableset [ structure ] <tableset> from '<filename>' [ nologging ]" << endl;
- cout << " [b13] list bustat for <tableset>" << endl;
- cout << " [b14] reset bustat for <tableset>" << endl;
- cout << " [b15] show logmng" << endl;
+ cout << " [b3] enable autocorrect for <tableset>" << endl;
+ cout << " [b4] disable archlog for <tableset>" << endl;
+ cout << " [b5] add archlog <archid> path '<archpath>' to <tableset>" << endl;
+ cout << " [b6] remove archlog <archid> from <tableset>" << endl;
+ cout << " [b7] begin backup for <tableset> [ message 'system message' ]" << endl;
+ cout << " [b8] end backup for <tableset> [ message 'system message' ] [ keep ticket ]" << endl;
+ cout << " [b9] recover tableset <tableset> [ to <point in time> ]" << endl;
+ cout << " [b10] export [ xml | binary | plain ] table <table> from <tableset> to '<filename>'" << endl;
+ cout << " [b11] export [ xml | binary | plain ] tableset [ structure ] <tableset> to '<filename>'" << endl;
+ cout << " [b12] import [ xml | binary | plain ] table <table> to <tableset> from '<filename>' [ nologging ]" << endl;
+ cout << " [b13] import [ xml | binary | plain ] tableset [ structure ] <tableset> from '<filename>' [ nologging ]" << endl;
+ cout << " [b14] list bustat for <tableset>" << endl;
+ cout << " [b15] reset bustat for <tableset>" << endl;
+ cout << " [b16] show logmng" << endl;
cout << endl;
cout << " You can get a detailed help for each command by typing \"help <topic>\"," << endl;
cout << " where topic is the identifier in in the square brackets ( e.g. help t1; )" << endl;
@@ -1263,6 +1264,15 @@
cout << endl;
}
else if ( topic == Chain("b3"))
+ {
+ cout << endl;
+ cout << "enable autocorrect for <tableset>" << endl;
+ cout << "-------------------------------------------------------------" << endl;
+ cout << endl;
+ cout << " Enables automatic index correction for the given tableset." << endl;
+ cout << endl;
+ }
+ else if ( topic == Chain("b4"))
{
cout << endl;
cout << "disable archlog for <tableset>" << endl;
@@ -1271,7 +1281,7 @@
cout << " Disables archive log mode for the given tableset." << endl;
cout << endl;
}
- else if ( topic == Chain("b4"))
+ else if ( topic == Chain("b5"))
{
cout << endl;
cout << "add archlog <archid> path '<archpath>' to <tableset>" << endl;
@@ -1280,7 +1290,7 @@
cout << " Adds the specified archlog destination to the given tableset" << endl;
cout << endl;
}
- else if ( topic == Chain("b5"))
+ else if ( topic == Chain("b6"))
{
cout << endl;
cout << "remove archlog <archlog> from <tableset>" << endl;
@@ -1288,7 +1298,7 @@
cout << " Removes the specified archlog destination from the given tableset" << endl;
cout << endl;
}
- else if ( topic == Chain("b6"))
+ else if ( topic == Chain("b7"))
{
cout << endl;
cout << "begin backup for <tableset>" << endl;
@@ -1299,7 +1309,7 @@
cout << " If any recovery is required, the original page is restored during logfile recovery" << endl;
cout << endl;
}
- else if ( topic == Chain("b7"))
+ else if ( topic == Chain("b8"))
{
cout << endl;
cout << "end backup for <tableset>" << endl;
@@ -1309,7 +1319,7 @@
cout << " Normally this is done, after backup has been finished for all datafiles." << endl;
cout << endl;
}
- else if ( topic == Chain("b8"))
+ else if ( topic == Chain("b9"))
{
cout << endl;
cout << "recover tableset <tableset> [ to <point in time>]" << endl;
@@ -1330,7 +1340,7 @@
cout << endl;
}
- else if ( topic == Chain("b9"))
+ else if ( topic == Chain("b10"))
{
cout << endl;
cout << "export [ xml | binary | plain ] table <tablename> from <tableset> to '<filename>'" << endl;
@@ -1340,7 +1350,7 @@
cout << " Either xml, binary or plain export mode can be used. If no mode is specified, xml mode is used." << endl;
cout << endl;
}
- else if ( topic == Chain("b10"))
+ else if ( topic == Chain("b11"))
{
cout << endl;
cout << "export [ xml | binary | plain ] tableset [ structure ] <tableset> to '<filename>'" << endl;
@@ -1353,7 +1363,7 @@
cout << endl;
}
- else if ( topic == Chain("b11"))
+ else if ( topic == Chain("b12"))
{
cout << endl;
cout << "import [ xml | binary | plain ] table <tablename> to <tableset> from '<filename>'" << endl;
@@ -1363,7 +1373,7 @@
cout << " Either xml, binary or plain export mode can be used. If no mode is specified, xml mode is used." << endl;
cout << endl;
}
- else if ( topic == Chain("b12"))
+ else if ( topic == Chain("b13"))
{
cout << endl;
cout << "import [ xml | binary | plain ] tableset [ structure ] <tableset> from '<filename>'" << endl;
@@ -1375,7 +1385,7 @@
cout << " Either xml, binary or plain export mode can be used. If no mode is specified, xml mode is used." << endl;
cout << endl;
}
- else if ( topic == Chain("b13"))
+ else if ( topic == Chain("b14"))
{
cout << endl;
cout << "list bustat for <tableset>" << endl;
@@ -1384,7 +1394,7 @@
cout << " Lists the online backup statistics for the given tableset." << endl;
cout << endl;
}
- else if ( topic == Chain("b14"))
+ else if ( topic == Chain("b15"))
{
cout << endl;
cout << "reset bustat for <tableset>" << endl;
@@ -1393,7 +1403,7 @@
cout << " Resets the online backup statistics for the given tableset." << endl;
cout << endl;
}
- else if ( topic == Chain("b15"))
+ else if ( topic == Chain("b16"))
{
cout << endl;
cout << "show logmng" << endl;
@@ -1402,7 +1412,6 @@
cout << " Prints the current log manager configuration" << endl;
cout << endl;
}
-
else
{
helpOverview();
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/src/CegoBTreeManager.cc
^
|
@@ -51,11 +51,6 @@
int fileId = _pBTO->getDataFileId();
int pageId = _pBTO->getDataPageId();
- if ( fileId == 0 && pageId == 0 )
- {
- throw Exception(EXLOC, Chain("BTree object is not valid"));
- }
-
_rootFixed = false;
}
@@ -70,6 +65,11 @@
{
int fileId = _pBTO->getDataFileId();
int pageId = _pBTO->getDataPageId();
+
+ if ( fileId == 0 && pageId == 0 )
+ {
+ throw Exception(EXLOC, Chain("BTree object is not valid"));
+ }
// cout << "Fixing root page " << fileId << " " << pageId << endl;
_pDBMng->bufferFix(_rootBP, _tabSetId, fileId, pageId, CegoBufferPool::NOSYNC, _pObjMng->getLockHandler());
@@ -79,10 +79,11 @@
void CegoBTreeManager::unfixRoot()
{
- // cout << "Unfixing root .." << _rootBP.getFileId() << " " << _rootBP.getPageId() << endl;
- _pDBMng->bufferUnfix(_rootBP, true, _pObjMng->getLockHandler());
- _rootFixed = false;
- // cout << "Unfixed .." << endl;
+ if ( _rootFixed )
+ {
+ _pDBMng->bufferUnfix(_rootBP, true, _pObjMng->getLockHandler());
+ _rootFixed = false;
+ }
}
@@ -134,6 +135,11 @@
{
fileId = _pBTO->getDataFileId();
pageId = _pBTO->getDataPageId();
+
+ if ( fileId == 0 && pageId == 0 )
+ {
+ throw Exception(EXLOC, Chain("2 : BTree object is not valid"));
+ }
}
bool isInserted = false;
@@ -768,7 +774,7 @@
CegoBufferPage bp;
while ( parentPageStack.Pop(bp) )
{
- _pDBMng->bufferUnfix(bp, true, _pObjMng->getLockHandler());
+ _pDBMng->bufferUnfix(bp, true, _pObjMng->getLockHandler());
}
throw e;
}
@@ -785,10 +791,23 @@
{
int firstLeafFileId = 0, firstLeafPageId = 0;
bool isFirst = true;
- int pageCount = freeNodePages(_pBTO->getDataFileId(), _pBTO->getDataPageId(), firstLeafFileId, firstLeafPageId, isFirst);
+ int fileId = _pBTO->getDataFileId();
+ int pageId = _pBTO->getDataPageId();
+
+ int pageCount;
+
+ if ( fileId == 0 && pageId == 0 )
+ {
+ pageCount = 0;
+ }
+ else
+ {
+ pageCount = freeNodePages(fileId, pageId, firstLeafFileId, firstLeafPageId, isFirst);
+ pageCount += freeLeafPages(firstLeafFileId, firstLeafPageId);
+ }
// cout << "Freeing leaf pages starting with " << firstLeafFileId << "/" << firstLeafPageId << endl;
- pageCount += freeLeafPages(firstLeafFileId, firstLeafPageId);
+
// cout << "Freed " << pageCount << " pages " << endl;
return pageCount;
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/src/CegoDistManager.cc
^
|
@@ -2260,6 +2260,32 @@
pIdx = idxList.Next();
}
+
+
+ // correct btrees
+ CegoBTreeObject *pBTree = btreeList.First();
+ while ( pBTree )
+ {
+
+ if ( pBTree->isValid() == false )
+ {
+
+ errorCount++;
+
+ dropBTree(tabSetId, pBTree->getName());
+ createBTree(tabSetId, pBTree->getName(), pBTree->getTabName(), pBTree->getSchema(), pBTree->getType());
+
+ Chain tableStatus = Chain("BTree ") + pBTree->getName() + Chain(" was corrected");
+ Element *pTableCheck = new Element(XML_CHECK_ELEMENT);
+ pTableCheck->setAttribute(XML_TYPE_ATTR, Chain("Table"));
+ pTableCheck->setAttribute(XML_NAME_ATTR, tableName);
+ pTableCheck->setAttribute(XML_VALUE_ATTR, tableStatus);
+ pCorrection->addContent(pTableCheck);
+
+ }
+
+ pBTree = btreeList.Next();
+ }
if ( errorCount == 0 )
{
|
[-]
[+]
|
Changed |
cego-2.20.9.tar.bz2/src/CegoObjectManager.cc
^
|
@@ -34,7 +34,7 @@
{
_pDBMng = pDBMng;
_pLockHandle = new CegoLockHandler(pDBMng);
- _ignoreInvalid = true;
+ _ignoreInvalid = false;
_modId = _pDBMng->getModId("CegoObjectManager");
}
@@ -832,6 +832,7 @@
btoe.decode(pE);
CegoBTreeManager btreeMng(this, &btoe);
+
int freedPages = btreeMng.freeBTree();
bp.freeEntry(pE);
@@ -3693,10 +3694,16 @@
CegoBTreeManager btreeMng(this, &bto);
- btreeMng.fixRoot();
- pageCount = btreeMng.getNumPages();
- btreeMng.unfixRoot();
-
+ if ( fileId == 0 && pageId == 0 )
+ {
+ pageCount=0;
+ }
+ else
+ {
+ btreeMng.fixRoot();
+ pageCount = btreeMng.getNumPages();
+ btreeMng.unfixRoot();
+ }
}
else
{
|