Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b4606367
Commit
b4606367
authored
Sep 19, 2017
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.6.37-82.2
parent
04ae1207
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
179 additions
and
55 deletions
+179
-55
storage/xtradb/api/api0api.cc
storage/xtradb/api/api0api.cc
+17
-4
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+21
-0
storage/xtradb/handler/ha_innodb.h
storage/xtradb/handler/ha_innodb.h
+5
-1
storage/xtradb/include/row0mysql.h
storage/xtradb/include/row0mysql.h
+6
-1
storage/xtradb/include/row0sel.h
storage/xtradb/include/row0sel.h
+13
-1
storage/xtradb/include/univ.i
storage/xtradb/include/univ.i
+1
-1
storage/xtradb/row/row0merge.cc
storage/xtradb/row/row0merge.cc
+3
-3
storage/xtradb/row/row0sel.cc
storage/xtradb/row/row0sel.cc
+113
-44
No files found.
storage/xtradb/api/api0api.cc
View file @
b4606367
/*****************************************************************************
Copyright (c) 2008, 201
5
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 201
7
, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -1976,11 +1976,14 @@ ib_cursor_read_row(
page_format
=
static_cast
<
ib_bool_t
>
(
dict_table_is_comp
(
tuple
->
index
->
table
));
rec
=
btr_pcur_get_rec
(
pcur
);
if
(
prebuilt
->
innodb_api_rec
&&
prebuilt
->
innodb_api_rec
!=
rec
)
{
rec
=
prebuilt
->
innodb_api_rec
;
if
(
!
rec_get_deleted_flag
(
rec
,
page_format
))
{
if
(
prebuilt
->
innodb_api
&&
prebuilt
->
innodb_api_rec
!=
NULL
)
{
rec
=
prebuilt
->
innodb_api_rec
;
}
}
if
(
!
rec_get_deleted_flag
(
rec
,
page_format
))
{
...
...
@@ -2017,6 +2020,10 @@ ib_cursor_position(
buf
=
static_cast
<
unsigned
char
*>
(
mem_alloc
(
UNIV_PAGE_SIZE
));
if
(
prebuilt
->
innodb_api
)
{
prebuilt
->
cursor_heap
=
cursor
->
heap
;
}
/* We want to position at one of the ends, row_search_for_mysql()
uses the search_tuple fields to work out what to do. */
dtuple_set_n_fields
(
prebuilt
->
search_tuple
,
0
);
...
...
@@ -2071,6 +2078,9 @@ ib_cursor_next(
row_prebuilt_t
*
prebuilt
=
cursor
->
prebuilt
;
byte
buf
[
UNIV_PAGE_SIZE_MAX
];
if
(
prebuilt
->
innodb_api
)
{
prebuilt
->
cursor_heap
=
cursor
->
heap
;
}
/* We want to move to the next record */
dtuple_set_n_fields
(
prebuilt
->
search_tuple
,
0
);
...
...
@@ -2123,6 +2133,9 @@ ib_cursor_moveto(
buf
=
static_cast
<
unsigned
char
*>
(
mem_alloc
(
UNIV_PAGE_SIZE
));
if
(
prebuilt
->
innodb_api
)
{
prebuilt
->
cursor_heap
=
cursor
->
heap
;
}
err
=
static_cast
<
ib_err_t
>
(
row_search_for_mysql
(
buf
,
ib_srch_mode
,
prebuilt
,
cursor
->
match_mode
,
0
));
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
b4606367
...
...
@@ -9426,6 +9426,27 @@ ha_innobase::ft_init_ext(
return
((
FT_INFO
*
)
fts_hdl
);
}
/*****************************************************************//**
Copy a cached MySQL row.
If requested, also avoids overwriting non-read columns.
@param[out] buf Row in MySQL format.
@param[in] cached_row Which row to copy.
@param[in] rec_len Record length. */
void
ha_innobase
::
copy_cached_row
(
uchar
*
buf
,
const
uchar
*
cached_row
,
uint
rec_len
)
{
if
(
prebuilt
->
keep_other_fields_on_keyread
)
{
row_sel_copy_cached_fields_for_mysql
(
buf
,
cached_row
,
prebuilt
);
}
else
{
memcpy
(
buf
,
cached_row
,
rec_len
);
}
}
/*****************************************************************//**
Set up search tuple for a query through FTS_DOC_ID_INDEX on
supplied Doc ID. This is used by MySQL to retrieve the documents
...
...
storage/xtradb/handler/ha_innodb.h
View file @
b4606367
/*****************************************************************************
Copyright (c) 2000, 201
6
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 201
7
, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -144,6 +144,10 @@ class ha_innobase: public handler
int
index_first
(
uchar
*
buf
);
int
index_last
(
uchar
*
buf
);
/* Copy a cached MySQL row. If requested, also avoids
overwriting non-read columns. */
void
copy_cached_row
(
uchar
*
to_rec
,
const
uchar
*
from_rec
,
uint
rec_length
);
bool
has_gap_locks
()
const
{
return
true
;
}
int
rnd_init
(
bool
scan
);
...
...
storage/xtradb/include/row0mysql.h
View file @
b4606367
/*****************************************************************************
Copyright (c) 2000, 201
6
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 201
7
, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -808,6 +808,8 @@ struct row_prebuilt_t {
mem_heap_t
*
heap
;
/*!< memory heap from which
these auxiliary structures are
allocated when needed */
mem_heap_t
*
cursor_heap
;
/*!< memory heap from which
innodb_api_buf is allocated per session*/
ins_node_t
*
ins_node
;
/*!< Innobase SQL insert node
used to perform inserts
to the table */
...
...
@@ -960,6 +962,9 @@ struct row_prebuilt_t {
unsigned
innodb_api
:
1
;
/*!< whether this is a InnoDB API
query */
const
rec_t
*
innodb_api_rec
;
/*!< InnoDB API search result */
void
*
innodb_api_buf
;
/*!< Buffer holding copy of the physical
Innodb API search record */
ulint
innodb_api_rec_size
;
/*!< Size of the Innodb API record */
byte
*
srch_key_val1
;
/*!< buffer used in converting
search key values from MySQL format
to InnoDB format.*/
...
...
storage/xtradb/include/row0sel.h
View file @
b4606367
/*****************************************************************************
Copyright (c) 1997, 201
6
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1997, 201
7
, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -205,6 +205,18 @@ struct sel_buf_t{
when data != NULL */
};
/** Copy used fields from cached row.
Copy cache record field by field, don't touch fields that
are not covered by current key.
@param[out] buf Where to copy the MySQL row.
@param[in] cached_rec What to copy (in MySQL row format).
@param[in] prebuilt prebuilt struct. */
void
row_sel_copy_cached_fields_for_mysql
(
byte
*
buf
,
const
byte
*
cached_rec
,
row_prebuilt_t
*
prebuilt
);
/** Query plan */
struct
plan_t
{
dict_table_t
*
table
;
/*!< table struct in the dictionary
...
...
storage/xtradb/include/univ.i
View file @
b4606367
...
...
@@ -47,7 +47,7 @@ Created 1/20/1994 Heikki Tuuri
#
define
INNODB_VERSION_BUGFIX
MYSQL_VERSION_PATCH
#
ifndef
PERCONA_INNODB_VERSION
#
define
PERCONA_INNODB_VERSION
82.
1
#
define
PERCONA_INNODB_VERSION
82.
2
#
endif
/* Enable UNIV_LOG_ARCHIVE in XtraDB */
...
...
storage/xtradb/row/row0merge.cc
View file @
b4606367
/*****************************************************************************
Copyright (c) 2005, 201
6
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2005, 201
7
, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -1469,6 +1469,8 @@ row_merge_read_clustered_index(
row_ext_t
*
ext
;
page_cur_t
*
cur
=
btr_pcur_get_page_cur
(
&
pcur
);
mem_heap_empty
(
row_heap
);
page_cur_move_to_next
(
cur
);
if
(
page_cur_is_after_last
(
cur
))
{
...
...
@@ -1898,8 +1900,6 @@ row_merge_read_clustered_index(
if
(
err
!=
DB_SUCCESS
)
{
goto
func_exit
;
}
mem_heap_empty
(
row_heap
);
}
func_exit:
...
...
storage/xtradb/row/row0sel.cc
View file @
b4606367
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment