mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
row0mysql.h, ha_innodb.cc:
Sergey Petrunia's ROR code fails to tell handlers that they should retrieve the primary key columns; let InnoDB ALWAYS retrieve them, to fix many bugs and potential bugs sql/ha_innodb.cc: Sergey Petrunia's ROR code fails to tell handlers that they should retrieve the primary key columns; let InnoDB ALWAYS retrieve them, to fix many bugs and potential bugs innobase/include/row0mysql.h: Sergey Petrunia's ROR code fails to tell handlers that they should retrieve the primary key columns; let InnoDB ALWAYS retrieve them, to fix many bugs and potential bugs
This commit is contained in:
parent
409debfa14
commit
f299ff85b5
2 changed files with 14 additions and 2 deletions
|
@ -547,7 +547,10 @@ struct row_prebuilt_struct {
|
|||
format */
|
||||
ulint hint_need_to_fetch_extra_cols;
|
||||
/* normally this is set to 0; if this
|
||||
is set to ROW_RETRIEVE_PRIMARY_KEY,
|
||||
is set to ROW_RETRIEVE_PRIMARY_KEY
|
||||
(that value is obsolete starting from
|
||||
5.0.2, because we always fetch the
|
||||
primary key cols),
|
||||
then we should at least retrieve all
|
||||
columns in the primary key; if this
|
||||
is set to ROW_RETRIEVE_ALL_COLS, then
|
||||
|
@ -620,6 +623,9 @@ struct row_prebuilt_struct {
|
|||
|
||||
/* Values for hint_need_to_fetch_extra_cols */
|
||||
#define ROW_RETRIEVE_PRIMARY_KEY 1
|
||||
/* value 1 is obsolete starting from
|
||||
5.0.2, because we always fetch the
|
||||
primary key cols */
|
||||
#define ROW_RETRIEVE_ALL_COLS 2
|
||||
|
||||
|
||||
|
|
|
@ -2208,7 +2208,13 @@ build_template(
|
|||
ulint n_fields;
|
||||
ulint n_requested_fields = 0;
|
||||
ibool fetch_all_in_key = FALSE;
|
||||
ibool fetch_primary_key_cols = FALSE;
|
||||
ibool fetch_primary_key_cols = TRUE; /* The ROR code in
|
||||
opt_range.cc assumes that the
|
||||
primary key cols are always
|
||||
retrieved. Starting from
|
||||
MySQL-5.0.2, let us always
|
||||
fetch them, even though it
|
||||
wastes some CPU. */
|
||||
ulint i;
|
||||
|
||||
if (prebuilt->select_lock_type == LOCK_X) {
|
||||
|
|
Loading…
Reference in a new issue