Commit e5706080 authored by unknown's avatar unknown

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
parent 1384e640
......@@ -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);
......
......@@ -747,8 +747,6 @@ void CertDecoder::GetName(NameType nt)
idx += length2;
}
source_.advance(oidSz + 1);
word32 length2 = GetLength(source_);
source_.advance(length2);
}
}
......
......@@ -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");
......
......@@ -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;
......
......@@ -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,
......
......@@ -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);
/**
......
......@@ -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;
}
......
......@@ -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): {
......
......@@ -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;
......
......@@ -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
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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,
......
......@@ -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);
}
......
......@@ -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())
......
......@@ -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++;
......
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
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