Commit d779a039 authored by unknown's avatar unknown

Merge mysql.com:/home/stewart/Documents/MySQL/5.0/ndb

into mysql.com:/home/stewart/Documents/MySQL/5.0/ndb-dynamic-port

parents 517b9bd9 821e062b
...@@ -48,12 +48,12 @@ public: ...@@ -48,12 +48,12 @@ public:
enum BinaryCondition enum BinaryCondition
{ {
LE = 0, ///< lower bound COND_LE = 0, ///< lower bound
LT = 1, ///< lower bound, strict COND_LT = 1, ///< lower bound, strict
GE = 2, ///< upper bound COND_GE = 2, ///< upper bound
GT = 3, ///< upper bound, strict COND_GT = 3, ///< upper bound, strict
EQ = 4, ///< equality COND_EQ = 4, ///< equality
NE = 5 COND_NE = 5
}; };
/** /**
...@@ -97,53 +97,53 @@ public: ...@@ -97,53 +97,53 @@ public:
/** Compare column value with integer for equal /** Compare column value with integer for equal
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for not equal.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for less than.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for less than or equal.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for greater than.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for greater than or equal.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for equal. 64-bit.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for not equal. 64-bit.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for less than. 64-bit.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for less than or equal. 64-bit.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for greater than. 64-bit.
* ®return 0 if successful, -1 otherwize * ®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. /** Compare column value with integer for greater than or equal. 64-bit.
* ®return 0 if successful, -1 otherwize * ®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 */ /** Check if column value is NULL */
......
...@@ -1906,7 +1906,6 @@ int Dbtup::interpreterNextLab(Signal* signal, ...@@ -1906,7 +1906,6 @@ int Dbtup::interpreterNextLab(Signal* signal,
else else
{ {
Uint32 tmp = ((argLen + 3) >> 2) + 1; Uint32 tmp = ((argLen + 3) >> 2) + 1;
ndbout_c("tmp = %d", tmp);
TprogramCounter += tmp; TprogramCounter += tmp;
} }
break; break;
......
...@@ -414,17 +414,17 @@ NdbScanFilter::cmp(BinaryCondition cond, int ColId, ...@@ -414,17 +414,17 @@ NdbScanFilter::cmp(BinaryCondition cond, int ColId,
const void *val, Uint32 len) const void *val, Uint32 len)
{ {
switch(cond){ switch(cond){
case LE: case COND_LE:
return m_impl.cond_col_const(Interpreter::LE, ColId, val, len); 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); 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); 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); 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); 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 m_impl.cond_col_const(Interpreter::NE, ColId, val, len);
} }
return -1; return -1;
......
...@@ -1671,7 +1671,7 @@ int ha_ndbcluster::filtered_scan(const byte *key, uint key_len, ...@@ -1671,7 +1671,7 @@ int ha_ndbcluster::filtered_scan(const byte *key, uint key_len,
// Define scan filter // Define scan filter
if (field->real_type() == MYSQL_TYPE_STRING) 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 else
{ {
if (field_len == 8) if (field_len == 8)
......
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