Bug #42527 SELECT length(data) fails with ibmdb2i when max_allowed_packet=64*1024*1024
Submitted: 2 Feb 2009 4:57 Modified: 13 May 2009 6:46
Reporter: Nirbhay Choubey Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DB2SE for IBM i Severity:S3 (Non-critical)
Version:5.1.30 OS:Other (IBMi 5.4)
Assigned to: Nirbhay Choubey CPU Architecture:Any

[2 Feb 2009 4:57] Nirbhay Choubey
Description:
select length(data) from t1;
Throws the following error with 'ibmdb2i' storage engine when max_allowed_packet is set to 64*1024*1024.

ibmdb2i error 2021: See message CPF5129 in joblog for job
259078/QUSER/QSQSRVR.
ERROR 1030 (HY000): Got error 2122 from storage engine

Server job log :
Job 259078/QUSER/QSQSRVR started on 01/11/09 at 18:26:03 in subsystem
QSYSWRK in QSYS. Job entered system on 01/11/09 at 18:26:03.
ACGDTA for 259078/QUSER/QSQSRVR not journaled; reason 1.
Printer device PRT01 not found.
Errors on CHGJOB command for job 259078/QUSER/QSQSRVR.
Printer device PRT01 not found.
Job changed successfully; however errors occurred.
ACGDTA for 259078/QUSER/QSQSRVR not journaled; reason 1.
User Profile = QAUSER
SERVER MODE CONNECTING JOB IS 259400/QSECOFR/QP0ZSPWP.
Unable to retrieve query options file.
"nirbhay" in QSYS type *LIB not found.
Library "nirbhay" created.
Journal receiver QSQJRN0001 created in library "nirbhay".

How to repeat:
set max_allowed_packet=64*1024*1024;
drop database if exists;
create database nirbhay;
use nirbhay;
drop table t1;
CREATE TABLE t1 (data LONGBLOB) engine=ibmdb2i;
INSERT INTO t1 (data) VALUES (NULL);
UPDATE t1 set data=repeat('a',18*1024*1024);
select length(data) from t1;
[13 May 2009 6:46] Nirbhay Choubey
Fixed with code changes in IBMDB2i.
Verified with mysql-5.1.34 on i5os 5.4 and 6.1