~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/memory/tests/t/heap_var.test

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Test MEMORY tables with variable-sized records.
 
3
#
 
4
 
 
5
--disable_warnings
 
6
drop table if exists t1;
 
7
--enable_warnings
 
8
 
 
9
set @@session.max_heap_table_size=16*1024*1024*24;
 
10
 
 
11
create temporary table t1 (a int not null, b int, c varchar(400), d varchar(400), primary key (a), key (b)) engine=MEMORY comment="testing heaps";
 
12
 
 
13
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
14
show table status like "t1";
 
15
 
 
16
insert into t1 values (1,1,'012',NULL), (2,2,'0123456789',NULL), (3,3,'012345678901234567890123456789',NULL), (4,4,NULL,'0123456789012345678901234567890123456789012345678901234567890123456789');
 
17
select * from t1;
 
18
 
 
19
delete from t1 where a = 3;
 
20
select * from t1;
 
21
 
 
22
insert into t1 values (5,5,NULL,'0123'), (6,6,NULL,'0123');
 
23
select * from t1;
 
24
 
 
25
update t1 set c = '012345678901234567890123456789' where a = 2;
 
26
select * from t1;
 
27
 
 
28
update t1 set c = '0123456789' where a = 2;
 
29
select * from t1;
 
30
 
 
31
insert into t1 values (7,7,'0123',NULL), (8,8,'0123',NULL);
 
32
select * from t1;
 
33
 
 
34
delete from t1;
 
35
select * from t1;
 
36
 
 
37
let $1=10001;
 
38
 
 
39
disable_query_log;
 
40
begin;
 
41
while ($1) 
 
42
{
 
43
 
 
44
  eval insert into t1 values ($1,$1,$1,$1);
 
45
 
 
46
  dec $1;
 
47
 
 
48
}
 
49
commit;
 
50
enable_query_log;
 
51
 
 
52
select count(*) from t1;
 
53
 
 
54
--error ER_DUP_ENTRY
 
55
insert into t1 values (100000,100000,NULL,'0123'), (100000,100000,NULL,'0123');
 
56
 
 
57
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
58
show table status like "t1";
 
59
select count(*) from t1;
 
60
 
 
61
set @@session.max_heap_table_size=default;
 
62
 
 
63
drop table t1;
 
64
 
 
65
# End of 5.0 tests