Skip to content

Instantly share code, notes, and snippets.

View BohuTANG's full-sized avatar

Bohu BohuTANG

View GitHub Profile
diff --git a/src/vendor/github.com/XeLabs/go-mysqlstack/sqlparser/ast.go b/src/vendor/github.com/XeLabs/go-mysqlstack/sqlparser/ast.go
index 5a68968..14e60a8 100644
--- a/src/vendor/github.com/XeLabs/go-mysqlstack/sqlparser/ast.go
+++ b/src/vendor/github.com/XeLabs/go-mysqlstack/sqlparser/ast.go
@@ -381,6 +381,35 @@ func (node *Set) WalkSubtree(visit Visit) error {
)
}
+/*********************************************/
+type DDLType int
index 421e1c4..54dcdac 100644
--- a/src/vendor/github.com/XeLabs/go-mysqlstack/sqlparser/sql.y
+++ b/src/vendor/github.com/XeLabs/go-mysqlstack/sqlparser/sql.y
@@ -4,6 +4,9 @@
%{
package sqlparser
+import (
+ "fmt"
+ )
ps version: 5.7.15-7-log
2tables ~25150327 records per table
Table: purchases_index0
Create Table: CREATE TABLE `purchases_index0` (
`transactionid` bigint(20) NOT NULL AUTO_INCREMENT,
`dateandtime` datetime DEFAULT NULL,
`cashregisterid` int(11) NOT NULL,
`customerid` int(11) NOT NULL,
`productid` int(11) NOT NULL,
===testing model===
a. 1 master and 2 slave
semi-sync is enabled
sysbench testing in production not a mock
b. PS5.7: https://github.com/BohuTANG/tokudb
c. 16-CPUS 16GB-Memory 100GB-SSD ECS
d. sysbench: 128threads, random-writes 3600s
8 tables which prepared by sysbench(oltp.lua)
===semi-sync====
Thread 99 (LWP 3470):
#01 0x00007f12b6ff1b6d in __fsync_nocancel () from /lib/x86_64-linux-gnu/libpthread-2.23.so
#02 0x00000000012dc56b in file_fsync_internal () from /home/ubuntu/src/tokudb/storage/tokudb/PerconaFT/portability/file.cc:422
#03 0x00000000012901b1 in toku_logger_maybe_fsync () from /home/ubuntu/src/tokudb/storage/tokudb/PerconaFT/ft/logger/logger.cc:797
#04 0x00000000012902b1 in toku_logger_fsync () from /home/ubuntu/src/tokudb/storage/tokudb/PerconaFT/ft/logger/logger.cc:533
#05 0x000000000128001c in env_log_flush () from /home/ubuntu/src/tokudb/storage/tokudb/PerconaFT/src/ydb.cc:1248
#06 0x00000000013029cb in tokudb_flush_logs () from /home/ubuntu/src/tokudb/storage/tokudb/hatoku_hton.cc:768
#07 0x0000000000812c7f in flush_handlerton () from /home/ubuntu/src/tokudb/sql/handler.cc:2607
#08 0x0000000000cb7279 in plugin_foreach_with_mask () from /home/ubuntu/src/tokudb/sql/sql_plugin.cc:2318
#09 0x0000000000819f0a in ha_flush_logs () from /home/ubuntu/src/tokudb/sql/handler.cc:2617
@BohuTANG
BohuTANG / ioarena.txt
Last active November 6, 2015 07:20
Sophia, LMDB, nessDB ioarena benchmarks
https://github.com/BohuTANG/ioarena
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Intel Core i5
Memory: 8 GB
==================================1) small kv tests=================================
number of operations 20,000,000
operations set
@BohuTANG
BohuTANG / posix-helgrind.c
Created June 10, 2014 14:56
a case for helgrind
/*
* make:
* gcc -g posixtest.c -pthread -o posixtest
* run:
* valgrind --tool=helgrind ./posixtest
*/
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
core 1 | core 2
-----------------|-----------------
A = 1;
-----------------|-----------------
exa = B;/*0*/ B = 1;
-----------------|-----------------
exa = A;/*1*/
-----------------|-----------------
C = exa;/*1*/
-----------------|-----------------
/*
* CascaDB crc32 algorithm and test
* refer to https://code.google.com/p/leveldb/source/browse/util/crc32c.cc
* BohuTANG
* 2013/08/27
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@BohuTANG
BohuTANG / nessDB-solaris.patch
Created July 16, 2013 05:11
nessDB solaris patch, from fc
diff --git a/Makefile b/Makefile
index 5631c4d..0e1e04e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
CC = gcc
#debug levle
-DOG = -rdynamic -DDOG
-DEBUG = -g -ggdb -DINFO $(DOG)