Commit b8864dcd authored by unknown's avatar unknown
Browse files

Avoid setting DB_NOOVERWRITE flag on hidden primary keys in tables

using the BDB storage engine. (Bug #14809)


sql/ha_berkeley.cc:
  Don't set DB_NOOVERWRITE on hidden primary key, since we already
  guarantee uniqueness in how these keys are generated.
parent c4239fee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -665,7 +665,7 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)

    /* Open other keys;  These are part of the share structure */
    key_file[primary_key]=file;
    key_type[primary_key]=DB_NOOVERWRITE;
    key_type[primary_key]= hidden_primary_key ? 0 : DB_NOOVERWRITE;

    DB **ptr=key_file;
    for (uint i=0, used_keys=0; i < table_share->keys ; i++, ptr++)