summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-01-12 23:22:12 +0300
committerunknown <sergefp@mysql.com>2005-01-12 23:22:12 +0300
commit4596579c999c7dbf5e0f9152fb0d645e94e11e7c (patch)
treeb1069c3c3bbffb3caa2fc2f236c475494af3cc7c /sql/opt_range.cc
parent4c9d5f80c1f84e66c7a6bde7bf370f199abbf4ee (diff)
parent5861c6dc172ec508ca85eaff437a2a6bab8825aa (diff)
downloadmariadb-git-4596579c999c7dbf5e0f9152fb0d645e94e11e7c.tar.gz
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/dbdata/psergey/mysql-5.0-bug5401-2 sql/opt_range.cc: Auto merged sql/ha_innodb.cc: Auto merged
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index d36ce743b05..4b0e5f036cb 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -912,7 +912,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
{
DBUG_PRINT("info", ("Reusing handler %p", file));
if (file->extra(HA_EXTRA_KEYREAD) ||
- file->extra(HA_EXTRA_RETRIEVE_ALL_COLS) |
+ file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) ||
init() || reset())
{
DBUG_RETURN(1);
@@ -937,7 +937,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
}
if (file->extra(HA_EXTRA_KEYREAD) ||
- file->extra(HA_EXTRA_RETRIEVE_ALL_COLS) ||
+ file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) ||
init() || reset())
{
file->close();
@@ -5621,7 +5621,8 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_and_merge()
DBUG_ENTER("QUICK_INDEX_MERGE_SELECT::prepare_unique");
/* We're going to just read rowids. */
- head->file->extra(HA_EXTRA_KEYREAD);
+ if (head->file->extra(HA_EXTRA_KEYREAD))
+ DBUG_RETURN(1);
/*
Make innodb retrieve all PK member fields, so
@@ -5630,7 +5631,8 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_and_merge()
(This also creates a deficiency - it is possible that we will retrieve
parts of key that are not used by current query at all.)
*/
- head->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
+ if (head->file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY))
+ DBUG_RETURN(1);
cur_quick_it.rewind();
cur_quick= cur_quick_it++;