Bug #12021 ndb_condition_pushdown fails in the latest 5.0
Submitted: 18 Jul 2005 20:40 Modified: 2 Sep 2005 9:13
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:
Assigned to: Martin Skold CPU Architecture:Any

[18 Jul 2005 20:40] Konstantin Osipov
Description:
The server is built with ./BUILD/compile-pentium-valgrind-max, the test suite 
fails in ndb_condition_pushdown:
-------------------------------------------------------
*** r/ndb_condition_pushdown.result     2005-06-03 19:23:55.000000000 +0300
--- r/ndb_condition_pushdown.reject     2005-07-18 23:33:52.739060800 +0300
***************
*** 1514,1520 ****
  '1901-01-01 01:01:01' in(date_time) 
  order by auto;
  id    select_type     table   type    possible_keys   key     key_len ref    rows     Extra
! 1     SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    4       Using where with pushed condition; Using filesort
  select auto from t1 where
  "aaaa" in(string) and 
  "aaaa" in(vstring) and 
--- 1514,1520 ----
  '1901-01-01 01:01:01' in(date_time) 
  order by auto;
  id    select_type     table   type    possible_keys   key     key_len ref    rows     Extra
! 1     SIMPLE  t1      ref     medium_index    medium_index    3       const  10       Using where; Using filesort
  select auto from t1 where
  "aaaa" in(string) and 
  "aaaa" in(vstring) and 
***************
*** 1617,1623 ****
  '1901-01-01 01:01:01' not in(date_time) 
  order by auto;
  id    select_type     table   type    possible_keys   key     key_len ref    rows     Extra
! 1     SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    4       Using where with pushed condition; Using filesort
  select auto from t1 where
  "aaaa" not in(string) and 
  "aaaa" not in(vstring) and 
--- 1617,1623 ----
  '1901-01-01 01:01:01' not in(date_time) 
  order by auto;
  id    select_type     table   type    possible_keys   key     key_len ref    rows     Extra
! 1     SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    4       Using where; Using filesort
  select auto from t1 where
  "aaaa" not in(string) and 
  "aaaa" not in(vstring) and 
-------------------------------------------------------

How to repeat:
run the test suite

Suggested fix:
Someone has pushed without running NDB tests.
Most probably the problem is trivial, as the difference is in EXPLAIN.
[18 Jul 2005 22:47] MySQL Verification Team
TEST                            RESULT
-------------------------------------------------------
ndb_condition_pushdown         [ fail ]
[29 Jul 2005 13:20] Martin Skold
The failed EXPLAIN shows that something has changed in the Item structure
(used to generate the pushdown conditions) causing condition generation
to fail. This is not just an EXPLAIN output problem, somebody broke this
optimization feature by pushing without testing.
[31 Jul 2005 19: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/internals/27758