summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-05 19:08:55 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-05 19:08:55 +0200
commitf6633bf058802ad7da8196d01fd19d75c53f7274 (patch)
treeb7ba9832aae2a3d0c72d2bf3d89cf2a5f13a44f6 /storage
parentfc5932a1b733b331be20c3f1b45c61c798227dba (diff)
parente555540ab6b9c3e0d4fdd00af093b115a9401d0a (diff)
downloadmariadb-git-f6633bf058802ad7da8196d01fd19d75c53f7274.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/row/row0ins.cc22
-rw-r--r--storage/myisam/ha_myisam.cc3
-rw-r--r--storage/xtradb/os/os0file.cc1
-rw-r--r--storage/xtradb/row/row0ins.cc19
4 files changed, 28 insertions, 17 deletions
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 439b253e80d..15dc0b70733 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -1439,11 +1439,12 @@ row_ins_foreign_check_on_constraint(
#ifdef WITH_WSREP
err = wsrep_append_foreign_key(
- thr_get_trx(thr),
- foreign,
- clust_rec,
- clust_index,
- FALSE, FALSE);
+ thr_get_trx(thr),
+ foreign,
+ clust_rec,
+ clust_index,
+ FALSE,
+ (node) ? TRUE : FALSE);
if (err != DB_SUCCESS) {
fprintf(stderr,
"WSREP: foreign key append failed: %d\n", err);
@@ -1609,6 +1610,10 @@ row_ins_check_foreign_constraint(
rec_offs_init(offsets_);
+#ifdef WITH_WSREP
+ upd_node= NULL;
+#endif /* WITH_WSREP */
+
ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_S));
err = DB_SUCCESS;
@@ -1802,9 +1807,10 @@ row_ins_check_foreign_constraint(
err = wsrep_append_foreign_key(
thr_get_trx(thr),
foreign,
- rec,
- check_index,
- check_ref, TRUE);
+ rec,
+ check_index,
+ check_ref,
+ (upd_node) ? TRUE : FALSE);
#endif /* WITH_WSREP */
goto end_scan;
} else if (foreign->type != 0) {
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 28c60308ce9..213b1dc9ec3 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -2364,7 +2364,8 @@ bool ha_myisam::check_if_incompatible_data(HA_CREATE_INFO *create_info,
{
uint options= table->s->db_options_in_use;
- if (create_info->auto_increment_value != stats.auto_increment_value ||
+ if ((create_info->used_fields & HA_CREATE_USED_AUTO &&
+ create_info->auto_increment_value != stats.auto_increment_value) ||
create_info->data_file_name != data_file_name ||
create_info->index_file_name != index_file_name ||
table_changes == IS_EQUAL_NO ||
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index 7fbee0312ee..32536306320 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -2072,7 +2072,6 @@ os_file_create_func(
file = INVALID_HANDLE_VALUE;
}
}
-
#else /* __WIN__ */
int create_flag;
const char* mode_str = NULL;
diff --git a/storage/xtradb/row/row0ins.cc b/storage/xtradb/row/row0ins.cc
index 6072b303d3a..00b8ce17b26 100644
--- a/storage/xtradb/row/row0ins.cc
+++ b/storage/xtradb/row/row0ins.cc
@@ -1296,11 +1296,12 @@ row_ins_foreign_check_on_constraint(
#ifdef WITH_WSREP
err = wsrep_append_foreign_key(
- thr_get_trx(thr),
- foreign,
- clust_rec,
- clust_index,
- FALSE, FALSE);
+ thr_get_trx(thr),
+ foreign,
+ clust_rec,
+ clust_index,
+ FALSE,
+ (node) ? TRUE : FALSE);
if (err != DB_SUCCESS) {
fprintf(stderr,
"WSREP: foreign key append failed: %d\n", err);
@@ -1461,6 +1462,9 @@ row_ins_check_foreign_constraint(
ulint* offsets = offsets_;
rec_offs_init(offsets_);
+#ifdef WITH_WSREP
+ upd_node= NULL;
+#endif /* WITH_WSREP */
run_again:
#ifdef UNIV_SYNC_DEBUG
ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED));
@@ -1651,8 +1655,9 @@ run_again:
thr_get_trx(thr),
foreign,
rec,
- check_index,
- check_ref, TRUE);
+ check_index,
+ check_ref,
+ (upd_node) ? TRUE : FALSE);
#endif /* WITH_WSREP */
goto end_scan;
} else if (foreign->type != 0) {