diff options
author | cmiller@zippy.cornsilk.net <> | 2006-11-02 17:39:52 -0500 |
---|---|---|
committer | cmiller@zippy.cornsilk.net <> | 2006-11-02 17:39:52 -0500 |
commit | af5acac047d77e961da64e93a4a1d1d3225886da (patch) | |
tree | fdb1676e1a24d430127643e773c8999bef7bed8c /sql/ha_innodb.cc | |
parent | 5196eadc060843665eb007498fa174ba43b4b989 (diff) | |
parent | 2704ba36755401f947600b6b3fd7f3ef3423c5bc (diff) | |
download | mariadb-git-af5acac047d77e961da64e93a4a1d1d3225886da.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index e2d4732531e..e9ccc0ccede 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -6563,7 +6563,8 @@ ha_innobase::store_lock( && lock_type != TL_IGNORE)) { /* The OR cases above are in this order: - 1) MySQL is doing LOCK TABLES ... READ LOCAL, or + 1) MySQL is doing LOCK TABLES ... READ LOCAL, or we + are processing a stored procedure or function, or 2) (we do not know when TL_READ_HIGH_PRIORITY is used), or 3) this is a SELECT ... IN SHARE MODE, or 4) we are doing a complex SQL statement like @@ -6625,7 +6626,8 @@ ha_innobase::store_lock( single transaction stored procedure call deterministic (if it does not use a consistent read). */ - if (lock_type == TL_READ && thd->in_lock_tables) { + if (lock_type == TL_READ + && thd->lex->sql_command == SQLCOM_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 @@ -6684,8 +6686,7 @@ ha_innobase::store_lock( (MySQL does have thd->in_lock_tables TRUE there). */ if (lock_type == TL_READ_NO_INSERT - && (!thd->in_lock_tables - || thd->lex->sql_command == SQLCOM_CALL)) { + && thd->lex->sql_command != SQLCOM_LOCK_TABLES) { lock_type = TL_READ; } |