mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34119 Assertion `page_dir_get_n_heap(new_page) == 2U' failed in dberr_t PageBulk::init()
Problem: ======= - insert..select statement on partition table fails to use bulk insert for the transaction. Solution: ======== - Enable the bulk insert operation for insert..select statement for partition table.
This commit is contained in:
@@ -9,11 +9,10 @@
|
|||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check status OK
|
test.t1 check status OK
|
||||||
@@ -541,26 +541,4 @@
|
@@ -542,28 +542,6 @@
|
||||||
DELETE FROM t1;
|
|
||||||
commit;
|
commit;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
-#
|
#
|
||||||
-# MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)'
|
-# MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)'
|
||||||
-# failed in cmp_rec_rec_simple_field
|
-# failed in cmp_rec_rec_simple_field
|
||||||
-#
|
-#
|
||||||
@@ -35,4 +34,7 @@
|
|||||||
-(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'),
|
-(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'),
|
||||||
-(REPEAT('x',65535),'dd');
|
-(REPEAT('x',65535),'dd');
|
||||||
-DROP TABLE t1;
|
-DROP TABLE t1;
|
||||||
# End of 10.11 tests
|
-#
|
||||||
|
# Assertion `page_dir_get_n_heap(new_page) == 2U' failed
|
||||||
|
# in dberr_t PageBulk::init()
|
||||||
|
#
|
||||||
|
@@ -9,11 +9,10 @@
|
|||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check status OK
|
test.t1 check status OK
|
||||||
@@ -541,26 +541,4 @@
|
@@ -542,28 +542,6 @@
|
||||||
DELETE FROM t1;
|
|
||||||
commit;
|
commit;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
-#
|
#
|
||||||
-# MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)'
|
-# MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)'
|
||||||
-# failed in cmp_rec_rec_simple_field
|
-# failed in cmp_rec_rec_simple_field
|
||||||
-#
|
-#
|
||||||
@@ -35,4 +34,7 @@
|
|||||||
-(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'),
|
-(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'),
|
||||||
-(REPEAT('x',65535),'dd');
|
-(REPEAT('x',65535),'dd');
|
||||||
-DROP TABLE t1;
|
-DROP TABLE t1;
|
||||||
# End of 10.11 tests
|
-#
|
||||||
|
# Assertion `page_dir_get_n_heap(new_page) == 2U' failed
|
||||||
|
# in dberr_t PageBulk::init()
|
||||||
|
#
|
||||||
|
@@ -563,4 +563,21 @@ INSERT INTO t1 VALUES (REPEAT('x',4805),'a'), (REPEAT('x',16111),'b'),
|
|||||||
(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'),
|
(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'),
|
||||||
(REPEAT('x',65535),'dd');
|
(REPEAT('x',65535),'dd');
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Assertion `page_dir_get_n_heap(new_page) == 2U' failed
|
||||||
|
# in dberr_t PageBulk::init()
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(f1 INT)ENGINE=InnoDB PARTITION BY RANGE (f1) (PARTITION p0 VALUES LESS THAN (100));
|
||||||
|
SET @old_bulk_op=
|
||||||
|
(SELECT variable_value FROM information_schema.global_status
|
||||||
|
WHERE variable_name = 'innodb_bulk_operations');
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1 SELECT seq FROM seq_1_to_1;
|
||||||
|
COMMIT;
|
||||||
|
SELECT variable_value-@old_bulk_op bulk_operations
|
||||||
|
FROM information_schema.global_status
|
||||||
|
WHERE variable_name = 'innodb_bulk_operations';
|
||||||
|
bulk_operations
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
# End of 10.11 tests
|
# End of 10.11 tests
|
||||||
|
@@ -619,4 +619,23 @@ INSERT INTO t1 VALUES (REPEAT('x',4805),'a'), (REPEAT('x',16111),'b'),
|
|||||||
(REPEAT('x',65535),'dd');
|
(REPEAT('x',65535),'dd');
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Assertion `page_dir_get_n_heap(new_page) == 2U' failed
|
||||||
|
--echo # in dberr_t PageBulk::init()
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1(f1 INT)ENGINE=InnoDB PARTITION BY RANGE (f1) (PARTITION p0 VALUES LESS THAN (100));
|
||||||
|
|
||||||
|
SET @old_bulk_op=
|
||||||
|
(SELECT variable_value FROM information_schema.global_status
|
||||||
|
WHERE variable_name = 'innodb_bulk_operations');
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1 SELECT seq FROM seq_1_to_1;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
SELECT variable_value-@old_bulk_op bulk_operations
|
||||||
|
FROM information_schema.global_status
|
||||||
|
WHERE variable_name = 'innodb_bulk_operations';
|
||||||
|
DROP TABLE t1;
|
||||||
--echo # End of 10.11 tests
|
--echo # End of 10.11 tests
|
||||||
|
@@ -2562,6 +2562,22 @@ row_ins_index_entry_big_rec(
|
|||||||
return(error);
|
return(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Check whether the executed sql command is from insert
|
||||||
|
statement
|
||||||
|
@param thd thread information
|
||||||
|
@return true if it is insert statement */
|
||||||
|
static bool thd_sql_is_insert(const THD *thd) noexcept
|
||||||
|
{
|
||||||
|
switch(thd_sql_command(thd))
|
||||||
|
{
|
||||||
|
case SQLCOM_INSERT:
|
||||||
|
case SQLCOM_INSERT_SELECT:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if defined __aarch64__&&defined __GNUC__&&__GNUC__==4&&!defined __clang__
|
#if defined __aarch64__&&defined __GNUC__&&__GNUC__==4&&!defined __clang__
|
||||||
/* Avoid GCC 4.8.5 internal compiler error due to srw_mutex::wr_unlock().
|
/* Avoid GCC 4.8.5 internal compiler error due to srw_mutex::wr_unlock().
|
||||||
We would only need this for row_ins_clust_index_entry_low(),
|
We would only need this for row_ins_clust_index_entry_low(),
|
||||||
@@ -2712,7 +2728,7 @@ err_exit:
|
|||||||
&& block->page.id().page_no() == index->page
|
&& block->page.id().page_no() == index->page
|
||||||
&& !index->table->is_native_online_ddl()
|
&& !index->table->is_native_online_ddl()
|
||||||
&& (!dict_table_is_partition(index->table)
|
&& (!dict_table_is_partition(index->table)
|
||||||
|| thd_sql_command(trx->mysql_thd) == SQLCOM_INSERT)) {
|
|| thd_sql_is_insert(trx->mysql_thd))) {
|
||||||
|
|
||||||
if (!index->table->n_rec_locks
|
if (!index->table->n_rec_locks
|
||||||
&& !index->table->versioned()
|
&& !index->table->versioned()
|
||||||
|
Reference in New Issue
Block a user