Skip to content

Instantly share code, notes, and snippets.

View kazeburo's full-sized avatar

Masahiro Nagano kazeburo

View GitHub Profile
*** glibc detected *** /usr/sbin/mysqld: double free or corruption (!prev): 0x00007fc7780a5a60 ***
*** glibc detected *** /usr/sbin/mysqld: corrupted double-linked list: 0x00007fc66807def0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x376b476166]
/lib64/libc.so.6[0x376b478f81]
======= Backtrace: =========
/usr/lib64/libgroonga.so.0(grn_free_default+0x31)[0x7fcc686dbfe1]
/lib64/libc.so.6[0x376b476166]
/usr/lib64/libgroonga.so.0(grn_obj_close+0x34b)[0x7fcc686eca6b]
/lib64/libc.so.6[0x376b478c93]
diff --git a/XS.xs b/XS.xs
index 4bf4c2a..cbe32bd 100644
--- a/XS.xs
+++ b/XS.xs
@@ -121,13 +121,14 @@ struct _ust {
static void
url_params_each(pTHX_ const char *s, const STRLEN len, const ust_t *u) {
+ static const char sep[] = "&;";
const char *send = s + len;
@kazeburo
kazeburo / mroonga_repl_test.md
Created January 29, 2014 05:34
ON DUPLICATE KEY UPDATE と mroongaでレプリケーションが壊れる件の検証

環境

  • CentOS 6.5
  • MySQL 5.6.15 Oracle rpm
  • mroonga 3.11
  • binlog_formatはMIXED

テーブル

CREATE TABLE article_index (

package Proclet::Crontab;
use strict;
use warnings;
use Carp qw/croak/;
use List::MoreUtils qw/all any uniq/;
use Set::Crontab;
my @keys = qw/minute hour day month day_of_week/;
my @ranges = (
@kazeburo
kazeburo / gist:7921148
Created December 12, 2013 00:24
build openresty with pcre-jit
cd /tmp
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz
tar zxf pcre-8.33.tar.gz
wget http://openresty.org/download/ngx_openresty-1.4.3.3.tar.gz
tar zxf ngx_openresty-1.4.3.3.tar.gz
cd ngx_openresty-1.4.3.3
export PATH=/sbin:$PATH
./configure --with-luajit --prefix=/path/to/openresty --with-http_gzip_static_module --with-pcre=/tmp/pcre-8.33 --with-pcre-jit
make
make install
package Plack::Middleware::Session::Fast;
use strict;
use warnings;
use parent qw/Plack::Middleware::Session/;
use Storable qw//;
use Data::MessagePack q//;
use Plack::Util::Accessor qw/serialize_method/;
sub prepare_app {
diff --git a/lib/Plack/Response.pm b/lib/Plack/Response.pm
index 5ea2e15..aba8364 100644
--- a/lib/Plack/Response.pm
+++ b/lib/Plack/Response.pm
@@ -85,24 +85,20 @@ sub finalize {
my $self = shift;
Carp::croak "missing status" unless $self->status();
- my $headers = $self->headers->clone;
- $self->_finalize_cookies($headers);
#!/usr/bin/perl
use strict;
use warnings;
use Plack::Response;
use Plack::Util;
use Cookie::Baker;
use Benchmark qw/timethese cmpthese/;
cmpthese(timethese(-1, {
diff --git a/webapp/perl/cpanfile b/webapp/perl/cpanfile
index e3d6103..944b12e 100644
--- a/webapp/perl/cpanfile
+++ b/webapp/perl/cpanfile
@@ -2,3 +2,6 @@ requires 'Kossy' => '0.12';
requires 'DBIx::Sunny' => '0.17';
requires 'DBD::mysql' => '4.022';
requires 'Starman' => '0.3003';
+requires 'Starlet';
+requires 'Cache::Memory::Simple';
@kazeburo
kazeburo / cpanfile
Created July 29, 2013 04:13
carton install with mysql
do 'mysql_helper.pl';
requires 'DBD::mysql';