Commit 43a0e76e authored by joreland@mysql.com's avatar joreland@mysql.com

Merge mysql.com:/home/jonas/src/mysql-4.1-ndb

into mysql.com:/home/jonas/src/wl1671
parents a3b8d42b 00b5e46f
......@@ -107,6 +107,7 @@ monty@tik.mysql.fi
monty@tramp.mysql.fi
monty@work.mysql.com
mronstrom@mysql.com
mskold@mysql.com
msvensson@build.mysql.com
mwagner@cash.mwagner.org
mwagner@evoq.mwagner.org
......@@ -166,6 +167,8 @@ tim@work.mysql.com
tom@basil-firewall.home.com
tomas@mc05.(none)
tomas@poseidon.(none)
tomas@poseidon.bredbandsbolaget.se
tomas@poseidon.ndb.mysql.com
tonu@hundin.mysql.fi
tonu@volk.internalnet
tonu@x153.internalnet
......
......@@ -1341,39 +1341,42 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
AC_ARG_WITH([ndb-shm],
[
--with-ndb-shm Include the NDB Cluster shared memory transporter],
[ndb-shm="$withval"],
[ndb-shm=no])
[ndb_shm="$withval"],
[ndb_shm=no])
AC_ARG_WITH([ndb-sci],
[
--with-ndb-sci Include the NDB Cluster sci transporter],
[ndb-sci="$withval"],
[ndb-sci=no])
[ndb_sci="$withval"],
[ndb_sci=no])
AC_MSG_CHECKING([for NDB Cluster options])
AC_MSG_RESULT([])
have_ndb_shm=no
case "$ndb-shm" in
case "$ndb_shm" in
yes )
AC_MSG_RESULT([Including NDB Cluster shared memory transporter])
AC_MSG_RESULT([-- including shared memory transporter])
AC_DEFINE(NDB_SHM_TRANSPORTER)
have_ndb_shm="yes"
;;
* )
AC_MSG_RESULT([Not including NDB Cluster shared memory transporter])
AC_MSG_RESULT([-- not including shared memory transporter])
;;
esac
have_ndb_sci=no
case "$ndb-sci" in
case "$ndb_sci" in
yes )
AC_MSG_RESULT([Including NDB Cluster sci transporter])
AC_MSG_RESULT([-- including sci transporter])
AC_DEFINE(NDB_SCI_TRANSPORTER)
have_ndb_sci="yes"
;;
* )
AC_MSG_RESULT([Not including NDB Cluster sci transporter])
AC_MSG_RESULT([-- not including sci transporter])
;;
esac
AC_MSG_RESULT([done.])
])
AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
......@@ -1394,8 +1397,9 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
AC_DEFINE(HAVE_NDBCLUSTER_DB)
have_ndbcluster="yes"
ndbcluster_includes="-I../ndb/include -I../ndb/include/ndbapi"
ndbcluster_libs="\$(top_builddir)/ndb/src/libndbclient.la"
ndbcluster_libs="\$(top_builddir)/ndb/src/.libs/libndbclient.a"
ndbcluster_system_libs=""
MYSQL_CHECK_NDB_OPTIONS
;;
* )
AC_MSG_RESULT([Not using NDB Cluster])
......
......@@ -2919,6 +2919,17 @@ AC_SUBST(mgmapiincludedir)
AC_SUBST(NDB_NDBAPICLIENT_INCLUDES)
AC_SUBST(NDB_MGMAPICLIENT_INCLUDES)
ndb_transporter_opt_objs=""
if test X"$have_ndb_shm" = Xyes
then
ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SHM_Transporter.lo SHM_Transporter.unix.lo"
fi
if test X"$have_ndb_sci" = Xyes
then
ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SCI_Transporter.lo"
fi
AC_SUBST(ndb_transporter_opt_objs)
#NDB_TYPE_COMMON="include \$(top_srcdir)/ndb/config/common.mk.am"
#NDB_TYPE_NDBAPI="include \$(top_srcdir)/ndb/config/type_ndbapi.mk.am"
#NDB_TYPE_NDBAPI="include \$(top_srcdir)/ndb/config/type_ndbapitest.mk.am"
......@@ -2934,7 +2945,7 @@ AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
# Output results
AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
ndb/Makefile ndb/include/Makefile ndb/src/Makefile ndb/src/common/Makefile dnl
ndb/Makefile ndb/src/Makefile ndb/src/common/Makefile dnl
ndb/tools/Makefile dnl
ndb/src/common/debugger/Makefile ndb/src/common/debugger/signaldata/Makefile dnl
ndb/src/common/portlib/Makefile ndb/src/common/portlib/unix/Makefile dnl
......
## find * -name '*.hpp' -print | grep -v SCCS | grep -v odbc | sed 's/\.hpp/\.hpp \\/' > tmp.out
## find * -name '*.h' -print | grep -v SCCS | grep -v odbc | sed 's/\.h/\.h \\/' >> tmp.out
SUBDIRS = . include src test tools
SUBDIRS = src test tools .
ndbinclude_HEADERS = \
include/ndb_types.h \
......@@ -31,4 +28,17 @@ mgmapiinclude_HEADERS = \
include/mgmapi/mgmapi.h \
include/mgmapi/mgmapi_debug.h
noinst_HEADERS =
EXTRA_DIST = include
dist-hook:
-rm -rf `find $(distdir) -type d -name SCCS`
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != "."; then \
files="`find $$subdir -name '*\.h'` `find $$subdir -name '*\.hpp'`"; \
for f in $$files; do \
if test -d "$(distdir)/`dirname $$f`" -a ! -e "$(distdir)/$$f"; then \
cp $$f $(distdir)/$$f; \
fi; \
done; \
fi; \
done
AM_LDFLAGS = -rpath @ndblibdir@
LDADD += $(top_srcdir)/ndb/test/src/libNDBT.a \
$(top_srcdir)/ndb/src/libndbclient.la
......
LDADD += $(top_srcdir)/ndb/test/src/libNDBT.a \
$(top_srcdir)/ndb/src/.libs/libndbclient.a
INCLUDES += @NDB_NDBAPITEST_INCLUDES@
noinst_HEADERS =
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -14,3 +14,5 @@ libndbclient_la_LIBADD = \
$(top_srcdir)/ndb/src/common/logger/liblogger.la \
$(top_srcdir)/ndb/src/common/portlib/unix/libportlib.la \
$(top_srcdir)/ndb/src/common/util/libgeneral.la
AM_LDFLAGS = -rpath @ndblibdir@
......@@ -7,6 +7,7 @@ DIRS := \
ndbapi \
mgmsrv \
mgmapi \
newtonapi \
rep \
mgmclient \
cw \
......
......@@ -8,7 +8,10 @@ libtransporter_la_SOURCES = \
TransporterRegistry.cpp \
Packer.cpp
# SHM_Transporter.cpp
EXTRA_libtransporter_la_SOURCES = SHM_Transporter.cpp SHM_Transporter.unix.cpp SCI_Transporter.cpp
libtransporter_la_LIBADD = @ndb_transporter_opt_objs@
libtransporter_la_DEPENDENCIES = @ndb_transporter_opt_objs@
INCLUDES_LOC = -I$(top_srcdir)/ndb/include/kernel -I$(top_srcdir)/ndb/include/transporter
......
......@@ -673,7 +673,7 @@ ConfigValuesFactory::unpack(const void * _src, Uint32 len){
break;
case ConfigValues::StringType:{
Uint32 s_len = ntohl(* (const Uint32 *)src); src += 4;
size_t s_len2 = strnlen((const char*)src, s_len);
size_t s_len2 = strlen((const char*)src);
if(s_len2 + 1 != s_len){
DEBUG abort();
return false;
......
......@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "dba_internal.hpp"
#include "NdbSchemaCon.hpp"
static bool getNdbAttr(DBA_DataTypes_t,
Size_t,
......@@ -31,7 +32,7 @@ DBA_CreateTable(const char* TableName,
if(DBA_TableExists(TableName))
return DBA_NO_ERROR;
NdbSchemaCon * schemaCon = DBA__TheNdb->startSchemaTransaction();
NdbSchemaCon * schemaCon = NdbSchemaCon::startSchemaTrans(DBA__TheNdb);
if(schemaCon == 0){
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: No schema transaction");
......@@ -39,8 +40,8 @@ DBA_CreateTable(const char* TableName,
}
NdbSchemaOp * schemaOp = schemaCon->getNdbSchemaOp();
if(schemaOp == 0){
DBA__TheNdb->closeSchemaTransaction(schemaCon);
if(schemaOp == 0){
NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: No schema op");
return DBA_NDB_ERROR;
......@@ -56,7 +57,7 @@ DBA_CreateTable(const char* TableName,
80,
1,
false) == -1){
DBA__TheNdb->closeSchemaTransaction(schemaCon);
NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: Create table failed");
return DBA_NDB_ERROR;
......@@ -71,7 +72,7 @@ DBA_CreateTable(const char* TableName,
&attrSize,
&arraySize,
&attrType)){
DBA__TheNdb->closeSchemaTransaction(schemaCon);
NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_APPLICATION_ERROR, 0,
"Invalid datatype/size combination");
return DBA_APPLICATION_ERROR;
......@@ -82,7 +83,7 @@ DBA_CreateTable(const char* TableName,
attrSize,
arraySize,
attrType) == -1){
DBA__TheNdb->closeSchemaTransaction(schemaCon);
NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: Create attribute failed");
return DBA_NDB_ERROR;
......@@ -90,14 +91,14 @@ DBA_CreateTable(const char* TableName,
}
if(schemaCon->execute() == -1){
DBA__TheNdb->closeSchemaTransaction(schemaCon);
NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: Execute schema failed");
return DBA_NDB_ERROR;
}
DBA__TheNdb->closeSchemaTransaction(schemaCon);
NdbSchemaCon::closeSchemaTrans(schemaCon);
return DBA_NO_ERROR;
}
......
......@@ -11,7 +11,7 @@ select_all_SOURCES = select_all.cpp
select_count_SOURCES = select_count.cpp
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_ndbapitest.mk.am
include $(top_srcdir)/ndb/config/type_ndbapitools.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -1648,7 +1648,7 @@ int ha_ndbcluster::close_scan()
cursor->close();
m_active_cursor= NULL;
DBUG_RETURN(0)
DBUG_RETURN(0);
}
int ha_ndbcluster::rnd_end()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment