diff --git a/ndb/include/ndbapi/NdbScanFilter.hpp b/ndb/include/ndbapi/NdbScanFilter.hpp index 6a9a035a0ed..6acb0456333 100644 --- a/ndb/include/ndbapi/NdbScanFilter.hpp +++ b/ndb/include/ndbapi/NdbScanFilter.hpp @@ -48,12 +48,12 @@ public: enum BinaryCondition { - LE = 0, ///< lower bound - LT = 1, ///< lower bound, strict - GE = 2, ///< upper bound - GT = 3, ///< upper bound, strict - EQ = 4, ///< equality - NE = 5 + COND_LE = 0, ///< lower bound + COND_LT = 1, ///< lower bound, strict + COND_GE = 2, ///< upper bound + COND_GT = 3, ///< upper bound, strict + COND_EQ = 4, ///< equality + COND_NE = 5 }; /** @@ -97,53 +97,53 @@ public: /** Compare column value with integer for equal * ®return 0 if successful, -1 otherwize */ - int eq(int ColId, Uint32 value) { return cmp(EQ, ColId, &value, 4);} + int eq(int ColId, Uint32 value) { return cmp(COND_EQ, ColId, &value, 4);} /** Compare column value with integer for not equal. * ®return 0 if successful, -1 otherwize */ - int ne(int ColId, Uint32 value) { return cmp(NE, ColId, &value, 4);} + int ne(int ColId, Uint32 value) { return cmp(COND_NE, ColId, &value, 4);} /** Compare column value with integer for less than. * ®return 0 if successful, -1 otherwize */ - int lt(int ColId, Uint32 value) { return cmp(LT, ColId, &value, 4);} + int lt(int ColId, Uint32 value) { return cmp(COND_LT, ColId, &value, 4);} /** Compare column value with integer for less than or equal. * ®return 0 if successful, -1 otherwize */ - int le(int ColId, Uint32 value) { return cmp(LE, ColId, &value, 4);} + int le(int ColId, Uint32 value) { return cmp(COND_LE, ColId, &value, 4);} /** Compare column value with integer for greater than. * ®return 0 if successful, -1 otherwize */ - int gt(int ColId, Uint32 value) { return cmp(GT, ColId, &value, 4);} + int gt(int ColId, Uint32 value) { return cmp(COND_GT, ColId, &value, 4);} /** Compare column value with integer for greater than or equal. * ®return 0 if successful, -1 otherwize */ - int ge(int ColId, Uint32 value) { return cmp(GE, ColId, &value, 4);} + int ge(int ColId, Uint32 value) { return cmp(COND_GE, ColId, &value, 4);} /** Compare column value with integer for equal. 64-bit. * ®return 0 if successful, -1 otherwize */ - int eq(int ColId, Uint64 value) { return cmp(EQ, ColId, &value, 8);} + int eq(int ColId, Uint64 value) { return cmp(COND_EQ, ColId, &value, 8);} /** Compare column value with integer for not equal. 64-bit. * ®return 0 if successful, -1 otherwize */ - int ne(int ColId, Uint64 value) { return cmp(NE, ColId, &value, 8);} + int ne(int ColId, Uint64 value) { return cmp(COND_NE, ColId, &value, 8);} /** Compare column value with integer for less than. 64-bit. * ®return 0 if successful, -1 otherwize */ - int lt(int ColId, Uint64 value) { return cmp(LT, ColId, &value, 8);} + int lt(int ColId, Uint64 value) { return cmp(COND_LT, ColId, &value, 8);} /** Compare column value with integer for less than or equal. 64-bit. * ®return 0 if successful, -1 otherwize */ - int le(int ColId, Uint64 value) { return cmp(LE, ColId, &value, 8);} + int le(int ColId, Uint64 value) { return cmp(COND_LE, ColId, &value, 8);} /** Compare column value with integer for greater than. 64-bit. * ®return 0 if successful, -1 otherwize */ - int gt(int ColId, Uint64 value) { return cmp(GT, ColId, &value, 8);} + int gt(int ColId, Uint64 value) { return cmp(COND_GT, ColId, &value, 8);} /** Compare column value with integer for greater than or equal. 64-bit. * ®return 0 if successful, -1 otherwize */ - int ge(int ColId, Uint64 value) { return cmp(GE, ColId, &value, 8);} + int ge(int ColId, Uint64 value) { return cmp(COND_GE, ColId, &value, 8);} /** @} *********************************************************************/ /** Check if column value is NULL */ diff --git a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index 2d8013989ec..9778c938e0f 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -1906,7 +1906,6 @@ int Dbtup::interpreterNextLab(Signal* signal, else { Uint32 tmp = ((argLen + 3) >> 2) + 1; - ndbout_c("tmp = %d", tmp); TprogramCounter += tmp; } break; diff --git a/ndb/src/ndbapi/NdbScanFilter.cpp b/ndb/src/ndbapi/NdbScanFilter.cpp index 0c054e1f463..f462cc536e1 100644 --- a/ndb/src/ndbapi/NdbScanFilter.cpp +++ b/ndb/src/ndbapi/NdbScanFilter.cpp @@ -414,17 +414,17 @@ NdbScanFilter::cmp(BinaryCondition cond, int ColId, const void *val, Uint32 len) { switch(cond){ - case LE: + case COND_LE: return m_impl.cond_col_const(Interpreter::LE, ColId, val, len); - case LT: + case COND_LT: return m_impl.cond_col_const(Interpreter::LT, ColId, val, len); - case GE: + case COND_GE: return m_impl.cond_col_const(Interpreter::GE, ColId, val, len); - case GT: + case COND_GT: return m_impl.cond_col_const(Interpreter::GT, ColId, val, len); - case EQ: + case COND_EQ: return m_impl.cond_col_const(Interpreter::EQ, ColId, val, len); - case NE: + case COND_NE: return m_impl.cond_col_const(Interpreter::NE, ColId, val, len); } return -1; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index d70ace943c8..12cf4874129 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -1671,7 +1671,7 @@ int ha_ndbcluster::filtered_scan(const byte *key, uint key_len, // Define scan filter if (field->real_type() == MYSQL_TYPE_STRING) - sf.eq(ndb_fieldnr, key_ptr, field_len); + sf.cmp(NdbScanFilter::COND_EQ, ndb_fieldnr, key_ptr, field_len); else { if (field_len == 8)