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

Mysql Worker panic when bind value is not provided for bind parameter #77

Open
stephanievu opened this issue Sep 26, 2019 · 0 comments
Open

Comments

@stephanievu
Copy link
Contributor

What I Did
The code below does not provide bind value for 2nd bind parameter
String bitustr = "update JAVA2OCC_2 set helix_bit = ?, helix_char = ? where ID = 5";
PreparedStatement pstu2 = oc.prepareStatement(bitustr);
pstu2.setBoolean(1, true);
pstu2.execute();
oc.commit();

What I Expected
I would get error from hera server

What I Saw Instead
Worker panic with error in log
17:10:13.365878 debug: [WORKER 1 cmdprocessor.go:186] process command 86:25 update JAVA2OCC_2 set helix_bit = :helix_bit, helix_char = :helix_char where ID = 5,
17:10:13.365929 verbose: [WORKER 1 cmdprocessor.go:214] Preparing: update JAVA2OCC_2 set helix_bit = ?, helix_char = ? where ID = 5
17:10:13.384405 verbose: [WORKER 1 workerservice.go:199] worker_sp0 : worker read <<< 11:2 helix_bit,
17:10:13.384431 debug: [WORKER 1 cmdprocessor.go:186] process command 11:2 helix_bit,
17:10:13.384458 verbose: [WORKER 1 workerservice.go:199] worker_sp0 : worker read <<< 3:3 ^A,
17:10:13.384472 debug: [WORKER 1 cmdprocessor.go:186] process command 3:3 ^A,
17:10:13.384515 verbose: [WORKER 1 cmdprocessor.go:325] BindValue: :helix_bit : 0 : {^A true}
17:10:13.384536 verbose: [WORKER 1 workerservice.go:199] worker_sp0 : worker read <<< 1:4,
17:10:13.384549 debug: [WORKER 1 cmdprocessor.go:186] process command 1:4,
17:10:13.384570 debug: [WORKER 1 cmdprocessor.go:381] Executing true
17:10:13.384593 debug: [WORKER 1 cmdprocessor.go:382] BINDS [{^A true}]
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
main.(*mysqlAdapter).ProcessError(0x9c4e80, 0x69d280, 0xc42007a9f0, 0xc4200f6980, 0xc4200f6960)
/x/hudson/workspace/occmux_with_go_bin_build64/gomux/src/github.com/paypal/hera/worker/mysqlworker/adapter.go:181 +0x65f
github.com/paypal/hera/worker/shared.(*CmdProcessor).ProcessCmd(0xc4200f6840, 0xc420094280, 0xc42012e150, 0x3)
/x/hudson/workspace/occmux_with_go_bin_build64/gomux/src/github.com/paypal/hera/worker/shared/cmdprocessor.go:401 +0x1c0c
github.com/paypal/hera/worker/shared.runworker(0xc42000e080, 0xc4200f6840, 0xc420085da8)
/x/hudson/workspace/occmux_with_go_bin_build64/gomux/src/github.com/paypal/hera/worker/shared/workerservice.go:204 +0x6f6
github.com/paypal/hera/worker/shared.Start(0x69fa00, 0x9c4e80)
/x/hudson/workspace/occmux_with_go_bin_build64/gomux/src/github.com/paypal/hera/worker/shared/workerservice.go:130 +0x73b
main.main()
/x/hudson/workspace/occmux_with_go_bin_build64/gomux/src/github.com/paypal/hera/worker/mysqlworker/main.go:62 +0x61b
17:10:13.387799 warn: [PROXY workerclient.go:758] workerclient pid= 1421 read error: EOF

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

2 participants
@stephanievu and others