diff --git a/mysql-test/r/huge_frm-6224.result b/mysql-test/r/huge_frm-6224.result index 3772317c04d..0d6dd968295 100644 --- a/mysql-test/r/huge_frm-6224.result +++ b/mysql-test/r/huge_frm-6224.result @@ -1 +1,3 @@ +set global max_allowed_packet=1024*1024*10; ERROR HY000: The definition for table `t1` is too big +set global max_allowed_packet=default; diff --git a/mysql-test/t/huge_frm-6224.test b/mysql-test/t/huge_frm-6224.test index 418722a7b51..322abd01738 100644 --- a/mysql-test/t/huge_frm-6224.test +++ b/mysql-test/t/huge_frm-6224.test @@ -4,17 +4,24 @@ # verify that huge frms are rejected during creation, not on opening # --source include/have_partition.inc +set global max_allowed_packet=1024*1024*10; +connect con1,localhost,root; -let $n=5646; +let $n=8164; let $a=create table t1 (a int) engine=myisam partition by hash(a) partitions $n (; dec $n; while ($n) { - let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n,; + let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n COMMENT 'partition p01234567890123456789012345678901234567890123456789012345678$n',; dec $n; } --disable_query_log --error ER_TABLE_DEFINITION_TOO_BIG eval $a partition foo); +--enable_query_log + +connection default; +disconnect con1; +set global max_allowed_packet=default; diff --git a/sql/unireg.h b/sql/unireg.h index b13dd494c74..f32a2fdfe12 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -202,7 +202,7 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table, #define FRM_HEADER_SIZE 64 #define FRM_FORMINFO_SIZE 288 -#define FRM_MAX_SIZE (512*1024) +#define FRM_MAX_SIZE (1024*1024) static inline bool is_binary_frm_header(uchar *head) {