Merge bb-10.2-ext into 10.3
This commit is contained in:
commit
633d252e32
@ -2705,7 +2705,11 @@ retry:
|
|||||||
fts_table.parent = table->name.m_name;
|
fts_table.parent = table->name.m_name;
|
||||||
|
|
||||||
trx = trx_allocate_for_background();
|
trx = trx_allocate_for_background();
|
||||||
trx_start_internal(trx);
|
if (srv_read_only_mode) {
|
||||||
|
trx_start_internal_read_only(trx);
|
||||||
|
} else {
|
||||||
|
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(
|
|||||||
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(
|
|||||||
/*=============*/
|
/*=============*/
|
||||||
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(
|
|||||||
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(
|
|||||||
}
|
}
|
||||||
|
|
||||||
error = fts_eval_sql(trx, graph);
|
error = fts_eval_sql(trx, graph);
|
||||||
|
fts_sql_commit(trx);
|
||||||
if (error == DB_SUCCESS) {
|
|
||||||
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(
|
|||||||
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(
|
|||||||
|
|
||||||
if (!trx) {
|
if (!trx) {
|
||||||
trx = trx_allocate_for_background();
|
trx = trx_allocate_for_background();
|
||||||
trx_start_internal(trx);
|
if (srv_read_only_mode) {
|
||||||
|
trx_start_internal_read_only(trx);
|
||||||
|
} else {
|
||||||
|
trx_start_internal(trx);
|
||||||
|
}
|
||||||
trx->op_info = "upload FTS stopword";
|
trx->op_info = "upload FTS stopword";
|
||||||
new_trx = TRUE;
|
new_trx = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -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(
|
|||||||
"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(
|
|||||||
/*===============*/
|
/*===============*/
|
||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user