MySQL Forums
Forum List  »  InnoDB

Re: Regarding "[Warning] InnoDB: Cannot add field"
Posted by: Stephen Kwok
Date: July 29, 2021 11:40AM

hi Peter,

Thanks so much for the article! It's helped me understand the problem more. I've tried the suggestion of forcing a varchar column to the overflow pages; unfortunately, that didn't help. I suspect it is because there isn't enough space-saving there as there is only one varchar column. In addition, most of the columns in the table have TEXT data type already and so I'm not sure why it is still causing the error. I'm posting the description of the table below. Can you or someone please shed more lights?

+----------------------------------------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------------------------+---------------------+------+-----+---------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| phnareacode | varchar(32) | YES | | NULL | |
| sec_id | int(10) unsigned | NO | | NULL | |
| devid | bigint(20) unsigned | YES | MUL | NULL | |
| col_1 | text | YES | | NULL | |
| col_2 | text | YES | | NULL | |
...
| column_a(the column mentioned in the warning)| text | YES | | NULL | |
| col_196 | text | YES | | NULL | |
...
| col_224 | text | YES | | NULL | |
+----------------------------------------------+---------------------+------+-----+---------+----------------+
CHARSET=utf8

Many of the col_* fields in many rows have NULL. Would that matter because according to https://mariadb.com/kb/en/innodb-dynamic-row-format/#overflow-pages-with-the-dynamic-row-format TEXT columns are written to overflow pages only when their values are longer than 40 bytes?

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.