Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿拉亮
soar
提交
d6e1ad7c
S
soar
项目概览
阿拉亮
/
soar
与 Fork 源项目一致
Fork自
Xiaomi / soar
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
soar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d6e1ad7c
编写于
12月 12, 2018
作者:
martianzhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix Makefile enviroment deps
上级
ccdfcb81
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
119 addition
and
47 deletion
+119
-47
Makefile
Makefile
+2
-2
deps.sh
deps.sh
+19
-0
doc/example/main_test.sh
doc/example/main_test.sh
+1
-1
vendor/github.com/pingcap/parser/ast/dml.go
vendor/github.com/pingcap/parser/ast/dml.go
+54
-1
vendor/github.com/pingcap/parser/types/field_type.go
vendor/github.com/pingcap/parser/types/field_type.go
+6
-0
vendor/github.com/pingcap/tidb/types/field_type.go
vendor/github.com/pingcap/tidb/types/field_type.go
+0
-6
vendor/vendor.json
vendor/vendor.json
+37
-37
未找到文件。
Makefile
浏览文件 @
d6e1ad7c
...
...
@@ -46,7 +46,7 @@ deps:
@
bash ./deps.sh
# The retool tools.json is setup from retool-install.sh
retool
sync
retool
do
gometalinter.v2
in
tall
retool
do
gometalinter.v2
--ins
tall
# Code format
.PHONY
:
fmt
...
...
@@ -176,7 +176,7 @@ docker:
-v
`
pwd
`
/doc/example/sakila.sql.gz:/docker-entrypoint-initdb.d/sakila.sql.gz
\
$(MYSQL_RELEASE)
:
$(MYSQL_VERSION)
@echo
-n
"waiting for sakila database initializing "
@echo
"waiting for sakila database initializing "
@while
!
mysql
-h
127.0.0.1
-u
root
sakila
-p1tIsB1g3rt
-NBe
"do 1;"
2>/dev/null;
do
\
printf
'.'
;
\
sleep
1
;
\
...
...
deps.sh
浏览文件 @
d6e1ad7c
...
...
@@ -10,3 +10,22 @@ for cmd in ${NEEDED_COMMANDS} ; do
echo
"
${
cmd
}
found"
fi
done
# MySQL client
## Mac OS: brew install mysql
## Ubuntu: apt-get install mysql-client
# Docker
## https://www.docker.com
# Git
## https://git-scm.com/
# Go
## https://golang.org/
# Govendor
## go get github.com/kardianos/govendor
# retool
## go get github.com/twitchtv/retool
doc/example/main_test.sh
浏览文件 @
d6e1ad7c
#!/bin/bash
GOPATH
=
$(
go
env
GOPATH
)
PROJECT_PATH
=
${
GOPATH
}
/src/github.com/XiaoMi/soar/
if
[
"
$1x
"
==
"-updatex"
]
;
then
...
...
vendor/github.com/pingcap/parser/ast/dml.go
浏览文件 @
d6e1ad7c
...
...
@@ -135,7 +135,18 @@ type TableName struct {
// Restore implements Recoverable interface.
func
(
n
*
TableName
)
Restore
(
sb
*
strings
.
Builder
)
error
{
return
errors
.
New
(
"Not implemented"
)
if
n
.
Schema
.
String
()
!=
""
{
WriteName
(
sb
,
n
.
Schema
.
String
())
sb
.
WriteString
(
"."
)
}
WriteName
(
sb
,
n
.
Name
.
String
())
for
_
,
value
:=
range
n
.
IndexHints
{
sb
.
WriteString
(
" "
)
if
err
:=
value
.
Restore
(
sb
);
err
!=
nil
{
return
errors
.
Annotate
(
err
,
"An error occurred while splicing IndexHints"
)
}
}
return
nil
}
// IndexHintType is the type for index hint use, ignore or force.
...
...
@@ -166,6 +177,48 @@ type IndexHint struct {
HintScope
IndexHintScope
}
// IndexHint Restore (The const field uses switch to facilitate understanding)
func
(
n
*
IndexHint
)
Restore
(
sb
*
strings
.
Builder
)
error
{
indexHintType
:=
""
switch
n
.
HintType
{
case
1
:
indexHintType
=
"USE INDEX"
case
2
:
indexHintType
=
"IGNORE INDEX"
case
3
:
indexHintType
=
"FORCE INDEX"
default
:
// Prevent accidents
return
errors
.
New
(
"IndexHintType has an error while matching"
)
}
indexHintScope
:=
""
switch
n
.
HintScope
{
case
1
:
indexHintScope
=
""
case
2
:
indexHintScope
=
" FOR JOIN"
case
3
:
indexHintScope
=
" FOR ORDER BY"
case
4
:
indexHintScope
=
" FOR GROUP BY"
default
:
// Prevent accidents
return
errors
.
New
(
"IndexHintScope has an error while matching"
)
}
sb
.
WriteString
(
indexHintType
)
sb
.
WriteString
(
indexHintScope
)
sb
.
WriteString
(
" ("
)
for
i
,
value
:=
range
n
.
IndexNames
{
if
i
>
0
{
sb
.
WriteString
(
", "
)
}
WriteName
(
sb
,
value
.
O
)
}
sb
.
WriteString
(
")"
)
return
nil
}
// Accept implements Node Accept interface.
func
(
n
*
TableName
)
Accept
(
v
Visitor
)
(
Node
,
bool
)
{
newNode
,
skipChildren
:=
v
.
Enter
(
n
)
...
...
vendor/github.com/pingcap/parser/types/field_type.go
浏览文件 @
d6e1ad7c
...
...
@@ -50,6 +50,12 @@ func NewFieldType(tp byte) *FieldType {
}
}
// Clone returns a copy of itself.
func
(
ft
*
FieldType
)
Clone
()
*
FieldType
{
ret
:=
*
ft
return
&
ret
}
// Equal checks whether two FieldType objects are equal.
func
(
ft
*
FieldType
)
Equal
(
other
*
FieldType
)
bool
{
// We do not need to compare whole `ft.Flag == other.Flag` when wrapping cast upon an Expression.
...
...
vendor/github.com/pingcap/tidb/types/field_type.go
浏览文件 @
d6e1ad7c
...
...
@@ -40,12 +40,6 @@ func NewFieldType(tp byte) *FieldType {
}
}
// CloneFieldType clones the given FieldType.
func
CloneFieldType
(
src
*
FieldType
)
*
FieldType
{
ft
:=
*
src
return
&
ft
}
// AggFieldType aggregates field types for a multi-argument function like `IF`, `IFNULL`, `COALESCE`
// whose return type is determined by the arguments' FieldTypes.
// Aggregation is performed by MergeFieldType function.
...
...
vendor/vendor.json
浏览文件 @
d6e1ad7c
...
...
@@ -107,104 +107,104 @@
{
"checksumSHA1"
:
"xbV0lm0Qw8rFC82Dttxbf5ypBjA="
,
"path"
:
"github.com/pingcap/parser"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"
zrZ2JfaxdfwpArtuyiPjgH9GKeY
="
,
"checksumSHA1"
:
"
RosqMriA/39ZEtqGgNU+bOfRBVc
="
,
"path"
:
"github.com/pingcap/parser/ast"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"skWGV4FNvD3vr+5olepaPPnylUw="
,
"path"
:
"github.com/pingcap/parser/auth"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"t4UHo966WzU9Z0IJkyGHRp0loOk="
,
"path"
:
"github.com/pingcap/parser/charset"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"SInoXbsRe0tnBwmatmtZYfSFbdk="
,
"path"
:
"github.com/pingcap/parser/format"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"reRV2qecd6NpB7tIW3JeK46K/sk="
,
"path"
:
"github.com/pingcap/parser/model"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"QBa9yiMDQNl2cLLwqlRoNTpCPNg="
,
"path"
:
"github.com/pingcap/parser/mysql"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"oNBCSwJRykKuzIKgPCttatB9hAo="
,
"path"
:
"github.com/pingcap/parser/opcode"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"XvnUllvwMYd6HrMvMiKnn4cGN2M="
,
"path"
:
"github.com/pingcap/parser/terror"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"
s96v2EoeGKcWHO3mpMOQk/z2iaI
="
,
"checksumSHA1"
:
"
YoDiJ3sniNqxkP5X/BDkx6efteA
="
,
"path"
:
"github.com/pingcap/parser/types"
,
"revision"
:
"
4e6d047fcaae221376638de5f44c07cb6bf3eb4
4"
,
"revisionTime"
:
"2018-12-1
1T02:45:40
Z"
"revision"
:
"
f20218bc290343c2752c4926c1bf4264343bbef
4"
,
"revisionTime"
:
"2018-12-1
2T04:21:31
Z"
},
{
"checksumSHA1"
:
"fWqL/7jTYOiqDNmiUcQi3u45Hw0="
,
"path"
:
"github.com/pingcap/tidb/sessionctx/stmtctx"
,
"revision"
:
"
ef0ad26da8f99044a741fc0a781a0c4791446e8b
"
,
"revisionTime"
:
"2018-12-1
0T15:48:53
Z"
"revision"
:
"
63e7dacf8d4e59dce05131561d313065cbeda586
"
,
"revisionTime"
:
"2018-12-1
2T05:36:44
Z"
},
{
"checksumSHA1"
:
"
U/TFas5WBPWG2DARj51bcfoN0x
Q="
,
"checksumSHA1"
:
"
0CCq+3fAyaXs9XU+xWaRvbbtSO
Q="
,
"path"
:
"github.com/pingcap/tidb/types"
,
"revision"
:
"
ef0ad26da8f99044a741fc0a781a0c4791446e8b
"
,
"revisionTime"
:
"2018-12-1
0T15:48:53
Z"
"revision"
:
"
63e7dacf8d4e59dce05131561d313065cbeda586
"
,
"revisionTime"
:
"2018-12-1
2T05:36:44
Z"
},
{
"checksumSHA1"
:
"DWVD7+ygtT66IQ+cqXmMJ5OVqUk="
,
"path"
:
"github.com/pingcap/tidb/types/json"
,
"revision"
:
"
ef0ad26da8f99044a741fc0a781a0c4791446e8b
"
,
"revisionTime"
:
"2018-12-1
0T15:48:53
Z"
"revision"
:
"
63e7dacf8d4e59dce05131561d313065cbeda586
"
,
"revisionTime"
:
"2018-12-1
2T05:36:44
Z"
},
{
"checksumSHA1"
:
"Zp5ME8OXNTmHnYTwJJUZlydN4/U="
,
"path"
:
"github.com/pingcap/tidb/types/parser_driver"
,
"revision"
:
"
ef0ad26da8f99044a741fc0a781a0c4791446e8b
"
,
"revisionTime"
:
"2018-12-1
0T15:48:53
Z"
"revision"
:
"
63e7dacf8d4e59dce05131561d313065cbeda586
"
,
"revisionTime"
:
"2018-12-1
2T05:36:44
Z"
},
{
"checksumSHA1"
:
"s709bhSrG2Ec35406mGtrySid4s="
,
"path"
:
"github.com/pingcap/tidb/util/execdetails"
,
"revision"
:
"
ef0ad26da8f99044a741fc0a781a0c4791446e8b
"
,
"revisionTime"
:
"2018-12-1
0T15:48:53
Z"
"revision"
:
"
63e7dacf8d4e59dce05131561d313065cbeda586
"
,
"revisionTime"
:
"2018-12-1
2T05:36:44
Z"
},
{
"checksumSHA1"
:
"nUC7zVoAMNR2a+z2iGqHoN2AkFE="
,
"path"
:
"github.com/pingcap/tidb/util/hack"
,
"revision"
:
"
ef0ad26da8f99044a741fc0a781a0c4791446e8b
"
,
"revisionTime"
:
"2018-12-1
0T15:48:53
Z"
"revision"
:
"
63e7dacf8d4e59dce05131561d313065cbeda586
"
,
"revisionTime"
:
"2018-12-1
2T05:36:44
Z"
},
{
"checksumSHA1"
:
"xSyepiuqsoaaeDch7cXeumvVHKM="
,
"path"
:
"github.com/pingcap/tidb/util/memory"
,
"revision"
:
"
ef0ad26da8f99044a741fc0a781a0c4791446e8b
"
,
"revisionTime"
:
"2018-12-1
0T15:48:53
Z"
"revision"
:
"
63e7dacf8d4e59dce05131561d313065cbeda586
"
,
"revisionTime"
:
"2018-12-1
2T05:36:44
Z"
},
{
"checksumSHA1"
:
"SmYeIK/fIYXNu8IKxD6HOVQVTuU="
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录