Merge lp:~akopytov/percona-xtradb-cluster/bug1366997-5.5 into lp:percona-xtradb-cluster/5.5

Proposed by Alexey Kopytov
Status: Merged
Approved by: Raghavendra D Prabhu
Approved revision: no longer in the source branch.
Merged at revision: 838
Proposed branch: lp:~akopytov/percona-xtradb-cluster/bug1366997-5.5
Merge into: lp:percona-xtradb-cluster/5.5
Diff against target: 65 lines (+24/-3)
2 files modified
sql/wsrep_hton.cc (+1/-1)
storage/innobase/handler/ha_innodb.cc (+23/-2)
To merge this branch: bzr merge lp:~akopytov/percona-xtradb-cluster/bug1366997-5.5
Reviewer Review Type Date Requested Status
Raghavendra D Prabhu Pending
Review via email: mp+246624@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sql/wsrep_hton.cc'
2--- sql/wsrep_hton.cc 2014-04-20 17:19:52 +0000
3+++ sql/wsrep_hton.cc 2015-01-15 18:33:08 +0000
4@@ -485,7 +485,7 @@
5 case WSREP_BF_ABORT:
6 DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED);
7 case WSREP_TRX_FAIL:
8- WSREP_DEBUG("commit failed for reason: %d", rcode);
9+ WSREP_DEBUG("commit failed for reason: %d %lu %s", rcode, thd->thread_id, thd->query());
10 DBUG_PRINT("wsrep", ("replicating commit fail"));
11
12 thd->wsrep_query_state= QUERY_EXEC;
13
14=== modified file 'storage/innobase/handler/ha_innodb.cc'
15--- storage/innobase/handler/ha_innodb.cc 2015-01-04 16:27:17 +0000
16+++ storage/innobase/handler/ha_innodb.cc 2015-01-15 18:33:08 +0000
17@@ -6711,6 +6711,14 @@
18 #ifdef WITH_WSREP
19 /* workaround for LP bug #355000, retrying the insert */
20 case SQLCOM_INSERT:
21+
22+ WSREP_DEBUG("DUPKEY error for autoinc\n"
23+ "THD %ld, value %llu, off %llu inc %llu",
24+ wsrep_thd_thread_id(current_thd),
25+ auto_inc,
26+ prebuilt->autoinc_offset,
27+ prebuilt->autoinc_increment);
28+
29 if (wsrep_on(current_thd) &&
30 auto_inc_inserted &&
31 wsrep_drupal_282555_workaround &&
32@@ -8280,10 +8288,10 @@
33 DBUG_ENTER("wsrep_append_key");
34 bool const copy = true;
35 #ifdef WSREP_DEBUG_PRINT
36- fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s ",
37+ fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s\n SQL: %s ",
38 (shared) ? "Shared" : "Exclusive",
39 wsrep_thd_thread_id(thd), trx->id, key_len,
40- table_share->table_name.str);
41+ table_share->table_name.str, wsrep_thd_query(thd));
42 for (int i=0; i<key_len; i++) {
43 fprintf(stderr, "%hhX, ", key[i]);
44 }
45@@ -12396,7 +12404,20 @@
46 next value in the series. */
47 if (prebuilt->autoinc_increment > increment) {
48
49+#ifdef WITH_WSREP
50+ WSREP_DEBUG("autoinc decrease: %llu -> %llu\n"
51+ "THD: %ld, current: %llu, autoinc: %llu",
52+ prebuilt->autoinc_increment,
53+ increment,
54+ wsrep_thd_thread_id(ha_thd()),
55+ current, autoinc);
56+ if (!wsrep_on(ha_thd()))
57+ {
58+#endif /* WITH_WSREP */
59 current = autoinc - prebuilt->autoinc_increment;
60+#ifdef WITH_WSREP
61+ }
62+#endif /* WITH_WSREP */
63
64 current = innobase_next_autoinc(
65 current, 1, increment, 1, col_max_value);

Subscribers

People subscribed via source and target branches