diff options
author | Dmitry Lenev <Dmitry.Lenev@oracle.com> | 2011-02-02 16:17:48 +0300 |
---|---|---|
committer | Dmitry Lenev <Dmitry.Lenev@oracle.com> | 2011-02-02 16:17:48 +0300 |
commit | 3473329d3b5e2fd339c184c2e7c75bb6b3bda3ad (patch) | |
tree | 60a1ca8daa1c46a6235ca044151ea19772a0ae94 /mysql-test/t/temp_table-master.opt | |
parent | c8de3bba8ed68b7cdbec26763cafe87746224850 (diff) | |
download | mariadb-git-3473329d3b5e2fd339c184c2e7c75bb6b3bda3ad.tar.gz |
Fix for bug #58650 "Failing assertion: primary_key_no == -1 ||
primary_key_no == 0".
Attempt to create InnoDB table with non-nullable column of
geometry type having an unique key with length 12 on it and
with some other candidate key led to server crash due to
assertion failure in both non-debug and debug builds.
The problem was that such a non-candidate key could have
been sorted as the first key in table/.FRM, before any legit
candidate keys. This resulted in assertion failure in InnoDB
engine which assumes that primary key should either be the
first key in table/.FRM or should not exist at all.
The reason behind such an incorrect sorting was an wrong
value of Create_field::key_length member for geometry field
(which was set to its pack_length == 12) which confused code
in mysql_prepare_create_table(), so it would skip marking
such key as a key with partial segments.
This patch fixes the problem by ensuring that this member
gets the same value of Create_field::key_length member as
for other blob fields (from which geometry field class is
inherited), and as result unique keys on geometry fields
are correctly marked as having partial segments.
Diffstat (limited to 'mysql-test/t/temp_table-master.opt')
0 files changed, 0 insertions, 0 deletions