Commit 2206f88a authored by unknown's avatar unknown

Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-build

into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mar07/stage2/51


scripts/make_binary_distribution.sh:
  Auto merged
parents 69517175 d25db408
...@@ -172,6 +172,7 @@ max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server" ...@@ -172,6 +172,7 @@ max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server"
alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag" alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag"
amd64_cflags="$check_cpu_cflags" amd64_cflags="$check_cpu_cflags"
amd64_cxxflags="" # If dropping '--with-big-tables', add here "-DBIG_TABLES" amd64_cxxflags="" # If dropping '--with-big-tables', add here "-DBIG_TABLES"
pentium_cflags="$check_cpu_cflags"
pentium64_cflags="$check_cpu_cflags -m64" pentium64_cflags="$check_cpu_cflags -m64"
ppc_cflags="$check_cpu_cflags" ppc_cflags="$check_cpu_cflags"
sparc_cflags="" sparc_cflags=""
......
...@@ -17,7 +17,7 @@ noinst_SCRIPTS = generate-text-files.pl ...@@ -17,7 +17,7 @@ noinst_SCRIPTS = generate-text-files.pl
EXTRA_DIST = $(noinst_SCRIPTS) manual.chm mysql.info INSTALL-BINARY EXTRA_DIST = $(noinst_SCRIPTS) manual.chm mysql.info INSTALL-BINARY
TXT_FILES= ../INSTALL-SOURCE ../INSTALL-WIN-SOURCE ../EXCEPTIONS-CLIENT \ TXT_FILES= ../INSTALL-SOURCE ../INSTALL-WIN-SOURCE \
INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt
all-local: $(TXT_FILES) all-local: $(TXT_FILES)
...@@ -55,9 +55,6 @@ GT = $(srcdir)/generate-text-files.pl ...@@ -55,9 +55,6 @@ GT = $(srcdir)/generate-text-files.pl
INSTALL-BINARY: $(srcdir)/mysql.info $(GT) INSTALL-BINARY: $(srcdir)/mysql.info $(GT)
perl -w $(GT) $(srcdir)/mysql.info "installing-binary" "installing-source" > $@ perl -w $(GT) $(srcdir)/mysql.info "installing-binary" "installing-source" > $@
../EXCEPTIONS-CLIENT: $(srcdir)/mysql.info $(GT)
perl -w $(GT) $(srcdir)/mysql.info "mysql-floss-license-exception" "function-index" > $@
../support-files/MacOSX/ReadMe.txt: $(srcdir)/mysql.info $(GT) ../support-files/MacOSX/ReadMe.txt: $(srcdir)/mysql.info $(GT)
perl -w $(GT) $(srcdir)/mysql.info "mac-os-x-installation" "netware-installation" > $@ perl -w $(GT) $(srcdir)/mysql.info "mac-os-x-installation" "netware-installation" > $@
......
MySQL FLOSS License Exception
The MySQL AB Exception for Free/Libre and Open Source
Software-only Applications Using MySQL Client Libraries (the
"FLOSS Exception").
Version 0.5, 30 August 2006
Exception Intent
We want specified Free/Libre and Open Source Software (``FLOSS'')
applications to be able to use specified GPL-licensed MySQL client
libraries (the ``Program'') despite the fact that not all FLOSS
licenses are compatible with version 2 of the GNU General Public
License (the ``GPL'').
Legal Terms and Conditions
As a special exception to the terms and conditions of version 2.0
of the GPL:
1. You are free to distribute a Derivative Work that is formed
entirely from the Program and one or more works (each, a
"FLOSS Work") licensed under one or more of the licenses
listed below in section 1, as long as:
a. You obey the GPL in all respects for the Program and the
Derivative Work, except for identifiable sections of the
Derivative Work which are not derived from the Program,
and which can reasonably be considered independent and
separate works in themselves,
b. all identifiable sections of the Derivative Work which
are not derived from the Program, and which can
reasonably be considered independent and separate works
in themselves,
i. are distributed subject to one of the FLOSS licenses
listed below, and
ii. the object code or executable form of those sections
are accompanied by the complete corresponding
machine-readable source code for those sections on
the same medium and under the same FLOSS license as
the corresponding object code or executable forms of
those sections, and
c. any works which are aggregated with the Program or with a
Derivative Work on a volume of a storage or distribution
medium in accordance with the GPL, can reasonably be
considered independent and separate works in themselves
which are not derivatives of either the Program, a
Derivative Work or a FLOSS Work.
If the above conditions are not met, then the Program may only
be copied, modified, distributed or used under the terms and
conditions of the GPL or another valid licensing option from
MySQL AB.
2. FLOSS License List
License name Version(s)/Copyright Date
Academic Free License 2.0
Apache Software License 1.0/1.1/2.0
Apple Public Source License 2.0
Artistic license From Perl 5.8.0
BSD license "July 22 1999"
Common Public License 1.0
GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1
Jabber Open Source License 1.0
MIT license ---
Mozilla Public License (MPL) 1.0/1.1
Open Software License 2.0
OpenSSL license (with original SSLeay license) "2003" ("1998")
PHP License 3.0
Python license (CNRI Python License) ---
Python Software Foundation License 2.1.1
Sleepycat License "1999"
University of Illinois/NCSA Open Source License ---
W3C License "2001"
X11 License "2001"
Zlib/libpng License ---
Zope Public License 2.0
Due to the many variants of some of the above licenses, we
require that any version follow the 2003 version of the Free
Software Foundation's Free Software Definition
(http://www.gnu.org/philosophy/free-sw.html) or version 1.9 of
the Open Source Definition by the Open Source Initiative
(http://www.opensource.org/docs/definition.php).
3. Definitions
a. Terms used, but not defined, herein shall have the
meaning provided in the GPL.
b. Derivative Work means a derivative work under copyright
law.
4. Applicability: This FLOSS Exception applies to all Programs
that contain a notice placed by MySQL AB saying that the
Program may be distributed under the terms of this FLOSS
Exception. If you create or distribute a work which is a
Derivative Work of both the Program and any other work
licensed under the GPL, then this FLOSS Exception is not
available for that work; thus, you must remove the FLOSS
Exception notice from that work and comply with the GPL in all
respects, including by retaining all GPL notices. You may
choose to redistribute a copy of the Program exclusively under
the terms of the GPL by removing the FLOSS Exception notice
from that copy of the Program, provided that the copy has
never been modified by you or any third party.
Appendix A. Qualified Libraries and Packages
The following is a non-exhaustive list of libraries and packages
which are covered by the FLOSS License Exception. Please note that
this appendix is provided merely as an additional service to
specific FLOSS projects wishing to simplify licensing information
for their users. Compliance with one of the licenses noted under
the "FLOSS license list" section remains a prerequisite.
Package Name Qualifying License and Version
Apache Portable Runtime (APR) Apache Software License 2.0
...@@ -506,6 +506,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) ...@@ -506,6 +506,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
share->data_file_type = DYNAMIC_RECORD; share->data_file_type = DYNAMIC_RECORD;
my_afree((gptr) disk_cache); my_afree((gptr) disk_cache);
mi_setup_functions(share); mi_setup_functions(share);
#ifdef HAVE_MMAP
if (open_flags & HA_OPEN_MMAP) if (open_flags & HA_OPEN_MMAP)
{ {
info.s= share; info.s= share;
...@@ -522,6 +523,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) ...@@ -522,6 +523,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
share->file_write= mi_mmap_pwrite; share->file_write= mi_mmap_pwrite;
} }
} }
#endif /* HAVE_MMAP */
share->is_log_table= FALSE; share->is_log_table= FALSE;
#ifdef THREAD #ifdef THREAD
thr_lock_init(&share->lock); thr_lock_init(&share->lock);
......
...@@ -963,7 +963,7 @@ const EventLoggerBase::EventRepLogLevelMatrix EventLoggerBase::matrix[] = { ...@@ -963,7 +963,7 @@ const EventLoggerBase::EventRepLogLevelMatrix EventLoggerBase::matrix[] = {
ROW(NDBStopCompleted, LogLevel::llStartUp, 1, Logger::LL_INFO ), ROW(NDBStopCompleted, LogLevel::llStartUp, 1, Logger::LL_INFO ),
ROW(NDBStopForced, LogLevel::llStartUp, 1, Logger::LL_ALERT ), ROW(NDBStopForced, LogLevel::llStartUp, 1, Logger::LL_ALERT ),
ROW(NDBStopAborted, LogLevel::llStartUp, 1, Logger::LL_INFO ), ROW(NDBStopAborted, LogLevel::llStartUp, 1, Logger::LL_INFO ),
ROW(StartREDOLog, LogLevel::llStartUp, 10, Logger::LL_INFO ), ROW(StartREDOLog, LogLevel::llStartUp, 4, Logger::LL_INFO ),
ROW(StartLog, LogLevel::llStartUp, 10, Logger::LL_INFO ), ROW(StartLog, LogLevel::llStartUp, 10, Logger::LL_INFO ),
ROW(UNDORecordsExecuted, LogLevel::llStartUp, 15, Logger::LL_INFO ), ROW(UNDORecordsExecuted, LogLevel::llStartUp, 15, Logger::LL_INFO ),
ROW(StartReport, LogLevel::llStartUp, 4, Logger::LL_INFO ), ROW(StartReport, LogLevel::llStartUp, 4, Logger::LL_INFO ),
......
...@@ -441,6 +441,7 @@ void Dblqh::execCONTINUEB(Signal* signal) ...@@ -441,6 +441,7 @@ void Dblqh::execCONTINUEB(Signal* signal)
else else
{ {
jam(); jam();
cstartRecReq = 2;
ndbrequire(c_redo_complete_fragments.isEmpty()); ndbrequire(c_redo_complete_fragments.isEmpty());
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId(); conf->startingNodeId = getOwnNodeId();
...@@ -11936,7 +11937,7 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal) ...@@ -11936,7 +11937,7 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal)
return; return;
} }
if (getNodeState().getNodeRestartInProgress() && cstartRecReq == ZFALSE) if (getNodeState().getNodeRestartInProgress() && cstartRecReq < 2)
{ {
GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0]; GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0];
saveRef->dihPtr = dihPtr; saveRef->dihPtr = dihPtr;
...@@ -12248,6 +12249,10 @@ void Dblqh::execFSCLOSECONF(Signal* signal) ...@@ -12248,6 +12249,10 @@ void Dblqh::execFSCLOSECONF(Signal* signal)
// Set the prev file to check if we shall close it. // Set the prev file to check if we shall close it.
logFilePtr.i = logFilePtr.p->prevLogFile; logFilePtr.i = logFilePtr.p->prevLogFile;
ptrCheckGuard(logFilePtr, clogFileFileSize, logFileRecord); ptrCheckGuard(logFilePtr, clogFileFileSize, logFileRecord);
logPartPtr.i = logFilePtr.p->logPartRec;
ptrCheckGuard(logPartPtr, clogPartFileSize, logPartRecord);
exitFromInvalidate(signal); exitFromInvalidate(signal);
return; return;
case LogFileRecord::CLOSING_INIT: case LogFileRecord::CLOSING_INIT:
...@@ -14017,7 +14022,7 @@ void Dblqh::execRESTORE_LCP_CONF(Signal* signal) ...@@ -14017,7 +14022,7 @@ void Dblqh::execRESTORE_LCP_CONF(Signal* signal)
return; return;
} }
if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == ZTRUE) if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == 1)
{ {
jam(); jam();
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
...@@ -14058,7 +14063,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal) ...@@ -14058,7 +14063,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal)
ndbrequire(req->receivingNodeId == cownNodeid); ndbrequire(req->receivingNodeId == cownNodeid);
cnewestCompletedGci = cnewestGci; cnewestCompletedGci = cnewestGci;
cstartRecReq = ZTRUE; cstartRecReq = 1;
for (logPartPtr.i = 0; logPartPtr.i < 4; logPartPtr.i++) { for (logPartPtr.i = 0; logPartPtr.i < 4; logPartPtr.i++) {
ptrAss(logPartPtr, logPartRecord); ptrAss(logPartPtr, logPartRecord);
logPartPtr.p->logPartNewestCompletedGCI = cnewestCompletedGci; logPartPtr.p->logPartNewestCompletedGCI = cnewestCompletedGci;
...@@ -14072,6 +14077,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal) ...@@ -14072,6 +14077,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal)
*------------------------------------------------------------------------ */ *------------------------------------------------------------------------ */
if(cstartType == NodeState::ST_INITIAL_NODE_RESTART){ if(cstartType == NodeState::ST_INITIAL_NODE_RESTART){
jam(); jam();
cstartRecReq = 2;
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId(); conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
...@@ -15893,6 +15899,7 @@ void Dblqh::srFourthComp(Signal* signal) ...@@ -15893,6 +15899,7 @@ void Dblqh::srFourthComp(Signal* signal)
return; return;
} }
} }
cstartRecReq = 2;
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId(); conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
...@@ -16761,7 +16768,7 @@ void Dblqh::initialiseRecordsLab(Signal* signal, Uint32 data, ...@@ -16761,7 +16768,7 @@ void Dblqh::initialiseRecordsLab(Signal* signal, Uint32 data,
cnoActiveCopy = 0; cnoActiveCopy = 0;
ccurrentGcprec = RNIL; ccurrentGcprec = RNIL;
caddNodeState = ZFALSE; caddNodeState = ZFALSE;
cstartRecReq = ZFALSE; cstartRecReq = 0;
cnewestGci = 0; cnewestGci = 0;
cnewestCompletedGci = 0; cnewestCompletedGci = 0;
crestartOldestGci = 0; crestartOldestGci = 0;
......
...@@ -1840,6 +1840,7 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal) ...@@ -1840,6 +1840,7 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal)
ndbrequire(m_file_hash.find(file_ptr, file_key)); ndbrequire(m_file_hash.find(file_ptr, file_key));
struct req val = lookup_extent(req.key.m_page_no, file_ptr.p); struct req val = lookup_extent(req.key.m_page_no, file_ptr.p);
Uint32 page_no_in_extent = calc_page_no_in_extent(req.key.m_page_no, &val);
Page_cache_client::Request preq; Page_cache_client::Request preq;
preq.m_page.m_page_no = val.m_extent_page_no; preq.m_page.m_page_no = val.m_extent_page_no;
...@@ -1865,7 +1866,6 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal) ...@@ -1865,7 +1866,6 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal)
ndbrequire(header->m_table == req.request.table_id); ndbrequire(header->m_table == req.request.table_id);
Uint32 page_no_in_extent = calc_page_no_in_extent(req.key.m_page_no, &val);
Uint32 word = header->get_free_word_offset(page_no_in_extent); Uint32 word = header->get_free_word_offset(page_no_in_extent);
Uint32 shift = SZ * (page_no_in_extent & 7); Uint32 shift = SZ * (page_no_in_extent & 7);
...@@ -1925,8 +1925,7 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal) ...@@ -1925,8 +1925,7 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal)
found: found:
header->update_free_bits(page_no, src_bits | UNCOMMITTED_MASK); header->update_free_bits(page_no, src_bits | UNCOMMITTED_MASK);
rep->bits= (src_bits & UNCOMMITTED_MASK) >> UNCOMMITTED_SHIFT; rep->bits= (src_bits & UNCOMMITTED_MASK) >> UNCOMMITTED_SHIFT;
rep->key.m_page_no= rep->key.m_page_no = req.key.m_page_no + page_no - page_no_in_extent;
val.m_extent_pages + val.m_extent_no * val.m_extent_size + page_no;
rep->reply.errorCode= 0; rep->reply.errorCode= 0;
return; return;
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
RWPool::RWPool() RWPool::RWPool()
{ {
bzero(this, sizeof(* this)); bzero(this, sizeof(* this));
m_current_pos = GLOBAL_PAGE_SIZE_WORDS; m_current_pos = RWPage::RWPAGE_WORDS;
m_current_first_free = REC_NIL; m_current_first_free = REC_NIL;
m_first_free_page = RNIL; m_first_free_page = RNIL;
} }
...@@ -57,7 +57,7 @@ RWPool::seize(Ptr<void>& ptr) ...@@ -57,7 +57,7 @@ RWPool::seize(Ptr<void>& ptr)
m_current_first_free = pageP->m_data[pos+m_record_info.m_offset_next_pool]; m_current_first_free = pageP->m_data[pos+m_record_info.m_offset_next_pool];
return true; return true;
} }
else if (pos + size < GLOBAL_PAGE_SIZE_WORDS) else if (pos + size < RWPage::RWPAGE_WORDS)
{ {
seize_first: seize_first:
ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos; ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos;
...@@ -81,11 +81,14 @@ RWPool::seize(Ptr<void>& ptr) ...@@ -81,11 +81,14 @@ RWPool::seize(Ptr<void>& ptr)
{ {
pageP = m_current_page = m_memroot + m_first_free_page; pageP = m_current_page = m_memroot + m_first_free_page;
m_current_page_no = m_first_free_page; m_current_page_no = m_first_free_page;
m_current_pos = GLOBAL_PAGE_SIZE_WORDS; m_current_pos = RWPage::RWPAGE_WORDS;
m_current_first_free = m_current_page->m_first_free; m_current_first_free = m_current_page->m_first_free;
m_first_free_page = m_current_page->m_next_page; m_first_free_page = m_current_page->m_next_page;
m_current_ref_count = m_current_page->m_ref_count; m_current_ref_count = m_current_page->m_ref_count;
(m_memroot + m_first_free_page)->m_prev_page = RNIL; if (m_first_free_page != RNIL)
{
(m_memroot + m_first_free_page)->m_prev_page = RNIL;
}
goto seize_free; goto seize_free;
} }
...@@ -105,7 +108,7 @@ RWPool::seize(Ptr<void>& ptr) ...@@ -105,7 +108,7 @@ RWPool::seize(Ptr<void>& ptr)
m_current_page = 0; m_current_page = 0;
m_current_page_no = RNIL; m_current_page_no = RNIL;
m_current_pos = GLOBAL_PAGE_SIZE_WORDS; m_current_pos = RWPage::RWPAGE_WORDS;
m_current_first_free = REC_NIL; m_current_first_free = REC_NIL;
return false; return false;
...@@ -154,6 +157,7 @@ RWPool::release(Ptr<void> ptr) ...@@ -154,6 +157,7 @@ RWPool::release(Ptr<void> ptr)
} }
page->m_next_page = ffp; page->m_next_page = ffp;
page->m_prev_page = RNIL; page->m_prev_page = RNIL;
m_first_free_page = ptr_page;
return; return;
} }
else if(ref_cnt == 1) else if(ref_cnt == 1)
......
...@@ -20,12 +20,14 @@ ...@@ -20,12 +20,14 @@
struct RWPage struct RWPage
{ {
STATIC_CONST( RWPAGE_WORDS = GLOBAL_PAGE_SIZE_WORDS - 4 );
Uint32 m_type_id; Uint32 m_type_id;
Uint16 m_first_free; Uint16 m_first_free;
Uint16 m_ref_count; Uint16 m_ref_count;
Uint32 m_next_page; Uint32 m_next_page;
Uint32 m_prev_page; Uint32 m_prev_page;
Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 4]; Uint32 m_data[RWPAGE_WORDS];
}; };
/** /**
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
WOPool::WOPool() WOPool::WOPool()
{ {
bzero(this, sizeof(* this)); bzero(this, sizeof(* this));
m_current_pos = GLOBAL_PAGE_SIZE_WORDS; m_current_pos = WOPage::WOPAGE_WORDS;
} }
void void
......
...@@ -20,9 +20,11 @@ ...@@ -20,9 +20,11 @@
struct WOPage struct WOPage
{ {
STATIC_CONST( WOPAGE_WORDS = GLOBAL_PAGE_SIZE_WORDS - 2 );
Uint32 m_type_id; Uint32 m_type_id;
Uint32 m_ref_count; Uint32 m_ref_count;
Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 2]; Uint32 m_data[WOPAGE_WORDS];
}; };
/** /**
...@@ -61,7 +63,7 @@ WOPool::seize(Ptr<void>& ptr) ...@@ -61,7 +63,7 @@ WOPool::seize(Ptr<void>& ptr)
Uint32 pos = m_current_pos; Uint32 pos = m_current_pos;
Uint32 size = m_record_info.m_size; Uint32 size = m_record_info.m_size;
WOPage *pageP = m_current_page; WOPage *pageP = m_current_page;
if (likely(pos + size < GLOBAL_PAGE_SIZE_WORDS)) if (likely(pos + size < WOPage::WOPAGE_WORDS))
{ {
ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos; ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos;
ptr.p = (pageP->m_data + pos); ptr.p = (pageP->m_data + pos);
......
...@@ -343,24 +343,24 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r) ...@@ -343,24 +343,24 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
} }
break; break;
case NdbDictionary::Column::Blob: case NdbDictionary::Column::Blob:
{
const NdbBlob::Head* h = (const NdbBlob::Head*)r.aRef();
out << h->length << ":";
const unsigned char* p = (const unsigned char*)(h + 1);
unsigned n = r.get_size_in_bytes() - sizeof(*h);
for (unsigned k = 0; k < n && k < h->length; k++)
out.print("%02X", (int)p[k]);
j = length;
}
break;
case NdbDictionary::Column::Text: case NdbDictionary::Column::Text:
{ {
const NdbBlob::Head* h = (const NdbBlob::Head*)r.aRef(); // user defined aRef() may not be aligned to Uint64
out << h->length << ":"; NdbBlob::Head head;
const unsigned char* p = (const unsigned char*)(h + 1); memcpy(&head, r.aRef(), sizeof(head));
unsigned n = r.get_size_in_bytes() - sizeof(*h); out << head.length << ":";
for (unsigned k = 0; k < n && k < h->length; k++) const unsigned char* p = (const unsigned char*)r.aRef() + sizeof(head);
out.print("%c", (int)p[k]); if (r.get_size_in_bytes() < sizeof(head))
out << "***error***"; // really cannot happen
else {
unsigned n = r.get_size_in_bytes() - sizeof(head);
for (unsigned k = 0; k < n && k < head.length; k++) {
if (r.getType() == NdbDictionary::Column::Blob)
out.print("%02X", (int)p[k]);
else
out.print("%c", (int)p[k]);
}
}
j = length; j = length;
} }
break; break;
......
...@@ -1353,6 +1353,68 @@ runBug26481(NDBT_Context* ctx, NDBT_Step* step) ...@@ -1353,6 +1353,68 @@ runBug26481(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK; return NDBT_OK;
} }
int
runBug26450(NDBT_Context* ctx, NDBT_Step* step)
{
Uint32 i;
int result = NDBT_OK;
int loops = ctx->getNumLoops();
int records = ctx->getNumRecords();
NdbRestarter res;
Ndb* pNdb = GETNDB(step);
int node = res.getRandomNotMasterNodeId(rand());
Vector<int> nodes;
for (unsigned i = 0; i<res.getNumDbNodes(); i++)
{
if (res.getDbNodeId(i) != node)
nodes.push_back(res.getDbNodeId(i));
}
if (res.restartAll())
return NDBT_FAILED;
if (res.waitClusterStarted())
return NDBT_FAILED;
ndbout_c("node: %d", node);
if (res.restartOneDbNode(node, false, true, true))
return NDBT_FAILED;
if (res.waitNodesNoStart(&node, 1))
return NDBT_FAILED;
if (runClearTable(ctx, step))
return NDBT_FAILED;
for (i = 0; i < 2; i++)
{
if (res.restartAll(false, true, i > 0))
return NDBT_FAILED;
if (res.waitClusterNoStart())
return NDBT_FAILED;
if (res.startNodes(nodes.getBase(), nodes.size()))
return NDBT_FAILED;
if (res.waitNodesStarted(nodes.getBase(), nodes.size()))
return NDBT_FAILED;
}
if (res.startNodes(&node, 1))
return NDBT_FAILED;
if (res.waitNodesStarted(&node, 1))
return NDBT_FAILED;
HugoTransactions trans (* ctx->getTab());
if (trans.selectCount(pNdb) != 0)
return NDBT_FAILED;
return NDBT_OK;
}
NDBT_TESTSUITE(testNodeRestart); NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad", TESTCASE("NoLoad",
"Test that one node at a time can be stopped and then restarted "\ "Test that one node at a time can be stopped and then restarted "\
...@@ -1697,6 +1759,10 @@ TESTCASE("Bug26457", ""){ ...@@ -1697,6 +1759,10 @@ TESTCASE("Bug26457", ""){
TESTCASE("Bug26481", ""){ TESTCASE("Bug26481", ""){
INITIALIZER(runBug26481); INITIALIZER(runBug26481);
} }
TESTCASE("Bug26450", ""){
INITIALIZER(runLoadTable);
INITIALIZER(runBug26450);
}
NDBT_TESTSUITE_END(testNodeRestart); NDBT_TESTSUITE_END(testNodeRestart);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
......
...@@ -59,7 +59,12 @@ BackupFile::Twiddle(const AttributeDesc* attr_desc, AttributeData* attr_data, Ui ...@@ -59,7 +59,12 @@ BackupFile::Twiddle(const AttributeDesc* attr_desc, AttributeData* attr_data, Ui
return true; return true;
case 64: case 64:
for(i = 0; i<arraySize; i++){ for(i = 0; i<arraySize; i++){
attr_data->u_int64_value[i] = Twiddle64(attr_data->u_int64_value[i]); // allow unaligned
char* p = (char*)&attr_data->u_int64_value[i];
Uint64 x;
memcpy(&x, p, sizeof(Uint64));
x = Twiddle64(x);
memcpy(p, &x, sizeof(Uint64));
} }
return true; return true;
default: default:
......
...@@ -562,6 +562,7 @@ fi ...@@ -562,6 +562,7 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1*
%doc %attr(644, root, man) %{_mandir}/man8/mysqlmanager.8* %doc %attr(644, root, man) %{_mandir}/man8/mysqlmanager.8*
%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqltest.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
%doc %attr(644, root, man) %{_mandir}/man1/perror.1* %doc %attr(644, root, man) %{_mandir}/man1/perror.1*
...@@ -648,28 +649,42 @@ fi ...@@ -648,28 +649,42 @@ fi
%files ndb-tools %files ndb-tools
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
%attr(755, root, root) %{_bindir}/ndb_config
%attr(755, root, root) %{_bindir}/ndb_desc
%attr(755, root, root) %{_bindir}/ndb_error_reporter
%attr(755, root, root) %{_bindir}/ndb_mgm %attr(755, root, root) %{_bindir}/ndb_mgm
%attr(755, root, root) %{_bindir}/ndb_print_backup_file
%attr(755, root, root) %{_bindir}/ndb_print_schema_file
%attr(755, root, root) %{_bindir}/ndb_print_sys_file
%attr(755, root, root) %{_bindir}/ndb_restore %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_all
%attr(755, root, root) %{_bindir}/ndb_select_count %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_show_tables
%attr(755, root, root) %{_bindir}/ndb_test_platform
%attr(755, root, root) %{_bindir}/ndb_config
%attr(755, root, root) %{_bindir}/ndb_error_reporter
%attr(755, root, root) %{_bindir}/ndb_size.pl %attr(755, root, root) %{_bindir}/ndb_size.pl
%attr(755, root, root) %{_bindir}/ndb_print_backup_file %attr(755, root, root) %{_bindir}/ndb_test_platform
%attr(755, root, root) %{_bindir}/ndb_print_schema_file %attr(755, root, root) %{_bindir}/ndb_waiter
%attr(755, root, root) %{_bindir}/ndb_print_sys_file
%attr(-, root, root) %{_datadir}/mysql/ndb_size.tmpl %attr(-, root, root) %{_datadir}/mysql/ndb_size.tmpl
%doc %attr(644, root, man) %{_mandir}/man1/ndb_config.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_desc.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_error_reporter.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_print_backup_file.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_print_schema_file.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_print_sys_file.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_select_all.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_select_count.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_show_tables.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_size.pl.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_waiter.1*
%files ndb-extra %files ndb-extra
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
%attr(755, root, root) %{_sbindir}/ndb_cpcd
%attr(755, root, root) %{_bindir}/ndb_delete_all
%attr(755, root, root) %{_bindir}/ndb_drop_index %attr(755, root, root) %{_bindir}/ndb_drop_index
%attr(755, root, root) %{_bindir}/ndb_drop_table %attr(755, root, root) %{_bindir}/ndb_drop_table
%attr(755, root, root) %{_bindir}/ndb_delete_all %doc %attr(644, root, man) %{_mandir}/man1/ndb_delete_all.1*
%attr(755, root, root) %{_sbindir}/ndb_cpcd %doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_index.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_table.1*
%files devel %files devel
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
...@@ -710,6 +725,11 @@ fi ...@@ -710,6 +725,11 @@ fi
%attr(755, root, root) %{_bindir}/mysql_client_test %attr(755, root, root) %{_bindir}/mysql_client_test
%attr(755, root, root) %{_bindir}/mysql_client_test_embedded %attr(755, root, root) %{_bindir}/mysql_client_test_embedded
%attr(755, root, root) %{_bindir}/mysqltest_embedded %attr(755, root, root) %{_bindir}/mysqltest_embedded
%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test_embedded.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql-stress-test.pl.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql-test-run.pl.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1*
%files embedded %files embedded
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
...@@ -719,6 +739,10 @@ fi ...@@ -719,6 +739,10 @@ fi
# itself - note that they must be ordered by date (important when # itself - note that they must be ordered by date (important when
# merging BK trees) # merging BK trees)
%changelog %changelog
* Fri Mar 02 2007 Joerg Bruehe <joerg@mysql.com>
- Add several man pages for NDB which are now created.
* Fri Jan 05 2007 Kent Boortz <kent@mysql.com> * Fri Jan 05 2007 Kent Boortz <kent@mysql.com>
- Put back "libmygcc.a", found no real reason it was removed. - Put back "libmygcc.a", found no real reason it was removed.
......
...@@ -18,13 +18,18 @@ ...@@ -18,13 +18,18 @@
#include <tap.h> #include <tap.h>
#include <string.h> #include <string.h>
#define BASE64_LOOP_COUNT 500
#define BASE64_ROWS 4 /* Number of ok(..) */
int int
main(void) main(void)
{ {
int i, cmp; int i, cmp;
size_t j, k, l, dst_len, needed_length; size_t j, k, l, dst_len, needed_length;
for (i= 0; i < 500; i++) plan(BASE64_LOOP_COUNT * BASE64_ROWS);
for (i= 0; i < BASE64_LOOP_COUNT; i++)
{ {
/* Create source data */ /* Create source data */
const size_t src_len= rand() % 1000 + 1; const size_t src_len= rand() % 1000 + 1;
......
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