summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2003-07-08 20:51:45 +0300
committerheikki@hundin.mysql.fi <>2003-07-08 20:51:45 +0300
commitf8a767b5d58f260493df6b5e0b01e123180d3783 (patch)
treea5df4d6ab9c6ac9601402e6e657fb24265bdf4a5 /sql
parentcc82126f5fef81af44c434498cf0577ce5d486fe (diff)
downloadmariadb-git-f8a767b5d58f260493df6b5e0b01e123180d3783.tar.gz
ha_innodb.cc:
Prevent the user from creating InnoDB tables with > 1000 columns
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 */