1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-17544 No warning when trying to name a primary key constraint.

Warning added.
This commit is contained in:
Alexey Botchkov
2019-07-30 21:57:48 +04:00
parent 4b5a14d0fe
commit c6efbc543d
28 changed files with 115 additions and 19 deletions

View File

@ -792,11 +792,15 @@ POINT(1 1)
drop function fn3;
create table t1(pt POINT);
alter table t1 add primary key pti(pt);
Warnings:
Warning 1280 Name 'pti' ignored for PRIMARY key.
drop table t1;
create table t1(pt GEOMETRY);
alter table t1 add primary key pti(pt);
ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
alter table t1 add primary key pti(pt(20));
Warnings:
Warning 1280 Name 'pti' ignored for PRIMARY key.
drop table t1;
create table t1 select ST_GeomFromText('point(1 1)');
desc t1;