Commit 6bf2b64a authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-34118 fsp_alloc_free_extent() fails to flag DB_OUT_OF_FILE_SPACE

fsp_alloc_free_extent(): When applicable, set *err = DB_OUT_OF_FILE_SPACE.
parent 887bb3f7
......@@ -801,4 +801,14 @@ CHECK TABLE t EXTENDED;
Table Op Msg_type Msg_text
test.t check status OK
DROP TEMPORARY TABLE t;
#
# MDEV-34118 fsp_alloc_free_extent() fails to flag DB_OUT_OF_FILE_SPACE
#
SET @save_increment = @@GLOBAL.innodb_autoextend_increment;
SET GLOBAL innodb_autoextend_increment=1;
CREATE TEMPORARY TABLE t (c LONGTEXT) ENGINE=INNODB;
INSERT INTO t VALUES (REPEAT ('1',16777216));
ERROR HY000: The table 't' is full
DROP TEMPORARY TABLE t;
SET GLOBAL innodb_autoextend_increment=@save_increment;
# End of 10.6 tests
......@@ -635,4 +635,23 @@ CHECK TABLE t;
CHECK TABLE t EXTENDED;
DROP TEMPORARY TABLE t;
--echo #
--echo # MDEV-34118 fsp_alloc_free_extent() fails to flag DB_OUT_OF_FILE_SPACE
--echo #
SET @save_increment = @@GLOBAL.innodb_autoextend_increment;
SET GLOBAL innodb_autoextend_increment=1;
CREATE TEMPORARY TABLE t (c LONGTEXT) ENGINE=INNODB;
if ($MTR_COMBINATION_4K)
{
--error ER_RECORD_FILE_FULL
INSERT INTO t VALUES (REPEAT ('1',16777216));
}
if (!$MTR_COMBINATION_4K)
{
INSERT INTO t VALUES (REPEAT ('1',16777216));
--echo ERROR HY000: The table 't' is full
}
DROP TEMPORARY TABLE t;
SET GLOBAL innodb_autoextend_increment=@save_increment;
--echo # End of 10.6 tests
......@@ -967,6 +967,7 @@ static xdes_t *fsp_alloc_free_extent(fil_space_t *space, uint32_t hint,
first = flst_get_first(FSP_HEADER_OFFSET + FSP_FREE
+ header->page.frame);
if (first.page == FIL_NULL) {
*err = DB_OUT_OF_FILE_SPACE;
return nullptr; /* No free extents left */
}
if (first.page >= space->free_limit) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment