Skip to content

Commit

Permalink
提交代码
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxuan.lc committed Mar 4, 2013
1 parent e8777d8 commit 99d8852
Show file tree
Hide file tree
Showing 2,848 changed files with 645,612 additions and 0 deletions.
340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

Empty file added ChangeLog
Empty file.
40 changes: 40 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
EXTRA_DIST=build.sh rpm/oceanbase.spec svn_dist_version

if WITH_TEST_CASE
TEST_DIR:=tests
endif
SUBDIRS=src $(TEST_DIR) tools
DIST_SUBDIRS=src tests tools

utest: check

.PHONY: utest

ABS_PATH=$(shell pwd)
TMP_DIR := /$(ABS_PATH)/oceanbase-tmp.$(shell echo $$$$)
PREFIX := $(shell [ x$(PREFIX) = x ] && PREFIX=/usr/local/oceanbase-$(VERSION) && echo "$${PREFIX}")
RELEASE := $(shell [ x$(RELEASE) = x ] && RELEASE="0" && echo "$${RELEASE}")
rpms:
make dist-gzip rpm/oceanbase.spec
mkdir -p $(TMP_DIR)
mkdir -p $(TMP_DIR)/BUILD
mkdir -p $(TMP_DIR)/RPMS
mkdir -p $(TMP_DIR)/SOURCES
mkdir -p $(TMP_DIR)/SRPMS
cp oceanbase-${VERSION}.tar.gz $(TMP_DIR)/SOURCES
echo $(PREFIX)
echo "RELEASE:$(RELEASE)"
cd $(TMP_DIR)/BUILD; \
tar xfz $(TMP_DIR)/SOURCES/oceanbase-${VERSION}.tar.gz \
oceanbase-$(VERSION)/rpm/oceanbase.spec
rpmbuild --define "_topdir $(TMP_DIR)" \
--define "NAME $(PACKAGE)" \
--define "VERSION $(VERSION)" \
--define "_prefix $(PREFIX)" \
--define "RELEASE $(RELEASE)" \
-ba $(TMP_DIR)/BUILD/oceanbase-$(VERSION)/rpm/oceanbase.spec
find $(TMP_DIR)/RPMS/ -name "*.rpm" -exec mv '{}' . \;
rm -rf $(TMP_DIR)

# rules to auto generate svn_version.cpp
include $(top_srcdir)/svn_version.mk
Empty file added NEWS
Empty file.
2 changes: 2 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
last merge dev log
2011-08-22 14:40:51 merge from dev 5023:5506 to 0.3 version
Empty file added authors
Empty file.
37 changes: 37 additions & 0 deletions auto_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
#

function usage()
{
echo "auto_tests.sh directory_name"
exit 1
}

# parse command line
TEST_NAME_PATTERN=""
if [ $# -eq 1 ]
then
true
else
usage
fi

TESTS=`find $1 -type f -perm /100 \( -name "test_*" -o -name "*_test" \)`
TOPDIR=`pwd`

for T in $TESTS
do
if [ -n $TEST_NAME_PATTERN ]
then
case $T in
*${TEST_NAME_PATTERN}*) ;;
*) continue ;;
esac
fi
D=`dirname $T`
F=`basename $T`
echo "[****************] RUN TEST $F IN $D"
cd $D
./$F 2>&1
cd $TOPDIR
done
32 changes: 32 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

export AUTOM4TE="autom4te"
export AUTOCONF="autoconf"

case "x$1" in
xinit)
set -x
aclocal
libtoolize --force --copy --automake
autoconf --force
automake --foreign --copy --add-missing
;;
xclean)
echo 'cleaning...'
make distclean >/dev/null 2>&1
rm -rf autom4te.cache
for fn in aclocal.m4 configure config.guess config.sub depcomp install-sh \
ltmain.sh libtool missing mkinstalldirs config.log config.status Makefile; do
rm -f $fn
done

find . -name Makefile.in -exec rm -f {} \;
find . -name Makefile -exec rm -f {} \;
find . -name .deps -prune -exec rm -rf {} \;
echo 'done'
;;
*)
./configure
;;
esac

147 changes: 147 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
AC_INIT([OceanBase],
[0.3.1.2],
[[email protected]],
[oceanbase])

obapi_version="1.0.0"
AC_SUBST(obapi_version)

AC_PROG_LIBTOOL
AM_INIT_AUTOMAKE(oceanbase, 0.3.1.2)
ac_default_prefix=${HOME}/oceanbase_bin
AC_PROG_CXX
AC_LANG([C++])
AC_ARG_WITH([tblib-root],
AS_HELP_STRING([--with-tblib-root],
[tbnet installation path]),
TBLIB_ROOT=${withval})

if ! test -d "${TBLIB_ROOT}/include"; then
AC_MSG_ERROR([TBLIB_ROOT have not been set])
exit 1;
fi
dnl tbnet include path supplied
AC_SUBST([TBLIB_ROOT])

