CSV engine reports "out of memory" when you select from a missing file
Bug #311104 reported by
Monty Taylor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Low
|
Padraig O'Sullivan |
Bug Description
I'm guessing this will get touched anyway once Stewart's new no-FRM is pushed. BUT...
create table bug15205_2 (val int not null) engine=csv;
--remove_file $MYSQLTEST_
select * from bug15205;
This _should_ get an error about can't open the data file. Instead, we get:
Out of memory; check if drizzled or some other process uses all available memory; if not, you may have to use 'ulimit' to allow drizzled to use more memory or you can add more swap space
Changed in drizzle: | |
status: | Confirmed → Fix Committed |
Changed in drizzle: | |
assignee: | nobody → posulliv |
Changed in drizzle: | |
milestone: | low-hanging-fruit → aloha |
To post a comment you must log in.
Confirmed:
$> cd tests/
$> ./dtr --start-and-exit
$> ../client/drizzle --user=root --port=9306
drizzle> create table bug15205_2 (val int not null) engine=csv;
Query OK, 0 rows affected (0.02 sec)
switch to another shell, then:
$> cd var/master_ data/test
$> rm bug15205_2.CSV
switch back to the Drizzle client and:
drizzle> select * from bug15205_2;
ERROR 1041 (HY000): Out of memory; check if drizzled or some other process uses all available memory; if not, you may have to use 'ulimit' to allow drizzled to use more memory or you can add more swap space
NOTES:
If you delete the .frm file and not the .CSV file, a correct error is reported:
drizzle> select * from bug15205_2;
ERROR 1146 (42S02): Table 'test.bug15205_2' doesn't exist
If you delete the .CSM file and not the .CSV or .frm files, an expected but well-handled crash occurs:
drizzle> select * from bug15205_2;
Empty set, 1 warning (0.01 sec)
drizzle> show warnings; -+----- -+----- ------- ------- ------- ------- ------- ------- ------- ------- ---+ -+----- -+----- ------- ------- ------- ------- ------- ------- ------- ------- ---+ -+----- -+----- ------- ------- ------- ------- ------- ------- ------- ------- ---+
+------
| Level | Code | Message |
+------
| Error | 1194 | Table 'bug15205_2' is marked as crashed and should be repaired |
+------
1 row in set (0.00 sec)
drizzle> repair table bug15205_2; ------- ----+-- ------+ ------- ---+--- ------- + ------- ----+-- ------+ ------- ---+--- ------- + ------- ----+-- ------+ ------- ---+--- ------- +
+------
| Table | Op | Msg_type | Msg_text |
+------
| test.bug15205_2 | repair | status | OK |
+------
1 row in set (0.00 sec)
drizzle> select * from bug15205_2;
Empty set (0.00 sec)