Commit c7f93b41 authored by unknown's avatar unknown
Browse files

Merge orca.ndb.mysql.com:/export/home/space/pekka/ndb/version/my51-ndb

into  orca.ndb.mysql.com:/export/home/space/pekka/ndb/version/my51-bug20612


mysql-test/r/ndb_dd_basic.result:
  manual 1+1
mysql-test/t/ndb_dd_basic.test:
  manual 1+1
parents 60024bd2 e1876e84
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -422,6 +422,26 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
DROP TABLE t1;
CREATE TABLE t1 (
a int NOT NULL,
b varchar(4000),  -- must use 2 pages undo
PRIMARY KEY using hash (a)
)
TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;
set autocommit = 0;
insert into t1 values(0,'x');
insert into t1 values(1,'x');
insert into t1 values(2,'x');
insert into t1 values(3,'x');
insert into t1 values(4,'x');
insert into t1 values(5,'x');
insert into t1 values(6,'x');
insert into t1 values(7,'x');
insert into t1 values(8,'x');
delete from t1 where a = 0;
commit;
set autocommit = 1;
drop table t1;
create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) 
TABLESPACE ts1 STORAGE DISK engine=NDB;
insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1);
+25 −0
Original line number Diff line number Diff line
@@ -345,6 +345,31 @@ DELETE FROM t1 WHERE a=2;
SELECT COUNT(*) FROM t1;
DROP TABLE t1;

# bug#20612 INS-DEL bug (not pgman bug)
# found via disk data assert but is not pgman or disk data related

CREATE TABLE t1 (
  a int NOT NULL,
  b varchar(4000),  -- must use 2 pages undo
  PRIMARY KEY using hash (a)
)
TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;

set autocommit = 0;
insert into t1 values(0,'x');
insert into t1 values(1,'x');
insert into t1 values(2,'x');
insert into t1 values(3,'x');
insert into t1 values(4,'x');
insert into t1 values(5,'x');
insert into t1 values(6,'x');
insert into t1 values(7,'x');
insert into t1 values(8,'x');
delete from t1 where a = 0;
commit;
set autocommit = 1;

drop table t1;
#############################
# Customer posted order by test case
# Org in ndb_dd_advance.test
+9 −1
Original line number Diff line number Diff line
@@ -1469,7 +1469,15 @@ int Dbtup::handleDeleteReq(Signal* signal,
  {
    Operationrec* prevOp= req_struct->prevOpPtr.p;
    regOperPtr->tupVersion= prevOp->tupVersion;
    regOperPtr->m_copy_tuple_location= prevOp->m_copy_tuple_location;
    // make copy since previous op is committed before this one
    const Uint32* org = c_undo_buffer.get_ptr(&prevOp->m_copy_tuple_location);
    Uint32* dst = c_undo_buffer.alloc_copy_tuple(
        &regOperPtr->m_copy_tuple_location, regTabPtr->total_rec_size);
    if (dst == 0) {
      terrorCode = ZMEM_NOMEM_ERROR;
      goto error;
    }
    memcpy(dst, org, regTabPtr->total_rec_size << 2);
  } 
  else 
  {