Bug #1486

Keys in current schema too long for MySQL

Added by Matthias Hörmann 121 days ago. Updated 110 days ago.

Status:Resolved Start: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(255) 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 1261
Added by k-fish 111 days 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

2008-09-09 11:56 - Matthias Hörmann

substring key notation works for varchar columns too

2008-09-12 15:57 - Matthias Hörmann

  • Assigned to set to Matthias Hörmann

Resolved in patch sent to Karsten today

2008-09-19 19:50 - Karsten Dambekalns

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

Applied in changeset r1261.

Also available in: Atom PDF