Bug #1486

Keys in current schema too long for MySQL

Added by Matthias Hörmann almost 7 years ago. Updated about 4 years ago.

Status:Resolved Start date:2008-09-09
Priority:Should have Due date:
Assigned To:Matthias Hörmann % Done:

100%

Category:-
Target version:-

Description

MySQL only supports key lengths of up to 1000 bytes (MyISAM) or 767 bytes (InnoDB).

This means any key using more than one VARCHAR UTF-8 encoded column won't work in MySQL.

There is a syntax to limit the part of a text/blob column used in a key to the first n characters
but it might not be wise to limit it too much with namespace URIs
(as a lot of those probably have similar prefixes if they are published by the same organization).

This problem affects both primary and unique keys.

Associated revisions

Revision ccf6e16f
Added by Karsten Dambekalns almost 7 years ago

TYPO3CR: Implemented MySQL testing, vastly improved PostgreSQL testing and wrote install shell script.
  • the SQL code contains key lengths for MySQL which are removed by all code that uses the SQL automatically if the database type is not mysql, fixes #1486
  • namespace URIs are now stored in TEXT columns, fixes #1484
  • MySQL gets it's ANSI_QUOTES option after connection setup in all places where connections are made
  • install.sh allows fully automated setup of both production and test databases: MySQL, PostgreSQL, SQLite; calls fixpermissions.sh
  • install.sh automatically calls web based database setup via lynx (could be wget if there are problems with the availability of lynx but lynx -dump gives more meaningful output)
  • testdb.sh replaces the various db specific tools and is used by install.sh for testdb setup, also allows dumping and cleanup of test databases
  • PHP code uses testdb.conf to read test database settings (all except sqlite currently)
  • production and testing now use the same database schema file, multi-line statements are now supported by the storage helper too

Patch (mostly) by Matthias Hörmann.

History

#1 Updated by Matthias Hörmann almost 7 years ago

substring key notation works for varchar columns too

#2 Updated by Matthias Hörmann almost 7 years ago

  • Assigned To set to Matthias Hörmann

Resolved in patch sent to Karsten today

#3 Updated by Karsten Dambekalns almost 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r1261.

Also available in: Atom PDF