[Commits] 702fdc5: MDEV-7714: Make possible to get innodb internal primary key for wrapper

Jan Lindström jan.lindstrom at mariadb.com
Fri Mar 13 07:14:12 EET 2015


revision-id: 702fdc52fa02c5f20004d169ad48494122d8ffed
parent(s): ed04c40b01c122436eda6552c550d62ce8a3920b
committer: Jan Lindström
branch nick: 10.0-git
timestamp: 2015-03-12 18:37:32 +0200
message:

MDEV-7714: Make possible to get innodb internal primary key for wrapper
type storage engine.

Authored by: Kentoku Shiba

---
 storage/innobase/row/row0mysql.cc | 5 +++++
 storage/xtradb/row/row0mysql.cc   | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index fb632d1..be2646d 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -1461,6 +1461,11 @@ row_insert_for_mysql(
 	with a latch. */
 	dict_table_n_rows_inc(table);
 
+	if (prebuilt->clust_index_was_generated) {
+		/* set row id to prebuilt */
+		ut_memcpy(prebuilt->row_id, node->row_id_buf, DATA_ROW_ID_LEN);
+	}
+
 	row_update_statistics_if_needed(table);
 	trx->op_info = "";
 
diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc
index ec4f865..fefd295 100644
--- a/storage/xtradb/row/row0mysql.cc
+++ b/storage/xtradb/row/row0mysql.cc
@@ -1455,6 +1455,11 @@ row_insert_for_mysql(
 			srv_stats.n_rows_inserted.add((size_t)trx->id, 1);
 		}
 
+		if (prebuilt->clust_index_was_generated) {
+			/* set row id to prebuilt */
+			ut_memcpy(prebuilt->row_id, node->row_id_buf, DATA_ROW_ID_LEN);
+		}
+
 		/* Not protected by dict_table_stats_lock() for performance
 		reasons, we would rather get garbage in stat_n_rows (which is
 		just an estimate anyway) than protecting the following code


More information about the commits mailing list