Commit 0be18c40 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.0 into 10.1

parents 10f06b07 4a35e76f
/***************************************************************************** /*****************************************************************************
Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2017, MariaDB Corporation. Copyright (c) 2016, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -4628,6 +4628,7 @@ fts_sync( ...@@ -4628,6 +4628,7 @@ fts_sync(
ib_vector_get(cache->indexes, i)); ib_vector_get(cache->indexes, i));
if (index_cache->index->to_be_dropped if (index_cache->index->to_be_dropped
|| index_cache->index->table->to_be_dropped
|| fts_sync_index_check(index_cache)) { || fts_sync_index_check(index_cache)) {
continue; continue;
} }
...@@ -4638,17 +4639,6 @@ fts_sync( ...@@ -4638,17 +4639,6 @@ fts_sync(
end_sync: end_sync:
if (error == DB_SUCCESS && !sync->interrupted) { if (error == DB_SUCCESS && !sync->interrupted) {
error = fts_sync_commit(sync); error = fts_sync_commit(sync);
if (error == DB_SUCCESS) {
for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache;
index_cache = static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i));
if (index_cache->index->index_fts_syncing) {
index_cache->index->index_fts_syncing
= false;
}
}
}
} else { } else {
fts_sync_rollback(sync); fts_sync_rollback(sync);
} }
...@@ -4657,12 +4647,9 @@ fts_sync( ...@@ -4657,12 +4647,9 @@ fts_sync(
/* Clear fts syncing flags of any indexes incase sync is /* Clear fts syncing flags of any indexes incase sync is
interrupeted */ interrupeted */
for (i = 0; i < ib_vector_size(cache->indexes); ++i) { for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache; static_cast<fts_index_cache_t*>(
index_cache = static_cast<fts_index_cache_t*>( ib_vector_get(cache->indexes, i))
ib_vector_get(cache->indexes, i)); ->index->index_fts_syncing = false;
if (index_cache->index->index_fts_syncing == true) {
index_cache->index->index_fts_syncing = false;
}
} }
sync->interrupted = false; sync->interrupted = false;
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2017, MariaDB Corporation. Copyright (c) 2016, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -4627,6 +4627,7 @@ fts_sync( ...@@ -4627,6 +4627,7 @@ fts_sync(
ib_vector_get(cache->indexes, i)); ib_vector_get(cache->indexes, i));
if (index_cache->index->to_be_dropped if (index_cache->index->to_be_dropped
|| index_cache->index->table->to_be_dropped
|| fts_sync_index_check(index_cache)) { || fts_sync_index_check(index_cache)) {
continue; continue;
} }
...@@ -4637,17 +4638,6 @@ fts_sync( ...@@ -4637,17 +4638,6 @@ fts_sync(
end_sync: end_sync:
if (error == DB_SUCCESS && !sync->interrupted) { if (error == DB_SUCCESS && !sync->interrupted) {
error = fts_sync_commit(sync); error = fts_sync_commit(sync);
if (error == DB_SUCCESS) {
for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache;
index_cache = static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i));
if (index_cache->index->index_fts_syncing) {
index_cache->index->index_fts_syncing
= false;
}
}
}
} else { } else {
fts_sync_rollback(sync); fts_sync_rollback(sync);
} }
...@@ -4656,12 +4646,9 @@ fts_sync( ...@@ -4656,12 +4646,9 @@ fts_sync(
/* Clear fts syncing flags of any indexes incase sync is /* Clear fts syncing flags of any indexes incase sync is
interrupeted */ interrupeted */
for (i = 0; i < ib_vector_size(cache->indexes); ++i) { for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache; static_cast<fts_index_cache_t*>(
index_cache = static_cast<fts_index_cache_t*>( ib_vector_get(cache->indexes, i))
ib_vector_get(cache->indexes, i)); ->index->index_fts_syncing = false;
if (index_cache->index->index_fts_syncing == true) {
index_cache->index->index_fts_syncing = false;
}
} }
sync->interrupted = false; sync->interrupted = false;
......
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