error mismatch on maximum primary key length versus the actual
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Invalid
|
High
|
Andrew Ettinger |
Bug Description
./test-run --suite=broken subselect_sj2.test
The error states that the maximum key length is 765 bytes. The primary key length in this query is 600 bytes which is below the maximum. The max length in the error message does not match the actual max length that Drizzle supports..
(Note, if the length of pk1, pk2, pk3 are changed to 100, the query runs.)
According to MySQL docs:
Size of primary key is 8 bytes if no primary key is provided and otherwise the sum of the max size of the attributes in the primary key.
subselect_sj2
broken.
drizzletest: At line 35: query 'create table t3 (
a int,
b int,
key(b),
pk1 char(200), pk2 char(200), pk3 char(200),
primary key(pk1, pk2, pk3)
) engine=innodb' failed: 1071: Specified key was too long; max key length is 767 bytes
The result from queries just before the failure was:
< snip >
7 4
8 4
9 5
explain select * from t2 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Start temporary
1 PRIMARY t2 ref b b 5 test.t1.a 1 End temporary
select * from t2 where b in (select a from t1);
a b
1 1
2 1
3 2
4 2
create table t3 (
a int,
b int,
key(b),
pk1 char(200), pk2 char(200), pk3 char(200),
primary key(pk1, pk2, pk3)
) engine=innodb;
More results from queries before failure can be found in /export/
Aborting: broken.
To continue, re-run with '--force'.
Stopping All Servers
Related branches
Changed in drizzle: | |
importance: | Undecided → High |
milestone: | none → aloha |
Changed in drizzle: | |
assignee: | nobody → Andrew Ettinger (sillydeveloper) |
status: | Confirmed → In Progress |
Changed in drizzle: | |
milestone: | bell → cherry |
Changed in drizzle: | |
milestone: | 2010-05-10 → none |
The limitation different I believe is due to UTF8 column
On Dec 21, 2008, at 3:20 PM, Aarti Pai wrote:
> Public bug reported: subselect_ sj2 [ fail ] home/bzrwork/ drizzle/ tests/var/ log/subselect_ sj2.log subselect_ sj2 failed in default mode. /bugs.launchpad .net/bugs/ 310344 subselect_ sj2 [ fail ]
>
> ./test-run --suite=broken subselect_sj2.test
>
> The error states that the maximum key length is 765 bytes. The
> primary key length in this query is 600 bytes which is below the
> maximum. The max length in the error message does not match the
> actual max length that Drizzle supports..
> (Note, if the length of pk1, pk2, pk3 are changed to 100, the query
> runs.)
>
> According to MySQL docs:
> Size of primary key is 8 bytes if no primary key is provided and
> otherwise the sum of the max size of the attributes in the primary
> key.
>
> subselect_sj2
>
> broken.
>
> drizzletest: At line 35: query 'create table t3 (
> a int,
> b int,
> key(b),
> pk1 char(200), pk2 char(200), pk3 char(200),
> primary key(pk1, pk2, pk3)
> ) engine=innodb' failed: 1071: Specified key was too long; max key
> length is 767 bytes
>
> The result from queries just before the failure was:
> < snip >
> 7 4
> 8 4
> 9 5
> explain select * from t2 where b in (select a from t1);
> id select_type table type possible_keys key
> key_len ref rows Extra
> 1 PRIMARY t1 ALL NULL NULL NULL NULL
> 3 Start temporary
> 1 PRIMARY t2 ref b b 5
> test.t1.a 1 End temporary
> select * from t2 where b in (select a from t1);
> a b
> 1 1
> 2 1
> 3 2
> 4 2
> create table t3 (
> a int,
> b int,
> key(b),
> pk1 char(200), pk2 char(200), pk3 char(200),
> primary key(pk1, pk2, pk3)
> ) engine=innodb;
>
> More results from queries before failure can be found in
> /export/
>
> Aborting: broken.
> To continue, re-run with '--force'.
> Stopping All Servers
>
> ** Affects: drizzle
> Importance: Undecided
> Status: New
>
> --
> error mismatch on maximum primary key length versus the actual
> https:/
> You received this bug notification because you are a member of
> Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud and Web: New
>
> Bug description:
> ./test-run --suite=broken subselect_sj2.test
>
> The error states that the maximum key length is 765 bytes. The
> primary key length in this query is 600 bytes which is below the
> maximum. The max length in the error message does not match the
> actual max length that Drizzle supports..
> (Note, if the length of pk1, pk2, pk3 are changed to 100, the query
> runs.)
>
> According to MySQL docs:
> Size of primary key is 8 bytes if no primary key is provided and
> otherwise the sum of the max size of the attributes in the primary
> key.
>
> subselect_sj2
>
> broken.
>
> drizzletest: At line 35: query 'create table t3 (
> a int,
> b int,
> key(b),
> pk1 char(200), pk2 char(200), pk3 char(200),
> primary key(pk1, pk2, pk3)
> ) engine=innodb' failed: 1071: Specified key was too long; max key
> length ...