summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/ha_innodb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/handler/ha_innodb.cc')
-rw-r--r--storage/innobase/handler/ha_innodb.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index ce2e4b6990f..e5e864bffc5 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -6537,14 +6537,21 @@ ha_innobase::clone(
DBUG_RETURN(new_handler);
}
-
-uint
-ha_innobase::max_supported_key_part_length() const
-/*==============================================*/
-{
- /* A table format specific index column length check will be performed
- at ha_innobase::add_index() and row_create_index_for_mysql() */
- return(REC_VERSION_56_MAX_INDEX_COL_LEN);
+uint ha_innobase::max_supported_key_part_length() const
+{
+ /* A table format specific index column length check will be performed
+ at ha_innobase::add_index() and row_create_index_for_mysql() */
+ /* FIXME: rewrite this as well as ha_innobase::max_supported_key_length()
+ using an API that considers the PRIMARY KEY as well as secondary index
+ metadata and the ROW_FORMAT and KEY_BLOCK_SIZE */
+ switch (srv_page_size) {
+ case 4096:
+ return 1173;
+ case 8192:
+ return 1536;
+ default:
+ return REC_VERSION_56_MAX_INDEX_COL_LEN;
+ }
}
/******************************************************************//**