1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix for bug #12267 (primary key over GEOMETRY field)

mysql-test/r/gis.result:
  test result fixed
mysql-test/t/gis.test:
  test case added
sql/sql_table.cc:
  we should check this for GEOMETRY fields
This commit is contained in:
unknown
2005-09-26 14:55:52 +05:00
parent ddd18a89ad
commit 2616b65787
3 changed files with 15 additions and 1 deletions

View File

@@ -1148,7 +1148,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
{
column->length*= sql_field->charset->mbmaxlen;
if (f_is_blob(sql_field->pack_flag))
if (f_is_blob(sql_field->pack_flag) ||
(f_is_geom(sql_field->pack_flag) && key->type != Key::SPATIAL))
{
if (!(file->table_flags() & HA_CAN_INDEX_BLOBS))
{