From 080c0c7ac8df45e6d6eb544e611183d029f4fb63 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 31 Mar 2007 00:29:18 +0400 Subject: [PATCH] BUG#26624: high mem usage (crash) in range optimizer Pushbuild fixes: - Make MAX_SEL_ARGS smaller (even 16K records_in_range() calls is more than it makes sense to do in typical cases) - Don't call sel_arg->test_use_count() if we've already allocated more than MAX_SEL_ARGs elements. The test will succeed but will take too much time for the test suite (and not provide much value). mysql-test/r/range.result: BUG#26624: high mem usage (crash) in range optimizer Pushbuild fixes: make the test go faster mysql-test/t/range.test: BUG#26624: high mem usage (crash) in range optimizer Pushbuild fixes: make the test go faster --- mysql-test/r/range.result | 147 ++++++++++++++++++++++++++++++++----- mysql-test/t/range.test | 149 +++++++++++++++++++++++++++++++++----- sql/opt_range.cc | 8 +- 3 files changed, 265 insertions(+), 39 deletions(-) diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 15d5f1a0183..4aaa114c0f9 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -710,23 +710,136 @@ index(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,c13,c14,c15,c16) ); insert into t1 (c1) values ('1'),('1'),('1'),('1'); select * from t1 where -c1 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c2 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c3 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c4 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c5 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c6 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c7 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c8 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c9 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c11 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c12 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c13 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c14 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c15 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -and c16 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -; +c1 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c2 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c3 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c4 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c5 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c6 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c7 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c8 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c9 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC") +and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", +"abcdefg1", "123456781", "qwertyui1", "asddfg1", +"abcdefg2", "123456782", "qwertyui2", "asddfg2", +"abcdefg3", "123456783", "qwertyui3", "asddfg3", +"abcdefg4", "123456784", "qwertyui4", "asddfg4", +"abcdefg5", "123456785", "qwertyui5", "asddfg5", +"abcdefg6", "123456786", "qwertyui6", "asddfg6", +"abcdefg7", "123456787", "qwertyui7", "asddfg7", +"abcdefg8", "123456788", "qwertyui8", "asddfg8", +"abcdefg9", "123456789", "qwertyui9", "asddfg9", +"abcdefgA", "12345678A", "qwertyuiA", "asddfgA", +"abcdefgB", "12345678B", "qwertyuiB", "asddfgB", +"abcdefgC", "12345678C", "qwertyuiC", "asddfgC"); c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 drop table t1; End of 4.1 tests diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 1e4cb91c03f..0dbfde92bd5 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -571,28 +571,139 @@ create table t1 ( c13 char(10), c14 char(10), c15 char(10), c16 char(10), index(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,c13,c14,c15,c16) ); - insert into t1 (c1) values ('1'),('1'),('1'),('1'); # This must run without crash and fast: select * from t1 where - c1 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c2 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c3 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c4 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c5 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c6 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c7 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c8 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c9 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c11 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c12 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c13 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c14 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c15 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") - and c16 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh") -; + c1 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c2 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c3 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c4 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c5 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c6 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c7 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c8 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c9 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") + and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", + "abcdefg1", "123456781", "qwertyui1", "asddfg1", + "abcdefg2", "123456782", "qwertyui2", "asddfg2", + "abcdefg3", "123456783", "qwertyui3", "asddfg3", + "abcdefg4", "123456784", "qwertyui4", "asddfg4", + "abcdefg5", "123456785", "qwertyui5", "asddfg5", + "abcdefg6", "123456786", "qwertyui6", "asddfg6", + "abcdefg7", "123456787", "qwertyui7", "asddfg7", + "abcdefg8", "123456788", "qwertyui8", "asddfg8", + "abcdefg9", "123456789", "qwertyui9", "asddfg9", + "abcdefgA", "12345678A", "qwertyuiA", "asddfgA", + "abcdefgB", "12345678B", "qwertyuiB", "asddfgB", + "abcdefgC", "12345678C", "qwertyuiC", "asddfgC"); drop table t1; - --echo End of 4.1 tests diff --git a/sql/opt_range.cc b/sql/opt_range.cc index ca8f31f5775..01b366077b0 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -241,7 +241,7 @@ public: enum leaf_color { BLACK,RED } color; enum Type { IMPOSSIBLE, MAYBE, MAYBE_KEY, KEY_RANGE } type; - enum { MAX_SEL_ARGS = 64000 }; + enum { MAX_SEL_ARGS = 16000 }; SEL_ARG() {} SEL_ARG(SEL_ARG &); @@ -1640,7 +1640,8 @@ tree_and(PARAM *param,SEL_TREE *tree1,SEL_TREE *tree2) { tree1->type= SEL_TREE::IMPOSSIBLE; #ifdef EXTRA_DEBUG - (*key1)->test_use_count(*key1); + if (param->alloced_sel_args < SEL_ARG::MAX_SEL_ARGS) + (*key1)->test_use_count(*key1); #endif break; } @@ -1677,7 +1678,8 @@ tree_or(PARAM *param,SEL_TREE *tree1,SEL_TREE *tree2) { result=tree1; // Added to tree1 #ifdef EXTRA_DEBUG - (*key1)->test_use_count(*key1); + if (param->alloced_sel_args < SEL_ARG::MAX_SEL_ARGS) + (*key1)->test_use_count(*key1); #endif } }