11 messages in com.mysql.lists.ndb-connectorsRe: NdbScanFilter with strings| From | Sent On | Attachments |
|---|---|---|
| John David Duncan | 18 Aug 2007 23:38 | |
| Monty Taylor | 19 Aug 2007 14:35 | |
| John David Duncan | 19 Aug 2007 18:01 | |
| Frazer Clement | 20 Aug 2007 07:09 | |
| John David Duncan | 22 Aug 2007 10:21 | |
| Monty Taylor | 22 Aug 2007 10:24 | |
| John David Duncan | 22 Aug 2007 10:26 | |
| Monty Taylor | 22 Aug 2007 10:32 | |
| Monty Taylor | 29 Aug 2007 22:41 | |
| John David Duncan | 29 Aug 2007 22:52 | |
| Monty Taylor | 29 Aug 2007 23:47 |
| Subject: | Re: NdbScanFilter with strings![]() |
|---|---|
| From: | Frazer Clement (f.cl...@uk.ibm.com) |
| Date: | 08/20/2007 07:09:14 AM |
| List: | com.mysql.lists.ndb-connectors |
I seem to recall that the passing-convention depends on the comparison used. If I remember correctly, LIKE filters don't require the preceding length byte stuff in the passed buffer, but equality does. Not sure about the other inequalities. Keep trying all the combinations.... :)
John David Duncan <jd...@mysql.com> 20/08/2007 02:02
To Monty Taylor <mtay...@mysql.com> cc ndb-...@lists.mysql.com Subject Re: NdbScanFilter with strings
int cmpString(NdbOperation * op, BinaryCondition cond, int ColId, const char * anInputString, size_t len ) { const NdbDictionary::Column * theColumn = op->getTable()->getColumn(ColId); char * stringVal = ndbFormatString(theColumn,anInputString,len); if (stringVal == NULL) return -1; int retval = self->cmp(cond,ColId,(void *)stringVal); free(stringVal); return retval; };
where ndbFormatString returns the whole length-byte-string thing.
I'm not 100% I've tested this, though. But I think I remember talking to Johan about it at the time...
Yeah, I try essentially the same thing (with either CHAR or VARCHAR), but I always get an empty result, as if the filter does not match anything.
-- MySQL NDB Connectors Mailing List For list archives: http://lists.mysql.com/ndb-connectors To unsubscribe: http://lists.mysql.com/ndb-connectors?unsub=f.cl...@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU




