summaryrefslogtreecommitdiff
path: root/sql/records.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
commit76f0b94bb0b2994d639353530c5b251d0f1a204b (patch)
tree9ed50628aac34f89a37637bab2fc4915b86b5eb4 /sql/records.cc
parent4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff)
parent5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff)
downloadmariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz
merge with 5.3
sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
Diffstat (limited to 'sql/records.cc')
-rw-r--r--sql/records.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/records.cc b/sql/records.cc
index 5709eaf1df2..d688ee675e7 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -207,15 +207,6 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
if (select && my_b_inited(&select->file))
tempfile= &select->file;
- else if (select && select->quick && select->quick->clustered_pk_range())
- {
- /*
- In case of QUICK_INDEX_MERGE_SELECT with clustered pk range we have to
- use its own access method(i.e QUICK_INDEX_MERGE_SELECT::get_next()) as
- sort file does not contain rowids which satisfy clustered pk range.
- */
- tempfile= 0;
- }
else
tempfile= table->sort.io_cache;
if (tempfile && my_b_inited(tempfile) &&
@@ -312,7 +303,8 @@ void end_read_record(READ_RECORD *info)
if (info->table)
{
filesort_free_buffers(info->table,0);
- (void) info->file->extra(HA_EXTRA_NO_CACHE);
+ if (info->table->created)
+ (void) info->file->extra(HA_EXTRA_NO_CACHE);
if (info->read_record != rr_quick) // otherwise quick_range does it
(void) info->file->ha_index_or_rnd_end();
info->table=0;