summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-09-30 20:20:10 +0200
committerunknown <serg@serg.mylan>2005-09-30 20:20:10 +0200
commit8f842e8fc9f304e4f95d81df3c222bab11ced391 (patch)
treeb141dda4cc321d6df0ee276762ac7bdbfa33b17c /sql/ha_innodb.cc
parent60ee93262bb7412c6f592b9b3152fbf3035a2037 (diff)
downloadmariadb-git-8f842e8fc9f304e4f95d81df3c222bab11ced391.tar.gz
Bug#11238
"SELECT ... FOR UPDATE executed as consistent read inside LOCK TABLES" Do not discard lock_type information as handler::start_stmt() may require knowledge. (fixed by Antony)
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index de458785534..b6737b3a991 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -6000,7 +6000,8 @@ int
ha_innobase::start_stmt(
/*====================*/
/* out: 0 or error code */
- THD* thd) /* in: handle to the user thread */
+ THD* thd, /* in: handle to the user thread */
+ thr_lock_type lock_type)
{
row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
trx_t* trx;
@@ -6041,7 +6042,7 @@ ha_innobase::start_stmt(
} else {
if (trx->isolation_level != TRX_ISO_SERIALIZABLE
&& thd->lex->sql_command == SQLCOM_SELECT
- && thd->lex->lock_option == TL_READ) {
+ && lock_type == TL_READ) {
/* For other than temporary tables, we obtain
no lock for consistent read (plain SELECT). */