Bug #24568 NdbScanFilter NAND/NOR operations sometimes do not work as expected
Submitted: 24 Nov 2006 9:06 Modified: 23 Mar 2007 11:14
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S2 (Serious)
Version:5.0, 5.1 OS:Linux (linux)
Assigned to: justin he CPU Architecture:Any

[24 Nov 2006 9:06] Hartmut Holzgraefe
Description:
I'd expect a top level AND in a NdbScanFilter setup being replaced by a NAND to simply invert the result but i'm getting different results back instead.

How to repeat:
See attached test program 

Suggested fix:
no idea
[2 Feb 2007 18:31] Jonas Oreland
comments:
1) is it really needed to have a separate stack for this,
   can you just extend current state
   (as it seems you push/pop at same places as other stack)

2) is it relly needed to have separate "group" for this,
   wouldnt it be enought to just add a "negate" == your popCount
   variable to current state?

3) Can you also make ndbapi testprogram on this, start with hartmut's
   and check in under ndb/test/ndbapi

   add modify it the following way
   1) let it be self contained, so that it
      - creates table (using ndbapi)
      - populates table
      - drop table

   2) let it work with a random set of filter generated 
      (and increase length to atleast 5)
[8 Feb 2007 5:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/19532

ChangeSet@1.2297, 2007-02-08 13:15:16+08:00, Justin.He@dev3-240.dev.cn.tlan +3 -0
  Bug#24568, NdbScanFilter NAND/NOR operations sometimes do not work as expected
  
  correct NAND/NOR operations, and add a test case for it.
[9 Feb 2007 9:15] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/19609

ChangeSet@1.2297, 2007-02-09 17:09:08+08:00, Justin.He@dev3-240.dev.cn.tlan +5 -0
  Bug#24568, NdbScanFilter NAND/NOR operations sometimes do not work as expected
  
  correct NAND/NOR operations, and add a test case for it.
[18 Feb 2007 23:47] Jonas Oreland
i still dont see need for extra stack...but it doesnt relly matter...
patch is ok...
[5 Mar 2007 10:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/21115

ChangeSet@1.2439, 2007-03-02 11:03:16+08:00, Justin.He@dev3-240.dev.cn.tlan +1 -0
  bug#24568, NdbScanFilter NAND/NOR operations sometimes do not work as expected
  when merge from 5.0 to 5.1, update a function call in testScanFilter.cpp 
  beacuase the function's definition is changed from 5.0 to 5.1
[5 Mar 2007 15:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/21160

ChangeSet@1.2107, 2007-03-05 16:41:00+01:00, jonas@perch.ndb.mysql.com +6 -0
  ndb - wl2325-5.0
    Bug #24568 ScanFilter and NAND/NOR
[21 Mar 2007 7:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/22429

ChangeSet@1.2475, 2007-03-21 15:36:22+08:00, Justin.He@dev3-240.dev.cn.tlan +1 -0
  Bug#24568, NdbScanFilter NAND/NOR operations sometimes do not works as expected
  this patch is an absolutely necessary supplement of the previous patch,
  the previous patch doesnot cover isnull() and isnotnull() methods' effect.
[23 Mar 2007 11:14] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.1.17 changelog.
[7 Apr 2007 7:00] Bugs System
Pushed into 5.0.40
[7 Apr 2007 7:01] Bugs System
Pushed into 5.1.18-beta
[29 May 2007 12:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/27567

ChangeSet@1.2148, 2007-05-29 14:34:55+02:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#24568 patch 2 (isnull/isnotnull) wl2325-5.0