Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当SQL语句太长的时候,sniffer会异常 #16

Open
chao opened this issue Dec 5, 2018 · 3 comments
Open

当SQL语句太长的时候,sniffer会异常 #16

chao opened this issue Dec 5, 2018 · 3 comments

Comments

@chao
Copy link

chao commented Dec 5, 2018

例如,捕捉到一个有1000个参数的Insert的SQL语句的时候出错:

, @p906, @p907, @p908, @p909, @p910, @p911, @p912, @p913, @p914, @p915, @p916, @p917, @p918, @p919, @p920, @p921, @p922, @p923, @p924, @p925, @p926, @p927, @p928, @p929, @p930, @p931, @p932, @p933, @p934, @p935, @p936, @p937, @p938, @p939, @p940, @p941, @p942, @p943, @p944, @p945, @p946, @p947, @p948, @p949, @p950, @p951, @p952, @p953, @p954, @p955, @p956, @p957, @p958, @p959, @p960, @p961, @p962, @p963, @p964, @p965, @p966, @p967, @p968, @p969, @p970, @p971, @p972, @p973, @p974, @p975, @p976, @p977, @p978, @p979, @p980, @p981, @p982, @p983, @p984, @p985, @p986, @p987, @p988, @p989, @p990, @p991, @p992, @p993, @p994, @p995, @p996, @p997, @p998, @p999;
Drop stm id[4];

panic: runtime error: index out of range

goroutine 1411 [running]:
encoding/binary.binary.littleEndian.Uint32(...)
	/usr/local/go/src/encoding/binary/binary.go:63
github.com/40t/go-sniffer/plugSrc/mysql/build.LengthBinary(0xc4206d6c01, 0x32, 0x5ff, 0x9b47d8, 0xc420044c00)
	/root/go/src/github.com/40t/go-sniffer/plugSrc/mysql/build/util.go:41 +0xc2
github.com/40t/go-sniffer/plugSrc/mysql/build.(*stream).resolveServerPacket(0xc4200571c0, 0xc4206d6c00, 0x33, 0x600, 0x1)
	/root/go/src/github.com/40t/go-sniffer/plugSrc/mysql/build/entry.go:230 +0x2fc
github.com/40t/go-sniffer/plugSrc/mysql/build.(*stream).resolve(0xc4200571c0)
	/root/go/src/github.com/40t/go-sniffer/plugSrc/mysql/build/entry.go:194 +0xc0
created by github.com/40t/go-sniffer/plugSrc/mysql/build.(*Mysql).ResolveStream
	/root/go/src/github.com/40t/go-sniffer/plugSrc/mysql/build/entry.go:71 +0x3b8
@cctse
Copy link

cctse commented Jan 7, 2019

go-sniffer
查询语句,数据并没多少

@40t
Copy link
Owner

40t commented Jun 6, 2019

代码 pull 一下,麻烦check一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@chao @40t @cctse and others