diff options
author | unknown <kostja@oak.local> | 2003-08-06 16:58:03 +0400 |
---|---|---|
committer | unknown <kostja@oak.local> | 2003-08-06 16:58:03 +0400 |
commit | a8cb3628b7b37503fa02e9f3b091eff5a3c3c399 (patch) | |
tree | 97ce56c35330de689cc9dbeddc5acd8b494ad0c7 /sql/records.cc | |
parent | b97d0ea2c3c2d325c56f01a8edf26e7944dea749 (diff) | |
download | mariadb-git-a8cb3628b7b37503fa02e9f3b091eff5a3c3c399.tar.gz |
fix for bug #958 and tests for it
aligned with Sergey notes.
sql/records.cc:
fix for bug #958 - big select with
count distinct and group by
aligned with Sergey notes.
Diffstat (limited to 'sql/records.cc')
-rw-r--r-- | sql/records.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/records.cc b/sql/records.cc index 783ca663dfe..72a6d480356 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -73,7 +73,13 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, info->ref_pos=table->file->ref; table->file->rnd_init(0); - if (! (specialflag & SPECIAL_SAFE_MODE) && + /* + table->sort.addon_field is checked because if we use addon fields, + it doesn't make sense to use cache - we don't read from the table + and table->sort.io_cache is read sequentially + */ + if (!table->sort.addon_field && + ! (specialflag & SPECIAL_SAFE_MODE) && thd->variables.read_rnd_buff_size && !table->file->fast_key_read() && (table->db_stat & HA_READ_ONLY || |