Support of full length domain names (until 255 char long)

Issue #715 closed
Jose M. Albarran created an issue

Hi

The piler database supports only 128 length domain names.

But the rule says that a domain name can be 255 char long (normal ASCII or IDNA.

Check this debate: http://stackoverflow.com/questions/8717378/what-is-the-maximum-length-of-an-idna-converted-domain-name?rq=1

Comments (8)

  1. Janos SUTO repo owner

    Yes, a valid domain name indeed could be up to 255 characters. However, for the rules tables mysql poses a limit on the length of the unique key, so I had to half the length of the domain name field. I'm not sure if it really is a problem for real world domain names.

  2. Jose M. Albarran reporter

    Hi, Janos

    The real problem will be with domains in IDNA. I will try to check an e-mail from a china domain, to check. Of course, is not urgent for today (all my china partners use alternative ascii e-mail address today).

  3. eXtremeSHOK

    @jsuto you can safely increase the size

    For InnoDB tables, the limit is 3072 bytes across all indexed columns, presumably taking only the first 767 bytes of each column.

    "The InnoDB internal maximum key length is 3500 bytes, but MySQL itself restricts this to 3072 bytes. This limit applies to the length of the combined index key in a multi-column index." http://dev.mysql.com/doc/refman/5.1/en/innodb-restrictions.html

    By default, an index key for a single-column index can be up to 767 bytes. The same length limit applies to any index key prefix. See Section 14.1.14, “CREATE INDEX Syntax”. For example, you might hit this limit with a column prefix index of more than 255 characters on a TEXT or VARCHAR column, assuming a UTF-8 character set and the maximum of 3 bytes for each character. When the innodb_large_prefix configuration option is enabled, this length limit is raised to 3072 bytes, for InnoDB tables that use the DYNAMIC and COMPRESSED row formats.

    No one should be using MyISAM these days, as it has major issues/flaws.

  4. eXtremeSHOK

    UTF-8 is 3 bytes per a char.

    varchar(255) = 3 * 255 = 765, leaving 2 bytes free, as the maximum is 767.

  5. Janos SUTO repo owner

    I think you should divide it, so the correct value would be 255/3 = 85. Anyway take the retention_rules table, increase the size of the domain column, and try to create the table.

  6. Janos SUTO repo owner

    I'm still not convinced that the issue is real even for Chinese domains. If you ever really stumble in such a problem, then reopen the issue.

  7. Log in to comment