summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innodb.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 9857628ccc8..09119a4eb54 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -3396,6 +3396,13 @@ ha_innobase::create(
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
if not yet created */