~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/endspace.test

[patch 106/129] Merge patch for revision 1915 from InnoDB SVN:
revno: 1915
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6130
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6126
committer: marko
timestamp: Mon 2009-11-02 09:42:56 +0000
message:
  branches/zip: Free all resources at shutdown. Set pointers to NULL, so
  that Valgrind will not complain about freed data structures that are
  reachable via pointers.  This addresses Bug #45992 and Bug #46656.
  
  This patch is mostly based on changes copied from branches/embedded-1.0,
  mainly c5432, c3439, c3134, c2994, c2978, but also some other code was
  copied.  Some added cleanup code is specific to MySQL/InnoDB.
  
  rb://199 approved by Sunny Bains
modified:
  ChangeLog                      2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
  btr/btr0sea.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbtr%2Fbtr0sea.c
  buf/buf0buf.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbuf%2Fbuf0buf.c
  dict/dict0dict.c               2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fdict%2Fdict0dict.c
  fil/fil0fil.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Ffil%2Ffil0fil.c
  ibuf/ibuf0ibuf.c               2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fibuf%2Fibuf0ibuf.c
  include/btr0sea.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fbtr0sea.h
  include/dict0dict.h            2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fdict0dict.h
  include/fil0fil.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Ffil0fil.h
  include/ibuf0ibuf.h            2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fibuf0ibuf.h
  include/lock0lock.h            2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Flock0lock.h
  include/log0log.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Flog0log.h
  include/log0recv.h             2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Flog0recv.h
  include/mem0mem.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fmem0mem.h
  include/mem0pool.h             2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fmem0pool.h
  include/os0file.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fos0file.h
  include/pars0pars.h            2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fpars0pars.h
  include/srv0srv.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fsrv0srv.h
  include/thr0loc.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fthr0loc.h
  include/trx0i_s.h              1864@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Finclude%2Ftrx0i_s.h
  include/trx0purge.h            2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Ftrx0purge.h
  include/trx0rseg.h             2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Ftrx0rseg.h
  include/trx0sys.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Ftrx0sys.h
  include/trx0undo.h             2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Ftrx0undo.h
  include/usr0sess.h             2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fusr0sess.h
  lock/lock0lock.c               2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Flock%2Flock0lock.c
  log/log0log.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Flog%2Flog0log.c
  log/log0recv.c                 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Flog%2Flog0recv.c
  mem/mem0dbg.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fmem%2Fmem0dbg.c
  mem/mem0pool.c                 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fmem%2Fmem0pool.c
  os/os0file.c                   2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fos%2Fos0file.c
  os/os0sync.c                   2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fos%2Fos0sync.c
  os/os0thread.c                 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fos%2Fos0thread.c
  pars/lexyy.c                   2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fpars%2Flexyy.c
  pars/pars0lex.l                2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fpars%2Fpars0lex.l
  que/que0que.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fque%2Fque0que.c
  srv/srv0srv.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fsrv%2Fsrv0srv.c
  srv/srv0start.c                2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fsrv%2Fsrv0start.c
  sync/sync0arr.c                2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fsync%2Fsync0arr.c
  sync/sync0sync.c               2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fsync%2Fsync0sync.c
  thr/thr0loc.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fthr%2Fthr0loc.c
  trx/trx0i_s.c                  1864@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Ftrx%2Ftrx0i_s.c
  trx/trx0purge.c                2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Ftrx%2Ftrx0purge.c
  trx/trx0rseg.c                 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Ftrx%2Ftrx0rseg.c
  trx/trx0sys.c                  2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Ftrx%2Ftrx0sys.c
  trx/trx0undo.c                 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Ftrx%2Ftrx0undo.c
  usr/usr0sess.c                 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fusr%2Fusr0sess.c
  ut/ut0mem.c                    2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fut%2Fut0mem.c
diff:
=== modified file 'ChangeLog'

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
-- source include/endspace.inc
11
11
 
12
12
#
13
 
# Test default engine tables.
 
13
# Test MyISAM tables.
14
14
#
15
15
 
16
16
create table t1 (text1 varchar(32) not NULL, KEY key1 (text1));
18
18
check table t1;
19
19
select * from t1 ignore key (key1) where text1='teststring' or 
20
20
  text1 like 'teststring_%' ORDER BY text1;
21
 
--sorted_result
22
21
select * from t1 where text1='teststring' or text1 like 'teststring_%';
23
 
--sorted_result
24
22
select * from t1 where text1='teststring' or text1 > 'teststring\t';
25
23
select * from t1 order by text1;
26
24
explain select * from t1 order by text1;
29
27
check table t1;
30
28
select * from t1 ignore key (key1) where text1='teststring' or 
31
29
  text1 like 'teststring_%' ORDER BY text1;
32
 
--sorted_result
33
30
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
34
 
--sorted_result
35
31
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
36
32
select text1, length(text1) from t1 order by text1;
37
33
select text1, length(text1) from t1 order by text1;
39
35
alter table t1 modify text1 blob not null, drop key key1, add key key1 (text1(20));
40
36
insert into t1 values ('teststring ');
41
37
select concat('|', text1, '|') from t1 order by text1;
42
 
--sorted_result
43
38
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
44
 
--sorted_result
45
39
select concat('|', text1, '|') from t1 where text1='teststring';
46
 
--sorted_result
47
40
select concat('|', text1, '|') from t1 where text1='teststring ';
48
41
 
49
42
alter table t1 modify text1 text not null;
50
 
--sorted_result
51
43
select concat('|', text1, '|') from t1 where text1='teststring';
52
 
--sorted_result
53
44
select concat('|', text1, '|') from t1 where text1='teststring ';
54
45
explain select concat('|', text1, '|') from t1 where text1='teststring ';
55
 
--sorted_result
56
46
select concat('|', text1, '|') from t1 where text1 like 'teststring_%';
57
 
--sorted_result
58
47
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
59
 
--sorted_result
60
48
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
61
49
select concat('|', text1, '|') from t1 order by text1;
62
50
drop table t1;
63
51
 
64
52
create table t1 (text1 varchar(32) not NULL, KEY key1 (text1));
65
53
insert into t1 values ('teststring'), ('nothing'), ('teststring\t');
66
 
--sorted_result
67
54
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
68
 
--sorted_result
69
55
select concat('|', text1, '|') from t1 where text1='teststring' or text1 >= 'teststring\t';
70
56
drop table t1;
71
57
 
91
77
create table t1 (text1 varchar(32) not NULL, KEY key1 (text1)) engine=innodb;
92
78
insert into t1 values ('teststring'), ('nothing'), ('teststring\t');
93
79
check table t1;
94
 
--sorted_result
95
80
select * from t1 where text1='teststring' or text1 like 'teststring_%';
96
 
--sorted_result
97
81
select * from t1 where text1='teststring' or text1 > 'teststring\t';
98
82
select * from t1 order by text1;
99
83
explain select * from t1 order by text1;
106
90
select concat('|', text1, '|') from t1 order by text1;
107
91
 
108
92
alter table t1 modify text1 text not null;
109
 
--sorted_result
110
93
select * from t1 where text1 like 'teststring_%';
111
94
 
112
95
# The following gives wrong result in InnoDB
113
 
--sorted_result
114
96
select text1, length(text1) from t1 where text1='teststring' or text1 like 'teststring_%';
115
 
--sorted_result
116
97
select text1, length(text1) from t1 where text1='teststring' or text1 >= 'teststring\t';
117
98
select concat('|', text1, '|') from t1 order by text1;
118
99
drop table t1;