List:Commits« Previous MessageNext Message »
From:jonas Date:January 10 2006 7:38am
Subject:bk commit into 5.1 tree (jonas:1.1993) BUG#16309
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1993 06/01/10 08:38:08 jonas@stripped +3 -0
  bug#16309 - ndb dd 
    Make sure blob table gets same tablespace as original table

  storage/ndb/src/ndbapi/NdbBlob.cpp
    1.29 06/01/10 08:38:05 jonas@stripped +2 -0
    Make sure blob table gets same tablespace as original table

  mysql-test/t/ndb_basic_disk.test
    1.2 06/01/10 08:38:05 jonas@stripped +38 -0
    Add test of blobs on disk

  mysql-test/r/ndb_basic_disk.result
    1.2 06/01/10 08:38:05 jonas@stripped +46 -0
    Add test of blobs on disk

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-dd

--- 1.28/storage/ndb/src/ndbapi/NdbBlob.cpp	2005-11-07 12:19:08 +01:00
+++ 1.29/storage/ndb/src/ndbapi/NdbBlob.cpp	2006-01-10 08:38:05 +01:00
@@ -78,6 +78,8 @@
     must be hash based so that the kernel can handle it on its own.
   */
   bt.m_primaryTableId = t->m_id;
+  bt.m_tablespace_id = t->m_tablespace_id;
+  bt.m_tablespace_version = t->m_tablespace_version;
   bt.m_ng.clear();
   switch (t->getFragmentType())
   {

--- 1.1/mysql-test/r/ndb_basic_disk.result	2005-12-23 05:32:40 +01:00
+++ 1.2/mysql-test/r/ndb_basic_disk.result	2006-01-10 08:38:05 +01:00
@@ -345,6 +345,52 @@
 2	2	2
 3	3	3
 drop table t1;
+create table t1 (
+a int not null primary key,
+b text not null
+) tablespace ts1 storage disk engine=ndbcluster;
+set @x0 = '01234567012345670123456701234567';
+set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
+set @b1 = 'b1';
+set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
+set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
+set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
+set @b1 = concat(@b1,@x0);
+set @b2 = 'b2';
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+insert into t1 values(1,@b1);
+insert into t1 values(2,@b2);
+select a,length(b),substr(b,1+2*900,2) from t1 where a=1;
+a	length(b)	substr(b,1+2*900,2)
+1	2256	b1
+select a,length(b),substr(b,1+2*9000,2) from t1 where a=2;
+a	length(b)	substr(b,1+2*9000,2)
+2	20000	b2
+update t1 set b=@b2 where a=1;
+update t1 set b=@b1 where a=2;
+select a,length(b),substr(b,1+2*9000,2) from t1 where a=1;
+a	length(b)	substr(b,1+2*9000,2)
+1	20000	b2
+select a,length(b),substr(b,1+2*900,2) from t1 where a=2;
+a	length(b)	substr(b,1+2*900,2)
+2	2256	b1
+update t1 set b=concat(b,b) where a=1;
+update t1 set b=concat(b,b) where a=2;
+select a,length(b),substr(b,1+4*9000,2) from t1 where a=1;
+a	length(b)	substr(b,1+4*9000,2)
+1	40000	b2
+select a,length(b),substr(b,1+4*900,2) from t1 where a=2;
+a	length(b)	substr(b,1+4*900,2)
+2	4512	b1
+delete from t1 where a=1;
+delete from t1 where a=2;
+select count(*) from t1;
+count(*)
+0
+drop table t1;
 alter tablespace ts1 drop datafile 'datafile.dat' engine = ndb;
 alter tablespace ts1 drop datafile 'datafile02.dat' engine = ndb;
 drop tablespace ts1 engine = ndb;

--- 1.1/mysql-test/t/ndb_basic_disk.test	2005-12-23 05:32:40 +01:00
+++ 1.2/mysql-test/t/ndb_basic_disk.test	2006-01-10 08:38:05 +01:00
@@ -267,6 +267,44 @@
 select * from t1 order by 1;
 drop table t1;
 
+# Test for blobs...
+create table t1 (
+  a int not null primary key,
+  b text not null
+) tablespace ts1 storage disk engine=ndbcluster;
+
+# b1 length 2000+256 (blob part aligned)
+set @x0 = '01234567012345670123456701234567';
+set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
+set @b1 = 'b1';
+set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
+set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
+set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
+set @b1 = concat(@b1,@x0);
+# b2 length 20000
+set @b2 = 'b2';
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
+
+insert into t1 values(1,@b1);
+insert into t1 values(2,@b2);
+select a,length(b),substr(b,1+2*900,2) from t1 where a=1;
+select a,length(b),substr(b,1+2*9000,2) from t1 where a=2;
+update t1 set b=@b2 where a=1;
+update t1 set b=@b1 where a=2;
+select a,length(b),substr(b,1+2*9000,2) from t1 where a=1;
+select a,length(b),substr(b,1+2*900,2) from t1 where a=2;
+update t1 set b=concat(b,b) where a=1;
+update t1 set b=concat(b,b) where a=2;
+select a,length(b),substr(b,1+4*9000,2) from t1 where a=1;
+select a,length(b),substr(b,1+4*900,2) from t1 where a=2;
+delete from t1 where a=1;
+delete from t1 where a=2;
+select count(*) from t1;
+drop table t1;
+
 alter tablespace ts1 drop datafile 'datafile.dat' engine = ndb;
 alter tablespace ts1 drop datafile 'datafile02.dat' engine = ndb;
 drop tablespace ts1 engine = ndb;
Thread
bk commit into 5.1 tree (jonas:1.1993) BUG#16309jonas10 Jan