config root man

Current Path : /usr/opt/mysql57/mysql-test/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/t/filesort_pack.test

CREATE TABLE t1 (
 id int(10) unsigned NOT NULL auto_increment,
 k int(10) unsigned NOT NULL default '0',
 c char(120) NOT NULL default '',
 pad char(60) NOT NULL default '',
 PRIMARY KEY (id),
 KEY k (k)
) engine=innodb;

--disable_query_log
let $count= 140;
while ($count)
{
  eval insert into t1(id, k) values ($count, $count);
  dec $count;
}
--enable_query_log

ANALYZE TABLE t1;

SET @@session.sort_buffer_size=32768;

FLUSH STATUS;
SHOW SESSION STATUS LIKE 'Sort%';

--disable_result_log
# This is similar to sysbench --oltp-order-ranges --oltp-range-size=1000
# With packed addon fields, we should get Sort_merge_passes = 0
SELECT c FROM t1 WHERE id between 2 and 1002 ORDER BY c;
--enable_result_log

SHOW SESSION STATUS LIKE 'Sort%';

SET @@session.sort_buffer_size=DEFAULT;

DROP TABLE t1;

Man Man