No way to limit temporary table size when maria tables are in use

Bug #424553 reported by Sergey Petrunia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Confirmed
Wishlist
Sergey Petrunia

Bug Description

I've hit this while merging this testcase from mysql-5.1/mysql-test/insert_select.test:

CREATE TABLE t1(a INT);
# To force MyISAM temp. table in the following INSERT ... SELECT.
SET max_heap_table_size = 16384;
# To overflow the temp. table.
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
SET GLOBAL myisam_data_pointer_size = 2;

INSERT INTO t1 VALUES (1), (2), (3), (4), (5);

--error ER_RECORD_FILE_FULL,ER_RECORD_FILE_FULL
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;

The problems are that
- Maria engine doesn't have an analog of myisam_data_pointer_size, consequently the insert will not fail and we can't run the testcase.
- Albeit there is a #define USE_MARIA_FOR_TMP_TABLES, once you have a binary there is no straightforward way to tell from SQL whether it will use maria or myisam for temporary tables.

Revision history for this message
Sergey Petrunia (sergefp) wrote :

Will add a server variable.

Changed in maria:
assignee: nobody → Sergey Petrunia (sergefp)
status: New → In Progress
tags: added: 5.1
Changed in maria:
importance: Undecided → High
Revision history for this message
Sergey Petrunia (sergefp) wrote :

I think 5.1 tag should be removed and priority reduced.

Other than the mentioned testcase (which we can live without), I have never saw anything or anybody to use @@myisam_data_pointer_size value to limit temporary table size. If there is a real need to set such limit, we should add a separate variable, e.g. @@disk_temp_table_size.

With regards to inability to check the USE_MARIA_FOR_TMP_TABLES setting from SQL, that doesn't seem to be high priority (haven't seen anybody to build MariaDB with MyISAM temp.tables for a while, there are no known issues with MyISAM vs Maria temp.tables, etc.)

Revision history for this message
Sergey Petrunia (sergefp) wrote :

Changed tags and priority accordingly.

Changed in maria:
importance: High → Low
tags: removed: 5.1
Changed in maria:
milestone: none → 5.3
Changed in maria:
status: In Progress → Confirmed
Changed in maria:
importance: Low → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.