##Test Case MySQL 8.0.21 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.21 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql > select @@version; +-----------+ | @@version | +-----------+ | 8.0.21 | +-----------+ 1 row in set (0.00 sec) mysql > create table sortlen (id int unsigned not null auto_increment primary key, str text not null); Query OK, 0 rows affected (0.02 sec) mysql > insert into sortlen set str=repeat('a',30000); Query OK, 1 row affected (0.00 sec) mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 2 rows affected (0.01 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql >insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 4 rows affected (0.01 sec) Records: 4 Duplicates: 0 Warnings: 0 mysql >insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 8 rows affected (0.02 sec) Records: 8 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 16 rows affected (0.04 sec) Records: 16 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 32 rows affected (0.04 sec) Records: 32 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 64 rows affected (0.05 sec) Records: 64 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 128 rows affected (0.10 sec) Records: 128 Duplicates: 0 Warnings: 0 mysql > select * from sortlen order by str; ERROR 1038 (HY001): Out of sort memory, consider increasing server sort buffer size mysql [localhost:4949] {msandbox} ((none)) > show variables like '%sort_buffer%'; +-------------------------+---------+ | Variable_name | Value | +-------------------------+---------+ | innodb_sort_buffer_size | 1048576 | | myisam_sort_buffer_size | 8388608 | | sort_buffer_size | 262144 | +-------------------------+---------+ ------ ----- ##Test Case MySQL 8.0.11 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 Server version: 8.0.11 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql > select @@version; +-----------+ | @@version | +-----------+ | 8.0.11 | +-----------+ 1 row in set (0.00 sec) mysql > use test; Database changed mysql > create table sortlen (id int unsigned not null auto_increment primary key, str text not null); Query OK, 0 rows affected (0.16 sec) mysql > insert into sortlen set str=repeat('a',30000); Query OK, 1 row affected (0.03 sec) mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 1 row affected (0.07 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 2 rows affected (0.06 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 4 rows affected (0.04 sec) Records: 4 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 8 rows affected (0.28 sec) Records: 8 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 16 rows affected (0.10 sec) Records: 16 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 32 rows affected (0.03 sec) Records: 32 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 64 rows affected (0.19 sec) Records: 64 Duplicates: 0 Warnings: 0 mysql > insert into sortlen (str) select repeat('a',30000) from sortlen; Query OK, 128 rows affected (0.19 sec) Records: 128 Duplicates: 0 Warnings: 0 mysql [localhost:2030] {msandbox} (test) > select * from sortlen order by str; +-----+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | id | str | 256 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [..] mysql > show variables like '%sort_buffer%'; +-------------------------+---------+ | Variable_name | Value | +-------------------------+---------+ | innodb_sort_buffer_size | 1048576 | | myisam_sort_buffer_size | 8388608 | | sort_buffer_size | 262144 | +-------------------------+---------+