config root man

Current Path : /usr/opt/mysql57/mysql-test/suite/opt_trace/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/opt/mysql57/mysql-test/suite/opt_trace/t/filesort_pack.test

--source include/have_optimizer_trace.inc
--source include/have_64bit.inc
--source include/have_innodb_16k.inc

call mtr.add_suppression("InnoDB: Cannot add field");

if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL
            + $VIEW_PROTOCOL > 0`)
{
   --skip Need normal protocol
}

SET optimizer_trace_max_mem_size=1048576; # 1MB
SET end_markers_in_json=off;
SET optimizer_trace="enabled=on,one_line=off";


## Each column here takes 1022 bytes, plus 2 bytes length field.
## Except the last column, which is one byte shorter.
## Total record size is 65535 which is the MySQL maximum.
CREATE TABLE t1 (
  c1 VARCHAR(1022) NOT NULL DEFAULT '',
  c2 VARCHAR(1022) NOT NULL DEFAULT '',
  c3 VARCHAR(1022) NOT NULL DEFAULT '',
  c4 VARCHAR(1022) NOT NULL DEFAULT '',
  c5 VARCHAR(1022) NOT NULL DEFAULT '',
  c6 VARCHAR(1022) NOT NULL DEFAULT '',
  c7 VARCHAR(1022) NOT NULL DEFAULT '',
  c8 VARCHAR(1022) NOT NULL DEFAULT '',
  c9 VARCHAR(1022) NOT NULL DEFAULT '',
  c10 VARCHAR(1022) NOT NULL DEFAULT '',
  c11 VARCHAR(1022) NOT NULL DEFAULT '',
  c12 VARCHAR(1022) NOT NULL DEFAULT '',
  c13 VARCHAR(1022) NOT NULL DEFAULT '',
  c14 VARCHAR(1022) NOT NULL DEFAULT '',
  c15 VARCHAR(1022) NOT NULL DEFAULT '',
  c16 VARCHAR(1022) NOT NULL DEFAULT '',
  c17 VARCHAR(1022) NOT NULL DEFAULT '',
  c18 VARCHAR(1022) NOT NULL DEFAULT '',
  c19 VARCHAR(1022) NOT NULL DEFAULT '',
  c20 VARCHAR(1022) NOT NULL DEFAULT '',
  c21 VARCHAR(1022) NOT NULL DEFAULT '',
  c22 VARCHAR(1022) NOT NULL DEFAULT '',
  c23 VARCHAR(1022) NOT NULL DEFAULT '',
  c24 VARCHAR(1022) NOT NULL DEFAULT '',
  c25 VARCHAR(1022) NOT NULL DEFAULT '',
  c26 VARCHAR(1022) NOT NULL DEFAULT '',
  c27 VARCHAR(1022) NOT NULL DEFAULT '',
  c28 VARCHAR(1022) NOT NULL DEFAULT '',
  c29 VARCHAR(1022) NOT NULL DEFAULT '',
  c30 VARCHAR(1022) NOT NULL DEFAULT '',
  c31 VARCHAR(1022) NOT NULL DEFAULT '',
  c32 VARCHAR(1022) NOT NULL DEFAULT '',
  c33 VARCHAR(1022) NOT NULL DEFAULT '',
  c34 VARCHAR(1022) NOT NULL DEFAULT '',
  c35 VARCHAR(1022) NOT NULL DEFAULT '',
  c36 VARCHAR(1022) NOT NULL DEFAULT '',
  c37 VARCHAR(1022) NOT NULL DEFAULT '',
  c38 VARCHAR(1022) NOT NULL DEFAULT '',
  c39 VARCHAR(1022) NOT NULL DEFAULT '',
  c40 VARCHAR(1022) NOT NULL DEFAULT '',
  c41 VARCHAR(1022) NOT NULL DEFAULT '',
  c42 VARCHAR(1022) NOT NULL DEFAULT '',
  c43 VARCHAR(1022) NOT NULL DEFAULT '',
  c44 VARCHAR(1022) NOT NULL DEFAULT '',
  c45 VARCHAR(1022) NOT NULL DEFAULT '',
  c46 VARCHAR(1022) NOT NULL DEFAULT '',
  c47 VARCHAR(1022) NOT NULL DEFAULT '',
  c48 VARCHAR(1022) NOT NULL DEFAULT '',
  c49 VARCHAR(1022) NOT NULL DEFAULT '',
  c50 VARCHAR(1022) NOT NULL DEFAULT '',
  c51 VARCHAR(1022) NOT NULL DEFAULT '',
  c52 VARCHAR(1022) NOT NULL DEFAULT '',
  c53 VARCHAR(1022) NOT NULL DEFAULT '',
  c54 VARCHAR(1022) NOT NULL DEFAULT '',
  c55 VARCHAR(1022) NOT NULL DEFAULT '',
  c56 VARCHAR(1022) NOT NULL DEFAULT '',
  c57 VARCHAR(1022) NOT NULL DEFAULT '',
  c58 VARCHAR(1022) NOT NULL DEFAULT '',
  c59 VARCHAR(1022) NOT NULL DEFAULT '',
  c60 VARCHAR(1022) NOT NULL DEFAULT '',
  c61 VARCHAR(1022) NOT NULL DEFAULT '',
  c62 VARCHAR(1022) NOT NULL DEFAULT '',
  c63 VARCHAR(1022) NOT NULL DEFAULT '',
  c64 VARCHAR(1021) NOT NULL DEFAULT ''
) ENGINE = INNODB;

SET @save_max_length_for_sort_data = @@max_length_for_sort_data;
SET @save_sort_buffer_size= @@sort_buffer_size;

## We cannot use addons, since the sort_length is 1022 bytes.
SET @@max_length_for_sort_data = 65535 + 1021;
select * from t1 order by c1;
SELECT * FROM information_schema.OPTIMIZER_TRACE;

## We can use addons, but not packed addons.
## With addon fields, we need larger sort_buffer_size.
SET @@max_length_for_sort_data = 65535 + 1022;
SET @@sort_buffer_size = 8 + 15 * (@@max_length_for_sort_data + 8);
select * from t1 order by c1;
SELECT * FROM information_schema.OPTIMIZER_TRACE;

## We can use addons, but not packed addons.
## With addon fields, we need larger sort_buffer_size.
SET @@max_length_for_sort_data = 65535 + 1023;
SET @@sort_buffer_size = 8 + 15 * (@@max_length_for_sort_data + 8);
select * from t1 order by c1;
SELECT * FROM information_schema.OPTIMIZER_TRACE;

## Here we can use packed addons.
## With addon fields, we need larger sort_buffer_size.
SET @@max_length_for_sort_data = 65535 + 1024;
SET @@sort_buffer_size = 8 + 15 * (@@max_length_for_sort_data + 8);
select * from t1 order by c1;
SELECT * FROM information_schema.OPTIMIZER_TRACE;

SET @@max_length_for_sort_data = @save_max_length_for_sort_data;
SET @@sort_buffer_size= @save_sort_buffer_size;

DROP TABLE t1;

SET innodb_strict_mode=off;
CREATE TABLE t1 (
  c1 CHAR(255) NOT NULL DEFAULT '',
  c2 CHAR(255) NOT NULL DEFAULT '',
  c3 CHAR(255) NOT NULL DEFAULT '',
  c4 CHAR(255) NOT NULL DEFAULT '',
  c5 CHAR(255) NOT NULL DEFAULT '',
  c6 CHAR(255) NOT NULL DEFAULT '',
  c7 CHAR(255) NOT NULL DEFAULT '',
  c8 CHAR(255) NOT NULL DEFAULT '',
  c9 CHAR(255) NOT NULL DEFAULT '',
  c10 CHAR(255) NOT NULL DEFAULT '',
  c11 CHAR(255) NOT NULL DEFAULT '',
  c12 CHAR(255) NOT NULL DEFAULT '',
  c13 CHAR(255) NOT NULL DEFAULT '',
  c14 CHAR(255) NOT NULL DEFAULT '',
  c15 CHAR(255) NOT NULL DEFAULT '',
  c16 CHAR(255) NOT NULL DEFAULT '',
  c17 CHAR(255) NOT NULL DEFAULT '',
  c18 CHAR(255) NOT NULL DEFAULT '',
  c19 CHAR(255) NOT NULL DEFAULT '',
  c20 CHAR(255) NOT NULL DEFAULT '',
  c21 CHAR(255) NOT NULL DEFAULT '',
  c22 CHAR(255) NOT NULL DEFAULT '',
  c23 CHAR(255) NOT NULL DEFAULT '',
  c24 CHAR(255) NOT NULL DEFAULT '',
  c25 CHAR(255) NOT NULL DEFAULT '',
  c26 CHAR(255) NOT NULL DEFAULT '',
  c27 CHAR(255) NOT NULL DEFAULT '',
  c28 CHAR(255) NOT NULL DEFAULT '',
  c29 CHAR(255) NOT NULL DEFAULT '',
  c30 CHAR(255) NOT NULL DEFAULT '',
  c31 CHAR(255) NOT NULL DEFAULT '',
  c32 CHAR(255) NOT NULL DEFAULT '',
  c33 CHAR(255) NOT NULL DEFAULT '',
  c34 CHAR(255) NOT NULL DEFAULT '',
  c35 CHAR(255) NOT NULL DEFAULT '',
  c36 CHAR(255) NOT NULL DEFAULT '',
  c37 CHAR(255) NOT NULL DEFAULT '',
  c38 CHAR(255) NOT NULL DEFAULT '',
  c39 CHAR(255) NOT NULL DEFAULT '',
  c40 CHAR(255) NOT NULL DEFAULT '',
  c41 CHAR(255) NOT NULL DEFAULT '',
  c42 CHAR(255) NOT NULL DEFAULT '',
  c43 CHAR(255) NOT NULL DEFAULT '',
  c44 CHAR(255) NOT NULL DEFAULT '',
  c45 CHAR(255) NOT NULL DEFAULT '',
  c46 CHAR(255) NOT NULL DEFAULT '',
  c47 CHAR(255) NOT NULL DEFAULT '',
  c48 CHAR(255) NOT NULL DEFAULT '',
  c49 CHAR(255) NOT NULL DEFAULT '',
  c50 CHAR(255) NOT NULL DEFAULT '',
  c51 CHAR(255) NOT NULL DEFAULT '',
  c52 CHAR(255) NOT NULL DEFAULT '',
  c53 CHAR(255) NOT NULL DEFAULT '',
  c54 CHAR(255) NOT NULL DEFAULT '',
  c55 CHAR(255) NOT NULL DEFAULT '',
  c56 CHAR(255) NOT NULL DEFAULT '',
  c57 CHAR(255) NOT NULL DEFAULT '',
  c58 CHAR(255) NOT NULL DEFAULT '',
  c59 CHAR(255) NOT NULL DEFAULT '',
  c60 CHAR(255) NOT NULL DEFAULT '',
  c61 CHAR(255) NOT NULL DEFAULT '',
  c62 CHAR(255) NOT NULL DEFAULT '',
  c63 CHAR(255) NOT NULL DEFAULT '',
  c64 CHAR(255) NOT NULL DEFAULT '',
  c65 CHAR(255) NOT NULL DEFAULT '',
  c66 CHAR(255) NOT NULL DEFAULT '',
  c67 CHAR(255) NOT NULL DEFAULT '',
  c68 CHAR(255) NOT NULL DEFAULT '',
  c69 CHAR(255) NOT NULL DEFAULT '',
  c70 CHAR(255) NOT NULL DEFAULT '',
  c71 CHAR(255) NOT NULL DEFAULT '',
  c72 CHAR(255) NOT NULL DEFAULT '',
  c73 CHAR(255) NOT NULL DEFAULT '',
  c74 CHAR(255) NOT NULL DEFAULT '',
  c75 CHAR(255) NOT NULL DEFAULT '',
  c76 CHAR(255) NOT NULL DEFAULT '',
  c77 CHAR(255) NOT NULL DEFAULT '',
  c78 CHAR(255) NOT NULL DEFAULT '',
  c79 CHAR(255) NOT NULL DEFAULT '',
  c80 CHAR(255) NOT NULL DEFAULT '',
  c81 CHAR(255) NOT NULL DEFAULT '',
  c82 CHAR(255) NOT NULL DEFAULT '',
  c83 CHAR(255) NOT NULL DEFAULT '',
  c84 CHAR(255) NOT NULL DEFAULT '',
  c85 CHAR(255) NOT NULL DEFAULT '',
  c86 CHAR(255) NOT NULL DEFAULT '',
  c87 CHAR(255) NOT NULL DEFAULT '',
  c88 CHAR(255) NOT NULL DEFAULT '',
  c89 CHAR(255) NOT NULL DEFAULT '',
  c90 CHAR(255) NOT NULL DEFAULT '',
  c91 CHAR(255) NOT NULL DEFAULT '',
  c92 CHAR(255) NOT NULL DEFAULT '',
  c93 CHAR(255) NOT NULL DEFAULT '',
  c94 CHAR(255) NOT NULL DEFAULT '',
  c95 CHAR(255) NOT NULL DEFAULT '',
  c96 CHAR(255) NOT NULL DEFAULT '',
  c97 CHAR(255) NOT NULL DEFAULT '',
  c98 CHAR(255) NOT NULL DEFAULT '',
  c99 CHAR(255) NOT NULL DEFAULT '',
  c100 CHAR(255) NOT NULL DEFAULT '',
  c101 CHAR(255) NOT NULL DEFAULT '',
  c102 CHAR(255) NOT NULL DEFAULT '',
  c103 CHAR(255) NOT NULL DEFAULT '',
  c104 CHAR(255) NOT NULL DEFAULT '',
  c105 CHAR(255) NOT NULL DEFAULT '',
  c106 CHAR(255) NOT NULL DEFAULT '',
  c107 CHAR(255) NOT NULL DEFAULT '',
  c108 CHAR(255) NOT NULL DEFAULT '',
  c109 CHAR(255) NOT NULL DEFAULT '',
  c110 CHAR(255) NOT NULL DEFAULT '',
  c111 CHAR(255) NOT NULL DEFAULT '',
  c112 CHAR(255) NOT NULL DEFAULT '',
  c113 CHAR(255) NOT NULL DEFAULT '',
  c114 CHAR(255) NOT NULL DEFAULT '',
  c115 CHAR(255) NOT NULL DEFAULT '',
  c116 CHAR(255) NOT NULL DEFAULT '',
  c117 CHAR(255) NOT NULL DEFAULT '',
  c118 CHAR(255) NOT NULL DEFAULT '',
  c119 CHAR(255) NOT NULL DEFAULT '',
  c120 CHAR(255) NOT NULL DEFAULT '',
  c121 CHAR(255) NOT NULL DEFAULT '',
  c122 CHAR(255) NOT NULL DEFAULT '',
  c123 CHAR(255) NOT NULL DEFAULT '',
  c124 CHAR(255) NOT NULL DEFAULT '',
  c125 CHAR(255) NOT NULL DEFAULT '',
  c126 CHAR(255) NOT NULL DEFAULT '',
  c127 CHAR(255) NOT NULL DEFAULT '',
  c128 CHAR(255) NOT NULL DEFAULT '',
  c129 CHAR(255) NOT NULL DEFAULT '',
  c130 CHAR(255) NOT NULL DEFAULT '',
  c131 CHAR(255) NOT NULL DEFAULT '',
  c132 CHAR(255) NOT NULL DEFAULT '',
  c133 CHAR(255) NOT NULL DEFAULT '',
  c134 CHAR(255) NOT NULL DEFAULT '',
  c135 CHAR(255) NOT NULL DEFAULT '',
  c136 CHAR(255) NOT NULL DEFAULT '',
  c137 CHAR(255) NOT NULL DEFAULT '',
  c138 CHAR(255) NOT NULL DEFAULT '',
  c139 CHAR(255) NOT NULL DEFAULT '',
  c140 CHAR(255) NOT NULL DEFAULT '',
  c141 CHAR(255) NOT NULL DEFAULT '',
  c142 CHAR(255) NOT NULL DEFAULT '',
  c143 CHAR(255) NOT NULL DEFAULT '',
  c144 CHAR(255) NOT NULL DEFAULT '',
  c145 CHAR(255) NOT NULL DEFAULT '',
  c146 CHAR(255) NOT NULL DEFAULT '',
  c147 CHAR(255) NOT NULL DEFAULT '',
  c148 CHAR(255) NOT NULL DEFAULT '',
  c149 CHAR(255) NOT NULL DEFAULT '',
  c150 CHAR(255) NOT NULL DEFAULT '',
  c151 CHAR(255) NOT NULL DEFAULT '',
  c152 CHAR(255) NOT NULL DEFAULT '',
  c153 CHAR(255) NOT NULL DEFAULT '',
  c154 CHAR(255) NOT NULL DEFAULT '',
  c155 CHAR(255) NOT NULL DEFAULT '',
  c156 CHAR(255) NOT NULL DEFAULT '',
  c157 CHAR(255) NOT NULL DEFAULT '',
  c158 CHAR(255) NOT NULL DEFAULT '',
  c159 CHAR(255) NOT NULL DEFAULT '',
  c160 CHAR(255) NOT NULL DEFAULT '',
  c161 CHAR(255) NOT NULL DEFAULT '',
  c162 CHAR(255) NOT NULL DEFAULT '',
  c163 CHAR(255) NOT NULL DEFAULT '',
  c164 CHAR(255) NOT NULL DEFAULT '',
  c165 CHAR(255) NOT NULL DEFAULT '',
  c166 CHAR(255) NOT NULL DEFAULT '',
  c167 CHAR(255) NOT NULL DEFAULT '',
  c168 CHAR(255) NOT NULL DEFAULT '',
  c169 CHAR(255) NOT NULL DEFAULT '',
  c170 CHAR(255) NOT NULL DEFAULT '',
  c171 CHAR(255) NOT NULL DEFAULT '',
  c172 CHAR(255) NOT NULL DEFAULT '',
  c173 CHAR(255) NOT NULL DEFAULT '',
  c174 CHAR(255) NOT NULL DEFAULT '',
  c175 CHAR(255) NOT NULL DEFAULT '',
  c176 CHAR(255) NOT NULL DEFAULT '',
  c177 CHAR(255) NOT NULL DEFAULT '',
  c178 CHAR(255) NOT NULL DEFAULT '',
  c179 CHAR(255) NOT NULL DEFAULT '',
  c180 CHAR(255) NOT NULL DEFAULT '',
  c181 CHAR(255) NOT NULL DEFAULT '',
  c182 CHAR(255) NOT NULL DEFAULT '',
  c183 CHAR(255) NOT NULL DEFAULT '',
  c184 CHAR(255) NOT NULL DEFAULT '',
  c185 CHAR(255) NOT NULL DEFAULT '',
  c186 CHAR(255) NOT NULL DEFAULT '',
  c187 CHAR(255) NOT NULL DEFAULT '',
  c188 CHAR(255) NOT NULL DEFAULT '',
  c189 CHAR(255) NOT NULL DEFAULT '',
  c190 CHAR(255) NOT NULL DEFAULT '',
  c191 CHAR(255) NOT NULL DEFAULT '',
  c192 CHAR(255) NOT NULL DEFAULT '',
  c193 CHAR(255) NOT NULL DEFAULT '',
  c194 CHAR(255) NOT NULL DEFAULT '',
  c195 CHAR(255) NOT NULL DEFAULT '',
  c196 CHAR(255) NOT NULL DEFAULT '',
  c197 CHAR(255) NOT NULL DEFAULT '',
  c198 CHAR(255) NOT NULL DEFAULT '',
  c199 CHAR(255) NOT NULL DEFAULT '',
  c200 CHAR(255) NOT NULL DEFAULT '',
  c201 CHAR(255) NOT NULL DEFAULT '',
  c202 CHAR(255) NOT NULL DEFAULT '',
  c203 CHAR(255) NOT NULL DEFAULT '',
  c204 CHAR(255) NOT NULL DEFAULT '',
  c205 CHAR(255) NOT NULL DEFAULT '',
  c206 CHAR(255) NOT NULL DEFAULT '',
  c207 CHAR(255) NOT NULL DEFAULT '',
  c208 CHAR(255) NOT NULL DEFAULT '',
  c209 CHAR(255) NOT NULL DEFAULT '',
  c210 CHAR(255) NOT NULL DEFAULT '',
  c211 CHAR(255) NOT NULL DEFAULT '',
  c212 CHAR(255) NOT NULL DEFAULT '',
  c213 CHAR(255) NOT NULL DEFAULT '',
  c214 CHAR(255) NOT NULL DEFAULT '',
  c215 CHAR(255) NOT NULL DEFAULT '',
  c216 CHAR(255) NOT NULL DEFAULT '',
  c217 CHAR(255) NOT NULL DEFAULT '',
  c218 CHAR(255) NOT NULL DEFAULT '',
  c219 CHAR(255) NOT NULL DEFAULT '',
  c220 CHAR(255) NOT NULL DEFAULT '',
  c221 CHAR(255) NOT NULL DEFAULT '',
  c222 CHAR(255) NOT NULL DEFAULT '',
  c223 CHAR(255) NOT NULL DEFAULT '',
  c224 CHAR(255) NOT NULL DEFAULT '',
  c225 CHAR(255) NOT NULL DEFAULT '',
  c226 CHAR(255) NOT NULL DEFAULT '',
  c227 CHAR(255) NOT NULL DEFAULT '',
  c228 CHAR(255) NOT NULL DEFAULT '',
  c229 CHAR(255) NOT NULL DEFAULT '',
  c230 CHAR(255) NOT NULL DEFAULT '',
  c231 CHAR(255) NOT NULL DEFAULT '',
  c232 CHAR(255) NOT NULL DEFAULT '',
  c233 CHAR(255) NOT NULL DEFAULT '',
  c234 CHAR(255) NOT NULL DEFAULT '',
  c235 CHAR(255) NOT NULL DEFAULT '',
  c236 CHAR(255) NOT NULL DEFAULT '',
  c237 CHAR(255) NOT NULL DEFAULT '',
  c238 CHAR(255) NOT NULL DEFAULT '',
  c239 CHAR(255) NOT NULL DEFAULT '',
  c240 CHAR(255) NOT NULL DEFAULT '',
  c241 CHAR(255) NOT NULL DEFAULT '',
  c242 CHAR(255) NOT NULL DEFAULT '',
  c243 CHAR(255) NOT NULL DEFAULT '',
  c244 CHAR(255) NOT NULL DEFAULT '',
  c245 CHAR(255) NOT NULL DEFAULT '',
  c246 CHAR(255) NOT NULL DEFAULT '',
  c247 CHAR(255) NOT NULL DEFAULT '',
  c248 CHAR(255) NOT NULL DEFAULT '',
  c249 CHAR(255) NOT NULL DEFAULT '',
  c250 CHAR(255) NOT NULL DEFAULT '',
  c251 CHAR(255) NOT NULL DEFAULT '',
  c252 CHAR(255) NOT NULL DEFAULT '',
  c253 CHAR(255) NOT NULL DEFAULT '',
  c254 CHAR(255) NOT NULL DEFAULT '',
  c255 CHAR(255) NOT NULL DEFAULT '',
  c256 CHAR(255) NOT NULL DEFAULT '',
  c257 CHAR(254) NOT NULL DEFAULT ''
) ENGINE = INNODB ROW_FORMAT=COMPACT;

SELECT * FROM t1 ORDER BY c1;
SELECT * FROM information_schema.OPTIMIZER_TRACE;

DROP TABLE t1;

Man Man