Bug #34181 Backup: crash if @@max_heap_table_size is small
Submitted: 31 Jan 2008 0:19 Modified: 8 Oct 2009 12:01
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0.5-alpha-debug OS:Linux (SUSE 10 64-bit)
Assigned to: Sanjay Manwani CPU Architecture:Any

[31 Jan 2008 0:19] Peter Gulutzan
Description:
I'm using mysql-6.0-backup.

I create a database.
I create an empty table.
I set @@max_heap_table_size = 2000.
I try to backup the database.

Crash.

How to repeat:
mysql> create database k;
Query OK, 1 row affected (0.00 sec)

mysql> use k
Database changed
mysql> set @@max_heap_table_size = 2000;
Query OK, 0 rows affected (0.00 sec)

mysql> create table t (s1 int) engine=memory;
Query OK, 0 rows affected (0.00 sec)

mysql> backup database k to '74';
ERROR 2013 (HY000): Lost connection to MySQL server during query
[31 Jan 2008 0:38] MySQL Verification Team
Thank you for the bug report. Verified as describde.

Database changed
mysql> set @@max_heap_table_size = 2000;
Query OK, 0 rows affected (0.00 sec)

mysql> create table t (s1 int) engine=memory;
Query OK, 0 rows affected (0.01 sec)

mysql> backup database k to '74';
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[8 Oct 2009 12:01] Sanjay Manwani
It seems this is an old bug, the heap size limit is checked against a minimum of 16484 and reset to this limit if it is less with a warning:
Warnings:
Warning 1292    Truncated incorrect max_heap_table_size value: '2000'