ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Karavaev Pavel <pppd@yandex.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] MySQL "max key length is 1000 bytes" bug?
Date: Thu, 13 Mar 2008 16:08:00 +0400
Message-ID: <47D91920.1000807@yandex.ru> (raw)
In-Reply-To: <47D7D346.9080507@gmail.com>

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.


      reply	other threads:[~2008-03-13 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12  6:48 Karavaev Pavel
2008-03-12 12:57 ` ua2fgb
2008-03-13 12:08   ` Karavaev Pavel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47D91920.1000807@yandex.ru \
    --to=pppd@yandex.ru \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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