Skip to content

Commit 702fdc5

Browse files
author
Jan Lindström
committed
MDEV-7714: Make possible to get innodb internal primary key for wrapper
type storage engine. Authored by: Kentoku Shiba
1 parent ed04c40 commit 702fdc5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

storage/innobase/row/row0mysql.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,11 @@ row_insert_for_mysql(
14611461
with a latch. */
14621462
dict_table_n_rows_inc(table);
14631463

1464+
if (prebuilt->clust_index_was_generated) {
1465+
/* set row id to prebuilt */
1466+
ut_memcpy(prebuilt->row_id, node->row_id_buf, DATA_ROW_ID_LEN);
1467+
}
1468+
14641469
row_update_statistics_if_needed(table);
14651470
trx->op_info = "";
14661471

storage/xtradb/row/row0mysql.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,6 +1455,11 @@ row_insert_for_mysql(
14551455
srv_stats.n_rows_inserted.add((size_t)trx->id, 1);
14561456
}
14571457

1458+
if (prebuilt->clust_index_was_generated) {
1459+
/* set row id to prebuilt */
1460+
ut_memcpy(prebuilt->row_id, node->row_id_buf, DATA_ROW_ID_LEN);
1461+
}
1462+
14581463
/* Not protected by dict_table_stats_lock() for performance
14591464
reasons, we would rather get garbage in stat_n_rows (which is
14601465
just an estimate anyway) than protecting the following code

0 commit comments

Comments
 (0)