Bug #21056 ndb pushdown equal/setValue error on datetime
Submitted: 14 Jul 2006 6:14 Modified: 2 Nov 2006 8:06
Reporter: Adam Dixon (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.0.25-BK, 5.0.22 OS:Linux (Linux)
Assigned to: Martin Skold

[14 Jul 2006 6:14] Adam Dixon
Description:
Datetime ndbpushdown use error.

mysql> select count(1) from t1 where realtime like '2006-07-14 %';
ERROR 1296 (HY000): Got error 4209 'Length parameter in equal/setValue is incorrect' from ndbcluster

How to repeat:
Evident on 5.0.21 & 5.0.22

mysql> CREATE TABLE t1 (realtime datetime) ENGINE=ndbcluster;
Query OK, 0 rows affected (0.34 sec)

mysql> insert into t1 (realtime) VALUES (NOW());
Query OK, 1 row affected (0.03 sec)
mysql> insert into t1 (realtime) VALUES (NOW());
Query OK, 1 row affected (0.00 sec)

mysql> set engine_condition_pushdown=1;
mysql> select * from t1 where realtime like '2006-07-14 %';
ERROR 1296 (HY000): Got error 4209 'Length parameter in equal/setValue is incorrect' from ndbcluster

mysql> set engine_condition_pushdown=0;
mysql> select * from t1 where realtime like '2006-07-14 %';
+---------------------+
| realtime            |
+---------------------+
| 2006-07-14 14:40:42 | 
...
| 2006-07-14 14:40:43 | 
+---------------------+
6 rows in set (0.04 sec)
[14 Jul 2006 10:38] Valerii Kravchuk
Thank you for a bug report. Verified just as described with 5.1.12-BK and 5.0.25-BK on Linux:

openxs@suse:~/dbs/5.1/mysql-test> ./mysql-test-run.pl --record ndb_21056
Logging: ./mysql-test-run.pl --record ndb_21056
Using ndbcluster if necessary, mysqld supports it
Skipping SSL, mysqld not compiled with SSL
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Using NDBCLUSTER_PORT       = 9310
Using NDBCLUSTER_PORT_SLAVE = 9311
Using IM_PORT               = 9312
Using IM_MYSQLD1_PORT       = 9313
Using IM_MYSQLD2_PORT       = 9314
Killing Possible Leftover Processes
Removing Stale Files
Installing Master Database
Installing Master Database
Installing ndbcluster master
Starting ndbd 1(2)
Starting ndbd 2(2)
Waiting for NDB data nodes to start...
Ok
=======================================================
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

ndb_21056                      [ fail ]

Errors are (from /home/openxs/dbs/5.1/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 16: query 'select * from t1 where realtime like '2006-07-14 %
'' failed: 1296: Got error 4209 'Length parameter in equal/setValue is incorrect
' from NDBCLUSTER
(the last lines may be the most important ones)
Result from queries before failure can be found in r/ndb_21056.log

Aborting: ndb_21056 failed in default mode. To continue, re-run with '--force'.
Ending Tests
Shutting-down MySQL daemon

Master(s) shutdown finished
Slave(s) shutdown finished
openxs@suse:~/dbs/5.1/mysql-test> cat t/ndb_21056.test
--source include/have_ndb.inc
--source include/not_embedded.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

#
# Basic test of pushdown in NDB
#

CREATE TABLE t1 (realtime datetime) ENGINE=ndbcluster;
insert into t1 (realtime) VALUES (NOW());
insert into t1 (realtime) VALUES (NOW());
set engine_condition_pushdown=1;
select * from t1 where realtime like '2006-07-14 %';

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

openxs@suse:~/dbs/5.1/mysql-test> cd ../../5.0/mysql-test/
openxs@suse:~/dbs/5.0/mysql-test> cp ../../5.1/mysql-test/t/ndb_21056.test t
openxs@suse:~/dbs/5.0/mysql-test> ./mysql-test-run --record ndb_21056
Logging: ./mysql-test-run --record ndb_21056
Installing Test Databases
Removing Stale Files
Installing Master Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --b
asedir=.. --datadir=mysql-test/var/master-data --skip-innodb --skip-ndbcluster -
-skip-bdb
Installing Master Databases 1
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --b
asedir=.. --datadir=mysql-test/var/master-data1 --skip-innodb --skip-ndbcluster
--skip-bdb
Installing Slave Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --b
asedir=.. --datadir=mysql-test/var/slave-data --skip-innodb --skip-ndbcluster --
skip-bdb
Manager disabled, skipping manager start.
Starting ndbcluster
Starting ndbd
Starting ndbd
Waiting for NDB data nodes to start...
Connected to Management Server at: localhost:9350
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @127.0.0.1  (Version: 5.0.25, Nodegroup: 0, Master)
id=2    @127.0.0.1  (Version: 5.0.25, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=3    @127.0.0.1  (Version: 5.0.25)

[mysqld(API)]   4 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
id=6 (not connected, accepting connect from any host)
id=7 (not connected, accepting connect from any host)

Loading Standard Test Databases
Starting Tests

TEST                            RESULT
-------------------------------------------------------
ndb_21056                      [ fail ]

Errors are (from /home/openxs/dbs/5.0/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 16: query 'select * from t1 where realtime like '2006-07-14 %
'' failed: 1296: Got error 4209 'Length parameter in equal/setValue is incorrect
' from ndbcluster
(the last lines may be the most important ones)
...

With set engine_condition_pushdown=0 everything works as expected.
[5 Sep 2006 15:07] 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/11412

ChangeSet@1.2257, 2006-09-05 17:07:00+02:00, mskold@mysql.com +4 -0
  Bug #21056  ndb pushdown equal/setValue error on datetime: only pushdown like of string type fields
[6 Sep 2006 9:54] 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/11456

ChangeSet@1.2258, 2006-09-06 11:54:01+02:00, mskold@mysql.com +2 -0
  Bug #21056  ndb pushdown equal/setValue error on datetime: Added missing order by
[15 Sep 2006 13:51] 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/12020

ChangeSet@1.2267, 2006-09-15 15:51:05+02:00, mskold@mysql.com +2 -0
  Bug #21056  ndb pushdown equal/setValue error on datetime: post review fixes, use my_bitmap
[18 Sep 2006 7:29] 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/12102

ChangeSet@1.2268, 2006-09-18 09:24:30+02:00, mskold@mysql.com +1 -0
  Bug #21056  ndb pushdown equal/setValue error on datetime: thread safe bitmap not needed
[1 Nov 2006 14:41] Jonas Oreland
pushed into 5.0.29
[2 Nov 2006 8:06] 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 fix for 5.0.29/5.1.12.