summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-18 19:57:55 +0200
committerunknown <serg@serg.mylan>2004-08-18 19:57:55 +0200
commit1afa6809873737eafe27d99c4963af68d2118db8 (patch)
tree8ac7985dc9b6caddd1c2402ef8606e4a4cd85ada /sql/sql_select.cc
parent2141c52f53a8f45cb4bd775f5ad713bc917f4bda (diff)
parent8c83ab405213c7954eacb9fc03e920742db0441e (diff)
downloadmariadb-git-1afa6809873737eafe27d99c4963af68d2118db8.tar.gz
manually merged
BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-mytest-old.c~5237697b30cf59e4: Auto merged Build-tools/Bootstrap: Auto merged Build-tools/mysql-copyright: Auto merged configure.in: Auto merged BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql: Auto merged VC++Files/innobase/innobase.dsp: Auto merged client/mysql.cc: Auto merged include/my_global.h: Auto merged innobase/dict/dict0crea.c: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/include/mtr0log.h: Auto merged innobase/include/mtr0log.ic: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/ut0dbg.h: Auto merged innobase/lock/lock0lock.c: Auto merged innobase/os/os0file.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/row/row0sel.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/ut/ut0dbg.c: Auto merged innobase/ut/ut0mem.c: Auto merged libmysql/Makefile.am: Auto merged libmysql/Makefile.shared: Auto merged libmysql/conf_to_src.c: Auto merged libmysql/dll.c: Auto merged libmysql/errmsg.c: Auto merged libmysql/manager.c: Auto merged libmysql_r/Makefile.am: Auto merged myisam/mi_key.c: Auto merged mysql-test/Makefile.am: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/having.result: Auto merged mysql-test/r/heap.result: Auto merged mysql-test/r/type_date.result: Auto merged mysql-test/r/type_float.result: Auto merged mysql-test/t/having.test: Auto merged mysql-test/t/heap.test: Auto merged mysql-test/t/type_date.test: Auto merged mysql-test/t/type_float.test: Auto merged mysql-test/t/type_uint.test: Auto merged scripts/make_binary_distribution.sh: Auto merged scripts/make_win_src_distribution.sh: Auto merged sql/Makefile.am: Auto merged sql/field.h: Auto merged sql/ha_heap.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_sum.h: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/protocol.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged sql/share/czech/errmsg.txt: Auto merged sql/share/danish/errmsg.txt: Auto merged sql/share/dutch/errmsg.txt: Auto merged sql/share/english/errmsg.txt: Auto merged sql/share/estonian/errmsg.txt: Auto merged sql/share/french/errmsg.txt: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/share/greek/errmsg.txt: Auto merged sql/share/hungarian/errmsg.txt: Auto merged sql/share/japanese/errmsg.txt: Auto merged sql/share/korean/errmsg.txt: Auto merged sql/share/norwegian-ny/errmsg.txt: Auto merged sql/share/norwegian/errmsg.txt: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/share/portuguese/errmsg.txt: Auto merged sql/share/romanian/errmsg.txt: Auto merged sql/share/russian/errmsg.txt: Auto merged sql/share/slovak/errmsg.txt: Auto merged sql/share/spanish/errmsg.txt: Auto merged sql/share/swedish/errmsg.txt: Auto merged sql/share/ukrainian/errmsg.txt: Auto merged
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc25
1 files changed, 24 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index f8bc6210a2f..c56645e06b9 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -5527,6 +5527,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]))
{
@@ -8447,7 +8461,16 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
{
if (!(pos= new Item_copy_string(pos)))
goto err;
- if (param->copy_funcs.push_back(pos))
+ /*
+ Item_copy_string::copy for function can call
+ Item_copy_string::val_int for blob via Item_ref.
+ But if Item_copy_string::copy for blob isn't called before,
+ it's value will be wrong
+ so let's insert Item_copy_string for blobs in the beginning of
+ copy_funcs
+ (to see full test case look at having.test, BUG #4358)
+ */
+ if (param->copy_funcs.push_front(pos))
goto err;
}
else