Project

General

Profile

Actions

Bug #91907

closed

tinytext columns cause schema inspector loop when adding an index on these columns

Added by S P over 4 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2020-07-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Some columns (I didn't check all, these are probably just some of them), like

  • sys_category.title
  • sys_file.name
  • sys_file_metadata.title

define itself as

<columname> tinytext
or
<columname> tinytext NOT NULL

First minor problem: BLOB-type columns (like BLOB and TEXT and their differnet sizes) are not not-nullable (specifying NULL or NOT NULL on them has no effect at all).

When adding an index on these columns like

CREATE TABLE sys_category (
    INDEX my_title_index (title(100))
);

The schema inspector will create the index first, but then always suggests to drop and recreate it, in an endless loop.

Why are these columns tinytext anyways? Instead of varchar(255)? tinytext is not Unicode-aware (it can only store 255 bytes, not 255 characters). Also it is a BLOB-type, which means usually it is way slower than varchar on lookup-time (depending on lots of factors, but it can never be faster than varchar, and usally it's really slower).

I marked this as v9, but I assume it's like this in any version.

Actions #1

Updated by S P over 4 years ago

This seems only to happen with tinytext. Tested it on a text column (sys_file.identifier) -> works perfectly.

Actions #2

Updated by S P about 3 years ago

  • TYPO3 Version changed from 9 to 10

Valid on v10, still.

Actions #3

Updated by S P about 1 month ago

Works on v12 (these fields are still tinytext instead of varchar(255), but the schema inspector correctly detectd indexes on them).

Ticket can be closed.

Actions #4

Updated by Oliver Bartsch about 1 month ago

  • Status changed from New to Closed

Closed as requested by author.

Actions

Also available in: Atom PDF