diff options
author | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-02-21 19:38:40 +0200 |
---|---|---|
committer | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-02-21 19:38:40 +0200 |
commit | e5706080f08eea5a5e67f85778307fd2cc021861 (patch) | |
tree | 3be2ddec9867a7253e617d92f8fa85f72d57e6d3 | |
parent | 1384e640053aee1f528148e876a632b2a0a2a8ed (diff) | |
download | mariadb-git-e5706080f08eea5a5e67f85778307fd2cc021861.tar.gz |
After merge fixes
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
extra/yassl/src/ssl.cpp:
Removed compiler warning
extra/yassl/taocrypt/src/asn.cpp:
After merge fixes
extra/yassl/testsuite/testsuite.cpp:
Removed compiler warning
mysql-test/r/ndb_lock.result:
After merge fixes
ndb/src/common/debugger/EventLogger.cpp:
Removed compiler warning
ndb/src/common/util/ConfigValues.cpp:
Removed compiler warning
ndb/src/common/util/NdbSqlUtil.cpp:
Removed compiler warning
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Removed compiler warning
ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp:
Removed compiler warning
ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp:
Removed compiler warning
ndb/src/kernel/vm/ndbd_malloc.cpp:
Removed compiler warning
ndb/src/mgmclient/main.cpp:
Removed compiler warning
ndb/src/ndbapi/SignalSender.cpp:
Removed compiler warning
sql/ha_ndbcluster.cc:
Some extra safety
sql/item_cmpfunc.cc:
After merge fixes
sql/item_subselect.cc:
After merge fixes
sql/sql_insert.cc:
After merge fixes
(This actually fixes a bug in old code when many connections are in use)
support-files/compiler_warnings.supp:
Removed some suppressed warnings
-rw-r--r-- | extra/yassl/src/ssl.cpp | 2 | ||||
-rw-r--r-- | extra/yassl/taocrypt/src/asn.cpp | 2 | ||||
-rw-r--r-- | extra/yassl/testsuite/testsuite.cpp | 4 | ||||
-rw-r--r-- | mysql-test/r/ndb_lock.result | 2 | ||||
-rw-r--r-- | ndb/src/common/debugger/EventLogger.cpp | 3 | ||||
-rw-r--r-- | ndb/src/common/util/ConfigValues.cpp | 2 | ||||
-rw-r--r-- | ndb/src/common/util/NdbSqlUtil.cpp | 2 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbtc/DbtcMain.cpp | 3 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp | 2 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp | 2 | ||||
-rw-r--r-- | ndb/src/kernel/vm/ndbd_malloc.cpp | 2 | ||||
-rw-r--r-- | ndb/src/mgmclient/main.cpp | 2 | ||||
-rw-r--r-- | ndb/src/ndbapi/SignalSender.cpp | 8 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 3 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 2 | ||||
-rw-r--r-- | sql/item_subselect.cc | 9 | ||||
-rw-r--r-- | sql/sql_insert.cc | 2 | ||||
-rw-r--r-- | support-files/compiler_warnings.supp | 12 |
18 files changed, 20 insertions, 44 deletions
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 70198af79b4..837121c249d 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -950,7 +950,7 @@ void ERR_print_errors_fp(FILE* /*fp*/) char* ERR_error_string(unsigned long errNumber, char* buffer) { - static char* msg = "Please supply a buffer for error string"; + static char* msg = (char*) "Please supply a buffer for error string"; if (buffer) { SetErrorString(YasslError(errNumber), buffer); diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index ef7a330b76d..5bc865a4ba7 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -747,8 +747,6 @@ void CertDecoder::GetName(NameType nt) idx += length2; } - source_.advance(oidSz + 1); - word32 length2 = GetLength(source_); source_.advance(length2); } } diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 93b9b3d7026..06e75153341 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -86,8 +86,8 @@ int main(int argc, char** argv) // input output compare byte input[TaoCrypt::MD5::DIGEST_SIZE]; byte output[TaoCrypt::MD5::DIGEST_SIZE]; - file_test("input", input); - file_test("output", output); + file_test((char*) "input", input); + file_test((char*) "output", output); assert(memcmp(input, output, sizeof(input)) == 0); printf("\nAll tests passed!\n"); diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result index d5875cb4d47..9a2cea0f512 100644 --- a/mysql-test/r/ndb_lock.result +++ b/mysql-test/r/ndb_lock.result @@ -121,7 +121,7 @@ select * from t1 where x = 1 for update; x y z 1 one 1 select * from t1 where x = 2 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction +Got one of the listed errors rollback; commit; begin; diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp index 3efd52808e2..58849b7d8db 100644 --- a/ndb/src/common/debugger/EventLogger.cpp +++ b/ndb/src/common/debugger/EventLogger.cpp @@ -913,6 +913,8 @@ EventLogger::close() removeAllHandlers(); } +#ifdef NOT_USED + static NdbOut& operator<<(NdbOut& out, const LogLevel & ll) { @@ -922,6 +924,7 @@ operator<<(NdbOut& out, const LogLevel & ll) out << "]"; return out; } +#endif int EventLoggerBase::event_lookup(int eventType, diff --git a/ndb/src/common/util/ConfigValues.cpp b/ndb/src/common/util/ConfigValues.cpp index cc1ce0d1519..9309fe3fbd6 100644 --- a/ndb/src/common/util/ConfigValues.cpp +++ b/ndb/src/common/util/ConfigValues.cpp @@ -18,8 +18,6 @@ #include <NdbOut.hpp> #include <NdbTCP.h> -static Uint32 hash(Uint32 key, Uint32 size); -static Uint32 nextHash(Uint32 key, Uint32 size, Uint32 pos, Uint32 count); static bool findKey(const Uint32 * vals, Uint32 sz, Uint32 key, Uint32 * pos); /** diff --git a/ndb/src/common/util/NdbSqlUtil.cpp b/ndb/src/common/util/NdbSqlUtil.cpp index 1234e4ece6b..0f62d66c149 100644 --- a/ndb/src/common/util/NdbSqlUtil.cpp +++ b/ndb/src/common/util/NdbSqlUtil.cpp @@ -681,8 +681,6 @@ int NdbSqlUtil::cmpBit(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full) { Uint32 n = (n1 < n2) ? n1 : n2; - char* c1 = (char*)p1; - char* c2 = (char*)p2; int ret = memcmp(p1, p2, n); return ret; } diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index 2b2e0e649a4..af994a2b3cb 100644 --- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -6944,7 +6944,6 @@ void Dbtc::execGCP_NOMORETRANS(Signal* signal) /*****************************************************************************/ void Dbtc::execNODE_FAILREP(Signal* signal) { - HostRecordPtr tmpHostptr; jamEntry(); NodeFailRep * const nodeFail = (NodeFailRep *)&signal->theData[0]; @@ -11866,8 +11865,6 @@ void Dbtc::execTCKEYREF(Signal* signal) } const UintR TconnectIndex = indexOp->connectionIndex; ApiConnectRecord * const regApiPtr = &apiConnectRecord[TconnectIndex]; - Uint32 tcKeyRequestInfo = indexOp->tcIndxReq.requestInfo; - Uint32 commitFlg = TcKeyReq::getCommitFlag(tcKeyRequestInfo); switch(indexOp->indexOpState) { case(IOS_NOOP): { diff --git a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp index b0f71223c9d..964d8578217 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp @@ -185,7 +185,6 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data PagePtr pagePtr; pagePtr.i = pageId; ptrCheckGuard(pagePtr, cnoOfPage, page); - const Uint32 tabDescriptor = tablePtr.p->tabDescriptor; const Uint32* attrIds = &tableDescriptor[tablePtr.p->readKeyArray].tabDescr; const Uint32 numAttrs = tablePtr.p->noOfKeyAttr; // read pk attributes from original tuple @@ -239,7 +238,6 @@ Dbtup::accReadPk(Uint32 tableId, Uint32 fragId, Uint32 fragPageId, Uint32 pageIn FragrecordPtr fragPtr; getFragmentrec(fragPtr, fragId, tablePtr.p); // get real page id and tuple offset - PagePtr pagePtr; Uint32 pageId = getRealpid(fragPtr.p, fragPageId); ndbrequire((pageIndex & 0x1) == 0); Uint32 pageOffset = ZPAGE_HEADER_SIZE + (pageIndex >> 1) * tablePtr.p->tupheadsize; diff --git a/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp b/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp index f9898519bde..364a8a0bba5 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp @@ -92,8 +92,6 @@ void Dbtup::rfrReadRestartInfoLab(Signal* signal, RestartInfoRecordPtr riPtr) seizeDiskBufferSegmentRecord(dbsiPtr); riPtr.p->sriDataBufferSegmentP = dbsiPtr.i; Uint32 retPageRef = RNIL; - Uint32 noAllocPages = 1; - Uint32 noOfPagesAllocated; { /** * Use low pages for 0-pages during SR diff --git a/ndb/src/kernel/vm/ndbd_malloc.cpp b/ndb/src/kernel/vm/ndbd_malloc.cpp index 9386e3c7cd3..21a26ff11d8 100644 --- a/ndb/src/kernel/vm/ndbd_malloc.cpp +++ b/ndb/src/kernel/vm/ndbd_malloc.cpp @@ -22,12 +22,14 @@ #include <stdio.h> #endif +#ifdef TRACE_MALLOC static void xxx(size_t size, size_t *s_m, size_t *s_k, size_t *s_b) { *s_m = size/1024/1024; *s_k = (size - *s_m*1024*1024)/1024; *s_b = size - *s_m*1024*1024-*s_k*1024; } +#endif static Uint64 g_allocated_memory; void *ndbd_malloc(size_t size) diff --git a/ndb/src/mgmclient/main.cpp b/ndb/src/mgmclient/main.cpp index 2d0103632b9..55617c74e3f 100644 --- a/ndb/src/mgmclient/main.cpp +++ b/ndb/src/mgmclient/main.cpp @@ -128,8 +128,6 @@ read_and_execute(int _try_reconnect) int main(int argc, char** argv){ NDB_INIT(argv[0]); - const char *_host = 0; - int _port = 0; load_defaults("my",load_default_groups,&argc,&argv); int ho_error; diff --git a/ndb/src/ndbapi/SignalSender.cpp b/ndb/src/ndbapi/SignalSender.cpp index 548a3e1d111..b8e71f310f7 100644 --- a/ndb/src/ndbapi/SignalSender.cpp +++ b/ndb/src/ndbapi/SignalSender.cpp @@ -19,14 +19,6 @@ #include <signaldata/NFCompleteRep.hpp> #include <signaldata/NodeFailRep.hpp> -static -void -require(bool x) -{ - if (!x) - abort(); -} - SimpleSignal::SimpleSignal(bool dealloc){ memset(this, 0, sizeof(* this)); deallocSections = dealloc; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 3443fd58aa8..555910ca3df 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -6660,6 +6660,9 @@ pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused))) for (;;) { + if (abort_loop) + break; /* Shutting down server */ + pthread_mutex_lock(&LOCK_ndb_util_thread); pthread_cond_timedwait(&COND_ndb_util_thread, &LOCK_ndb_util_thread, diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 10877fa4434..e0d74cc7547 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -904,7 +904,7 @@ longlong Item_in_optimizer::val_int() */ for (i= 0; i < ncols; i++) { - if (cache->el(i)->null_value) + if (cache->element_index(i)->null_value) item_subs->set_cond_guard_var(i, FALSE); } diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index cb6e8146adc..20d9ed8affa 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1164,7 +1164,7 @@ Item_in_subselect::row_value_transformer(JOIN *join) optimizer->keep_top_level_cache(); thd->lex->current_select= current; - unit->uncacheable|= UNCACHEABLE_DEPENDENT; + master_unit->uncacheable|= UNCACHEABLE_DEPENDENT; if (!abort_on_null && left_expr->maybe_null && !pushed_cond_guards) { @@ -1220,7 +1220,7 @@ Item_in_subselect::row_value_transformer(JOIN *join) (char *)"<list ref>") ); Item *col_item= new Item_cond_or(item_eq, item_isnull); - if (!abort_on_null && left_expr->el(i)->maybe_null) + if (!abort_on_null && left_expr->element_index(i)->maybe_null) { if (!(col_item= new Item_func_trig_cond(col_item, get_cond_guard(i)))) DBUG_RETURN(RES_ERROR); @@ -1234,7 +1234,7 @@ Item_in_subselect::row_value_transformer(JOIN *join) ref_pointer_array + i, (char *)"<no matter>", (char *)"<list ref>")); - if (!abort_on_null && left_expr->el(i)->maybe_null) + if (!abort_on_null && left_expr->element_index(i)->maybe_null) { if (!(item_nnull_test= new Item_func_trig_cond(item_nnull_test, get_cond_guard(i)))) @@ -1311,7 +1311,7 @@ Item_in_subselect::row_value_transformer(JOIN *join) TODO: why we create the above for cases where the right part cant be NULL? */ - if (left_expr->el(i)->maybe_null) + if (left_expr->element_index(i)->maybe_null) { if (!(item= new Item_func_trig_cond(item, get_cond_guard(i)))) DBUG_RETURN(RES_ERROR); @@ -1762,7 +1762,6 @@ int subselect_single_select_engine::exec() if (!executed) { item->reset_value_registration(); - bool have_changed_access= FALSE; JOIN_TAB *changed_tabs[MAX_TABLES]; JOIN_TAB **last_changed_tab= changed_tabs; if (item->have_guarded_conds()) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 3b479841c1d..aa429f9250e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1193,7 +1193,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) goto err; } if ((table->file->table_flags() & HA_PARTIAL_COLUMN_READ) || - compare_record(table, query_id)) + compare_record(table, thd->query_id)) { info->updated++; diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index f8651e1d27d..d97ffbfafe2 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -1,12 +1,4 @@ DictTabInfo.cpp : .*invalid access to non-static.* DictTabInfo.cpp : .*macro was used incorrectly.* -EventLogger.cpp : .*defined but not used.* : 916 -NdbSqlUtil.cpp : .*unused variable.* : 684 - 685 -DbdihMain.cpp : .*unused variable.* : 6666 -DbtcMain.cpp : .*unused variable.* : 6947 -DbtcMain.cpp : .*unused variable.* : 11870 -DbtupExecQuery.cpp : .*unused variable.* : 1449 -DbtupSystemRestart.cpp : .*unused variable.* : 95 - 96 -DbtupIndex.cpp : .*unused variable.* : 188 - 242 -ndbd_malloc.cpp : .*defined but not used.* : 25 -main.cpp : .*unused variable.* : 131 - 132 +DbdihMain.cpp : .*unused variable.* : 6666-6705 +DbtupExecQuery.cpp : .*unused variable.* : 1448-1449 |