diff options
Diffstat (limited to 'storage/maria/ma_write.c')
-rw-r--r-- | storage/maria/ma_write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c index 34ce530283c..4175a5be18c 100644 --- a/storage/maria/ma_write.c +++ b/storage/maria/ma_write.c @@ -340,7 +340,7 @@ err: for (j=0 ; j < share->base.keys ; j++) maria_flush_bulk_insert(info, j); } - info->errkey= (int) i; + info->errkey= i < share->base.keys ? (int) i : -1; /* We delete keys in the reverse order of insertion. This is the order that a rollback would do and is important for CLR_ENDs generated by |