in-memory tables are silently dropped while close to OOM
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
percona-projects-qa |
Invalid
|
Undecided
|
Alexey Kopytov |
Bug Description
Created 16 16-Mb HEAP tables, and changed memory limit so free memory remaining was less 10 Mbytes,
Creation and filling of 17th table failed with ERROR 5 (HY000): Out of memory (Needed 128992 bytes) which was expected. After each attempt to create a table there were less memory left. (3 additional attempts were performed)
After that it was found that 3 tables were silently dropped without any notice and mentioning in error log. Amount of memory equal to 3*16Mb was freed by mysqld.
mysql> create table t1 (a VARCHAR (512), b VARCHAR(512)) ENGINE=HEAP;
Query OK, 0 rows affected (0.02 sec)
mysql> insert into t1 values ('348utg93rhbvi
Query OK, 1 row affected (0.00 sec)
mysql> insert into t1 select * from t1;
...snip...
mysql> insert into t1 select * from t1;
ERROR 1114 (HY000): The table 't1' is full
mysql> create table t2 (a VARCHAR (512), b VARCHAR(512)) ENGINE=HEAP;
Query OK, 0 rows affected (0.03 sec)
mysql> insert into t2 select * from t1;
Query OK, 16121 rows affected (0.06 sec)
Records: 16121 Duplicates: 0 Warnings: 0
...
mysql> create table t16 (a VARCHAR (512), b VARCHAR(512)) ENGINE=HEAP; insert into t16 select * from t1;
Query OK, 0 rows affected (0.02 sec)
Query OK, 16121 rows affected (0.10 sec)
Records: 16121 Duplicates: 0 Warnings: 0
mysql> create table t17 (a VARCHAR (512), b VARCHAR(512)) ENGINE=HEAP; insert into t17 select * from t1;
Query OK, 0 rows affected (0.02 sec)
ERROR 5 (HY000): Out of memory (Needed 128992 bytes)
mysql> drop table t17
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> create table t17 (a VARCHAR (512), b VARCHAR(512)) ENGINE=HEAP; insert into t17 select * from t1;
Query OK, 0 rows affected (0.03 sec)
ERROR 5 (HY000): Out of memory (Needed 128992 bytes)
mysql> drop table t17;
Query OK, 0 rows affected (0.00 sec)
mysql> create table t17 (a VARCHAR (512), b VARCHAR(512)) ENGINE=HEAP; insert into t17 select * from t1;
Query OK, 0 rows affected (0.02 sec)
ERROR 5 (HY000): Out of memory (Needed 128992 bytes)
mysql> drop table t17;
Query OK, 0 rows affected (0.00 sec)
mysql> create table t17 (a VARCHAR (512), b VARCHAR(512)) ENGINE=HEAP; insert into t17 select * from t1;
Query OK, 0 rows affected (0.04 sec)
ERROR 5 (HY000): Out of memory (Needed 128992 bytes)
mysql> drop table t17;
Query OK, 0 rows affected (0.00 sec)
mysql> drop table t16,t15.t14;
ERROR 1051 (42S02): Unknown table 't14'
mysql> drop table t16,t15,t14;
ERROR 1051 (42S02): Unknown table 't16'
mysql> drop table t16;
ERROR 1051 (42S02): Unknown table 't16'
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t1 |
| t10 |
| t11 |
| t12 |
| t13 |
| t2 |
| t3 |
| t4 |
| t5 |
| t6 |
| t7 |
| t8 |
| t9 |
+----------------+
13 rows in set (0.01 sec)
description: | updated |
Changed in percona-projects-qa: | |
milestone: | none → 5.5.13-eb |
assignee: | nobody → Alexey Kopytov (akopytov) |
invalid, I have dropped tables myself. The typo was in first drop request (point instead of comma) which made me think tables were dropped silently.