[Commits] Rev 2833: merge with 5.1. in http://bazaar.launchpad.net/~maria-captains/maria/5.2/

serg at askmonty.org serg at askmonty.org
Sun Jul 25 18:07:10 EEST 2010


At http://bazaar.launchpad.net/~maria-captains/maria/5.2/

------------------------------------------------------------
revno: 2833 [merge]
revision-id: sergii at pisem.net-20100725150649-4q1id0kchejptzku
parent: sergii at pisem.net-20100724061003-dt7akyw7w7afxk92
parent: sergii at pisem.net-20100724121730-q9j6d333angk9qmu
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.2
timestamp: Sun 2010-07-25 17:06:49 +0200
message:
  merge with 5.1.
  fix .map file hanlding
modified:
  include/maria.h                sp1f-maria.h-20060411134400-ylx7cem3pcdf2jg6it2tuutxyzoljzvv
  scripts/make_win_bin_dist      sp1f-make_win_bin_dist-20060901123056-xnusgszvkfrrcxkqidb7zszax2ezpyto
  sql/CMakeLists.txt             sp1f-cmakelists.txt-20060831175237-esoeu5kpdtwjvehkghwy6fzbleniq2wy
  sql/ha_ndbcluster.cc           sp1f-ha_ndbcluster.cc-20040414175836-rvqnoxrkqexyhfu3d62s4t345ip7rez2
  sql/ha_ndbcluster.h            sp1f-ha_ndbcluster.h-20040414175838-f2xtjmtguwmk5nwfkstanc4lig3fcuvm
  sql/ha_partition.cc            sp1f-ha_partition.cc-20050718113037-eoky4qluumb5dmdyg5z6n2fvdkgutxms
  sql/ha_partition.h             sp1f-ha_partition.h-20050718113038-4xxwqkuu2xgxqtrwfbc43zgfyfcwzjsq
  sql/handler.h                  sp1f-handler.h-19700101030959-mumq2hpilkpgxuf22ftyv5kbilysnzvn
  sql/log_event.cc               sp1f-log_event.cc-19700101030959-msmqlflsngxosswid2hpzxly5vfqdddc
  sql/log_event_old.cc           sp1f-log_event_old.cc-20070412135046-uu5xq4cnpwslzif6fbmj3g65x4vdkzxu
  sql/sql_insert.cc              sp1f-sql_insert.cc-19700101030959-xgwqe5svnimxudzdcuitauljzz2zjk5g
  sql/sql_load.cc                sp1f-sql_load.cc-19700101030959-hoqlay5we4yslrw23xqedulkejw6a3o5
  sql/sql_table.cc               sp1f-sql_table.cc-19700101030959-tzdkvgigezpuaxnldqh3fx2h7h2ggslu
  storage/archive/ha_archive.cc  sp1f-ha_archive.cc-20040521001938-uy57z43drkjeirpjafdzdpvfxruqho4q
  storage/archive/ha_archive.h   sp1f-ha_archive.h-20040521001938-2znbujthgg7fimriindwgekrepwpb2x4
  storage/federated/ha_federated.cc sp1f-ha_federated.cc-20041211200120-gu52ex5sicbua5vtoocuki3ltllsvm2c
  storage/federated/ha_federated.h sp1f-ha_federated.h-20041211200120-46qvxkyzym5wewxozk4xcbzljpbqxvlb
  storage/federatedx/ha_federatedx.cc ha_federatedx.cc-20091029224633-m824ql737a2j6q5a-6
  storage/federatedx/ha_federatedx.h ha_federatedx.h-20091029224633-m824ql737a2j6q5a-8
  storage/maria/ha_maria.cc      sp1f-ha_maria.cc-20060411134405-dmngb4v5x5fxlxhff527ud3etiutxuxk
  storage/maria/ha_maria.h       sp1f-ha_maria.h-20060411134405-vvsjodaugfqw4mekr3sxxnj26gukxxuo
  storage/maria/ma_write.c       sp1f-ma_write.c-20060411134450-llgjlkzrighulmt3uicm5qub3r63llaq
  storage/myisam/ha_myisam.cc    sp1f-ha_myisam.cc-19700101030959-7xzssylbn7zfz3nupnsw43wws6xlltsu
  storage/myisam/ha_myisam.h     sp1f-ha_myisam.h-19700101030959-6vqsvuthz3pkfqplhfwzqrdryoixszpn
