1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

fix ALTER TABLE .. DROP CONSTRAINT IF NOT EXISTS

This commit is contained in:
Sergei Golubchik
2016-07-02 12:22:58 +02:00
parent 5c764a0eb8
commit b258f91103
3 changed files with 5 additions and 1 deletions

View File

@ -5880,7 +5880,7 @@ drop_create_field:
}
else if (drop->type == Alter_drop::CHECK_CONSTRAINT)
{
for (uint i=0; i < table->s->table_check_constraints; i++)
for (uint i=table->s->field_check_constraints; i < table->s->table_check_constraints; i++)
{
if (my_strcasecmp(system_charset_info, drop->name,
table->check_constraints[i]->name.str) == 0)