AC_ARG_WITH([release],
AS_HELP_STRING([--with-release],
[use optimize (default is NO)]),
[
if test "$withval" = "yes"; then
CXXFLAGS="-g -O2 -D_NO_EXCEPTION -DCOMPATIBLE -finline-functions \
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG\
-Wall -Werror -Wextra -Wunused-parameter -Wformat -fno-strict-aliasing \
-Wconversion -Wno-deprecated -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 \
-D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" #-lprofiler
fi
],
[ CXXFLAGS="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_NO_EXCEPTION -DCOMPATIBLE \
-Wall -Werror -Wextra -Wunused-parameter \
-Wformat -Wconversion -Wno-deprecated -fno-strict-aliasing -g"]
)

#check gcc version, add -Wno-ignored-qualifiers flag for gcc version greater than 4.3.0
GCC_VERSION=`$CC -dumpversion`
if test $? -eq 0; then
major=`echo $GCC_VERSION | cut -d. -f1`
minor=`echo $GCC_VERSION | cut -d. -f2`
fi
if test $major -eq 4 -a $minor -ge 3 ; then
CXXFLAGS="${CXXFLAGS} -Wno-ignored-qualifiers"
fi

AC_ARG_WITH([test_case],
AS_HELP_STRING([--with-test-case],
[with test case (default is YES)]),
[
if test "$withval" = "no"; then
test_case=no
fi
],
[ test_case=yes ]
)

AC_ARG_WITH([coverage],
AS_HELP_STRING([--with-coverage],
[with coverage (default is NO)]),
[
if test "$withval" = "yes"; then
coverage=yes
fi
],
[coverage=no]
)

AC_ARG_VAR([RELEASEID], [release number when building in Taobao ABS])
AC_DEFINE_UNQUOTED([RELEASEID], "$RELEASEID")

AM_CONDITIONAL([WITH_TEST_CASE], test x$test_case = xyes )

AM_CONDITIONAL([COVERAGE], test x$coverage = xyes )

dnl see whether subversion is installed
AC_PATH_PROG(svnversioncommand, svnversion)

dnl use svnversion to record the current repository revision only if
dnl subversion is installed and we are in a working copy
if test "X$svnversioncommand" = "X" || test `$svnversioncommand -n '.'` = "exported"; then
mysvnversion="cat \$(top_srcdir)/svn_dist_version"
AM_CONDITIONAL([HAVESVNWC], false)
else
mysvnversion="svnversion -n '.'"
AM_CONDITIONAL([HAVESVNWC], true)
fi

AC_SUBST(mysvnversion)

AC_CONFIG_FILES([\
Makefile \
tools/Makefile \
tools/olapdrive/Makefile \
tools/syschecker/Makefile \
tools/syschecker/client/Makefile \
tools/msync/Makefile \
tools/sqltest/Makefile \
tools/bigquerytest/Makefile \
tools/dump/Makefile \
tools/dump/scripts/Makefile \
tools/obadmin/Makefile \
src/Makefile \
src/common/Makefile \
src/common/compress/Makefile \
src/common/btree/Makefile \
src/common/btree/test/Makefile \
src/rootserver/Makefile \
src/chunkserver/Makefile \
src/updateserver/Makefile \
src/mergeserver/Makefile \
src/sstable/Makefile \
src/clustermanager/Makefile \
src/mms/Makefile \
src/lsync/Makefile \
src/client/Makefile \
src/client/cpp/Makefile \
src/compactsstable/Makefile \
src/sql/Makefile \
src/importserver/Makefile \
tests/Makefile \
tests/chunkserver/Makefile \
tests/common/Makefile \
tests/common/compress/Makefile \
tests/common/hash/Makefile \
tests/rootserver/Makefile \
tests/updateserver/Makefile \
tests/updateserver/stress_test/Makefile \
tests/mergeserver/Makefile \
tests/mergeserver/olap/Makefile \
tests/clustermanager/Makefile \
tests/mms/Makefile \
tests/sql/Makefile \
tests/sstable/Makefile \
tests/lsync/Makefile \
tests/compactsstable/Makefile \
tools/mixed_test/Makefile \
tools/log_tool/Makefile \
tools/sstable_builder/Makefile
])
AC_OUTPUT
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added doc/oceanbase架构和接口/OceanBase API.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added doc/oceanbase架构和接口/OceanBase介绍.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added doc/使用运维/OB旁路导入方案0.2.docx
Binary file not shown.
Binary file added doc/使用运维/OceanBase_stress_test_tool.docx
Binary file not shown.
Binary file not shown.
Binary file added doc/使用运维/OceanBase部署文档.docx
Binary file not shown.
Binary file not shown.
Binary file added doc/使用运维/Oceanbase_HA.docx
Binary file not shown.
Binary file added doc/使用运维/收藏夹升级问题.docx
Binary file not shown.
Loading

0 comments on commit 99d8852

Please sign in to comment.