Merge branch '10.2' into 10.3

This commit is contained in:
Sergei Golubchik 2018-09-26 20:49:51 +02:00
commit 57e0da50bb
436 changed files with 9692 additions and 196647 deletions

View file

@ -9207,7 +9207,7 @@ void ha_mroonga::remove_related_files(const char *base_path)
if (stat(entry->d_name, &file_status) != 0) {
continue;
}
if (!((file_status.st_mode & S_IFMT) && S_IFREG)) {
if (!((file_status.st_mode & S_IFMT) == S_IFREG)) {
continue;
}
if (strncmp(entry->d_name, base_path, base_path_length) == 0) {
@ -16795,15 +16795,8 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd,
ref_table_buff,
ref_table_name_length,
TRUE);
#ifdef MRN_FOREIGN_KEY_USE_METHOD_ENUM
f_key_info.update_method = FK_OPTION_RESTRICT;
f_key_info.delete_method = FK_OPTION_RESTRICT;
#else
f_key_info.update_method = thd_make_lex_string(thd, NULL, "RESTRICT",
8, TRUE);
f_key_info.delete_method = thd_make_lex_string(thd, NULL, "RESTRICT",
8, TRUE);
#endif
f_key_info.referenced_key_name = thd_make_lex_string(thd, NULL, "PRIMARY",
7, TRUE);
LEX_CSTRING *field_name = thd_make_lex_string(thd,

View file

@ -211,10 +211,6 @@ extern "C" {
# define MRN_FOREIGN_KEY_USE_CONST_STRING
#endif
#if MYSQL_VERSION_ID >= 100203 && defined(MRN_MARIADB_P)
# define MRN_FOREIGN_KEY_USE_METHOD_ENUM
#endif
#if MYSQL_VERSION_ID < 50706 || defined(MRN_MARIADB_P)
# define MRN_HANDLER_IS_FATAL_ERROR_HAVE_FLAGS
#endif

View file

@ -4984,7 +4984,7 @@ grn_scan_info_build_full(grn_ctx *ctx, grn_obj *expr, int *n,
next_code_op = -1;
for (i = 0, stat = SCAN_START, c = e->codes, ce = &e->codes[e->codes_curr]; c < ce; c++) {
grn_operator code_op;
if (next_code_op == -1) {
if (next_code_op == (grn_operator)-1) {
code_op = c->op;
} else {
code_op = next_code_op;