summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-03-12 01:10:22 +0200
committerunknown <monty@mysql.com>2004-03-12 01:10:22 +0200
commita1d9e1eec4ff8e9e53567bb3606bc4605a952375 (patch)
tree8427a74265a1dc0dc71464f4add7541489713f46 /sql/sql_update.cc
parentc6d91e00bbd103e46d806b1b9aad1963f4cfe18c (diff)
downloadmariadb-git-a1d9e1eec4ff8e9e53567bb3606bc4605a952375.tar.gz
Ensure that install_test_db.sh script works with both 'make install' and 'make_binary_distribution' layouts
Abort if we can't allocate memory for table cache Fix bug with multi-update-tables and BDB tables. extra/replace.c: Fix comments mysql-test/install_test_db.sh: Change internal option from -bin to --bin Ensure that script works with both 'make install' and 'make_binary_distribution' layouts (Bug #3031) mysql-test/mysql-test-run.sh: Change internal option from -bin to --bin sql/ha_berkeley.cc: More debug sql/mysql_priv.h: Change table_cache_init to return error sql/mysqld.cc: Abort if we can't allocate memory for table cache. (Bug #3085) Enable warnings by default sql/sql_base.cc: Change table_cache_init to return error sql/sql_update.cc: Fix bug with multi-update-tables and BDB tables. Bug #3098 Problem was that we didn't initialize BDB for calls to rnd_pos()
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 0a8530aa141..02d2fe2c442 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -866,14 +866,16 @@ int multi_update::do_updates(bool from_send_error)
DBUG_RETURN(0);
for (cur_table= update_tables; cur_table ; cur_table= cur_table->next)
{
+ byte *ref_pos;
+ TABLE *tmp_table;
+
table = cur_table->table;
if (table == table_to_update)
continue; // Already updated
-
org_updated= updated;
- byte *ref_pos;
- TABLE *tmp_table= tmp_tables[cur_table->shared];
+ tmp_table= tmp_tables[cur_table->shared];
tmp_table->file->extra(HA_EXTRA_CACHE); // Change to read cache
+ (void) table->file->rnd_init(0);
table->file->extra(HA_EXTRA_NO_CACHE);
/*
@@ -940,6 +942,7 @@ int multi_update::do_updates(bool from_send_error)
else
trans_safe= 0; // Can't do safe rollback
}
+ (void) table->file->rnd_end();
}
DBUG_RETURN(0);