Commit ef5c8dbf authored by unknown's avatar unknown

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/jonas/src/mysql-4.1


configure.in:
  Auto merged
ndb/test/src/NDBT_Test.cpp:
  Auto merged
parents a6cb0e5f 876b4a59
......@@ -119,6 +119,7 @@ miguel@light.
miguel@light.local
miguel@sartre.local
mikael@mc04.(none)
mikael@orca.ndb.mysql.com
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
mikron@mikael-ronstr-ms-dator.local
mleich@mysql.com
......
......@@ -1624,6 +1624,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
--without-ndb-debug Disable special ndb debug features],
[ndb_debug="$withval"],
[ndb_debug="default"])
AC_ARG_WITH([ndb-ccflags],
[
--with-ndb-ccflags Extra CC options for ndb compile],
[ndb_cxxflags_fix="$ndb_cxxflags_fix $withval"],
[ndb_cxxflags_fix=$ndb_cxxflags_fix])
AC_MSG_CHECKING([for NDB Cluster options])
AC_MSG_RESULT([])
......
......@@ -135,7 +135,13 @@
#ifdef HAVE_UNIXWARE7_THREADS
#include <thread.h>
#else
#if defined(HPUX10) || defined(HPUX11)
C_MODE_START /* HPUX needs this, signal.h bug */
#include <pthread.h>
C_MODE_END
#else
#include <pthread.h> /* AIX must have this included first */
#endif
#endif /* HAVE_UNIXWARE7_THREADS */
#endif /* HAVE_mit_thread */
#if !defined(SCO) && !defined(_REENTRANT)
......
......@@ -8,6 +8,7 @@ use strict;
sub mtr_get_pid_from_file ($);
sub mtr_get_opts_from_file ($);
sub mtr_fromfile ($);
sub mtr_tofile ($@);
sub mtr_tonewfile($@);
......@@ -107,6 +108,8 @@ sub mtr_fromfile ($) {
open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!");
my $text= join('', <FILE>);
close FILE;
$text =~ s/^\s+//; # Remove starting space, incl newlines
$text =~ s/\s+$//; # Remove ending space, incl newlines
return $text;
}
......
This diff is collapsed.
......@@ -10,6 +10,7 @@ sub mtr_report_test_name($);
sub mtr_report_test_passed($);
sub mtr_report_test_failed($);
sub mtr_report_test_skipped($);
sub mtr_report_test_disabled($);
sub mtr_show_failed_diff ($);
sub mtr_report_stats ($);
......@@ -72,7 +73,14 @@ sub mtr_report_test_skipped ($) {
my $tinfo= shift;
$tinfo->{'result'}= 'MTR_RES_SKIPPED';
if ( $tinfo->{'disable'} )
{
print "[ disabled ] $tinfo->{'comment'}\n";
}
else
{
print "[ skipped ]\n";
}
}
sub mtr_report_test_passed ($) {
......@@ -95,9 +103,18 @@ sub mtr_report_test_failed ($) {
$tinfo->{'result'}= 'MTR_RES_FAILED';
print "[ fail ]\n";
# FIXME Instead of this test, and meaningless error message in 'else'
# we should write out into $::path_timefile when the error occurs.
if ( -f $::path_timefile )
{
print "Errors are (from $::path_timefile) :\n";
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
print "\n(the last lines may be the most important ones)\n";
}
else
{
print "Unexpected termination, probably when starting mysqld\n";
}
}
sub mtr_report_stats ($) {
......
This diff is collapsed.
......@@ -212,3 +212,10 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1";
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10;
drop table t1, t2;
create table t1 (id int not null auto_increment primary key, id_str varchar(32));
insert into t1 (id_str) values ("test");
update t1 set id_str = concat(id_str, id) where id = last_insert_id();
select * from t1;
id id_str
1 test1
drop table t1;
......@@ -170,3 +170,12 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1";
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10;
drop table t1, t2;
#
# Bug #8057
#
create table t1 (id int not null auto_increment primary key, id_str varchar(32));
insert into t1 (id_str) values ("test");
update t1 set id_str = concat(id_str, id) where id = last_insert_id();
select * from t1;
drop table t1;
......@@ -76,7 +76,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status);
*
* * status: exit code
*/
void NdbThread_Exit(int status);
void NdbThread_Exit(void *status);
/**
* Set thread concurrency level
......
......@@ -54,10 +54,7 @@ extern "C" void* thread1func(void* arg)
if (arg1 != 7)
fail("TEST1", "Wrong arg");
NdbThread_Exit(returnvalue);
return NULL;
return returnvalue;
}
// test 2 variables and funcs
......@@ -80,10 +77,7 @@ extern "C" void* test2func(void* arg)
fail("TEST2", "Failed to unlock mutex");
int returnvalue = arg1;
NdbThread_Exit(returnvalue);
return NULL;
return returnvalue;
}
......@@ -129,8 +123,7 @@ extern "C" void* testfunc(void* arg)
}
while(tmpVar<100);
NdbThread_Exit(0);
return NULL;
return 0;
}
extern "C" void* testTryLockfunc(void* arg)
......@@ -169,8 +162,7 @@ extern "C" void* testTryLockfunc(void* arg)
}
while(tmpVar<100);
NdbThread_Exit(0);
return NULL;
return 0;
}
......
......@@ -17,7 +17,7 @@
#include <ndb_global.h>
#include <NdbThread.h>
#include <pthread.h>
#include <my_pthread.h>
#include <NdbMem.h>
#define MAX_THREAD_NAME 16
......@@ -39,8 +39,8 @@ struct NdbThread
static
void*
ndb_thread_wrapper(void* _ss){
void * ret;
struct NdbThread * ss = (struct NdbThread *)_ss;
my_thread_init();
{
DBUG_ENTER("ndb_thread_wrapper");
#ifdef NDB_SHM_TRANSPORTER
if (g_ndb_shm_signum)
......@@ -52,8 +52,15 @@ ndb_thread_wrapper(void* _ss){
pthread_sigmask(SIG_BLOCK, &mask, 0);
}
#endif
{
void *ret;
struct NdbThread * ss = (struct NdbThread *)_ss;
ret= (* ss->func)(ss->object);
DBUG_RETURN(ret);
NdbThread_Exit(ret);
}
/* will never be reached */
DBUG_RETURN(0);
}
}
......@@ -130,9 +137,10 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
}
void NdbThread_Exit(int status)
void NdbThread_Exit(void *status)
{
pthread_exit(&status);
my_thread_end();
pthread_exit(status);
}
......
......@@ -1104,11 +1104,8 @@ TransporterRegistry::setIOState(NodeId nodeId, IOState state) {
static void *
run_start_clients_C(void * me)
{
my_thread_init();
((TransporterRegistry*) me)->start_clients_thread();
my_thread_end();
NdbThread_Exit(0);
return me;
return 0;
}
// Run by kernel thread
......
......@@ -526,6 +526,7 @@ NdbSqlUtil::cmpDate(const void* info, const Uint32* p1, const Uint32* p2, Uint32
union { const Uint32* p; const unsigned char* v; } u1, u2;
u1.p = p1;
u2.p = p2;
#ifdef ndb_date_sol9x86_cc_xO3_madness
// from Field_newdate::val_int
Uint64 j1 = uint3korr(u1.v);
Uint64 j2 = uint3korr(u2.v);
......@@ -536,6 +537,33 @@ NdbSqlUtil::cmpDate(const void* info, const Uint32* p1, const Uint32* p2, Uint32
if (j1 > j2)
return +1;
return 0;
#else
uint j1 = uint3korr(u1.v);
uint j2 = uint3korr(u2.v);
uint d1 = (j1 & 31);
uint d2 = (j2 & 31);
j1 = (j1 >> 5);
j2 = (j2 >> 5);
uint m1 = (j1 & 15);
uint m2 = (j2 & 15);
j1 = (j1 >> 4);
j2 = (j2 >> 4);
uint y1 = j1;
uint y2 = j2;
if (y1 < y2)
return -1;
if (y1 > y2)
return +1;
if (m1 < m2)
return -1;
if (m1 > m2)
return +1;
if (d1 < d2)
return -1;
if (d1 > d2)
return +1;
return 0;
#endif
#endif
}
......
......@@ -186,11 +186,7 @@ extern "C"
void*
socketServerThread_C(void* _ss){
SocketServer * ss = (SocketServer *)_ss;
my_thread_init();
ss->doRun();
my_thread_end();
NdbThread_Exit(0);
return 0;
}
......@@ -309,11 +305,8 @@ void*
sessionThread_C(void* _sc){
SocketServer::Session * si = (SocketServer::Session *)_sc;
my_thread_init();
if(!transfer(si->m_socket)){
si->m_stopped = true;
my_thread_end();
NdbThread_Exit(0);
return 0;
}
......@@ -325,8 +318,6 @@ sessionThread_C(void* _sc){
}
si->m_stopped = true;
my_thread_end();
NdbThread_Exit(0);
return 0;
}
......
......@@ -82,7 +82,6 @@ static int numAsyncFiles = 0;
extern "C" void * runAsyncFile(void* arg)
{
my_thread_init();
((AsyncFile*)arg)->run();
return (NULL);
}
......@@ -876,8 +875,6 @@ void AsyncFile::endReq()
{
// Thread is ended with return
if (theWriteBuffer) NdbMem_Free(theWriteBuffer);
my_thread_end();
NdbThread_Exit(0);
}
......
......@@ -40,7 +40,6 @@ extern "C" void* runProducer(void*arg)
NdbSleep_MilliSleep(i);
i++;
}
NdbThread_Exit(0);
return NULL;
}
......@@ -58,7 +57,6 @@ extern "C" void* runConsumer(void* arg)
delete p;
}
NdbThread_Exit(0);
return NULL;
}
......@@ -92,7 +90,6 @@ extern "C" void* runProducer2(void*arg)
NdbSleep_MilliSleep(i);
i++;
}
NdbThread_Exit(0);
return NULL;
}
......@@ -111,7 +108,6 @@ extern "C" void* runConsumer2(void* arg)
delete p;
}
ndbout << "Consumer2: " << count << " received" << endl;
NdbThread_Exit(0);
return NULL;
}
......
......@@ -76,11 +76,16 @@ FastScheduler::activateSendPacked()
globalData.loopMax = 2048;
}//FastScheduler::activateSendPacked()
//------------------------------------------------------------------------
// sendPacked is executed at the end of the loop.
// To ensure that we don't send any messages before executing all local
// packed signals we do another turn in the loop (unless we have already
// executed too many signals in the loop).
//------------------------------------------------------------------------
void
FastScheduler::doJob()
{
do{
Uint32 loopCount = 0;
Uint32 init_loopCount = 0;
Uint32 TminLoops = getBOccupancy() + EXTRA_SIGNALS_PER_DO_JOB;
Uint32 TloopMax = (Uint32)globalData.loopMax;
if (TminLoops < TloopMax) {
......@@ -89,6 +94,8 @@ FastScheduler::doJob()
if (TloopMax < MIN_NUMBER_OF_SIG_PER_DO_JOB) {
TloopMax = MIN_NUMBER_OF_SIG_PER_DO_JOB;
}//if
do{
Uint32 loopCount = init_loopCount;
register Uint32 tHighPrio = globalData.highestAvailablePrio;
register Signal* signal = getVMSignals();
while ((tHighPrio < LEVEL_IDLE) && (loopCount < TloopMax)) {
......@@ -151,7 +158,7 @@ FastScheduler::doJob()
if (globalData.sendPackedActivated == 1) {
Uint32 t1 = theDoJobTotalCounter;
Uint32 t2 = theDoJobCallCounter;
t1 += loopCount;
t1 += (loopCount - init_loopCount);
t2++;
theDoJobTotalCounter = t1;
theDoJobCallCounter = t2;
......@@ -161,7 +168,11 @@ FastScheduler::doJob()
theDoJobTotalCounter = 0;
}//if
}//if
} while (getBOccupancy() > MAX_OCCUPANCY);
init_loopCount = loopCount;
sendPacked();
} while ((getBOccupancy() > MAX_OCCUPANCY) ||
((init_loopCount < TloopMax) &&
(globalData.highestAvailablePrio < LEVEL_IDLE)));
}//FastScheduler::doJob()
void FastScheduler::sendPacked()
......
......@@ -173,9 +173,6 @@ void ThreadConfig::ipControlLoop()
// until all buffers are empty or until we have executed 2048 signals.
//--------------------------------------------------------------------
globalScheduler.doJob();
globalScheduler.sendPacked();
}//while
globalData.incrementWatchDogCounter(6);
......
......@@ -27,10 +27,7 @@
extern "C"
void*
runWatchDog(void* w){
my_thread_init();
((WatchDog*)w)->run();
my_thread_end();
NdbThread_Exit(0);
return NULL;
}
......
......@@ -457,8 +457,6 @@ event_thread_run(void* m)
{
NdbMgmHandle handle= *(NdbMgmHandle*)m;
my_thread_init();
int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_BACKUP, 0 };
int fd = ndb_mgm_listen_event(handle, filter);
if (fd > 0)
......@@ -478,9 +476,7 @@ event_thread_run(void* m)
do_event_thread= -1;
}
my_thread_end();
NdbThread_Exit(0);
return 0;
return NULL;
}
bool
......
......@@ -3192,13 +3192,27 @@ fixShmKey(InitConfigFileParser::Context & ctx, const char *)
{
DBUG_ENTER("fixShmKey");
{
static int last_signum= -1;
Uint32 signum;
if(!ctx.m_currentSection->get("Signum", &signum))
{
signum= OPT_NDB_SHM_SIGNUM_DEFAULT;
if (signum <= 0)
{
ctx.reportError("Unable to set default parameter for [SHM]Signum"
" please specify [SHM DEFAULT]Signum");
return false;
}
ctx.m_currentSection->put("Signum", signum);
DBUG_PRINT("info",("Added Signum=%u", signum));
}
if ( last_signum != (int)signum && last_signum >= 0 )
{
ctx.reportError("All shared memory transporters must have same [SHM]Signum defined."
" Use [SHM DEFAULT]Signum");
return false;
}
last_signum= (int)signum;
}
{
Uint32 id1= 0, id2= 0, key= 0;
......
......@@ -70,12 +70,7 @@ void *
MgmtSrvr::logLevelThread_C(void* m)
{
MgmtSrvr *mgm = (MgmtSrvr*)m;
my_thread_init();
mgm->logLevelThreadRun();
my_thread_end();
NdbThread_Exit(0);
/* NOTREACHED */
return 0;
}
......@@ -83,12 +78,7 @@ void *
MgmtSrvr::signalRecvThread_C(void *m)
{
MgmtSrvr *mgm = (MgmtSrvr*)m;
my_thread_init();
mgm->signalRecvThreadRun();
my_thread_end();
NdbThread_Exit(0);
/* NOTREACHED */
return 0;
}
......
......@@ -54,7 +54,6 @@ runClusterMgr_C(void * me)
#ifdef NDB_OSE
NdbSleep_MilliSleep(50);
#endif
NdbThread_Exit(0);
return NULL;
}
......@@ -560,10 +559,7 @@ extern "C"
void*
runArbitMgr_C(void* me)
{
my_thread_init();
((ArbitMgr*) me)->threadMain();
my_thread_end();
NdbThread_Exit(0);
return NULL;
}
......
......@@ -405,11 +405,8 @@ extern "C"
void*
runSendRequest_C(void * me)
{
my_thread_init();
((TransporterFacade*) me)->threadMainSend();
my_thread_end();
NdbThread_Exit(0);
return me;
return 0;
}
void TransporterFacade::threadMainSend(void)
......@@ -443,11 +440,8 @@ extern "C"
void*
runReceiveResponse_C(void * me)
{
my_thread_init();
((TransporterFacade*) me)->threadMainReceive();
my_thread_end();
NdbThread_Exit(0);
return me;
return 0;
}
void TransporterFacade::threadMainReceive(void)
......
......@@ -87,11 +87,8 @@ const char *Ndb_cluster_connection::get_connectstring(char *buf,
extern "C" pthread_handler_decl(run_ndb_cluster_connection_connect_thread, me)
{
my_thread_init();
g_run_connect_thread= 1;
((Ndb_cluster_connection_impl*) me)->connect_thread();
my_thread_end();
NdbThread_Exit(0);
return me;
}
......
......@@ -984,7 +984,6 @@ void* ThreadExec(void* ThreadData){
delete pMyNdb;
pMyNdb = NULL ;
ThreadReady[thread_no] = 1;
NdbThread_Exit(0) ;
return 0 ;
}//if
......@@ -1197,7 +1196,6 @@ void* ThreadExec(void* ThreadData){
} // for(;;)
delete pMyNdb ;
NdbThread_Exit(0) ;
return 0 ; // Compiler is happy now
return 0 ;
}
......@@ -494,8 +494,7 @@ threadLoop(void* ThreadData)
delete localNdb;
ThreadReady[threadNo] = 1;
NdbThread_Exit(0);
return NULL; // Just to keep compiler happy
return NULL;
}//threadLoop()
static
......
......@@ -617,7 +617,7 @@ static void* flexBenchThread(void* pArg)
free(attrRefValue) ;
free(pOps) ;
delete pNdb ;
NdbThread_Exit(0) ;
return 0; // thread exits
}
pNdb->init();
......@@ -934,8 +934,7 @@ static void* flexBenchThread(void* pArg)
free(longKeyAttrValue);
} // if
NdbThread_Exit(0);
return NULL; // Just to keep compiler happy
return NULL; // Thread exits
}
......
......@@ -612,10 +612,7 @@ flexHammerThread(void* pArg)
flexHammerErrorData->resetErrorCounters();
// And exit using NDBT
NdbThread_Exit(0);
return NULL;
return NULL; // thread exits
} // flexHammerThread
......
......@@ -701,8 +701,7 @@ flexScanThread(void* ThreadData)
free(pkValue);
} // if
NdbThread_Exit(0);
return NULL;
return NULL; // thread exits
} // flexScanThread
......
......@@ -389,8 +389,7 @@ threadLoop(void* ThreadData)
delete localNdb;
ThreadReady[loc_threadNo] = 1;
NdbThread_Exit(0);
return NULL; // Just to keep compiler happy
return NULL; // Thread exits
}//threadLoop()
static
......
......@@ -406,9 +406,8 @@ threadLoop(void* ThreadData)
delete localNdb;
ThreadReady[threadNo] = 1;
NdbThread_Exit(0);
return NULL;
return NULL; // thread exits
}
void executeThread(StartType aType, Ndb* aNdbObject, ThreadNdb* threadInfo)
......
......@@ -710,7 +710,7 @@ static void* flexBenchThread(void* pArg)
the_socket_name,
0) == NULL ) {
ndbout << "failed" << endl;
NdbThread_Exit(0) ;
return 0;
}
ndbout << "ok" << endl;
......@@ -722,7 +722,7 @@ static void* flexBenchThread(void* pArg)
if (r) {
ndbout << "autocommit on/off failed" << endl;
NdbThread_Exit(0) ;
return 0;
}
}
#endif
......@@ -741,7 +741,7 @@ static void* flexBenchThread(void* pArg)
ndbout << threadNo << endl ;
ndbout << "Thread #" << threadNo << " will now exit" << endl ;
tResult = 13 ;
NdbThread_Exit(0) ;
return 0;
}
if (use_ndb) {
......@@ -750,7 +750,7 @@ static void* flexBenchThread(void* pArg)
ndbout << "Failed to get an NDB object" << endl;
ndbout << "Thread #" << threadNo << " will now exit" << endl ;
tResult = 13;
NdbThread_Exit(0) ;
return 0;
}
pNdb->waitUntilReady();
return_ndb_object(pNdb, ndb_id);
......@@ -900,11 +900,11 @@ static void* flexBenchThread(void* pArg)
prep_insert[i] = mysql_prepare(&mysql, buf, pos);
if (prep_insert[i] == 0) {
ndbout << "mysql_prepare: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
if (mysql_bind_param(prep_insert[i], bind_insert)) {
ndbout << "mysql_bind_param: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
}
......@@ -926,11 +926,11 @@ static void* flexBenchThread(void* pArg)
prep_update[i] = mysql_prepare(&mysql, buf, pos);
if (prep_update[i] == 0) {
ndbout << "mysql_prepare: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
if (mysql_bind_param(prep_update[i], bind_update)) {
ndbout << "mysql_bind_param: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
}
......@@ -953,15 +953,15 @@ static void* flexBenchThread(void* pArg)
prep_read[i] = mysql_prepare(&mysql, buf, pos);
if (prep_read[i] == 0) {
ndbout << "mysql_prepare: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
if (mysql_bind_param(prep_read[i], bind_read)) {
ndbout << "mysql_bind_param: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
if (mysql_bind_result(prep_read[i], &bind_read[1])) {
ndbout << "mysql_bind_result: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
}
......@@ -978,11 +978,11 @@ static void* flexBenchThread(void* pArg)
prep_delete[i] = mysql_prepare(&mysql, buf, pos);
if (prep_delete[i] == 0) {
ndbout << "mysql_prepare: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
if (mysql_bind_param(prep_delete[i], bind_delete)) {
ndbout << "mysql_bind_param: " << mysql_error(&mysql) << endl;
NdbThread_Exit(0) ;
return 0;
}
}
}
......@@ -1431,8 +1431,7 @@ static void* flexBenchThread(void* pArg)
ndbout << "I got here " << endl;
return_ndb_object(pNdb, ndb_id);
}
NdbThread_Exit(0);
return NULL; // Just to keep compiler happy
return NULL;
}
......
......@@ -274,8 +274,6 @@ threadRoutine(void *arg)
asyncDbDisconnect(pNDB);
NdbThread_Exit(0);
return NULL;
}
......
......@@ -479,7 +479,6 @@ void *
runStep_C(void * s)
{
runStep(s);
NdbThread_Exit(0);
return NULL;
}
......
......@@ -291,7 +291,6 @@ extern "C" void*
copyrun_C(void* copy)
{
((Copy*) copy)->run();
NdbThread_Exit(0);
return 0;
}
......@@ -322,7 +321,6 @@ extern "C" void*
connrun_C(void* conn)
{
((Conn*) conn)->run();
NdbThread_Exit(0);
return 0;
}
......
......@@ -2298,14 +2298,10 @@ longlong Item_func_last_insert_id::val_int()
longlong value=args[0]->val_int();
current_thd->insert_id(value);
null_value=args[0]->null_value;
return value;
}
else
{
Item *it= get_system_var(current_thd, OPT_SESSION, "last_insert_id", 14,
"last_insert_id()");
return it->val_int();
}
current_thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
return current_thd->insert_id();
}
/* This function is just used to test speed of different functions */
......
......@@ -27,7 +27,8 @@ EXTRA_DIST = mysql.spec.sh \
mysql.server.sh \
binary-configure.sh \
magic \
MySQL-shared-compat.spec.sh
MySQL-shared-compat.spec.sh \
ndb-config-2-node.ini.sh
SUBDIRS = MacOSX
......@@ -38,7 +39,8 @@ pkgdata_DATA = my-small.cnf \
my-innodb-heavy-4G.cnf \
mysql-log-rotate \
mysql-@VERSION@.spec \
MySQL-shared-compat.spec
MySQL-shared-compat.spec \
ndb-config-2-node.ini
pkgdata_SCRIPTS = mysql.server
......@@ -52,7 +54,8 @@ CLEANFILES = my-small.cnf \
mysql-log-rotate \
mysql.server \
binary-configure \
MySQL-shared-compat.spec
MySQL-shared-compat.spec \
ndb-config-2-node.ini
mysql-@VERSION@.spec: mysql.spec
rm -f $@
......
......@@ -104,6 +104,53 @@ This package contains the standard MySQL clients and administration tools.
%description client -l pt_BR
Este pacote contm os clientes padro para o MySQL.
%package ndb-storage
Release: %{release}
Summary: MySQL - ndbcluster storage engine
Group: Applications/Databases
%description ndb-storage
This package contains the ndbcluster storage engine.
It is necessary to have this package installed on all
computers that should store ndbcluster table data.
Note that this storage engine can only be used in conjunction
with the MySQL Max server.
%{see_base}
%package ndb-management
Release: %{release}
Summary: MySQL - ndbcluster storage engine management
Group: Applications/Databases
%description ndb-management
This package contains ndbcluster storage engine management.
It is necessary to have this package installed on at least
one computer in the cluster.
%{see_base}
%package ndb-tools
Release: %{release}
Summary: MySQL - ndbcluster storage engine basic tools
Group: Applications/Databases
%description ndb-tools
This package contains ndbcluster storage engine basic tools.
%{see_base}
%package ndb-extra
Release: %{release}
Summary: MySQL - ndbcluster storage engine extra tools
Group: Applications/Databases
%description ndb-extra
This package contains some extra ndbcluster storage engine tools for the advanced user.
They should be used with caution.
%{see_base}
%package bench
Release: %{release}
Requires: %{name}-client perl-DBI perl
......@@ -162,6 +209,7 @@ Requires: MySQL-server >= 4.0
Optional MySQL server binary that supports additional features like:
- Berkeley DB Storage Engine
- Ndbcluster Storage Engine interface
- Archive Storage Engine
- CSV Storage Engine
- Example Storage Engine
......@@ -279,6 +327,7 @@ BuildMySQL "--enable-shared \
--without-openssl \
--with-berkeley-db \
--with-innodb \
--with-ndbcluster \
--with-raid \
--with-archive \
--with-csv-storage-engine \
......@@ -293,6 +342,9 @@ BuildMySQL "--enable-shared \
mv sql/mysqld sql/mysqld-max
nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym
# Install the ndb binaries
(cd ndb; make install DESTDIR=$RBR)
# Install embedded server library in the build root
install -m 644 libmysqld/libmysqld.a $RBR%{_libdir}/mysql/
......@@ -435,6 +487,21 @@ chmod -R og-rw $mysql_datadir/mysql
# Allow safe_mysqld to start mysqld and print a message before we exit
sleep 2
%pre ndb-storage
mysql_clusterdir=/var/lib/mysql-cluster
# Create cluster directory if needed
if test ! -d $mysql_clusterdir; then mkdir -m755 $mysql_clusterdir; fi
%pre ndb-storage
mysql_clusterdir=/var/lib/mysql-cluster
# Create cluster directory if needed
if test ! -d $mysql_clusterdir; then mkdir -m755 $mysql_clusterdir; fi
%post Max
# Restart mysqld, to use the new binary.
echo "Restarting mysqld."
......@@ -475,6 +542,7 @@ fi
%doc Docs/manual.{html,ps,texi,txt}
%doc Docs/manual_toc.html
%doc support-files/my-*.cnf
%doc support-files/ndb-*.ini
%doc %attr(644, root, root) %{_infodir}/mysql.info*
......@@ -556,6 +624,32 @@ fi
%postun shared
/sbin/ldconfig
%files ndb-storage
%defattr(-,root,root,0755)
%attr(755, root, root) %{_sbindir}/ndbd
%files ndb-management
%defattr(-,root,root,0755)
%attr(755, root, root) %{_sbindir}/ndb_mgmd
%attr(755, root, root) %{_bindir}/ndb_mgm
%files ndb-tools
%defattr(-,root,root,0755)
%attr(755, root, root) %{_bindir}/ndb_mgm
%attr(755, root, root) %{_bindir}/ndb_restore
%attr(755, root, root) %{_bindir}/ndb_waiter
%attr(755, root, root) %{_bindir}/ndb_select_all
%attr(755, root, root) %{_bindir}/ndb_select_count
%attr(755, root, root) %{_bindir}/ndb_desc
%attr(755, root, root) %{_bindir}/ndb_show_tables
%attr(755, root, root) %{_bindir}/ndb_test_platform
%files ndb-extra
%defattr(-,root,root,0755)
%attr(755, root, root) %{_bindir}/ndb_drop_index
%attr(755, root, root) %{_bindir}/ndb_drop_table
%attr(755, root, root) %{_bindir}/ndb_delete_all
%files devel
%defattr(-, root, root, 0755)
%doc EXCEPTIONS-CLIENT
......
# Example Ndbcluster storage engine config file.
#
[ndbd default]
NoOfReplicas= 2
MaxNoOfConcurrentOperations= 10000
DataMemory= 80M
IndexMemory= 24M
TimeBetweenWatchDogCheck= 30000
DataDir= /var/lib/mysql-cluster
MaxNoOfOrderedIndexes= 512
[ndb_mgmd default]
DataDir= /var/lib/mysql-cluster
[ndb_mgmd]
Id=1
HostName= localhost
[ndbd]
Id= 2
HostName= localhost
[ndbd]
Id= 3
HostName= localhost
[mysqld]
Id= 4
[mysqld]
Id= 5
[mysqld]
Id= 6
[mysqld]
Id= 7
# choose an unused port number
# in this configuration 63132, 63133, and 63134
# will be used
[tcp default]
PortNumber= 63132
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