diff options
author | monty@narttu.mysql.fi <> | 2003-03-19 22:25:44 +0200 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-03-19 22:25:44 +0200 |
commit | b883a9c01c9caba9e74bdc6f4f5b57b1a81a0fd4 (patch) | |
tree | abbee7d78d1399086c301a5bd02f3ba4a9e1ea38 /sql/key.cc | |
parent | 48a9c1239c6b2b2ba27f8a1a9a0df98af204d53b (diff) | |
parent | 584729430a77280e753cc4bf67d2bb6d7f94a6b8 (diff) | |
download | mariadb-git-b883a9c01c9caba9e74bdc6f4f5b57b1a81a0fd4.tar.gz |
Merge with 4.0.12
Diffstat (limited to 'sql/key.cc')
-rw-r--r-- | sql/key.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/key.cc b/sql/key.cc index feda9e156b3..37ef6339f20 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -271,5 +271,13 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields) return 1; } } + + /* + If table handler has primary key as part of the index, check that primary + key is not updated + */ + if (idx != table->primary_key && table->primary_key < MAX_KEY && + (table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX)) + return check_if_key_used(table, table->primary_key, fields); return 0; } |