summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorJimmy Yang <jimmy.yang@oracle.com>2012-03-22 11:22:54 +0800
committerJimmy Yang <jimmy.yang@oracle.com>2012-03-22 11:22:54 +0800
commit19d68d68df7dd1d3b4882434f60d773393c97bc1 (patch)
treec79b1eb332670ba9155cfc1c798d9e2dbe0ae29d /storage
parent3fe232f156c807ba738ce4f9baff634ff60031bd (diff)
downloadmariadb-git-19d68d68df7dd1d3b4882434f60d773393c97bc1.tar.gz
Fix Bug #13849910 - INNODB ASSERTS ON TOO LONG TABLENAME WHEN USING PARTITIONS
rb://981 approved by Sunny Bains
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/include/univ.i16
1 files changed, 11 insertions, 5 deletions
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 71c75469ee9..3394fc576cb 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -303,11 +303,17 @@ management to ensure correct alignment for doubles etc. */
/* Maximum number of parallel threads in a parallelized operation */
#define UNIV_MAX_PARALLELISM 32
-/* The maximum length of a table name. This is the MySQL limit and is
-defined in mysql_com.h like NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN, the
-number does not include a terminating '\0'. InnoDB probably can handle
-longer names internally */
-#define MAX_TABLE_NAME_LEN 192
+/** This is the "mbmaxlen" for my_charset_filename (defined in
+strings/ctype-utf8.c), which is used to encode File and Database names. */
+#define FILENAME_CHARSET_MAXNAMLEN 5
+
+/** The maximum length of an encode table name in bytes. The max
+table and database names are NAME_CHAR_LEN (64) characters. After the
+encoding, the max length would be NAME_CHAR_LEN (64) *
+FILENAME_CHARSET_MAXNAMLEN (5) = 320 bytes. The number does not include a
+terminating '\0'. InnoDB can handle longer names internally */
+#define MAX_TABLE_NAME_LEN 320
+
/* The maximum length of a database name. Like MAX_TABLE_NAME_LEN this is
the MySQL's NAME_LEN, see check_and_convert_db_name(). */