diff options
author | heikki@hundin.mysql.fi <> | 2003-07-08 20:51:45 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2003-07-08 20:51:45 +0300 |
commit | f8a767b5d58f260493df6b5e0b01e123180d3783 (patch) | |
tree | a5df4d6ab9c6ac9601402e6e657fb24265bdf4a5 /sql | |
parent | cc82126f5fef81af44c434498cf0577ce5d486fe (diff) | |
download | mariadb-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.cc | 7 |
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 */ |