diff options
author | unknown <serg@serg.mylan> | 2005-03-02 15:29:46 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-02 15:29:46 +0100 |
commit | 618669091378dd1050d678b4b68ad4f31d0132b9 (patch) | |
tree | 7ecf94ccad08edf0ab0ab533b694636d2ddccf2b | |
parent | f508a6ca80c72f96008a1e9a977f9563637c1a89 (diff) | |
download | mariadb-git-618669091378dd1050d678b4b68ad4f31d0132b9.tar.gz |
workaround for a bug removed
mysys/my_mmap.c:
cleanup
sql/ha_innodb.cc:
don's start a transaction in prepare().
restore disabled code for ibbackup
-rw-r--r-- | mysys/my_mmap.c | 9 | ||||
-rw-r--r-- | sql/ha_innodb.cc | 18 |
2 files changed, 8 insertions, 19 deletions
diff --git a/mysys/my_mmap.c b/mysys/my_mmap.c index 98243c9d5d8..a111c3dc571 100644 --- a/mysys/my_mmap.c +++ b/mysys/my_mmap.c @@ -28,8 +28,7 @@ int my_msync(int fd, void *addr, size_t len, int flags) return my_sync(fd, MYF(0)); } -#else -#ifdef __WIN__ +#elif defined(__WIN__) static SECURITY_ATTRIBUTES mmap_security_attributes= {sizeof(SECURITY_ATTRIBUTES), 0, TRUE}; @@ -83,11 +82,7 @@ int my_msync(int fd, void *addr, size_t len, int flags) return FlushViewOfFile(addr, len) ? 0 : -1; } -#endif - -#ifndef __WIN__ +#else #warning "no mmap!" #endif -#endif - diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 1251d30eb11..5d348a51555 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1351,10 +1351,10 @@ innobase_commit_low( return; } -/* The following will be enabled later when we put the 4.1 functionality back -to 5.0. */ -#ifdef DISABLE_HAVE_REPLICATION - if (current_thd->slave_thread) { +#ifdef HAVE_REPLICATION + THD *thd=current_thd; + + if (thd && thd->slave_thread) { /* Update the replication position info inside InnoDB */ trx->mysql_master_log_file_name @@ -6328,13 +6328,7 @@ innobase_xa_prepare( /* We were instructed to prepare the whole transaction, or this is an SQL statement end and autocommit is on */ - /* If there is no active InnoDB transaction, - trx_prepare_for_mysql() will (temporarily) start one */ - - if (trx->active_trans == 0) { - - trx->active_trans = 1; - } + ut_ad(trx->active_trans); error = trx_prepare_for_mysql(trx); } else { @@ -6344,7 +6338,7 @@ innobase_xa_prepare( if (trx->auto_inc_lock) { /* If we had reserved the auto-inc lock for some table in this SQL statement we release it now */ - + row_unlock_table_autoinc_for_mysql(trx); } /* Store the current undo_no of the transaction so that we |