summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-08-31 18:50:33 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2005-08-31 18:50:33 +0200
commit0df66847cb148b970b147e26f64310c591282647 (patch)
tree51f34163bd89a6b06f26e207d31fe3e81693854a
parent901e45e26387093f14235f1752fcd154e6c6a2e6 (diff)
parentc65bd03f099b513f1ac0cf50a6d6ebe59710d334 (diff)
downloadmariadb-git-0df66847cb148b970b147e26f64310c591282647.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
-rw-r--r--sql/ha_innodb.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index e8279982da5..b30ddfe8227 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -1651,6 +1651,8 @@ ha_innobase::open(
my_free((char*) upd_buff, MYF(0));
my_errno = ENOENT;
+ dict_table_decrement_handle_count(ib_table);
+
DBUG_RETURN(1);
}
@@ -5439,6 +5441,21 @@ ha_innobase::store_lock(
if (lock_type != TL_IGNORE && lock.type == TL_UNLOCK) {
+ if (lock_type == TL_READ && thd->in_lock_tables) {
+ /* We come here if MySQL is processing LOCK TABLES
+ ... READ LOCAL. MyISAM under that table lock type
+ reads the table as it was at the time the lock was
+ granted (new inserts are allowed, but not seen by the
+ reader). To get a similar effect on an InnoDB table,
+ we must use LOCK TABLES ... READ. We convert the lock
+ type here, so that for InnoDB, READ LOCAL is
+ equivalent to READ. This will change the InnoDB
+ behavior in mysqldump, so that dumps of InnoDB tables
+ are consistent with dumps of MyISAM tables. */
+
+ lock_type = TL_READ_NO_INSERT;
+ }
+
/* If we are not doing a LOCK TABLE or DISCARD/IMPORT
TABLESPACE, then allow multiple writers */