Commit f0f7eccc authored by unknown's avatar unknown

ha_innodb.cc:

  Prevent the user from creating InnoDB tables with > 1000 columns


sql/ha_innodb.cc:
  Prevent the user from creating InnoDB tables with > 1000 columns
parent eb271ef8
...@@ -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