-------------- next part --------------
=== modified file 'include/maria.h'
--- a/include/maria.h	2010-01-27 21:53:08 +0000
+++ b/include/maria.h	2010-07-23 20:37:21 +0000
@@ -452,7 +452,7 @@ my_bool maria_test_if_sort_rep(MARIA_HA 
 
 int maria_init_bulk_insert(MARIA_HA *info, ulong cache_size, ha_rows rows);
 void maria_flush_bulk_insert(MARIA_HA *info, uint inx);
-void maria_end_bulk_insert(MARIA_HA *info, my_bool table_will_be_deleted);
+void maria_end_bulk_insert(MARIA_HA *info);
 int maria_assign_to_pagecache(MARIA_HA *info, ulonglong key_map,
                               PAGECACHE *key_cache);
 void maria_change_pagecache(PAGECACHE *old_key_cache,

=== modified file 'scripts/make_win_bin_dist'
--- a/scripts/make_win_bin_dist	2010-05-12 14:27:18 +0000
+++ b/scripts/make_win_bin_dist	2010-07-25 15:06:49 +0000
@@ -163,7 +163,7 @@ if [ -f "storage/pbxt/bin/xtstat.exe" ] 
   cp storage/pbxt/bin/xtstat.{exe,pdb} $DESTDIR/bin
 fi
 
-cp server-tools/instance-manager/$TARGET/*.{exe,map}     $DESTDIR/bin/
+cp server-tools/instance-manager/$TARGET/*.exe           $DESTDIR/bin/
 if [ x"$TARGET" != x"release" ] ; then
   cp server-tools/instance-manager/$TARGET/*.pdb         $DESTDIR/bin/
   cp client/$TARGET/mysql.pdb                            $DESTDIR/bin/
@@ -361,7 +361,7 @@ cp -R mysql-test/{t,r,include,suite,std_
 
 rm -rf $DESTDIR/mysql-test/lib/My/SafeProcess/my_safe_kill.{dir,vcproj}
 rm -rf $DESTDIR/mysql-test/lib/My/SafeProcess/my_safe_process.{dir,vcproj}
-rm -rf $DESTDIR/mysql-test/lib/My/SafeProcess/{Debug,RelWithDebInfo}/*.{ilk,idb,map}
+rm -rf $DESTDIR/mysql-test/lib/My/SafeProcess/{Debug,RelWithDebInfo}/*.{ilk,idb}
 
 
 # Note that this will not copy "extra" if a soft link

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2010-07-09 11:39:19 +0000
+++ b/sql/CMakeLists.txt	2010-07-25 15:06:49 +0000
@@ -18,6 +18,7 @@ SET(CMAKE_CXX_FLAGS_DEBUG 
     "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
 SET(CMAKE_C_FLAGS_DEBUG 
     "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MAP /MAPINFO:EXPORTS")
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 
                     ${CMAKE_SOURCE_DIR}/extra/yassl/include 

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-06-01 19:52:20 +0000
+++ b/sql/ha_ndbcluster.cc	2010-07-25 15:06:49 +0000
@@ -4232,7 +4232,7 @@ void ha_ndbcluster::start_bulk_insert(ha
 /**
   End of an insert.
 */
-int ha_ndbcluster::end_bulk_insert(bool abort)
+int ha_ndbcluster::end_bulk_insert()
 {
   int error= 0;
   DBUG_ENTER("end_bulk_insert");

=== modified file 'sql/ha_ndbcluster.h'
--- a/sql/ha_ndbcluster.h	2008-05-29 18:39:25 +0000
+++ b/sql/ha_ndbcluster.h	2010-07-23 20:37:21 +0000
@@ -322,7 +322,7 @@ class ha_ndbcluster: public handler
   double scan_time();
   ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
   void start_bulk_insert(ha_rows rows);
-  int end_bulk_insert(bool abort);
+  int end_bulk_insert();
 
   static Thd_ndb* seize_thd_ndb();
   static void release_thd_ndb(Thd_ndb* thd_ndb);

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-07-16 22:41:44 +0000
+++ b/sql/ha_partition.cc	2010-07-25 15:06:49 +0000
@@ -3416,18 +3416,17 @@ ha_rows ha_partition::guess_bulk_insert_
 
   SYNOPSIS
     end_bulk_insert()
-    abort               1 if table will be deleted (error condition)
 
   RETURN VALUE
     >0                      Error code
     0                       Success
 
   Note: end_bulk_insert can be called without start_bulk_insert
-        being called, see bug??44108.
+        being called, see bug#44108.
 
 */
 
-int ha_partition::end_bulk_insert(bool abort)
+int ha_partition::end_bulk_insert()
 {
   int error= 0;
   uint i;
@@ -3440,7 +3439,7 @@ int ha_partition::end_bulk_insert(bool a
   {
     int tmp;
     if (bitmap_is_set(&m_bulk_insert_started, i) &&
-        (tmp= m_file[i]->ha_end_bulk_insert(abort)))
+        (tmp= m_file[i]->ha_end_bulk_insert()))
       error= tmp;
   }
   bitmap_clear_all(&m_bulk_insert_started);

=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h	2010-07-16 22:41:44 +0000
+++ b/sql/ha_partition.h	2010-07-25 15:06:49 +0000
@@ -364,7 +364,7 @@ public:
   virtual int delete_row(const uchar * buf);
   virtual int delete_all_rows(void);
   virtual void start_bulk_insert(ha_rows rows);
-  virtual int end_bulk_insert(bool);
+  virtual int end_bulk_insert();
 private:
   ha_rows guess_bulk_insert_rows();
   void start_part_bulk_insert(THD *thd, uint part_id);

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2010-07-16 22:41:44 +0000
+++ b/sql/handler.h	2010-07-25 15:06:49 +0000
@@ -1382,10 +1382,10 @@ public:
     estimation_rows_to_insert= rows;
     start_bulk_insert(rows);
   }
-  int ha_end_bulk_insert(bool abort)
+  int ha_end_bulk_insert()
   {
     estimation_rows_to_insert= 0;
-    return end_bulk_insert(abort);
+    return end_bulk_insert();
   }
   int ha_bulk_update_row(const uchar *old_data, uchar *new_data,
                          uint *dup_key_found);
@@ -2062,7 +2062,7 @@ private:
   virtual int repair(THD* thd, HA_CHECK_OPT* check_opt)
   { return HA_ADMIN_NOT_IMPLEMENTED; }
   virtual void start_bulk_insert(ha_rows rows) {}
-  virtual int end_bulk_insert(bool abort) { return 0; }
+  virtual int end_bulk_insert() { return 0; }
   virtual int index_read(uchar * buf, const uchar * key, uint key_len,
                          enum ha_rkey_function find_flag)
    { return  HA_ERR_WRONG_COMMAND; }

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-07-16 22:41:44 +0000
+++ b/sql/log_event.cc	2010-07-25 15:06:49 +0000
@@ -8521,7 +8521,7 @@ Write_rows_log_event::do_after_row_opera
       ultimately. Still todo: fix
     */
   }
-  if ((local_error= m_table->file->ha_end_bulk_insert(0)))
+  if ((local_error= m_table->file->ha_end_bulk_insert()))
   {
     m_table->file->print_error(local_error, MYF(0));
   }

=== modified file 'sql/log_event_old.cc'
--- a/sql/log_event_old.cc	2010-07-16 22:41:44 +0000
+++ b/sql/log_event_old.cc	2010-07-25 15:06:49 +0000
@@ -948,7 +948,7 @@ int Write_rows_log_event_old::do_after_r
     fires bug#27077
     todo: explain or fix
   */
-  if ((local_error= table->file->ha_end_bulk_insert(0)))
+  if ((local_error= table->file->ha_end_bulk_insert()))
   {
     table->file->print_error(local_error, MYF(0));
   }
@@ -2644,7 +2644,7 @@ Write_rows_log_event_old::do_after_row_o
     fires bug#27077
     todo: explain or fix
   */
-  if ((local_error= m_table->file->ha_end_bulk_insert(0)))
+  if ((local_error= m_table->file->ha_end_bulk_insert()))
   {
     m_table->file->print_error(local_error, MYF(0));
   }

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2010-07-20 05:41:24 +0000
+++ b/sql/sql_insert.cc	2010-07-25 15:06:49 +0000
@@ -881,7 +881,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *t
       auto_inc values from the delayed_insert thread as they share TABLE.
     */
     table->file->ha_release_auto_increment();
-    if (using_bulk_insert && table->file->ha_end_bulk_insert(0) && !error)
+    if (using_bulk_insert && table->file->ha_end_bulk_insert() && !error)
     {
       table->file->print_error(my_errno,MYF(0));
       error=1;
@@ -3288,7 +3288,7 @@ bool select_insert::send_eof()
   DBUG_PRINT("enter", ("trans_table=%d, table_type='%s'",
                        trans_table, table->file->table_type()));
 
-  error= (!thd->prelocked_mode) ? table->file->ha_end_bulk_insert(0) : 0;
+  error= (!thd->prelocked_mode) ? table->file->ha_end_bulk_insert() : 0;
   table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
   table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
 
@@ -3371,7 +3371,7 @@ void select_insert::abort() {
       before.
     */
     if (!thd->prelocked_mode)
-      table->file->ha_end_bulk_insert(0);
+      table->file->ha_end_bulk_insert();
 
     /*
       If at least one row has been inserted/modified and will stay in

=== modified file 'sql/sql_load.cc'
--- a/sql/sql_load.cc	2010-05-26 18:55:40 +0000
+++ b/sql/sql_load.cc	2010-07-23 20:37:21 +0000
@@ -432,7 +432,7 @@ int mysql_load(THD *thd,sql_exchange *ex
       error= read_sep_field(thd, info, table_list, fields_vars,
                             set_fields, set_values, read_info,
                             *enclosed, skip_lines, ignore);
-    if (!thd->prelocked_mode && table->file->ha_end_bulk_insert(0) && !error)
+    if (!thd->prelocked_mode && table->file->ha_end_bulk_insert() && !error)
     {
       table->file->print_error(my_errno, MYF(0));
       error= 1;

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2010-07-17 19:58:08 +0000
+++ b/sql/sql_table.cc	2010-07-25 15:06:49 +0000
@@ -7959,7 +7959,7 @@ err:
 
   if (error > 0)
     to->file->extra(HA_EXTRA_PREPARE_FOR_DROP);
-  if (errpos >= 3 && to->file->ha_end_bulk_insert(error > 1) && error <= 0)
+  if (errpos >= 3 && to->file->ha_end_bulk_insert() && error <= 0)
   {
     to->file->print_error(my_errno,MYF(0));
     error= 1;

=== modified file 'storage/archive/ha_archive.cc'
--- a/storage/archive/ha_archive.cc	2010-07-20 23:07:45 +0000
+++ b/storage/archive/ha_archive.cc	2010-07-25 15:06:49 +0000
@@ -1555,7 +1555,7 @@ void ha_archive::start_bulk_insert(ha_ro
   Other side of start_bulk_insert, is end_bulk_insert. Here we turn off the bulk insert
   flag, and set the share dirty so that the next select will call sync for us.
 */
-int ha_archive::end_bulk_insert(bool table_will_be_deleted)
+int ha_archive::end_bulk_insert()
 {
   DBUG_ENTER("ha_archive::end_bulk_insert");
   bulk_insert= FALSE;

=== modified file 'storage/archive/ha_archive.h'
--- a/storage/archive/ha_archive.h	2008-05-29 15:33:33 +0000
+++ b/storage/archive/ha_archive.h	2010-07-23 20:37:21 +0000
@@ -134,7 +134,7 @@ public:
   int optimize(THD* thd, HA_CHECK_OPT* check_opt);
   int repair(THD* thd, HA_CHECK_OPT* check_opt);
   void start_bulk_insert(ha_rows rows);
-  int end_bulk_insert(bool table_will_be_deleted);
+  int end_bulk_insert();
   enum row_type get_row_type() const 
   { 
     return ROW_TYPE_COMPRESSED;

=== modified file 'storage/federated/ha_federated.cc'
--- a/storage/federated/ha_federated.cc	2010-06-01 19:52:20 +0000
+++ b/storage/federated/ha_federated.cc	2010-07-25 15:06:49 +0000
@@ -1983,12 +1983,12 @@ void ha_federated::start_bulk_insert(ha_
   @retval       != 0    Error occured at remote server. Also sets my_errno.
 */
 
-int ha_federated::end_bulk_insert(bool abort)
+int ha_federated::end_bulk_insert()
 {
   int error= 0;
   DBUG_ENTER("ha_federated::end_bulk_insert");
   
-  if (!abort && bulk_insert.str && bulk_insert.length)
+  if (!table_will_be_deleted && bulk_insert.str && bulk_insert.length)
   {
     if (real_query(bulk_insert.str, bulk_insert.length))
       error= stash_remote_error();
@@ -2905,6 +2905,8 @@ int ha_federated::extra(ha_extra_functio
   case HA_EXTRA_INSERT_WITH_UPDATE:
     insert_dup_update= TRUE;
     break;
+  case HA_EXTRA_PREPARE_FOR_DROP:
+    table_will_be_deleted = TRUE;
   default:
     /* do nothing */
     DBUG_PRINT("info",("unhandled operation: %d", (uint) operation));
@@ -3305,6 +3307,7 @@ int ha_federated::external_lock(THD *thd
     }
   }
 #endif /* XXX_SUPERCEDED_BY_WL2952 */
+  table_will_be_deleted = FALSE;
   DBUG_RETURN(error);
 }
 

=== modified file 'storage/federated/ha_federated.h'
--- a/storage/federated/ha_federated.h	2010-04-28 12:52:24 +0000
+++ b/storage/federated/ha_federated.h	2010-07-23 20:37:21 +0000
@@ -88,7 +88,7 @@ class ha_federated: public handler
     Array of all stored results we get during a query execution.
   */
   DYNAMIC_ARRAY results;
-  bool position_called;
+  bool position_called, table_will_be_deleted;
   uint fetch_num; // stores the fetch num
   MYSQL_ROW_OFFSET current_position;  // Current position used by ::position()
   int remote_error_number;
@@ -210,7 +210,7 @@ public:
   int close(void);                                              // required
 
   void start_bulk_insert(ha_rows rows);
-  int end_bulk_insert(bool abort);
+  int end_bulk_insert();
   int write_row(uchar *buf);
   int update_row(const uchar *old_data, uchar *new_data);
   int delete_row(const uchar *buf);

=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc	2010-07-16 22:57:55 +0000
+++ b/storage/federatedx/ha_federatedx.cc	2010-07-25 15:06:49 +0000
@@ -2143,12 +2143,12 @@ void ha_federatedx::start_bulk_insert(ha
   @retval       != 0    Error occured at remote server. Also sets my_errno.
 */
 
-int ha_federatedx::end_bulk_insert(bool abort)
+int ha_federatedx::end_bulk_insert()
 {
   int error= 0;
   DBUG_ENTER("ha_federatedx::end_bulk_insert");
   
-  if (bulk_insert.str && bulk_insert.length && !abort)
+  if (bulk_insert.str && bulk_insert.length && !table_will_be_deleted)
   {
     if ((error= txn->acquire(share, FALSE, &io)))
       DBUG_RETURN(error);
@@ -3082,6 +3082,9 @@ int ha_federatedx::extra(ha_extra_functi
   case HA_EXTRA_INSERT_WITH_UPDATE:
     insert_dup_update= TRUE;
     break;
+  case HA_EXTRA_PREPARE_FOR_DROP:
+    table_will_be_deleted = TRUE;
+    break;
   default:
     /* do nothing */
     DBUG_PRINT("info",("unhandled operation: %d", (uint) operation));
@@ -3391,6 +3394,7 @@ int ha_federatedx::external_lock(MYSQL_T
     txn->release(&io);
   else
   {
+    table_will_be_deleted = FALSE;
     txn= get_txn(thd);  
     if (!(error= txn->acquire(share, lock_type == F_RDLCK, &io)) &&
         (lock_type == F_WRLCK || !io->is_autocommit()))

=== modified file 'storage/federatedx/ha_federatedx.h'
--- a/storage/federatedx/ha_federatedx.h	2009-11-14 19:33:59 +0000
+++ b/storage/federatedx/ha_federatedx.h	2010-07-23 20:37:21 +0000
@@ -259,7 +259,7 @@ class ha_federatedx: public handler
   int remote_error_number;
   char remote_error_buf[FEDERATEDX_QUERY_BUFFER_SIZE];
   bool ignore_duplicates, replace_duplicates;
-  bool insert_dup_update;
+  bool insert_dup_update, table_will_be_deleted;
   DYNAMIC_STRING bulk_insert;
 
 private:
@@ -379,7 +379,7 @@ public:
   int close(void);                                              // required
 
   void start_bulk_insert(ha_rows rows);
-  int end_bulk_insert(bool abort);
+  int end_bulk_insert();
   int write_row(uchar *buf);
   int update_row(const uchar *old_data, uchar *new_data);
   int delete_row(const uchar *buf);

=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc	2010-06-16 10:58:56 +0000
+++ b/storage/maria/ha_maria.cc	2010-07-25 15:06:49 +0000
@@ -1980,14 +1980,14 @@ void ha_maria::start_bulk_insert(ha_rows
     != 0  Error
 */
 
-int ha_maria::end_bulk_insert(bool table_will_be_deleted)
+int ha_maria::end_bulk_insert()
 {
   int err;
   DBUG_ENTER("ha_maria::end_bulk_insert");
-  maria_end_bulk_insert(file, table_will_be_deleted);
+  maria_end_bulk_insert(file);
   if ((err= maria_extra(file, HA_EXTRA_NO_CACHE, 0)))
     goto end;
-  if (can_enable_indexes && !table_will_be_deleted)
+  if (can_enable_indexes && !file->s->deleting)
     err= enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
 end:
   if (bulk_insert_single_undo != BULK_INSERT_NONE)

=== modified file 'storage/maria/ha_maria.h'
--- a/storage/maria/ha_maria.h	2010-06-13 22:13:32 +0000
+++ b/storage/maria/ha_maria.h	2010-07-23 20:37:21 +0000
@@ -123,7 +123,7 @@ public:
   int enable_indexes(uint mode);
   int indexes_are_disabled(void);
   void start_bulk_insert(ha_rows rows);
-  int end_bulk_insert(bool abort);
+  int end_bulk_insert();
   ha_rows records_in_range(uint inx, key_range * min_key, key_range * max_key);
   void update_create_info(HA_CREATE_INFO * create_info);
   int create(const char *name, TABLE * form, HA_CREATE_INFO * create_info);

=== modified file 'storage/maria/ma_write.c'
--- a/storage/maria/ma_write.c	2010-03-09 19:22:24 +0000
+++ b/storage/maria/ma_write.c	2010-07-23 20:37:21 +0000
@@ -1755,7 +1755,7 @@ void maria_flush_bulk_insert(MARIA_HA *i
   }
 }
 
-void maria_end_bulk_insert(MARIA_HA *info, my_bool abort)
+void maria_end_bulk_insert(MARIA_HA *info)
 {
   DBUG_ENTER("maria_end_bulk_insert");
   if (info->bulk_insert)
@@ -1765,7 +1765,7 @@ void maria_end_bulk_insert(MARIA_HA *inf
     {
       if (is_tree_inited(&info->bulk_insert[i]))
       {
-        if (abort)
+        if (info->s->deleting)
           reset_free_element(&info->bulk_insert[i]);
         delete_tree(&info->bulk_insert[i]);
       }

=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	2010-06-05 14:53:36 +0000
+++ b/storage/myisam/ha_myisam.cc	2010-07-25 15:06:49 +0000
@@ -1589,11 +1589,11 @@ void ha_myisam::start_bulk_insert(ha_row
     != 0  Error
 */
 
-int ha_myisam::end_bulk_insert(bool abort)
+int ha_myisam::end_bulk_insert()
 {
   mi_end_bulk_insert(file);
   int err=mi_extra(file, HA_EXTRA_NO_CACHE, 0);
-  if (!err && !abort)
+  if (!err && !file->s->deleting)
   {
     if (can_enable_indexes)
     {

=== modified file 'storage/myisam/ha_myisam.h'
--- a/storage/myisam/ha_myisam.h	2010-06-05 14:53:36 +0000
+++ b/storage/myisam/ha_myisam.h	2010-07-25 15:06:49 +0000
@@ -107,7 +107,7 @@ class ha_myisam: public handler
   int enable_indexes(uint mode);
   int indexes_are_disabled(void);
   void start_bulk_insert(ha_rows rows);
-  int end_bulk_insert(bool abort);
+  int end_bulk_insert();
   ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
   void update_create_info(HA_CREATE_INFO *create_info);
   int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);



More information about the commits mailing list