summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-07-26 03:33:43 +0500
committerunknown <gshchepa/uchum@gleb.loc>2007-07-26 03:33:43 +0500
commit2df3b7b0ea0681c6fafeda7d6c017404691d5cb9 (patch)
tree9586be2beae68dcf0a316792398609129103c820 /sql/table.cc
parent607ab14cf767ed0187e0c050ed61cb4ebaf34bb7 (diff)
parent0784d92414cba073201000ed0df23d136a6df077 (diff)
downloadmariadb-git-2df3b7b0ea0681c6fafeda7d6c017404691d5cb9.tar.gz
Merge gleb.loc:/home/uchum/work/bk/5.0
into gleb.loc:/home/uchum/work/bk/5.0-opt mysql-test/t/create.test: Auto merged sql/field.cc: Auto merged sql/sql_base.cc: Auto merged sql/table.cc: Auto merged mysql-test/r/create.result: Merge with 5.0 (main).
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index f24f5c6fbcc..ce894e6910f 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -780,7 +780,12 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
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= share->keys_in_use;
+ if (share->db_type == DB_TYPE_INNODB &&
+ field->part_of_sortkey.is_set(key))
+ field->part_of_sortkey= share->keys_in_use;
+ }
}
if (field->key_length() != key_part->length)
{