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
633d252e
Commit
633d252e
authored
Feb 15, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge bb-10.2-ext into 10.3
parents
f40c11d8
4074c745
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
15 deletions
+28
-15
storage/innobase/fts/fts0fts.cc
storage/innobase/fts/fts0fts.cc
+23
-10
storage/innobase/fts/fts0opt.cc
storage/innobase/fts/fts0opt.cc
+5
-5
No files found.
storage/innobase/fts/fts0fts.cc
View file @
633d252e
...
@@ -2705,7 +2705,11 @@ fts_cmp_set_sync_doc_id(
...
@@ -2705,7 +2705,11 @@ fts_cmp_set_sync_doc_id(
fts_table
.
parent
=
table
->
name
.
m_name
;
fts_table
.
parent
=
table
->
name
.
m_name
;
trx
=
trx_allocate_for_background
();
trx
=
trx_allocate_for_background
();
if
(
srv_read_only_mode
)
{
trx_start_internal_read_only
(
trx
);
}
else
{
trx_start_internal
(
trx
);
trx_start_internal
(
trx
);
}
trx
->
op_info
=
"update the next FTS document id"
;
trx
->
op_info
=
"update the next FTS document id"
;
...
@@ -2814,6 +2818,10 @@ fts_update_sync_doc_id(
...
@@ -2814,6 +2818,10 @@ fts_update_sync_doc_id(
fts_cache_t
*
cache
=
table
->
fts
->
cache
;
fts_cache_t
*
cache
=
table
->
fts
->
cache
;
char
fts_name
[
MAX_FULL_NAME_LEN
];
char
fts_name
[
MAX_FULL_NAME_LEN
];
if
(
srv_read_only_mode
)
{
return
DB_READ_ONLY
;
}
fts_table
.
suffix
=
"CONFIG"
;
fts_table
.
suffix
=
"CONFIG"
;
fts_table
.
table_id
=
table
->
id
;
fts_table
.
table_id
=
table
->
id
;
fts_table
.
type
=
FTS_COMMON_TABLE
;
fts_table
.
type
=
FTS_COMMON_TABLE
;
...
@@ -3058,6 +3066,10 @@ fts_commit_table(
...
@@ -3058,6 +3066,10 @@ fts_commit_table(
/*=============*/
/*=============*/
fts_trx_table_t
*
ftt
)
/*!< in: FTS table to commit*/
fts_trx_table_t
*
ftt
)
/*!< in: FTS table to commit*/
{
{
if
(
srv_read_only_mode
)
{
return
DB_READ_ONLY
;
}
const
ib_rbt_node_t
*
node
;
const
ib_rbt_node_t
*
node
;
ib_rbt_t
*
rows
;
ib_rbt_t
*
rows
;
dberr_t
error
=
DB_SUCCESS
;
dberr_t
error
=
DB_SUCCESS
;
...
@@ -3807,7 +3819,6 @@ fts_doc_fetch_by_doc_id(
...
@@ -3807,7 +3819,6 @@ fts_doc_fetch_by_doc_id(
trx_t
*
trx
=
trx_allocate_for_background
();
trx_t
*
trx
=
trx_allocate_for_background
();
que_t
*
graph
;
que_t
*
graph
;
trx_start_internal
(
trx
);
trx
->
op_info
=
"fetching indexed FTS document"
;
trx
->
op_info
=
"fetching indexed FTS document"
;
/* The FTS index can be supplied by caller directly with
/* The FTS index can be supplied by caller directly with
...
@@ -3895,13 +3906,7 @@ fts_doc_fetch_by_doc_id(
...
@@ -3895,13 +3906,7 @@ fts_doc_fetch_by_doc_id(
}
}
error
=
fts_eval_sql
(
trx
,
graph
);
error
=
fts_eval_sql
(
trx
,
graph
);
if
(
error
==
DB_SUCCESS
)
{
fts_sql_commit
(
trx
);
fts_sql_commit
(
trx
);
}
else
{
fts_sql_rollback
(
trx
);
}
trx_free_for_background
(
trx
);
trx_free_for_background
(
trx
);
if
(
!
get_doc
)
{
if
(
!
get_doc
)
{
...
@@ -4370,6 +4375,10 @@ fts_sync(
...
@@ -4370,6 +4375,10 @@ fts_sync(
bool
wait
,
bool
wait
,
bool
has_dict
)
bool
has_dict
)
{
{
if
(
srv_read_only_mode
)
{
return
DB_READ_ONLY
;
}
ulint
i
;
ulint
i
;
dberr_t
error
=
DB_SUCCESS
;
dberr_t
error
=
DB_SUCCESS
;
fts_cache_t
*
cache
=
sync
->
table
->
fts
->
cache
;
fts_cache_t
*
cache
=
sync
->
table
->
fts
->
cache
;
...
@@ -7346,7 +7355,11 @@ fts_load_stopword(
...
@@ -7346,7 +7355,11 @@ fts_load_stopword(
if
(
!
trx
)
{
if
(
!
trx
)
{
trx
=
trx_allocate_for_background
();
trx
=
trx_allocate_for_background
();
if
(
srv_read_only_mode
)
{
trx_start_internal_read_only
(
trx
);
}
else
{
trx_start_internal
(
trx
);
trx_start_internal
(
trx
);
}
trx
->
op_info
=
"upload FTS stopword"
;
trx
->
op_info
=
"upload FTS stopword"
;
new_trx
=
TRUE
;
new_trx
=
TRUE
;
}
}
...
...
storage/innobase/fts/fts0opt.cc
View file @
633d252e
...
@@ -989,7 +989,6 @@ fts_table_fetch_doc_ids(
...
@@ -989,7 +989,6 @@ fts_table_fetch_doc_ids(
if
(
!
trx
)
{
if
(
!
trx
)
{
trx
=
trx_allocate_for_background
();
trx
=
trx_allocate_for_background
();
trx_start_internal
(
trx
);
alloc_bk_trx
=
TRUE
;
alloc_bk_trx
=
TRUE
;
}
}
...
@@ -1018,17 +1017,14 @@ fts_table_fetch_doc_ids(
...
@@ -1018,17 +1017,14 @@ fts_table_fetch_doc_ids(
"CLOSE c;"
);
"CLOSE c;"
);
error
=
fts_eval_sql
(
trx
,
graph
);
error
=
fts_eval_sql
(
trx
,
graph
);
fts_sql_commit
(
trx
);
mutex_enter
(
&
dict_sys
->
mutex
);
mutex_enter
(
&
dict_sys
->
mutex
);
que_graph_free
(
graph
);
que_graph_free
(
graph
);
mutex_exit
(
&
dict_sys
->
mutex
);
mutex_exit
(
&
dict_sys
->
mutex
);
if
(
error
==
DB_SUCCESS
)
{
if
(
error
==
DB_SUCCESS
)
{
fts_sql_commit
(
trx
);
ib_vector_sort
(
doc_ids
->
doc_ids
,
fts_update_doc_id_cmp
);
ib_vector_sort
(
doc_ids
->
doc_ids
,
fts_update_doc_id_cmp
);
}
else
{
fts_sql_rollback
(
trx
);
}
}
if
(
alloc_bk_trx
)
{
if
(
alloc_bk_trx
)
{
...
@@ -2442,6 +2438,10 @@ fts_optimize_table(
...
@@ -2442,6 +2438,10 @@ fts_optimize_table(
/*===============*/
/*===============*/
dict_table_t
*
table
)
/*!< in: table to optimiza */
dict_table_t
*
table
)
/*!< in: table to optimiza */
{
{
if
(
srv_read_only_mode
)
{
return
DB_READ_ONLY
;
}
dberr_t
error
=
DB_SUCCESS
;
dberr_t
error
=
DB_SUCCESS
;
fts_optimize_t
*
optim
=
NULL
;
fts_optimize_t
*
optim
=
NULL
;
fts_t
*
fts
=
table
->
fts
;
fts_t
*
fts
=
table
->
fts
;
...
...
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