1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge with 4.0 to get fix for MIN/MAX

This commit is contained in:
monty@mashka.mysql.fi
2003-02-07 16:38:37 +02:00
48 changed files with 533 additions and 32 deletions

View File

@ -2292,7 +2292,18 @@ convert_search_mode_to_innobase(
case HA_READ_AFTER_KEY: return(PAGE_CUR_G);
case HA_READ_BEFORE_KEY: return(PAGE_CUR_L);
case HA_READ_PREFIX: return(PAGE_CUR_GE);
case HA_READ_PREFIX_LAST: return(PAGE_CUR_LE_OR_EXTENDS);
case HA_READ_PREFIX_LAST: return(PAGE_CUR_LE);
/* TODO: 1) this should really be
return(PAGE_CUR_LE_OR_EXTENDS); but since MySQL uses
a wrong flag in search, we convert this to PAGE_CUR_LE;
2) if the character set is not latin1, then InnoDB
uses a MySQL function innobase_mysql_cmp() to
compare CHAR and VARCHAR strings; since that function
does not return the number of matched bytes,
PAGE_CUR_LE_OR_EXTENDS does not currently work: we
should probably write my_sortncmp_with_n_matcehd_bytes()
to determine if a field 'extends' another;
see dev-public discussion on Feb 7th, 2003 */
default: assert(0);
}
@ -4175,7 +4186,10 @@ static void free_share(INNOBASE_SHARE *share)
}
/*********************************************************************
Stores a MySQL lock into a 'lock' field in a handle. */
Converts a MySQL table lock stored in the 'lock' field of the handle to
a proper type before storing the lock. MySQL also calls this when it
releases a lock. */
THR_LOCK_DATA**
ha_innobase::store_lock(
@ -4201,8 +4215,13 @@ ha_innobase::store_lock(
binlog) requires the use of a locking read */
prebuilt->select_lock_type = LOCK_S;
} else {
/* We set possible LOCK_X value in external_lock, not yet
} else if (lock_type != TL_IGNORE) {
/* In ha_berkeley.cc there is a comment that MySQL
may in exceptional cases call this with TL_IGNORE also
when it is NOT going to release the lock. */
/* We set possible LOCK_X value in external_lock, not yet
here even if this would be SELECT ... FOR UPDATE */
prebuilt->select_lock_type = LOCK_NONE;