zeevex_cluster 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDJhZTNkZTM5ZGJkNDcxNjQ4Njg2YWMzY2QyZDlhOWUxMGFiNmQyNg==
4
+ M2FhMzQyYzhlMjdhMzZhNmMxYTU4M2MwZDcyNDgzYzljZGQ4Yjk1Zg==
5
5
  data.tar.gz: !binary |-
6
- OWY3NDQwMjljNDRhNDNlMzZmMDRjYzQwZTMwNDA4NDdmYjU3MzkxYQ==
6
+ YWQxZjQ1ODMyNjBjMTFhNTdkMzU5MGVmYmQ5MmNmZGRjNzk0ZWM3YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjE2NmEyZjI1ZTQ0ZmYxYTA5N2FhYTFlZDZkNmU3MmJiMzVjMzJlN2I4ODMy
10
- Y2M5MmZkZGZhZWM5ODFiMmM4ZGFkNTQ5N2FlNTc4NjQ3NGY2Y2UwNjI0MjY0
11
- NzExOWRiOTQzMmYwYmMwNDY5ZTMzN2VmM2M2OTVkNGMyNWVhODY=
9
+ YmY0ZGNlMGY2YTQyNTY5ZDlkMDY2MTBjMzI2MTEwOWJkYjYxMmM4YmRiZDMz
10
+ M2RmMWZhMjZkYmI0MGMzYmFmMmE2MGFiYWI4NWE2NmI2OTAzODlhMzE3NmM5
11
+ NDVmMGI1OGIwYmM4NzBkYTRlZjBlMjc1ZDYwNDhjNzczMWZlNWQ=
12
12
  data.tar.gz: !binary |-
13
- Y2RmNjkzYzI4YWZkZjkxOWE3NTgxMzBlYzQ3Njc2MTliMDYxOThmMjM0MzA2
14
- YjljY2MzYWZlNWZkOGE2NzE2YTk5MDhkMWYwNzI3YWY4YzRkMTk4YjVhNmZj
15
- MzJkNDY0OGUxMjJiNDc0YmEzMDIzZjg4MzA5NDM1N2Y4NTk4MTc=
13
+ NmE2NTIxNzdiYzgxYzg2NzJjZGExODJhNGE3NmY0YmI4ZTI5YjY2NmE2MzVj
14
+ Zjk4OThlYjk1ODg1M2Y4NTc3ZTJmNjE0NGI4YjViYjIwMjUyMzdjOTM3N2Ni
15
+ ZDBjZWQ1YjQ2N2ZhOTcwOWYyZDBlNTU0NGU0ZjA1N2MyNWI2MGI=
@@ -248,10 +248,15 @@ module ZeevexCluster::Coordinator
248
248
 
249
249
  # see http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html for WTF affected_rows
250
250
  # overloading
251
- res[:success] = [1,2].include?(res[:affected_rows])
251
+ #
252
+ # See bug http://bugs.mysql.com/bug.php?id=46675 for case when the affected_rows can be 3.
253
+ # this appears to be the case in mysql server 5.1 when doing an update on the matched row.
254
+ # so we just treat 3 the same as 2.
255
+
256
+ res[:success] = [1,2,3].include?(res[:affected_rows])
252
257
  res[:upsert_type] = case res[:affected_rows]
253
258
  when 1 then :insert
254
- when 2 then :update
259
+ when 2,3 then :update
255
260
  else :none
256
261
  end
257
262
  res
@@ -1,3 +1,3 @@
1
1
  module ZeevexCluster
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeevex_cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Sanders
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: state_machine