Commit bb00abb0 authored by unknown's avatar unknown

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


configure.in:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
scripts/Makefile.am:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
storage/ndb/include/transporter/TransporterRegistry.hpp:
  Auto merged
storage/ndb/src/common/transporter/SCI_Transporter.cpp:
  Auto merged
storage/ndb/src/common/transporter/SCI_Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Buffer.hpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/SendBuffer.cpp:
  Auto merged
storage/ndb/src/common/transporter/SendBuffer.hpp:
  Auto merged
storage/ndb/src/common/transporter/TCP_Transporter.cpp:
  Auto merged
storage/ndb/src/common/transporter/TCP_Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
  Auto merged
storage/ndb/test/ndbapi/testNdbApi.cpp:
  Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
  Auto merged
storage/ndb/test/run-test/ndb-autotest.sh:
  Auto merged
storage/ndb/test/tools/hugoLoad.cpp:
  Auto merged
storage/ndb/test/tools/hugoPkUpdate.cpp:
  Auto merged
storage/ndb/test/tools/hugoScanRead.cpp:
  Auto merged
storage/ndb/test/tools/hugoScanUpdate.cpp:
  Auto merged
storage/ndb/tools/Makefile.am:
  Auto merged
storage/ndb/tools/restore/Restore.cpp:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
parents a4e96888 c7787f8a
...@@ -214,4 +214,4 @@ drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ...@@ -214,4 +214,4 @@ drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
# Test BUG#10287 # Test BUG#10287
# #
--exec $NDB_TOOLS_DIR/ndb_select_all -d sys -D , SYSTAB_0 | grep 520093696 --exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696
...@@ -32,8 +32,6 @@ bin_SCRIPTS = @server_scripts@ \ ...@@ -32,8 +32,6 @@ bin_SCRIPTS = @server_scripts@ \
mysqldumpslow \ mysqldumpslow \
mysql_explain_log \ mysql_explain_log \
mysqld_multi \ mysqld_multi \
make_win_src_distribution \
make_win_binary_distribution \
mysql_create_system_tables mysql_create_system_tables
EXTRA_SCRIPTS = make_binary_distribution.sh \ EXTRA_SCRIPTS = make_binary_distribution.sh \
...@@ -84,6 +82,7 @@ CLEANFILES = @server_scripts@ \ ...@@ -84,6 +82,7 @@ CLEANFILES = @server_scripts@ \
mysqldumpslow \ mysqldumpslow \
mysqld_multi \ mysqld_multi \
make_win_src_distribution \ make_win_src_distribution \
make_win_binary_distribution \
mysql_create_system_tables mysql_create_system_tables
DISTCLEANFILES = mysqlbug DISTCLEANFILES = mysqlbug
......
...@@ -2372,7 +2372,7 @@ void sql_print_information(const char *format, ...) ...@@ -2372,7 +2372,7 @@ void sql_print_information(const char *format, ...)
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
#ifdef HAVE_MMAP
/********* transaction coordinator log for 2pc - mmap() based solution *******/ /********* transaction coordinator log for 2pc - mmap() based solution *******/
/* /*
...@@ -2410,13 +2410,17 @@ void sql_print_information(const char *format, ...) ...@@ -2410,13 +2410,17 @@ void sql_print_information(const char *format, ...)
new xid is added into it. Removing a xid from a page does not make it new xid is added into it. Removing a xid from a page does not make it
dirty - we don't sync removals to disk. dirty - we don't sync removals to disk.
*/ */
ulong tc_log_page_waits= 0;
#ifdef HAVE_MMAP
#define TC_LOG_HEADER_SIZE (sizeof(tc_log_magic)+1) #define TC_LOG_HEADER_SIZE (sizeof(tc_log_magic)+1)
static const char tc_log_magic[]={(char) 254, 0x23, 0x05, 0x74}; static const char tc_log_magic[]={(char) 254, 0x23, 0x05, 0x74};
ulong opt_tc_log_size= TC_LOG_MIN_SIZE; ulong opt_tc_log_size= TC_LOG_MIN_SIZE;
ulong tc_log_max_pages_used=0, tc_log_page_size=0, ulong tc_log_max_pages_used=0, tc_log_page_size=0, tc_log_cur_pages_used=0;
tc_log_page_waits=0, tc_log_cur_pages_used=0;
int TC_LOG_MMAP::open(const char *opt_name) int TC_LOG_MMAP::open(const char *opt_name)
{ {
......
...@@ -1087,6 +1087,8 @@ extern ulong rpl_recovery_rank, thread_cache_size; ...@@ -1087,6 +1087,8 @@ extern ulong rpl_recovery_rank, thread_cache_size;
extern ulong back_log; extern ulong back_log;
extern ulong specialflag, current_pid; extern ulong specialflag, current_pid;
extern ulong expire_logs_days, sync_binlog_period, sync_binlog_counter; extern ulong expire_logs_days, sync_binlog_period, sync_binlog_counter;
extern ulong opt_tc_log_size, tc_log_max_pages_used, tc_log_page_size;
extern ulong tc_log_page_waits;
extern my_bool relay_log_purge, opt_innodb_safe_binlog, opt_innodb; extern my_bool relay_log_purge, opt_innodb_safe_binlog, opt_innodb;
extern uint test_flags,select_errors,ha_open_options; extern uint test_flags,select_errors,ha_open_options;
extern uint protocol_version, mysqld_port, dropping_tables; extern uint protocol_version, mysqld_port, dropping_tables;
......
...@@ -4673,9 +4673,11 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite, ...@@ -4673,9 +4673,11 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
"more than one storage engine, when binary log is disabled)", "more than one storage engine, when binary log is disabled)",
(gptr*) &opt_tc_log_file, (gptr*) &opt_tc_log_file, 0, GET_STR, (gptr*) &opt_tc_log_file, (gptr*) &opt_tc_log_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_MMAP
{"log-tc-size", OPT_LOG_TC_SIZE, "Size of transaction coordinator log.", {"log-tc-size", OPT_LOG_TC_SIZE, "Size of transaction coordinator log.",
(gptr*) &opt_tc_log_size, (gptr*) &opt_tc_log_size, 0, GET_ULONG, (gptr*) &opt_tc_log_size, (gptr*) &opt_tc_log_size, 0, GET_ULONG,
REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ~0L, 0, TC_LOG_PAGE_SIZE, 0}, REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ~0L, 0, TC_LOG_PAGE_SIZE, 0},
#endif
{"log-update", OPT_UPDATE_LOG, {"log-update", OPT_UPDATE_LOG,
"The update log is deprecated since version 5.0, is replaced by the binary \ "The update log is deprecated since version 5.0, is replaced by the binary \
log and this option justs turns on --log-bin instead.", log and this option justs turns on --log-bin instead.",
...@@ -5817,9 +5819,11 @@ struct show_var_st status_vars[]= { ...@@ -5817,9 +5819,11 @@ struct show_var_st status_vars[]= {
#endif /* HAVE_OPENSSL */ #endif /* HAVE_OPENSSL */
{"Table_locks_immediate", (char*) &locks_immediate, SHOW_LONG}, {"Table_locks_immediate", (char*) &locks_immediate, SHOW_LONG},
{"Table_locks_waited", (char*) &locks_waited, SHOW_LONG}, {"Table_locks_waited", (char*) &locks_waited, SHOW_LONG},
#ifdef HAVE_MMAP
{"Tc_log_max_pages_used", (char*) &tc_log_max_pages_used, SHOW_LONG}, {"Tc_log_max_pages_used", (char*) &tc_log_max_pages_used, SHOW_LONG},
{"Tc_log_page_size", (char*) &tc_log_page_size, SHOW_LONG}, {"Tc_log_page_size", (char*) &tc_log_page_size, SHOW_LONG},
{"Tc_log_page_waits", (char*) &tc_log_page_waits, SHOW_LONG}, {"Tc_log_page_waits", (char*) &tc_log_page_waits, SHOW_LONG},
#endif
{"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_CONST}, {"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_CONST},
{"Threads_connected", (char*) &thread_count, SHOW_INT_CONST}, {"Threads_connected", (char*) &thread_count, SHOW_INT_CONST},
{"Threads_created", (char*) &thread_created, SHOW_LONG_CONST}, {"Threads_created", (char*) &thread_created, SHOW_LONG_CONST},
......
...@@ -45,10 +45,6 @@ extern const char **errmesg; ...@@ -45,10 +45,6 @@ extern const char **errmesg;
#define TC_LOG_PAGE_SIZE 8192 #define TC_LOG_PAGE_SIZE 8192
#define TC_LOG_MIN_SIZE (3*TC_LOG_PAGE_SIZE) #define TC_LOG_MIN_SIZE (3*TC_LOG_PAGE_SIZE)
extern ulong opt_tc_log_size;
extern ulong tc_log_max_pages_used;
extern ulong tc_log_page_size;
extern ulong tc_log_page_waits;
#define TC_HEURISTIC_RECOVER_COMMIT 1 #define TC_HEURISTIC_RECOVER_COMMIT 1
#define TC_HEURISTIC_RECOVER_ROLLBACK 2 #define TC_HEURISTIC_RECOVER_ROLLBACK 2
......
...@@ -203,6 +203,13 @@ public: ...@@ -203,6 +203,13 @@ public:
bool createSCITransporter(struct TransporterConfiguration * config); bool createSCITransporter(struct TransporterConfiguration * config);
bool createSHMTransporter(struct TransporterConfiguration * config); bool createSHMTransporter(struct TransporterConfiguration * config);
bool createOSETransporter(struct TransporterConfiguration * config); bool createOSETransporter(struct TransporterConfiguration * config);
/**
* Get free buffer space
*
* Get #free bytes in send buffer for <em>node</node>
*/
Uint32 get_free_buffer(Uint32 node) const ;
/** /**
* prepareSend * prepareSend
......
...@@ -1025,7 +1025,8 @@ SCI_Transporter::initSCI() { ...@@ -1025,7 +1025,8 @@ SCI_Transporter::initSCI() {
DBUG_RETURN(true); DBUG_RETURN(true);
} }
Uint32
SCI_Transporter::get_free_buffer() const
{
return (m_TargetSegm[m_ActiveAdapterId].writer)->get_free_buffer();
}
...@@ -133,7 +133,8 @@ public: ...@@ -133,7 +133,8 @@ public:
* remote segment is mapped. Otherwize false. * remote segment is mapped. Otherwize false.
*/ */
bool getConnectionStatus(); bool getConnectionStatus();
virtual Uint32 get_free_buffer() const;
private: private:
SCI_Transporter(TransporterRegistry &t_reg, SCI_Transporter(TransporterRegistry &t_reg,
const char *local_host, const char *local_host,
......
...@@ -157,6 +157,7 @@ public: ...@@ -157,6 +157,7 @@ public:
inline Uint32 getWriteIndex() const { return m_writeIndex;} inline Uint32 getWriteIndex() const { return m_writeIndex;}
inline Uint32 getBufferSize() const { return m_bufferSize;} inline Uint32 getBufferSize() const { return m_bufferSize;}
inline Uint32 get_free_buffer() const;
inline void copyIndexes(SHM_Writer * standbyWriter); inline void copyIndexes(SHM_Writer * standbyWriter);
...@@ -212,5 +213,21 @@ SHM_Writer::updateWritePtr(Uint32 sz){ ...@@ -212,5 +213,21 @@ SHM_Writer::updateWritePtr(Uint32 sz){
m_writeIndex = tWriteIndex; m_writeIndex = tWriteIndex;
* m_sharedWriteIndex = tWriteIndex; * m_sharedWriteIndex = tWriteIndex;
} }
inline
Uint32
SHM_Writer::get_free_buffer() const
{
Uint32 tReadIndex = * m_sharedReadIndex;
Uint32 tWriteIndex = m_writeIndex;
Uint32 free;
if(tReadIndex <= tWriteIndex){
free = m_bufferSize + tReadIndex - tWriteIndex;
} else {
free = tReadIndex - tWriteIndex;
}
return free;
}
#endif #endif
...@@ -365,3 +365,9 @@ SHM_Transporter::doSend() ...@@ -365,3 +365,9 @@ SHM_Transporter::doSend()
kill(m_remote_pid, g_ndb_shm_signum); kill(m_remote_pid, g_ndb_shm_signum);
} }
} }
Uint32
SHM_Transporter::get_free_buffer() const
{
return writer->get_free_buffer();
}
...@@ -139,6 +139,8 @@ protected: ...@@ -139,6 +139,8 @@ protected:
int m_remote_pid; int m_remote_pid;
Uint32 m_last_signal; Uint32 m_last_signal;
Uint32 m_signal_threshold; Uint32 m_signal_threshold;
virtual Uint32 get_free_buffer() const;
private: private:
bool _shmSegCreated; bool _shmSegCreated;
......
...@@ -60,7 +60,7 @@ SendBuffer::bufferSize() { ...@@ -60,7 +60,7 @@ SendBuffer::bufferSize() {
} }
Uint32 Uint32
SendBuffer::bufferSizeRemaining() { SendBuffer::bufferSizeRemaining() const {
return (sizeOfBuffer - dataSize); return (sizeOfBuffer - dataSize);
} }
......
...@@ -51,7 +51,7 @@ public: ...@@ -51,7 +51,7 @@ public:
bool initBuffer(Uint32 aRemoteNodeId); bool initBuffer(Uint32 aRemoteNodeId);
// Number of bytes remaining in the buffer // Number of bytes remaining in the buffer
Uint32 bufferSizeRemaining(); Uint32 bufferSizeRemaining() const;
// Number of bytes of data in the buffer // Number of bytes of data in the buffer
int bufferSize(); int bufferSize();
......
...@@ -253,6 +253,11 @@ TCP_Transporter::sendIsPossible(struct timeval * timeout) { ...@@ -253,6 +253,11 @@ TCP_Transporter::sendIsPossible(struct timeval * timeout) {
#endif #endif
} }
Uint32
TCP_Transporter::get_free_buffer() const
{
return m_sendBuffer.bufferSizeRemaining();
}
Uint32 * Uint32 *
TCP_Transporter::getWritePtr(Uint32 lenBytes, Uint32 prio){ TCP_Transporter::getWritePtr(Uint32 lenBytes, Uint32 prio){
......
...@@ -101,6 +101,7 @@ private: ...@@ -101,6 +101,7 @@ private:
*/ */
virtual void updateReceiveDataPtr(Uint32 bytesRead); virtual void updateReceiveDataPtr(Uint32 bytesRead);
virtual Uint32 get_free_buffer() const;
protected: protected:
/** /**
* Setup client/server and perform connect/accept * Setup client/server and perform connect/accept
......
...@@ -86,6 +86,8 @@ public: ...@@ -86,6 +86,8 @@ public:
m_socket_client->set_port(port); m_socket_client->set_port(port);
}; };
virtual Uint32 get_free_buffer() const = 0;
protected: protected:
Transporter(TransporterRegistry &, Transporter(TransporterRegistry &,
TransporterType, TransporterType,
......
...@@ -558,6 +558,18 @@ TransporterRegistry::removeTransporter(NodeId nodeId) { ...@@ -558,6 +558,18 @@ TransporterRegistry::removeTransporter(NodeId nodeId) {
theTransporters[nodeId] = NULL; theTransporters[nodeId] = NULL;
} }
Uint32
TransporterRegistry::get_free_buffer(Uint32 node) const
{
Transporter *t;
if(likely((t = theTransporters[node]) != 0))
{
return t->get_free_buffer();
}
return 0;
}
SendStatus SendStatus
TransporterRegistry::prepareSend(const SignalHeader * const signalHeader, TransporterRegistry::prepareSend(const SignalHeader * const signalHeader,
Uint8 prio, Uint8 prio,
......
...@@ -5072,6 +5072,7 @@ Dbdih::invalidateNodeLCP(Signal* signal, Uint32 nodeId, TabRecordPtr tabPtr) ...@@ -5072,6 +5072,7 @@ Dbdih::invalidateNodeLCP(Signal* signal, Uint32 nodeId, TabRecordPtr tabPtr)
* And reset nextLcp * And reset nextLcp
*/ */
replicaPtr.p->nextLcp = 0; replicaPtr.p->nextLcp = 0;
replicaPtr.p->noCrashedReplicas = 0;
}//if }//if
}//for }//for
}//for }//for
......
...@@ -133,6 +133,9 @@ void Dbtup::sendReadAttrinfo(Signal* signal, ...@@ -133,6 +133,9 @@ void Dbtup::sendReadAttrinfo(Signal* signal,
Uint32 ToutBufIndex, Uint32 ToutBufIndex,
const Operationrec * const regOperPtr) const Operationrec * const regOperPtr)
{ {
if(ToutBufIndex == 0)
return;
const BlockReference recBlockref = regOperPtr->recBlockref; const BlockReference recBlockref = regOperPtr->recBlockref;
const Uint32 sig0 = regOperPtr->tcOperationPtr; const Uint32 sig0 = regOperPtr->tcOperationPtr;
const Uint32 sig1 = regOperPtr->transid1; const Uint32 sig1 = regOperPtr->transid1;
......
...@@ -1668,7 +1668,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1668,7 +1668,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
"256K", "256K",
"16K", "64K",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
{ {
...@@ -1856,7 +1856,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1856,7 +1856,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
"1M", "1M",
"4K", "64K",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
{ {
......
...@@ -1605,6 +1605,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, ...@@ -1605,6 +1605,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
bool haveAutoIncrement = false; bool haveAutoIncrement = false;
Uint64 autoIncrementValue = 0; Uint64 autoIncrementValue = 0;
Uint32 distKeys= 0;
for(i = 0; i<sz; i++){ for(i = 0; i<sz; i++){
const NdbColumnImpl * col = impl.m_columns[i]; const NdbColumnImpl * col = impl.m_columns[i];
if(col == 0) if(col == 0)
...@@ -1616,7 +1617,9 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, ...@@ -1616,7 +1617,9 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
} }
haveAutoIncrement = true; haveAutoIncrement = true;
autoIncrementValue = col->m_autoIncrementInitialValue; autoIncrementValue = col->m_autoIncrementInitialValue;
} }
if (col->m_distributionKey)
distKeys++;
} }
// Check max length of frm data // Check max length of frm data
...@@ -1649,7 +1652,10 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, ...@@ -1649,7 +1652,10 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
abort(); abort();
} }
int distKeys= impl.m_noOfDistributionKeys; if (distKeys == impl.m_noOfKeys)
distKeys= 0;
impl.m_noOfDistributionKeys= distKeys;
for(i = 0; i<sz; i++){ for(i = 0; i<sz; i++){
const NdbColumnImpl * col = impl.m_columns[i]; const NdbColumnImpl * col = impl.m_columns[i];
if(col == 0) if(col == 0)
...@@ -1661,7 +1667,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, ...@@ -1661,7 +1667,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
tmpAttr.AttributeId = i; tmpAttr.AttributeId = i;
tmpAttr.AttributeKeyFlag = col->m_pk; tmpAttr.AttributeKeyFlag = col->m_pk;
tmpAttr.AttributeNullableFlag = col->m_nullable; tmpAttr.AttributeNullableFlag = col->m_nullable;
tmpAttr.AttributeDKey = col->m_distributionKey; tmpAttr.AttributeDKey = distKeys ? col->m_distributionKey : 0;
tmpAttr.AttributeExtType = (Uint32)col->m_type; tmpAttr.AttributeExtType = (Uint32)col->m_type;
tmpAttr.AttributeExtPrecision = ((unsigned)col->m_precision & 0xFFFF); tmpAttr.AttributeExtPrecision = ((unsigned)col->m_precision & 0xFFFF);
......
...@@ -104,8 +104,9 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) ...@@ -104,8 +104,9 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
{ {
Uint32 tTransId1, tTransId2; Uint32 tTransId1, tTransId2;
Uint32 tReqInfo; Uint32 tReqInfo;
Uint32 tInterpretInd = theInterpretIndicator; Uint8 tInterpretInd = theInterpretIndicator;
Uint8 tDirtyIndicator = theDirtyIndicator;
Uint32 tTotalCurrAI_Len = theTotalCurrAI_Len;
theErrorLine = 0; theErrorLine = 0;
if (tInterpretInd != 1) { if (tInterpretInd != 1) {
...@@ -123,7 +124,13 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) ...@@ -123,7 +124,13 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
if (tStatus != GetValue) { if (tStatus != GetValue) {
setErrorCodeAbort(4116); setErrorCodeAbort(4116);
return -1; return -1;
}//if }
else if(unlikely(tDirtyIndicator && tTotalCurrAI_Len == 0))
{
getValue(NdbDictionary::Column::FRAGMENT);
tTotalCurrAI_Len = theTotalCurrAI_Len;
assert(theTotalCurrAI_Len);
}
} else { } else {
setErrorCodeAbort(4005); setErrorCodeAbort(4005);
return -1; return -1;
...@@ -132,6 +139,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) ...@@ -132,6 +139,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
if (prepareSendInterpreted() == -1) { if (prepareSendInterpreted() == -1) {
return -1; return -1;
}//if }//if
tTotalCurrAI_Len = theTotalCurrAI_Len;
}//if }//if
//------------------------------------------------------------- //-------------------------------------------------------------
...@@ -140,7 +148,6 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) ...@@ -140,7 +148,6 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
//------------------------------------------------------------- //-------------------------------------------------------------
TcKeyReq * const tcKeyReq = CAST_PTR(TcKeyReq, theTCREQ->getDataPtrSend()); TcKeyReq * const tcKeyReq = CAST_PTR(TcKeyReq, theTCREQ->getDataPtrSend());
Uint32 tTotalCurrAI_Len = theTotalCurrAI_Len;
Uint32 tTableId = m_currentTable->m_tableId; Uint32 tTableId = m_currentTable->m_tableId;
Uint32 tSchemaVersion = m_currentTable->m_version; Uint32 tSchemaVersion = m_currentTable->m_version;
...@@ -188,7 +195,6 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) ...@@ -188,7 +195,6 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
tcKeyReq->setStartFlag(tReqInfo, tStartIndicator); tcKeyReq->setStartFlag(tReqInfo, tStartIndicator);
tcKeyReq->setInterpretedFlag(tReqInfo, tInterpretIndicator); tcKeyReq->setInterpretedFlag(tReqInfo, tInterpretIndicator);
Uint8 tDirtyIndicator = theDirtyIndicator;
OperationType tOperationType = theOperationType; OperationType tOperationType = theOperationType;
Uint32 tTupKeyLen = theTupKeyLen; Uint32 tTupKeyLen = theTupKeyLen;
Uint8 abortOption = Uint8 abortOption =
......
...@@ -866,6 +866,112 @@ int runUpdateWithoutKeys(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -866,6 +866,112 @@ int runUpdateWithoutKeys(NDBT_Context* ctx, NDBT_Step* step){
return result; return result;
} }
int runReadWithoutGetValue(NDBT_Context* ctx, NDBT_Step* step){
int result = NDBT_OK;
const NdbDictionary::Table* pTab = ctx->getTab();
HugoOperations hugoOps(*pTab);
Ndb* pNdb = GETNDB(step);
Uint32 lm;
for(Uint32 cm= 0; cm < 2; cm++)
{
for(lm= 0; lm <= NdbOperation::LM_CommittedRead; lm++)
{
NdbConnection* pCon = pNdb->startTransaction();
if (pCon == NULL){
pNdb->closeTransaction(pCon);
return NDBT_FAILED;
}
NdbOperation* pOp = pCon->getNdbOperation(pTab->getName());
if (pOp == NULL){
ERR(pCon->getNdbError());
pNdb->closeTransaction(pCon);
return NDBT_FAILED;
}
if (pOp->readTuple((NdbOperation::LockMode)lm) != 0){
pNdb->closeTransaction(pCon);
ERR(pOp->getNdbError());
return NDBT_FAILED;
}
for(int a = 0; a<pTab->getNoOfColumns(); a++){
if (pTab->getColumn(a)->getPrimaryKey() == true){
if(hugoOps.equalForAttr(pOp, a, 1) != 0){
ERR(pCon->getNdbError());
pNdb->closeTransaction(pCon);
return NDBT_FAILED;
}
}
}
// Dont' call any getValues
// Execute should work
int check = pCon->execute(cm == 0 ? NoCommit : Commit);
if (check == 0){
ndbout << "execute worked" << endl;
} else {
ERR(pCon->getNdbError());
result = NDBT_FAILED;
}
pNdb->closeTransaction(pCon);
}
}
/**
* Now test scans
*/
for(lm= 0; lm <= NdbOperation::LM_CommittedRead; lm++)
{
NdbConnection* pCon = pNdb->startTransaction();
if (pCon == NULL){
pNdb->closeTransaction(pCon);
return NDBT_FAILED;
}
NdbScanOperation* pOp = pCon->getNdbScanOperation(pTab->getName());
if (pOp == NULL){
ERR(pCon->getNdbError());
pNdb->closeTransaction(pCon);
return NDBT_FAILED;
}
if ((pOp->readTuples((NdbOperation::LockMode)lm)) != 0){
pNdb->closeTransaction(pCon);
ERR(pOp->getNdbError());
return NDBT_FAILED;
}
// Dont' call any getValues
// Execute should work
int check = pCon->execute(NoCommit);
if (check == 0){
ndbout << "execute worked" << endl;
} else {
ERR(pCon->getNdbError());
result = NDBT_FAILED;
}
int res;
while((res = pOp->nextResult()) == 0);
pNdb->closeTransaction(pCon);
if(res != 1)
result = NDBT_FAILED;
}
return result;
}
int runCheckGetNdbErrorOperation(NDBT_Context* ctx, NDBT_Step* step){ int runCheckGetNdbErrorOperation(NDBT_Context* ctx, NDBT_Step* step){
int result = NDBT_OK; int result = NDBT_OK;
const NdbDictionary::Table* pTab = ctx->getTab(); const NdbDictionary::Table* pTab = ctx->getTab();
...@@ -1000,6 +1106,12 @@ TESTCASE("NdbErrorOperation", ...@@ -1000,6 +1106,12 @@ TESTCASE("NdbErrorOperation",
"Test that NdbErrorOperation is properly set"){ "Test that NdbErrorOperation is properly set"){
INITIALIZER(runCheckGetNdbErrorOperation); INITIALIZER(runCheckGetNdbErrorOperation);
} }
TESTCASE("ReadWithoutGetValue",
"Test that it's possible to perform read wo/ getvalue's\n"){
INITIALIZER(runLoadTable);
INITIALIZER(runReadWithoutGetValue);
FINALIZER(runClearTable);
}
NDBT_TESTSUITE_END(testNdbApi); NDBT_TESTSUITE_END(testNdbApi);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
......
...@@ -512,6 +512,10 @@ max-time: 500 ...@@ -512,6 +512,10 @@ max-time: 500
cmd: testNdbApi cmd: testNdbApi
args: -n UpdateWithoutValues T6 args: -n UpdateWithoutValues T6
max-time: 500
cmd: testNdbApi
args: -n ReadWithoutGetValue
#max-time: 500 #max-time: 500
#cmd: testInterpreter #cmd: testInterpreter
#args: T1 #args: T1
......
This diff is collapsed.
...@@ -30,10 +30,12 @@ int main(int argc, const char** argv){ ...@@ -30,10 +30,12 @@ int main(int argc, const char** argv){
const char* _tabname = NULL; const char* _tabname = NULL;
int _help = 0; int _help = 0;
int _batch = 512; int _batch = 512;
const char* db = 0;
struct getargs args[] = { struct getargs args[] = {
{ "records", 'r', arg_integer, &_records, "Number of records", "recs" }, { "records", 'r', arg_integer, &_records, "Number of records", "recs" },
{ "batch", 'b', arg_integer, &_batch, "Number of operations in each transaction", "batch" }, { "batch", 'b', arg_integer, &_batch, "Number of operations in each transaction", "batch" },
{ "database", 'd', arg_string, &db, "Database", "" },
{ "usage", '?', arg_flag, &_help, "Print help", "" } { "usage", '?', arg_flag, &_help, "Print help", "" }
}; };
int num_args = sizeof(args) / sizeof(args[0]); int num_args = sizeof(args) / sizeof(args[0]);
...@@ -59,7 +61,7 @@ int main(int argc, const char** argv){ ...@@ -59,7 +61,7 @@ int main(int argc, const char** argv){
{ {
return NDBT_ProgramExit(NDBT_FAILED); return NDBT_ProgramExit(NDBT_FAILED);
} }
Ndb MyNdb(&con, "TEST_DB" ); Ndb MyNdb( &con, db ? db : "TEST_DB" );
if(MyNdb.init() != 0){ if(MyNdb.init() != 0){
ERR(MyNdb.getNdbError()); ERR(MyNdb.getNdbError());
......
...@@ -33,7 +33,7 @@ int main(int argc, const char** argv){ ...@@ -33,7 +33,7 @@ int main(int argc, const char** argv){
int _loops = 1; int _loops = 1;
int _abort = 0; int _abort = 0;
int _batch = 0; int _batch = 0;
const char* _tabname = NULL; const char* _tabname = NULL, *db = 0;
int _help = 0; int _help = 0;
struct getargs args[] = { struct getargs args[] = {
...@@ -41,7 +41,8 @@ int main(int argc, const char** argv){ ...@@ -41,7 +41,8 @@ int main(int argc, const char** argv){
{ "loops", 'l', arg_integer, &_loops, "number of times to run this program(0=infinite loop)", "loops" }, { "loops", 'l', arg_integer, &_loops, "number of times to run this program(0=infinite loop)", "loops" },
// { "batch", 'b', arg_integer, &_batch, "batch value", "batch" }, // { "batch", 'b', arg_integer, &_batch, "batch value", "batch" },
{ "records", 'r', arg_integer, &_records, "Number of records", "records" }, { "records", 'r', arg_integer, &_records, "Number of records", "records" },
{ "usage", '?', arg_flag, &_help, "Print help", "" } { "usage", '?', arg_flag, &_help, "Print help", "" },
{ "database", 'd', arg_string, &db, "Database", "" }
}; };
int num_args = sizeof(args) / sizeof(args[0]); int num_args = sizeof(args) / sizeof(args[0]);
int optind = 0; int optind = 0;
...@@ -62,7 +63,7 @@ int main(int argc, const char** argv){ ...@@ -62,7 +63,7 @@ int main(int argc, const char** argv){
{ {
return NDBT_ProgramExit(NDBT_FAILED); return NDBT_ProgramExit(NDBT_FAILED);
} }
Ndb MyNdb(&con, "TEST_DB" ); Ndb MyNdb( &con, db ? db : "TEST_DB" );
if(MyNdb.init() != 0){ if(MyNdb.init() != 0){
ERR(MyNdb.getNdbError()); ERR(MyNdb.getNdbError());
......
...@@ -33,7 +33,7 @@ int main(int argc, const char** argv){ ...@@ -33,7 +33,7 @@ int main(int argc, const char** argv){
int _loops = 1; int _loops = 1;
int _abort = 0; int _abort = 0;
int _parallelism = 1; int _parallelism = 1;
const char* _tabname = NULL; const char* _tabname = NULL, *db = 0;
int _help = 0; int _help = 0;
int lock = NdbOperation::LM_Read; int lock = NdbOperation::LM_Read;
int sorted = 0; int sorted = 0;
...@@ -45,7 +45,8 @@ int main(int argc, const char** argv){ ...@@ -45,7 +45,8 @@ int main(int argc, const char** argv){
{ "records", 'r', arg_integer, &_records, "Number of records", "recs" }, { "records", 'r', arg_integer, &_records, "Number of records", "recs" },
{ "usage", '?', arg_flag, &_help, "Print help", "" }, { "usage", '?', arg_flag, &_help, "Print help", "" },
{ "lock", 'm', arg_integer, &lock, "lock mode", "" }, { "lock", 'm', arg_integer, &lock, "lock mode", "" },
{ "sorted", 's', arg_flag, &sorted, "sorted", "" } { "sorted", 's', arg_flag, &sorted, "sorted", "" },
{ "database", 'd', arg_string, &db, "Database", "" }
}; };
int num_args = sizeof(args) / sizeof(args[0]); int num_args = sizeof(args) / sizeof(args[0]);
int optind = 0; int optind = 0;
...@@ -66,7 +67,7 @@ int main(int argc, const char** argv){ ...@@ -66,7 +67,7 @@ int main(int argc, const char** argv){
{ {
return NDBT_ProgramExit(NDBT_FAILED); return NDBT_ProgramExit(NDBT_FAILED);
} }
Ndb MyNdb(&con, "TEST_DB" ); Ndb MyNdb( &con, db ? db : "TEST_DB" );
if(MyNdb.init() != 0){ if(MyNdb.init() != 0){
ERR(MyNdb.getNdbError()); ERR(MyNdb.getNdbError());
......
...@@ -33,7 +33,7 @@ int main(int argc, const char** argv){ ...@@ -33,7 +33,7 @@ int main(int argc, const char** argv){
int _loops = 1; int _loops = 1;
int _parallelism = 1; int _parallelism = 1;
int _ver2 = 0; int _ver2 = 0;
const char* _tabname = NULL; const char* _tabname = NULL, *db = 0;
int _help = 0; int _help = 0;
struct getargs args[] = { struct getargs args[] = {
...@@ -42,7 +42,8 @@ int main(int argc, const char** argv){ ...@@ -42,7 +42,8 @@ int main(int argc, const char** argv){
{ "records", 'r', arg_integer, &_records, "Number of records", "recs" }, { "records", 'r', arg_integer, &_records, "Number of records", "recs" },
{ "ver2", '2', arg_flag, &_ver2, "Use version 2 of scanUpdateRecords", "" }, { "ver2", '2', arg_flag, &_ver2, "Use version 2 of scanUpdateRecords", "" },
{ "ver2", '1', arg_negative_flag, &_ver2, "Use version 1 of scanUpdateRecords (default)", "" }, { "ver2", '1', arg_negative_flag, &_ver2, "Use version 1 of scanUpdateRecords (default)", "" },
{ "usage", '?', arg_flag, &_help, "Print help", "" } { "usage", '?', arg_flag, &_help, "Print help", "" },
{ "database", 'd', arg_string, &db, "Database", "" }
}; };
int num_args = sizeof(args) / sizeof(args[0]); int num_args = sizeof(args) / sizeof(args[0]);
int optind = 0; int optind = 0;
...@@ -63,7 +64,7 @@ int main(int argc, const char** argv){ ...@@ -63,7 +64,7 @@ int main(int argc, const char** argv){
{ {
return NDBT_ProgramExit(NDBT_FAILED); return NDBT_ProgramExit(NDBT_FAILED);
} }
Ndb MyNdb(&con, "TEST_DB" ); Ndb MyNdb( &con, db ? db : "TEST_DB" );
if(MyNdb.init() != 0){ if(MyNdb.init() != 0){
ERR(MyNdb.getNdbError()); ERR(MyNdb.getNdbError());
...@@ -100,6 +101,7 @@ int main(int argc, const char** argv){ ...@@ -100,6 +101,7 @@ int main(int argc, const char** argv){
return NDBT_ProgramExit(NDBT_FAILED); return NDBT_ProgramExit(NDBT_FAILED);
} }
i++; i++;
//NdbSleep_MilliSleep(300);
} }
return NDBT_ProgramExit(NDBT_OK); return NDBT_ProgramExit(NDBT_OK);
......
...@@ -30,7 +30,8 @@ ndb_restore_SOURCES = restore/restore_main.cpp \ ...@@ -30,7 +30,8 @@ ndb_restore_SOURCES = restore/restore_main.cpp \
restore/consumer.cpp \ restore/consumer.cpp \
restore/consumer_restore.cpp \ restore/consumer_restore.cpp \
restore/consumer_printer.cpp \ restore/consumer_printer.cpp \
restore/Restore.cpp restore/Restore.cpp \
../test/src/NDBT_ResultRow.cpp $(tools_common_sources)
include $(top_srcdir)/storage/ndb/config/common.mk.am include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_ndbapitools.mk.am include $(top_srcdir)/storage/ndb/config/type_ndbapitools.mk.am
......
...@@ -925,19 +925,12 @@ operator<<(NdbOut& ndbout, const LogEntry& logE) ...@@ -925,19 +925,12 @@ operator<<(NdbOut& ndbout, const LogEntry& logE)
return ndbout; return ndbout;
} }
#include <NDBT.hpp>
NdbOut & NdbOut &
operator<<(NdbOut& ndbout, const TableS & table){ operator<<(NdbOut& ndbout, const TableS & table){
ndbout << endl << "Table: " << table.getTableName() << endl;
for (int j = 0; j < table.getNoOfAttributes(); j++) ndbout << (* (NDBT_Table*)table.m_dictTable) << endl;
{
const AttributeDesc * desc = table[j];
ndbout << desc->m_column->getName() << ": "
<< (Uint32) desc->m_column->getType();
ndbout << " key: " << (Uint32) desc->m_column->getPrimaryKey();
ndbout << " array: " << desc->arraySize;
ndbout << " size: " << desc->size << endl;
} // for
return ndbout; return ndbout;
} }
......
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
%else %else
%define release 0.glibc23 %define release 0.glibc23
%endif %endif
%define license GPL
%define mysqld_user mysql %define mysqld_user mysql
%define server_suffix -standard %define server_suffix -standard
%define mysqldatadir /var/lib/mysql
# We don't package all files installed into the build root by intention - # We don't package all files installed into the build root by intention -
# See BUG#998 for details. # See BUG#998 for details.
...@@ -16,11 +18,9 @@ ...@@ -16,11 +18,9 @@
Name: MySQL Name: MySQL
Summary: MySQL: a very fast and reliable SQL database server Summary: MySQL: a very fast and reliable SQL database server
Group: Applications/Databases Group: Applications/Databases
Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
Group(pt_BR): Aplicações/Banco_de_Dados
Version: @MYSQL_NO_DASH_VERSION@ Version: @MYSQL_NO_DASH_VERSION@
Release: %{release} Release: %{release}
License: GPL License: %{license}
Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz
URL: http://www.mysql.com/ URL: http://www.mysql.com/
Packager: Lenz Grimmer <build@mysql.com> Packager: Lenz Grimmer <build@mysql.com>
...@@ -54,11 +54,8 @@ news and information about the MySQL software. Also please see the ...@@ -54,11 +54,8 @@ news and information about the MySQL software. Also please see the
documentation and the manual for more information. documentation and the manual for more information.
%package server %package server
Release: %{release}
Summary: MySQL: a very fast and reliable SQL database server Summary: MySQL: a very fast and reliable SQL database server
Group: Applications/Databases Group: Applications/Databases
Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
Group(pt_BR): Aplicações/Banco_de_Dados
Requires: fileutils sh-utils Requires: fileutils sh-utils
Provides: msqlormysql mysql-server mysql MySQL Provides: msqlormysql mysql-server mysql MySQL
Obsoletes: MySQL mysql mysql-server Obsoletes: MySQL mysql mysql-server
...@@ -88,11 +85,8 @@ If you want to access and work with the database, you have to install ...@@ -88,11 +85,8 @@ If you want to access and work with the database, you have to install
package "MySQL-client" as well! package "MySQL-client" as well!
%package client %package client
Release: %{release}
Summary: MySQL - Client Summary: MySQL - Client
Group: Applications/Databases Group: Applications/Databases
Summary(pt_BR): MySQL - Cliente
Group(pt_BR): Aplicações/Banco_de_Dados
Obsoletes: mysql-client Obsoletes: mysql-client
Provides: mysql-client Provides: mysql-client
...@@ -101,11 +95,7 @@ This package contains the standard MySQL clients and administration tools. ...@@ -101,11 +95,7 @@ This package contains the standard MySQL clients and administration tools.
%{see_base} %{see_base}
%description client -l pt_BR
Este pacote contém os clientes padrão para o MySQL.
%package ndb-storage %package ndb-storage
Release: %{release}
Summary: MySQL - ndbcluster storage engine Summary: MySQL - ndbcluster storage engine
Group: Applications/Databases Group: Applications/Databases
...@@ -119,7 +109,6 @@ with the MySQL Max server. ...@@ -119,7 +109,6 @@ with the MySQL Max server.
%{see_base} %{see_base}
%package ndb-management %package ndb-management
Release: %{release}
Summary: MySQL - ndbcluster storage engine management Summary: MySQL - ndbcluster storage engine management
Group: Applications/Databases Group: Applications/Databases
...@@ -131,7 +120,6 @@ one computer in the cluster. ...@@ -131,7 +120,6 @@ one computer in the cluster.
%{see_base} %{see_base}
%package ndb-tools %package ndb-tools
Release: %{release}
Summary: MySQL - ndbcluster storage engine basic tools Summary: MySQL - ndbcluster storage engine basic tools
Group: Applications/Databases Group: Applications/Databases
...@@ -141,7 +129,6 @@ This package contains ndbcluster storage engine basic tools. ...@@ -141,7 +129,6 @@ This package contains ndbcluster storage engine basic tools.
%{see_base} %{see_base}
%package ndb-extra %package ndb-extra
Release: %{release}
Summary: MySQL - ndbcluster storage engine extra tools Summary: MySQL - ndbcluster storage engine extra tools
Group: Applications/Databases Group: Applications/Databases
...@@ -152,12 +139,9 @@ They should be used with caution. ...@@ -152,12 +139,9 @@ They should be used with caution.
%{see_base} %{see_base}
%package bench %package bench
Release: %{release}
Requires: %{name}-client perl-DBI perl Requires: %{name}-client perl-DBI perl
Summary: MySQL - Benchmarks and test system Summary: MySQL - Benchmarks and test system
Group: Applications/Databases Group: Applications/Databases
Summary(pt_BR): MySQL - Medições de desempenho
Group(pt_BR): Aplicações/Banco_de_Dados
Provides: mysql-bench Provides: mysql-bench
Obsoletes: mysql-bench Obsoletes: mysql-bench
...@@ -166,15 +150,9 @@ This package contains MySQL benchmark scripts and data. ...@@ -166,15 +150,9 @@ This package contains MySQL benchmark scripts and data.
%{see_base} %{see_base}
%description bench -l pt_BR
Este pacote contém medições de desempenho de scripts e dados do MySQL.
%package devel %package devel
Release: %{release}
Summary: MySQL - Development header files and libraries Summary: MySQL - Development header files and libraries
Group: Applications/Databases Group: Applications/Databases
Summary(pt_BR): MySQL - Medições de desempenho
Group(pt_BR): Aplicações/Banco_de_Dados
Provides: mysql-devel Provides: mysql-devel
Obsoletes: mysql-devel Obsoletes: mysql-devel
...@@ -184,12 +162,7 @@ necessary to develop MySQL client applications. ...@@ -184,12 +162,7 @@ necessary to develop MySQL client applications.
%{see_base} %{see_base}
%description devel -l pt_BR
Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas
necessárias para desenvolver aplicações clientes do MySQL.
%package shared %package shared
Release: %{release}
Summary: MySQL - Shared libraries Summary: MySQL - Shared libraries
Group: Applications/Databases Group: Applications/Databases
...@@ -198,7 +171,6 @@ This package contains the shared libraries (*.so*) which certain ...@@ -198,7 +171,6 @@ This package contains the shared libraries (*.so*) which certain
languages and applications need to dynamically load and use MySQL. languages and applications need to dynamically load and use MySQL.
%package Max %package Max
Release: %{release}
Summary: MySQL - server with extended functionality Summary: MySQL - server with extended functionality
Group: Applications/Databases Group: Applications/Databases
Provides: mysql-Max Provides: mysql-Max
...@@ -222,12 +194,9 @@ the standard MySQL package. ...@@ -222,12 +194,9 @@ the standard MySQL package.
Please note that this is a dynamically linked binary! Please note that this is a dynamically linked binary!
%package embedded %package embedded
Release: %{release}
Requires: %{name}-devel Requires: %{name}-devel
Summary: MySQL - embedded library Summary: MySQL - embedded library
Group: Applications/Databases Group: Applications/Databases
Summary(pt_BR): MySQL - Medições de desempenho
Group(pt_BR): Aplicações/Banco_de_Dados
Obsoletes: mysql-embedded Obsoletes: mysql-embedded
%description embedded %description embedded
...@@ -271,7 +240,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ ...@@ -271,7 +240,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \ --sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \ --datadir=%{_datadir} \
--localstatedir=/var/lib/mysql \ --localstatedir=%{mysqldatadir} \
--infodir=%{_infodir} \ --infodir=%{_infodir} \
--includedir=%{_includedir} \ --includedir=%{_includedir} \
--mandir=%{_mandir} \ --mandir=%{_mandir} \
...@@ -311,7 +280,7 @@ mkdir -p $RBR%{_libdir}/mysql ...@@ -311,7 +280,7 @@ mkdir -p $RBR%{_libdir}/mysql
PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin} PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin}
export PATH export PATH
# Build the 4.0 Max binary (includes BDB and UDFs and therefore # Build the Max binary (includes BDB and UDFs and therefore
# cannot be linked statically against the patched glibc) # cannot be linked statically against the patched glibc)
# Use gcc for C and C++ code (to avoid a dependency on libstdc++ and # Use gcc for C and C++ code (to avoid a dependency on libstdc++ and
...@@ -336,8 +305,7 @@ BuildMySQL "--enable-shared \ ...@@ -336,8 +305,7 @@ BuildMySQL "--enable-shared \
--with-comment=\"MySQL Community Edition - Max (GPL)\" \ --with-comment=\"MySQL Community Edition - Max (GPL)\" \
--with-server-suffix='-Max'" --with-server-suffix='-Max'"
# Save everything for debug make test
# tar cf $RBR/all.tar .
# Save mysqld-max # Save mysqld-max
mv sql/mysqld sql/mysqld-max mv sql/mysqld sql/mysqld-max
...@@ -387,13 +355,15 @@ BuildMySQL "--disable-shared \ ...@@ -387,13 +355,15 @@ BuildMySQL "--disable-shared \
--without-openssl" --without-openssl"
nm --numeric-sort sql/mysqld > sql/mysqld.sym nm --numeric-sort sql/mysqld > sql/mysqld.sym
make test
%install %install
RBR=$RPM_BUILD_ROOT RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version} MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
# Ensure that needed directories exists # Ensure that needed directories exists
install -d $RBR%{_sysconfdir}/{logrotate.d,init.d} install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
install -d $RBR/var/lib/mysql/mysql install -d $RBR%{mysqldatadir}/mysql
install -d $RBR%{_datadir}/{sql-bench,mysql-test} install -d $RBR%{_datadir}/{sql-bench,mysql-test}
install -d $RBR%{_includedir} install -d $RBR%{_includedir}
install -d $RBR%{_libdir} install -d $RBR%{_libdir}
...@@ -447,7 +417,7 @@ then ...@@ -447,7 +417,7 @@ then
fi fi
%post server %post server
mysql_datadir=/var/lib/mysql mysql_datadir=%{mysqldatadir}
# Create data directory if needed # Create data directory if needed
if test ! -d $mysql_datadir; then mkdir -m755 $mysql_datadir; fi if test ! -d $mysql_datadir; then mkdir -m755 $mysql_datadir; fi
...@@ -467,17 +437,17 @@ fi ...@@ -467,17 +437,17 @@ fi
# Create a MySQL user. Do not report any problems if it already # Create a MySQL user. Do not report any problems if it already
# exists. This is redhat specific and should be handled more portable # exists. This is redhat specific and should be handled more portable
useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" mysql 2> /dev/null || true useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" %{mysqld_user} 2> /dev/null || true
# Change permissions so that the user that will run the MySQL daemon # Change permissions so that the user that will run the MySQL daemon
# owns all database files. # owns all database files.
chown -R mysql $mysql_datadir chown -R %{mysqld_user} $mysql_datadir
# Initiate databases # Initiate databases
mysql_install_db --rpm --user=mysql %{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
# Change permissions again to fix any new files. # Change permissions again to fix any new files.
chown -R mysql $mysql_datadir chown -R %{mysqld_user} $mysql_datadir
# Fix permissions for the permission database so that only the user # Fix permissions for the permission database so that only the user
# can read them. # can read them.
...@@ -671,6 +641,7 @@ fi ...@@ -671,6 +641,7 @@ fi
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
%attr(-, root, root) %{_datadir}/sql-bench %attr(-, root, root) %{_datadir}/sql-bench
%attr(-, root, root) %{_datadir}/mysql-test %attr(-, root, root) %{_datadir}/mysql-test
%attr(755, rott, root) %{_bindir}/mysql_client_test
%attr(755, root, root) %{_bindir}/mysqltestmanager %attr(755, root, root) %{_bindir}/mysqltestmanager
%attr(755, root, root) %{_bindir}/mysqltestmanager-pwgen %attr(755, root, root) %{_bindir}/mysqltestmanager-pwgen
%attr(755, root, root) %{_bindir}/mysqltestmanagerc %attr(755, root, root) %{_bindir}/mysqltestmanagerc
...@@ -688,6 +659,17 @@ fi ...@@ -688,6 +659,17 @@ 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
* Mon Jun 06 2005 Lenz Grimmer <lenz@mysql.com>
- added mysql_client_test to the "bench" subpackage (BUG 10676)
* Wed Jun 01 2005 Lenz Grimmer <lenz@mysql.com>
- use "mysqldatadir" variable instead of hard-coding the path multiple times
- use the "mysqld_user" variable on all occasions a user name is referenced
- removed (incomplete) Brazilian translations
- removed redundant release tags from the subpackage descriptions
* Wed May 25 2005 Joerg Bruehe <joerg@mysql.com> * Wed May 25 2005 Joerg Bruehe <joerg@mysql.com>
- Added a "make clean" between separate calls to "BuildMySQL". - Added a "make clean" between separate calls to "BuildMySQL".
......
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