bugfix in checksum with force varpart

parent 39a80cc2
...@@ -2487,7 +2487,7 @@ sub ndbcluster_start_install ($) { ...@@ -2487,7 +2487,7 @@ sub ndbcluster_start_install ($) {
else else
{ {
$ndb_no_ord=32; $ndb_no_ord=32;
$ndb_con_op=5000; $ndb_con_op=10000;
$ndb_dmem="20M"; $ndb_dmem="20M";
$ndb_imem="1M"; $ndb_imem="1M";
$ndb_pbmem="4M"; $ndb_pbmem="4M";
......
...@@ -37,3 +37,29 @@ ROW_FORMAT=DYNAMIC ...@@ -37,3 +37,29 @@ ROW_FORMAT=DYNAMIC
ENGINE=NDB; ENGINE=NDB;
ForceVarPart: 1 ForceVarPart: 1
DROP TABLE t1; DROP TABLE t1;
create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb;
insert into t1(b) values ('0123456789');
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
select count(*) from t1;
count(*)
1024
begin;
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
rollback;
select count(*),b from t1 group by b;
count(*) b
1024 0123456789
drop table t1;
...@@ -60,3 +60,27 @@ CREATE TABLE t1 ...@@ -60,3 +60,27 @@ CREATE TABLE t1
ENGINE=NDB; ENGINE=NDB;
--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart
DROP TABLE t1; DROP TABLE t1;
# test of bug
create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb;
insert into t1(b) values ('0123456789');
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
select count(*) from t1;
begin;
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
update t1 set b = concat(b,b);
rollback;
select count(*),b from t1 group by b;
drop table t1;
...@@ -2846,6 +2846,12 @@ Dbtup::handle_size_change_after_update(KeyReqStruct* req_struct, ...@@ -2846,6 +2846,12 @@ Dbtup::handle_size_change_after_update(KeyReqStruct* req_struct,
if (unlikely(realloc_var_part(regFragPtr, regTabPtr, pagePtr, if (unlikely(realloc_var_part(regFragPtr, regTabPtr, pagePtr,
refptr, alloc, needed))) refptr, alloc, needed)))
return -1; return -1;
if (regTabPtr->m_bits & Tablerec::TR_Checksum)
{
jam();
setChecksum(org, regTabPtr);
}
} }
req_struct->m_tuple_ptr->m_header_bits = copy_bits; req_struct->m_tuple_ptr->m_header_bits = copy_bits;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment