On 2/27/21 3:48 PM, Ruth Ivimey-Cook wrote:
It is also possible to Alter existing databases and tables, but with one catch: the maximum table row length is reduced, so some tables will need to be adjusted (e.g. converting varchar(255) to varchar(230)).
This is misleading. The maximum row length depends on the actual data stored in the row. The sum of the various column size limits for VARCHAR and other columns can well exceed the maximum row size as long as the sum of the lengths of the actual data stored in the row does not.
The significant issue is all these limits are bytes, not characters, so in the worst case, a VARCHAR(255) column can only store 85 3-byte utf8 encoded unicodes or 63 4-byte utf8mb4 encoded unicodes, but this too is misleading an most strings contain single byte encodings with some 2 or 3 byte encodings and maybe at most one or two 4-byte encodings.
Furthermore, the problem issues are essentially limited to emojis and possibly other 4-byte encoded symbols in email subject headers and bodies. Bodies are a TEXT field and the data are stored separately and do not affect the row size and subjects are defined with a maximum length of 512 bytes which should be sufficient.
None of the data stored in rows is at all likely to exceed the maximum row length, even with a lot of 4-byte encodings.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan