1# 2# Tests related to pack modes of the sortkey and addon fields. 3# Fields can be either packed or fixed length. 4# 5# See the comment in filesort.cc: 6# 7# Heuristic: skip packing if potential savings are less than 10 bytes. 8# 9 10--echo # 11--echo # Start of 10.5 tests 12--echo # 13 14--echo # 15--echo # MDEV-27307 main.ctype_utf8mb4_uca_allkeys tests fail with Valgrind/MSAN 16--echo # 17--echo # In this scenario packing is fully disabled: 18--echo # - The sortkey is of a fixed width data type 19--echo # - The addon fields have too small potential savings 20 21SET NAMES latin1; 22 23CREATE TABLE t1 ( 24 code INT NOT NULL, 25 str VARCHAR(5) CHARACTER SET latin1 NOT NULL 26) ENGINE=MyISAM; 27 28DELIMITER $$; 29FOR i IN 0..50 30DO 31 INSERT INTO t1 VALUES (i, REPEAT('a',1)); 32END FOR; 33$$ 34DELIMITER ;$$ 35SELECT COUNT(*) FROM t1; 36 37# The result is not very interesting, let's suppress it. 38# We just make sure there are no Valgrind/MSAN warnings about 39# not initialized memory being written to disk. 40 41SET sort_buffer_size=1024; 42--disable_result_log 43SELECT HEX(code), HEX(str) FROM t1 ORDER BY HEX(str); 44--enable_result_log 45SET sort_buffer_size=DEFAULT; 46 47DROP TABLE t1; 48 49--echo # 50--echo # End of 10.5 tests 51--echo # 52