ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] MySQL "max key length is 1000 bytes" bug?
@ 2008-03-12  6:48 Karavaev Pavel
  2008-03-12 12:57 ` ua2fgb
  0 siblings, 1 reply; 3+ messages in thread
From: Karavaev Pavel @ 2008-03-12  6:48 UTC (permalink / raw)
  To: ALT Linux Community

Приветствую сообщество!
При установке greysql столкнулся в тем, что он не может создать свои 
рабочие таблицы по причине:

mysql> CREATE TABLE `connect` (
    ->   `sender_name` varchar(64) NOT NULL default '',
    ->   `sender_domain` varchar(255) NOT NULL default '',
    ->   `src` varchar(39) NOT NULL default '',
    ->   `rcpt` varchar(255) NOT NULL default '',
    ->   `first_seen` timestamp(19) NOT NULL,
    ->   KEY `connect_idx` (`src`,`sender_domain`,`sender_name`),
    ->   KEY `connect_fseen` (`first_seen`)
    -> ) TYPE=MyISAM;
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
mysql>

Вроде бы похоже на старый баг http://bugs.mysql.com/bug.php?id=13835 , 
но пример, приведенный на этой странице выполняется нормально:

mysql> create table fulltext_test(id integer
    -> ,fulltext_string varchar(10000)
    -> ,fulltext index ftx1(fulltext_string)
    -> );
Query OK, 0 rows affected (0.00 sec)
mysql>

Данную ситуацию схватил на MySQL-server-5.0.51-alt1 и на 
MySQL-server-5.0.34-alt1.
Кто виноват и что делать?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Comm] MySQL "max key length is 1000 bytes" bug?
  2008-03-12  6:48 [Comm] MySQL "max key length is 1000 bytes" bug? Karavaev Pavel
@ 2008-03-12 12:57 ` ua2fgb
  2008-03-13 12:08   ` Karavaev Pavel
  0 siblings, 1 reply; 3+ messages in thread
From: ua2fgb @ 2008-03-12 12:57 UTC (permalink / raw)
  To: ALT Linux Community general discussions

Karavaev Pavel пишет:
>
> mysql> CREATE TABLE `connect` (
>    ->   `sender_name` varchar(64) NOT NULL default '',
>    ->   `sender_domain` varchar(255) NOT NULL default '',
>    ->   `src` varchar(39) NOT NULL default '',
>    ->   `rcpt` varchar(255) NOT NULL default '',
>    ->   `first_seen` timestamp(19) NOT NULL,
>    ->   KEY `connect_idx` (`src`,`sender_domain`,`sender_name`),
>    ->   KEY `connect_fseen` (`first_seen`)
>    -> ) TYPE=MyISAM;
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 
> bytes
> mysql>
>
5.0.22-log -- не подтверждаю.

цитата из http://dev.mysql.com/doc/refman/5.0/en/create-table.html
KEY is normally a synonym for INDEX. The key attribute PRIMARY KEY can 
also be specified as just KEY when given in a column definition. This 
was implemented for compatibility with other database systems.


Попробуй изменить KEY на INDEX. Если не поможет -- попробуй создать 
таблицу без ключей.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Comm] MySQL "max key length is 1000 bytes" bug?
  2008-03-12 12:57 ` ua2fgb
@ 2008-03-13 12:08   ` Karavaev Pavel
  0 siblings, 0 replies; 3+ messages in thread
From: Karavaev Pavel @ 2008-03-13 12:08 UTC (permalink / raw)
  To: ALT Linux Community general discussions

ua2fgb@gmail.com пишет
> 5.0.22-log -- не подтверждаю.
>
> цитата из http://dev.mysql.com/doc/refman/5.0/en/create-table.html
> KEY is normally a synonym for INDEX. The key attribute PRIMARY KEY can 
> also be specified as just KEY when given in a column definition. This 
> was implemented for compatibility with other database systems.
>
>
> Попробуй изменить KEY на INDEX. Если не поможет -- попробуй создать 
> таблицу без ключей.
>
mysql> CREATE TABLE `connect` (
    ->   `sender_name` varchar(64) NOT NULL default '',
    ->   `sender_domain` varchar(255) NOT NULL default '',
    ->   `src` varchar(39) NOT NULL default '',
    ->   `rcpt` varchar(255) NOT NULL default '',
    ->   `first_seen` timestamp(19) NOT NULL,
    ->   INDEX `connect_idx` (`src`,`sender_domain`,`sender_name`),
    ->   INDEX `connect_fseen` (`first_seen`)
    -> ) TYPE=MyISAM;
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
mysql> select version();
+------------+
| version()  |
+------------+
| 5.0.51-log |
+------------+
1 row in set (0.00 sec)
mysql>
Создать таблицу без ключей, конечно, можно. Может быть, даже и 
заработает. Но разве это выход? sqlgrey - не единственный, кто может 
захотеть ключи по полям. varchar.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-13 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-12  6:48 [Comm] MySQL "max key length is 1000 bytes" bug? Karavaev Pavel
2008-03-12 12:57 ` ua2fgb
2008-03-13 12:08   ` Karavaev Pavel

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git