SET DEFAULT_STORAGE_ENGINE='tokudb'; call mtr.add_suppression("TokuDB.*"); call mtr.add_suppression(".*returned handler error 22"); drop table if exists t; create table t (id int not null primary key, v longblob not null); select @@max_allowed_packet into @my_max_allowed_packet; set global max_allowed_packet=100000000; connect conn1,localhost,root,,; insert into t values (1,repeat('a',32*1024*1024)); ERROR HY000: Got error 22 "Invalid argument" from storage engine TokuDB insert into t values (1,repeat('a',32*1024*1024-1)); ERROR HY000: Got error 22 "Invalid argument" from storage engine TokuDB insert into t values (1,repeat('a',32*1024*1024-2)); ERROR HY000: Got error 22 "Invalid argument" from storage engine TokuDB insert into t values (1,repeat('a',32*1024*1024-3)); ERROR HY000: Got error 22 "Invalid argument" from storage engine TokuDB insert into t values (1,repeat('a',32*1024*1024-4)); select id,length(v) from t; id length(v) 1 33554428 truncate table t; insert into t values (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,repeat('e',32*1024*1024-1)); ERROR HY000: Got error 22 "Invalid argument" from storage engine TokuDB select id,length(v) from t; id length(v) truncate table t; insert into t values (1,'a'),(2,'b'),(3,'c'),(4,'d'); insert into t values (5,repeat('e',32*1024*1024-1)); ERROR HY000: Got error 22 "Invalid argument" from storage engine TokuDB select id,length(v) from t; id length(v) 1 1 2 1 3 1 4 1 connection default; disconnect conn1; set global max_allowed_packet=@my_max_allowed_packet; drop table t;