Bug #48238 Test "partition_alter4_innodb" fails due to "Out of memory"
Submitted: 22 Oct 2009 17:38
Reporter: Joerg Bruehe Email Updates:
Status: Verified Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.1.40 OS:Other (AIX + HP-UX, 32 bit)
Assigned to: CPU Architecture:Any

[22 Oct 2009 17:38] Joerg Bruehe
Description:
The test fails due to "Out of memory" on some platforms,
their only common characteristic is that they are big-endian, 32 bit.

One report is this (aix5.3-powerpc-32bit):
=====
parts.partition_alter4_innodb            [ retry-fail ]
        Test ended at YYYY-MM-DD HH:MM:SS

CURRENT_TEST: parts.partition_alter4_innodb
Out of memory (Needed 1368064 bytes)
mysqltest: In included file "./suite/parts/inc/partition_check.inc": At line 852: unknown error

The result from queries just before the failure was:
< snip >
COMMIT WORK;

# check transactions-2 success:     1
ROLLBACK WORK;

# check transactions-3 success:     1
DELETE FROM t1 WHERE f_charbig = 'was inserted';
COMMIT WORK;
ROLLBACK WORK;

# check transactions-4 success:     1
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT f_int1, f_int1, '', '', 'was inserted'
FROM t0_template source_tab
WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;

# check transactions-5 success:     1
ROLLBACK WORK;

# check transactions-6 success:     1

More results from queries before failure can be found in /PATH/mysql-test/var/log/partition_alter4_innodb.log

 - saving '/PATH/mysql-test/var/log/parts.partition_alter4_innodb/' to '/PATH/mysql-test/var/log/parts.partition_alter4_innodb/'
=====

This is the other (hpux11.11-hppa-32bit):
=====
parts.partition_alter4_innodb            [ retry-fail ]
        Test ended at YYYY-MM-DD HH:MM:SS

CURRENT_TEST: parts.partition_alter4_innodb
Out of memory (Needed 1024 bytes)
Out of memory (Needed 2063856680 bytes)
Out of memory (Needed 2063856680 bytes)
Out of memory (Needed 2063856680 bytes)
...
Out of memory (Needed 2063856680 bytes)
Out of memory (Needed 2063856680 bytes)
Out of memory (Needed 2063856680 bytes)
mysqltest: In included file "./suite/parts/inc/partition_trigg3.inc": At line 59: query 'SELECT '# check trigger-$num success: ' AS "", COUNT(*) = 3 AS "" FROM t1
WHERE f_int1 = CAST(f_char1 AS SIGNED INT) + @max_row_div2 + 2
AND f_int2 = - CAST(f_char1 AS SIGNED INT) + @max_row_div2 - 1
AND f_charbig = '####updated per insert trigger####'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

The result from queries just before the failure was:
< snip >
# check trigger-10 success:     1
DROP TRIGGER trg_2;
UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
f_int2 = CAST(f_char1 AS SIGNED INT),
f_charbig = CONCAT('===',f_char1,'===');
CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
SET new.f_int1 = @my_max1 + @counter,
new.f_int2 = @my_min2 - @counter,
new.f_charbig = '####updated per insert trigger####';
SET @counter = @counter + 1;
END|
SET @counter = 1;
SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
ORDER BY f_int1;
DROP TRIGGER trg_3;

More results from queries before failure can be found in /PATH/mysql-test/var/log/partition_alter4_innodb.log
Out of memory (Needed 8164 bytes)

 - saving '/PATH/mysql-test/var/log/parts.partition_alter4_innodb/' to '/PATH/mysql-test/var/log/parts.partition_alter4_innodb/'
=====

How to repeat:
Found while running the test suite.