| Bug #55559 | MAX_HEAP_TABLE_SIZE does not work as specified | ||
|---|---|---|---|
| Submitted: | 26 Jul 2010 14:15 | Modified: | 27 Jul 2010 15:10 |
| Reporter: | Sven Sandberg | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: Memory storage engine | Severity: | S2 (Serious) |
| Version: | 5.1, trunk | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[26 Jul 2010 14:15]
Sven Sandberg
[26 Jul 2010 14:46]
Valeriy Kravchuk
Verified with current mysql-5.1 from bzr:
macbook-pro:5.1 openxs$ bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.1.50-debug Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SET SESSION MAX_HEAP_TABLE_SIZE = 16384;
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE TABLE t1 (a VARCHAR(10000)) ENGINE = MEMORY;
Query OK, 0 rows affected (0.06 sec)
mysql> SELECT @@SESSION.MAX_HEAP_TABLE_SIZE;
+-------------------------------+
| @@SESSION.MAX_HEAP_TABLE_SIZE |
+-------------------------------+
| 16384 |
+-------------------------------+
1 row in set (0.00 sec)
mysql> SHOW CREATE TABLE t1;
+-------+----------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+----------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`a` varchar(10000) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 |
+-------+----------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO t1 VALUES (REPEAT('x', 10000));
ERROR 1114 (HY000): The table 't1' is full
mysql> show table status like 't1'\G
*************************** 1. row ***************************
Name: t1
Engine: MEMORY
Version: 10
Row_format: Fixed
Rows: 10
Avg_row_length: 10003
Data_length: 100040
Max_data_length: 10003
Index_length: 0
Data_free: 0
Auto_increment: NULL
Create_time: NULL
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)
[26 Jul 2010 14:59]
Valeriy Kravchuk
See bug #29178 for possible explanation.
[26 Jul 2010 15:03]
Valeriy Kravchuk
BTW, I had default read_buffer_size: | read_buffer_size | 131072 | that is close enough to that 100000+ size limit...
[27 Jul 2010 15:10]
Omer Barnir
Duplicate of bug#29178
