Bug #27982 Summary: NdbScanfilter cmp api evolution proposal
Submitted: 20 Apr 2007 13:52 Modified: 4 May 2007 11:40
Reporter: Tomas Ulin Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S4 (Feature request)
Version:mysql-5.1 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request) / R4 (High) / E3 (Medium)

[20 Apr 2007 13:52] Tomas Ulin
Description:
oday the NdbScanFilter api provides a set of methods to address Mysql predefined attribute types such as BINARY,CHAR .
The proposal is to extend this api to be able to compare only on a subset of bytes of these attribute by introducing an offset parameter in the cmp methods.

The actual comparison method is defined as follow :

int NdbScanFilter::cmp(BinaryCondition cond,
int ColId,
const void* val,
Uint32 len = 0)
This method compare the column ColId with the value val.
and could become :
int NdbScanFilter::cmp(BinaryCondition cond,
int ColId,
const void* val,
Uint32 len = 0,
Uint32 Offset=0)
This method compare the column ColId with the value val starting at Offset byte from the beginning.

According to this evolution, we could easily apply Mysql filter on application specific attributes as Set and Array.

How to repeat:
.