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.
This commit is contained in:
unknown 2005-11-09 16:28:20 -08:00
parent c4239fee21
commit b8864dcde6

View file

@ -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++)