ha_innodb.cc:

  Put back the ha_innodb.cc source code lines that were accidentally removed in Jan Lindstrom's push yesterday (he used the account heikki@mysql.com)
parent 0276d38f
...@@ -1748,7 +1748,12 @@ innobase_mysql_cmp( ...@@ -1748,7 +1748,12 @@ innobase_mysql_cmp(
} }
} }
ret = my_strnncoll(charset, /* Starting from 4.1.3, we use strnncollsp() in comparisons of
non-latin1_swedish_ci strings. NOTE that the collation order
changes then: 'b\0\0...' is ordered BEFORE 'b ...'. Users
having indexes on such data need to rebuild their tables! */
ret = charset->coll->strnncollsp(charset,
a, a_length, a, a_length,
b, b_length); b, b_length);
if (ret < 0) { if (ret < 0) {
...@@ -4657,6 +4662,21 @@ ha_innobase::start_stmt( ...@@ -4657,6 +4662,21 @@ ha_innobase::start_stmt(
prepared for an update of a row */ prepared for an update of a row */
prebuilt->select_lock_type = LOCK_X; prebuilt->select_lock_type = LOCK_X;
} else {
if (thd->lex->sql_command == SQLCOM_SELECT
&& thd->lex->lock_option == TL_READ) {
/* For other than temporary tables, we obtain
no lock for consistent read (plain SELECT) */
prebuilt->select_lock_type = LOCK_NONE;
} else {
/* Not a consistent read: use LOCK_X as the
select_lock_type value (TODO: how could we know
whether it should be LOCK_S, LOCK_X, or LOCK_NONE?) */
prebuilt->select_lock_type = LOCK_X;
}
} }
/* Set the MySQL flag to mark that there is an active transaction */ /* Set the MySQL flag to mark that there is an active transaction */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment