Skip to content

Instantly share code, notes, and snippets.

@adsr
adsr / foo.diff
Created September 16, 2016 15:44
diff --git a/client/client_priv.h b/client/client_priv.h
index 7348726..7a46e9e 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -102,20 +102,22 @@ enum options_client
OPT_REMOTE_PROTO,
OPT_CONFIG_ALL,
OPT_REWRITE_DB,
OPT_SERVER_PUBLIC_KEY,
OPT_ENABLE_CLEARTEXT_PLUGIN,
diff --git a/server/config.c b/server/config.c
index cc6070a..6f68114 100644
--- a/server/config.c
+++ b/server/config.c
@@ -45,20 +45,23 @@
#include "http_protocol.h"
#include "http_core.h"
#include "http_log.h" /* for errors in parse_htaccess */
#include "http_request.h" /* for default_handler (see invoke_handler) */
#include "http_main.h"
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index fa635b1..a0c10cb 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4714,40 +4714,45 @@ PHP_FUNCTION(error_log)
/* For BC (not binary-safe!) */
PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers) /* {{{ */
{
return _php_error_log_ex(opt_err, message, (opt_err == 3) ? strlen(message) : 0, opt, headers);
}
diff --git a/script.go b/script.go
index 7eeb67f..398b072 100644
--- a/script.go
+++ b/script.go
@@ -197,32 +197,35 @@ func (self *ScriptDef) makeDefault() error {
}
// Return the JSON-decoded form of `in`. For `unsafe` and `string` types,
// double quotes are added if `in` does not begin with a double quote. For
// `string` the value is passed through `escapeShellArg`. `int` and `float`
diff --git a/oauth.c b/oauth.c
index 62522bd..198e2cb 100644
--- a/oauth.c
+++ b/oauth.c
@@ -367,22 +367,22 @@ static int oauth_strcmp(zval *first, zval *second)
} else if (result > 0) {
return 1;
}
return 0;
diff --git a/oauth.c b/oauth.c
index 62522bd..198e2cb 100644
--- a/oauth.c
+++ b/oauth.c
@@ -374,8 +374,8 @@ static int oauth_strcmp(zval *first, zval *second)
static int oauth_compare_value(const void *a, const void *b)
{
Bucket *f, *s;
- f = *(Bucket **)a;
- s = *(Bucket **)b;
@adsr
adsr / -
Created March 27, 2017 19:34
{"ts_sec":1489789961,"file":"dbreplica-bin.002223","pos":455174711,"gtids":"304c6cfd-694e-11e6-8a02-ecf4bbce0af0:1-2341223,9b23318a-694f-11e6-8a05-ecf4bbce09e8:1-36441605","row":1,"server_id":1003534,"event":3}
{"ts_sec":1489790020,"file":"dbreplica-bin.002223","pos":458239804,"gtids":"304c6cfd-694e-11e6-8a02-ecf4bbce0af0:1-2345790,9b23318a-694f-11e6-8a05-ecf4bbce09e8:1-36441664","row":1,"server_id":1003534,"event":3}
{"ts_sec":1489790081,"file":"dbreplica-bin.002223","pos":461985103,"gtids":"304c6cfd-694e-11e6-8a02-ecf4bbce0af0:1-2350941,9b23318a-694f-11e6-8a05-ecf4bbce09e8:1-36441725","row":1,"server_id":1003534,"event":3}
{"ts_sec":1489790141,"file":"dbreplica-bin.002223","pos":464758792,"gtids":"304c6cfd-694e-11e6-8a02-ecf4bbce0af0:1-2354689,9b23318a-694f-11e6-8a05-ecf4bbce09e8:1-36441785","row":1,"server_id":1003534,"event":3}
{"ts_sec":1489790201,"file":"dbreplica-bin.002223","pos":471098018,"gtids":"304c6cfd-694e-11e6-8a02-ecf4bbce0af0:1-2363256,9b23318a-694f-11e6-8a05-ecf4bbce09e8:1-36441845","row":1,
It is apparent that octopus handling is a risky behavior, as within our study
area a known adult male stranded and a necropsy confirmed the cause of death
was from suffocation from a large 2.1 kg octopus. The dolphin had attempted to
swallow the octopus, however, the octopus was found almost intact, with the
head and the mantle of the octopus in the dolphin's stomach and the 1.3 m long
arms separated from the head and extending out of its mouth. Similarly, another
[bottlenose dolphin] died from suspected asphyxiation due to an octopus lodged
in its mouth and pharynx.
diff --git a/debezium-connector-mysql/src/main/java/io/debezium/connector/mysql/BinlogReader.java b/debezium-connector-mysql/src/main/java/io/debezium/connector/mysql/BinlogReader.java
index f23d902..ebf0464 100644
--- a/debezium-connector-mysql/src/main/java/io/debezium/connector/mysql/BinlogReader.java
+++ b/debezium-connector-mysql/src/main/java/io/debezium/connector/mysql/BinlogReader.java
@@ -60,6 +60,7 @@
private static final long INITIAL_POLL_PERIOD_IN_MILLIS = TimeUnit.SECONDS.toMillis(5);
private static final long MAX_POLL_PERIOD_IN_MILLIS = TimeUnit.HOURS.toMillis(1);
+ private static final int EVENT_QUEUE_CAPACITY = 1024 * 32;
diff --git a/sql/handler.cc b/sql/handler.cc
index 1c58ba2..7919c7f 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -7853,7 +7853,7 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data)
{ error= update_row(old_data, new_data);})
MYSQL_UPDATE_ROW_DONE(error);
- if (unlikely(error))
+ if (unlikely(error && (error != HA_ERR_RECORD_IS_THE_SAME || !ha_thd()->lex->force)))