summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2004-08-09 11:39:26 +0200
committerunknown <ingo@mysql.com>2004-08-09 11:39:26 +0200
commit63ae5d0b4d87e25eb3fa773bb4b22b94b2d1fe52 (patch)
tree0dec7031907f9a7f630c527d82911f483e4277e1 /sql/sql_select.cc
parent078a282f933e70e673356b047b3a57b8ba6a4c7a (diff)
downloadmariadb-git-63ae5d0b4d87e25eb3fa773bb4b22b94b2d1fe52.tar.gz
bug#4497 - Serious regression if disk based TMP table is used.
Solved performance problems by enabling write buffer. sql/sql_select.cc: bug#4497 - Serious regression if disk based TMP table is used. Solved performance problems by enabling write buffer. Supplied no test case, as it required too much data to see the performance regression.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 096b73c482f..7b688041acc 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -4533,6 +4533,20 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
new_table.no_rows=1;
}
+#ifdef TO_BE_DONE_LATER_IN_4_1
+ /*
+ To use start_bulk_insert() (which is new in 4.1) we need to find
+ all places where a corresponding end_bulk_insert() should be put.
+ */
+ table->file->info(HA_STATUS_VARIABLE); /* update table->file->records */
+ new_table.file->start_bulk_insert(table->file->records);
+#else
+ /*
+ HA_EXTRA_WRITE_CACHE can stay until close, no need to disable it explicitly.
+ */
+ new_table.file->extra(HA_EXTRA_WRITE_CACHE);
+#endif
+
/* copy all old rows */
while (!table->file->rnd_next(new_table.record[1]))
{