diff options
author | unknown <bell@sanja.is.com.ua> | 2004-05-19 17:09:40 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-05-19 17:09:40 +0300 |
commit | efcb7706c4d6b43cce8fd392b698ecc5d37a6c43 (patch) | |
tree | cc719f08c9901d8cb4614a46901eb4e6adc9c3fe /sql/sql_union.cc | |
parent | 9fb55cefac8204fb77e28e9141977a72b7017483 (diff) | |
parent | de2c35230fc68eebcbe64e8e629195f1c4d9e76a (diff) | |
download | mariadb-git-efcb7706c4d6b43cce8fd392b698ecc5d37a6c43.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-explain-4.1
mysql-test/r/func_encrypt.result:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 003ff2d95f5..ec1abc57a51 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -361,8 +361,8 @@ int st_select_lex_unit::exec() item->reset(); table->file->delete_all_rows(); } - if (union_distinct) // for subselects - table->file->extra(HA_EXTRA_CHANGE_KEY_TO_UNIQUE); + if (union_distinct && table->file->enable_indexes(HA_KEY_SWITCH_ALL)) + DBUG_RETURN(1); // For sub-selects for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select()) { ha_rows records_at_start= 0; @@ -414,7 +414,11 @@ int st_select_lex_unit::exec() records_at_start= table->file->records; sl->join->exec(); if (sl == union_distinct) - table->file->extra(HA_EXTRA_CHANGE_KEY_TO_DUP); + { + if (table->file->disable_indexes(HA_KEY_SWITCH_ALL)) + DBUG_RETURN(1); + table->no_keyread=1; + } res= sl->join->error; offset_limit_cnt= sl->offset_limit; if (!res && union_result->flush()) |