Below is the list of changes that have just been committed into a local
4.1 repository of heikki. When heikki does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2399 05/08/31 14:17:05 heikki@stripped +1 -0
ha_innodb.cc:
Fix bug #12852 : do not increment the open handle count to a table if the table does
not have an .ibd file and InnoDB decides to return an error from the ::open() function;
then the table can be dropped even if the user has tried to open it
sql/ha_innodb.cc
1.206 05/08/31 14:16:46 heikki@stripped +15 -0
Fix bug #12852 : do not increment the open handle count to a table if the table does
not have an .ibd file and InnoDB decides to return an error from the ::open() function;
then the table can be dropped even if the user has tried to open it
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: heikki
# Host: hundin.mysql.fi
# Root: /home/heikki/mysql-4.1
--- 1.205/sql/ha_innodb.cc 2005-08-24 17:30:14 +03:00
+++ 1.206/sql/ha_innodb.cc 2005-08-31 14:16:46 +03:00
@@ -1651,6 +1651,8 @@
my_free((char*) upd_buff, MYF(0));
my_errno = ENOENT;
+ dict_table_decrement_handle_count(ib_table);
+
DBUG_RETURN(1);
}
@@ -5438,6 +5440,19 @@
}
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. */
+
+ lock_type = TL_READ_NO_INSERT;
+ }
/* If we are not doing a LOCK TABLE or DISCARD/IMPORT
TABLESPACE, then allow multiple writers */