[TYPO3-core] RFC: Fix sys_refindex problem when using multiplyDBfieldSize=2

Bernhard Kraft kraftb at kraftb.at
Thu Aug 24 18:02:03 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Stucki wrote:


> Define the key to be only 199 characters long. For some reason it didn't work 
> with a length of 200 chars.

The whole key may only be 256 characters long.
http://dev.mysql.com/doc/refman/4.1/en/isam-storage-engine.html
"Maximum key length 256 bytes (default)"
AFAIK this is not only true for ISAM but also MyISAM


Other cms seem to have the same problems :
http://bugs.mysql.com/bug.php?id=4541


The last key:
  KEY lookup_string (ref_table,ref_string)

Has:
200 bytes:  ref_string varchar(200) DEFAULT '' NOT NULL,
+
40 bytes:   ref_table varchar(40) DEFAULT '' NOT NULL,
=
240 bytes.

But as soon as you set "mulitplyDBfieldSize" to a value larger than 1 ref_table
will need 80 bytes (one byte is always required) - t3lib_install only makes "text"
fields if they would be longer than 255 bytes ...

I do not know if we should take care of this issue automatically
... setting the "(length)" parmater of keys when complete key would get longer than 256 bytes

or if we should simply write some note that when multiplyDBfieldSize is used one must take care
of his key lenghts (maybe some extension uses a 200 bytes key which would be 400 after multiplication
by 2) ...

Then we would rather fix it in T3 than to bother the mysql developers (which already raised the limit
to 1000 bytes in mysql5 ... at least that's what I read right now)




greets,
Bernhard
- --
- ----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
- ----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFE7c17Il4dkVkDMFkRAk0NAJwK/3lQVQTo29x/xAOxpehgrBicTgCeLrdR
6LQKO9h3QH4q/NYuLSl5lqc=
=gGbm
-----END PGP SIGNATURE-----



More information about the TYPO3-team-core mailing list