Navigation Menu

Skip to content

Commit

Permalink
Add missing table type check for no primary key check
Browse files Browse the repository at this point in the history
Because NO_KEY table doesn't require primary key.
  • Loading branch information
kou committed Nov 27, 2014
1 parent 12d720f commit 2b15a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ha_mroonga.cpp
Expand Up @@ -5290,7 +5290,7 @@ int ha_mroonga::storage_write_row(uchar *buf)
}
}

if (pkey_size == 0) {
if (grn_table->header.type != GRN_TABLE_NO_KEY && pkey_size == 0) {
my_message(ER_ERROR_ON_WRITE, "primary key is empty", MYF(0));
DBUG_RETURN(ER_ERROR_ON_WRITE);
}
Expand Down

0 comments on commit 2b15a8d

Please sign in to comment.