diff options
author | monty@tramp.mysql.fi <> | 2000-10-03 14:18:03 +0300 |
---|---|---|
committer | monty@tramp.mysql.fi <> | 2000-10-03 14:18:03 +0300 |
commit | 9f7c4563f78f74999efd94768ec483d8c24c3761 (patch) | |
tree | c02cc6a9c6585038615c596332aae70354b44aac /sql/key.cc | |
parent | 69a249c054b3c1dd4c1aadeb735291ea63862c98 (diff) | |
download | mariadb-git-9f7c4563f78f74999efd94768ec483d8c24c3761.tar.gz |
First part of automatic repair of MyISAM tables.
Error on full disk on repair.
SIGHUP signal handling.
Update with keys on timestamp
Portability fixes
Diffstat (limited to 'sql/key.cc')
-rw-r--r-- | sql/key.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/key.cc b/sql/key.cc index df3f0fe25d5..8678202922e 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -243,7 +243,10 @@ void key_unpack(String *to,TABLE *table,uint idx) } -/* Return 1 if any field in a list is part of key */ +/* + Return 1 if any field in a list is part of key or the key uses a field + that is automaticly updated (like a timestamp) +*/ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields) { @@ -255,6 +258,10 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields) key_part++) { Item_field *field; + + if (key_part->field == table->timestamp_field) + return 1; // Can't be used for update + f.rewind(); while ((field=(Item_field*) f++)) { |