Skip to content

Instantly share code, notes, and snippets.

diff --git a/Makefile b/Makefile
index f53eef2..f566151 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,8 @@ termbox_ld_soname:=soname
termbox_a:=libtermbox.a
termbox_h:=termbox.h
-ifeq ($(shell uname), Darwin)
+$(shell $(LD) -install_name x -o /dev/null /dev/null 2>/dev/null)
diff --git a/Makefile b/Makefile
index f53eef2..a7581bb 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,8 @@ termbox_ld_soname:=soname
termbox_a:=libtermbox.a
termbox_h:=termbox.h
-ifeq ($(shell uname), Darwin)
+$(shell $(LD) -install_name x /dev/null 2>/dev/null)
diff --git a/termbox.c b/termbox.c
index 4b3557c..f9138b8 100644
--- a/termbox.c
+++ b/termbox.c
@@ -724,12 +724,7 @@ int tb_init_fd(int inout_) {
struct termios tios;
memcpy(&tios, &orig_tios, sizeof(tios));
- tios.c_iflag &=
- ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
diff --git a/bline.c b/bline.c
index 310235b..4123721 100644
--- a/bline.c
+++ b/bline.c
@@ -80,8 +80,8 @@ int bline_count_chars(bline_t *bline) {
} else {
char_w = wcwidth(ch);
}
- // Let null and non-printable chars occupy 1 column
- if (char_w < 1) char_w = 1;
diff --git a/go/vt/vtgate/engine/update_target.go b/go/vt/vtgate/engine/update_target.go
index f637d4166..0ca4b5327 100644
--- a/go/vt/vtgate/engine/update_target.go
+++ b/go/vt/vtgate/engine/update_target.go
@@ -62,17 +62,21 @@ func (updTarget UpdateTarget) GetTableName() string {
func (updTarget UpdateTarget) Execute(vcursor VCursor, bindVars map[string]*query.BindVariable, wantfields bool) (*sqltypes.Result, error) {
err := vcursor.Session().SetTarget(updTarget.Target)
if err != nil {
return nil, err
}
diff --git a/go/vt/vttablet/tabletmanager/rpc_replication.go b/go/vt/vttablet/tabletmanager/rpc_replication.go
index f0eea772f..d226d3a51 100644
--- a/go/vt/vttablet/tabletmanager/rpc_replication.go
+++ b/go/vt/vttablet/tabletmanager/rpc_replication.go
@@ -289,7 +289,7 @@ func (agent *ActionAgent) InitSlave(ctx context.Context, parent *topodatapb.Tabl
if err := agent.MysqlDaemon.SetSlavePosition(ctx, pos); err != nil {
return err
}
- if err := agent.MysqlDaemon.SetMaster(ctx, topoproto.MysqlHostname(ti.Tablet), int(topoproto.MysqlPort(ti.Tablet)), false /* slaveStopBefore */, true /* slaveStartAfter */); err != nil {
+ if err := agent.MysqlDaemon.SetMaster(ctx, ti.Tablet.Hostname, int(topoproto.MysqlPort(ti.Tablet)), false /* slaveStopBefore */, true /* slaveStartAfter */); err != nil {
diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h
index 7cc7cc96e6..e379488118 100644
--- a/ext/mysqlnd/mysqlnd.h
+++ b/ext/mysqlnd/mysqlnd.h
@@ -306,21 +306,21 @@ PHPAPI void _mysqlnd_get_client_stats(MYSQLND_STATS * stats, zval *return_valu
#define MYSQLND_METHOD_PRIVATE(class, method) mysqlnd_##class##_##method##_priv
ZEND_BEGIN_MODULE_GLOBALS(mysqlnd)
char * debug; /* The actual string */
char * trace_alloc_settings; /* The actual string */
diff --git a/server/config.c b/server/config.c
index 7c7a1e0033..754152b86b 100644
--- a/server/config.c
+++ b/server/config.c
@@ -45,37 +45,42 @@
#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"
Last night, the large goldfish
decided there were too many
living things.
He ate two shrimp, four minnows.
The paradise fish hides
behind the filter
all day.
diff --git a/proto/query.proto b/proto/query.proto
index 7c902f686..f9f314910 100644
--- a/proto/query.proto
+++ b/proto/query.proto
@@ -225,7 +225,7 @@ message BindVariable {
// BoundQuery is a query with its bind variables
message BoundQuery {
// sql is the SQL query to execute
- string sql = 1;
+ bytes sql = 1;