~drizzle-trunk/drizzle/development

1919.3.39 by Barry.Leslie at PrimeBase
Restoring original pbms tests.
1
CREATE TABLE t1 (a int primary key, b blob);
2
insert into t1 values (1, "Hello World");
3
insert into t1 values (2, "Hello PBMS");
4
insert into t1 values (3, "Hello BLOB World");
5
SELECT COUNT(*) FROM t1;
6
COUNT(*)
7
3
8
select a, Table_name, Blob_size from pbms_reference ref, t1  where ref.Blob_url =  t1.b order by a;
9
a	Table_name	Blob_size
10
1	t1	11
11
2	t1	10
12
3	t1	16
13
select a, MD5_Checksum from pbms_repository rep, pbms_reference ref, t1 where t1.b = ref.Blob_url and ref.Repository_id = rep.Repository_id and ref.Repo_blob_offset = rep.Repo_blob_offset order by a;
14
a	MD5_Checksum
15
1	B10A8DB164E0754105B7A99BE72E3FE5
16
2	90D9BF084B48FBC92710E6807B8875B0
17
3	6B230DE148EE7EA4A4454090784119E6
18
CREATE Temporary TABLE my_pbms_blob_ids (id int, offset int, url varchar(120));
19
insert into my_pbms_blob_ids (select Repository_id, Repo_blob_offset, Blob_url from pbms_reference);
20
insert into pbms_metadata (select id, offset, "Name", "Test1" from my_pbms_blob_ids ref, t1  where t1.a = 1 and ref.url =  t1.b);
21
insert into pbms_metadata (select id, offset, "Name", "Test2" from my_pbms_blob_ids ref, t1  where t1.a = 2 and ref.url =  t1.b);
22
insert into pbms_metadata (select id, offset, "Name", "Test3" from my_pbms_blob_ids ref, t1  where t1.a = 3 and ref.url =  t1.b);
23
select a, name, value from pbms_metadata meta, pbms_reference ref, t1 where t1.b = ref.Blob_url and ref.Repository_id = meta.Repository_id and ref.Repo_blob_offset = meta.Repo_blob_offset order by a;
24
a	name	value
25
1	Name	Test1
26
2	Name	Test2
27
3	Name	Test3
28
delete from my_pbms_blob_ids;
29
insert into my_pbms_blob_ids (select Repository_id, Repo_blob_offset, Blob_url from pbms_reference);
30
insert into pbms_metadata (select id, offset, "Name2", "Test2.2" from my_pbms_blob_ids ref, t1  where t1.a = 2 and ref.url =  t1.b);
31
select a, name, value from pbms_metadata meta, pbms_reference ref, t1 where t1.b = ref.Blob_url and ref.Repository_id = meta.Repository_id and ref.Repo_blob_offset = meta.Repo_blob_offset order by a, name;
32
a	name	value
33
1	Name	Test1
34
2	Name	Test2
35
2	Name2	Test2.2
36
3	Name	Test3
37
drop Temporary table my_pbms_blob_ids;
38
drop table t1;
1919.3.30 by Barry.Leslie at PrimeBase
An other valgrind test.
39
create table autoincbug (id int not null primary key auto_increment, test varchar(10));
40
alter table autoincbug auto_increment = 1000;
41
insert into autoincbug values (null, 'hej');
42
alter table autoincbug auto_increment = 32727;
43
drop table autoincbug;