mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
Merge mysql.com:/home/stewart/Documents/MySQL/5.0/ndb
into mysql.com:/home/stewart/Documents/MySQL/5.0/ndb-dynamic-port
This commit is contained in:
commit
d779a03980
4 changed files with 25 additions and 26 deletions
|
@ -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 */
|
||||
|
|
|
@ -1906,7 +1906,6 @@ int Dbtup::interpreterNextLab(Signal* signal,
|
|||
else
|
||||
{
|
||||
Uint32 tmp = ((argLen + 3) >> 2) + 1;
|
||||
ndbout_c("tmp = %d", tmp);
|
||||
TprogramCounter += tmp;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue