File: join_cache_notasan.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (42 lines) | stat: -rw-r--r-- 1,559 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# Tests that should be in join_cache but cannot be run with ASAN

--source include/have_64bit.inc
# Disable asan it asan builds crashes when trying to allocate too much memory
--source include/not_asan.inc
# Valgrind is useful here, but very slow as lots of memory is allocated
--source include/no_valgrind_without_big.inc
--source include/have_innodb.inc

# MSAN runs, but ignore its notice. ER_OUTOFMEMORY is expected by tests
call mtr.add_suppression("MemorySanitizer failed to allocate");

--echo #
--echo # MDEV-28217 Incorrect Join Execution When Controlling Join Buffer Size
--echo #

# This test tries to allocate a too big bufffer, for which ASAN gives an error

CREATE TABLE t1 (i int PRIMARY KEY)engine=innodb;
INSERT INTO t1 VALUES (1332945389);
CREATE TABLE t2 (i int PRIMARY KEY)engine=innodb;
INSERT INTO t2 VALUES (1180244875), (1951338178);
--replace_regex /[0-9][0-9]+/X/
SET SESSION join_buffer_size= 5250229460064350213;
SET SESSION join_cache_level = 4;
SET optimizer_switch='optimize_join_buffer_size=on';
SELECT t2.i FROM t2  LEFT  JOIN t1 ON t1.i = t2.i  WHERE t1.i;
SET optimizer_switch='optimize_join_buffer_size=off';
--replace_regex /[0-9][0-9]+/X/
--error ER_OUTOFMEMORY
SELECT t1.i,t2.i FROM t2  LEFT  JOIN t1 ON t1.i = t2.i  WHERE t1.i;
SET SESSION join_buffer_size= 10000000;
SELECT t1.i,t2.i FROM t2  LEFT  JOIN t1 ON t1.i = t2.i  WHERE t1.i;
SET SESSION optimizer_switch= default;
SET SESSION join_buffer_size= default;
SET SESSION join_cache_level= default;
drop table t1,t2;

--echo #
--echo # End of 10.4 tests
--echo #