From 0b751edc57385e125415a3d0aa8f37ad772e7178 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Mar 2004 18:16:10 +0200 Subject: Rollback UPDATE/DELETE statements on kill nsure that rows in a multi-row INSERT DELAYED are inserted atomicly mysql-test/mysql-test-run.sh: Make test case safe for openserver/unixware (Bug #2700) sql/sql_delete.cc: Rollback statement on kill sql/sql_insert.cc: Ensure that rows in a multi-row INSERT DELAYED are inserted atomicly (without releasing logs). This is needed to ensure that the mysqlbinlog is consistent. Bug #2491 sql/sql_list.h: Ensure that rows in a multi-row INSERT DELAYED is inserted atomicly (without releasing logs). This is needed to ensure that the mysqlbinlog is consistent. Bug #2491 sql/sql_update.cc: Rollback statement on kill --- sql/sql_update.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index d2ccd02051b..0a8530aa141 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -238,6 +238,8 @@ int mysql_update(THD *thd, } } } + if (thd->killed && !error) + error= 1; // Aborted limit= tmp_limit; end_read_record(&info); /* Change select to use tempfile */ @@ -309,6 +311,8 @@ int mysql_update(THD *thd, else table->file->unlock_row(); } + if (thd->killed && !error) + error= 1; // Aborted end_read_record(&info); free_io_cache(table); // If ORDER BY thd->proc_info="end"; -- cgit v1.2.1 From a1d9e1eec4ff8e9e53567bb3606bc4605a952375 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Mar 2004 01:10:22 +0200 Subject: 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() --- sql/sql_update.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sql/sql_update.cc') 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); -- cgit v1.2.1