ha_innodb.cc:

  Prevent the user from creating InnoDB tables with > 1000 columns
parent cc82126f
...@@ -3396,6 +3396,13 @@ ha_innobase::create( ...@@ -3396,6 +3396,13 @@ ha_innobase::create(
DBUG_ASSERT(thd != NULL); DBUG_ASSERT(thd != NULL);
if (form->fields > 1000) {
/* The limit probably should be REC_MAX_N_FIELDS - 3 = 1020,
but we play safe here */
return(HA_ERR_TO_BIG_ROW);
}
/* Get the transaction associated with the current thd, or create one /* Get the transaction associated with the current thd, or create one
if not yet created */ if not yet created */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment