diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-21 03:38:35 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-21 03:38:35 +0300 |
commit | c1a80bc0615f15535bb297e0f065091b2945af21 (patch) | |
tree | bd27d62de7286eca9070d981c59b7cc1c889d9f1 /sql/table.cc | |
parent | 5dbd7397bd0d268b02d2aacb16b8c288fcfa2e93 (diff) | |
download | mariadb-git-c1a80bc0615f15535bb297e0f065091b2945af21.tar.gz |
Integrated table->ref_primary_key into table->part_of_key
Fixed bug in UNION
client/mysqlbinlog.cc:
Added error message handling to read_log_event()
heap/hp_write.c:
More debug info
myisam/myisampack.c:
Cleanup
mysql-test/mysql-test-run.sh:
Portability fixes.
mysql-test/r/union.result:
More tests cases for UNION
mysql-test/t/union.test:
More tests cases for UNION
sql/Makefile.am:
Added mysql_embed.h
sql/item.cc:
Fixed bug when using the same table multiple times in union.
sql/log_event.cc:
Removed use of ## construct (Portability problem)
sql/log_event.h:
Added error message handling to read_log_event()
sql/mysql_priv.h:
Added mysql_embed.h
sql/opt_sum.cc:
Cleanup
sql/slave.cc:
cleanup
sql/sql_base.cc:
Integrated table->ref_primary_key into table->part_of_key
sql/sql_union.cc:
Cleanup
sql/table.cc:
Integrated table->ref_primary_key into table->part_of_key
sql/table.h:
Integrated table->ref_primary_key into table->part_of_key
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc index eed4170c14a..6c2f0e27c95 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -455,8 +455,12 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, if (key == primary_key) { field->flags|= PRI_KEY_FLAG; + /* + If this field is part of the primary key and all keys contains + the primary key, then we can use any key to find this column + */ if (ha_option & HA_PRIMARY_KEY_IN_READ_INDEX) - field->part_of_key|= ((key_map) 1 << primary_key); + field->part_of_key= outparam->keys_in_use; } if (field->key_length() != key_part->length) { @@ -480,8 +484,6 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, (outparam->keys_in_use & ((key_map) 1 << primary_key))) { outparam->primary_key=primary_key; - if (outparam->file->option_flag() & HA_PRIMARY_KEY_IN_READ_INDEX) - outparam->ref_primary_key= (key_map) 1 << primary_key; /* If we are using an integer as the primary key then allow the user to refer to it as '_rowid' |