Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9fe144e

Browse files
committed
update example
1 parent0e1595e commit9fe144e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎examples/proxy.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ impl PacketHandler for DemoHandler {
8686
if sql.contains("avocado"){
8787
// take over processing of this packet and return an error packet
8888
// to the client
89-
Action::Error(1064,// error code
90-
[0x31,0x32,0x33,0x34,0x35],// sql state
91-
String::from("Proxy rejecting any avocado-related queries"))
89+
Action::Error{
90+
code:1064,// error code
91+
state:[0x31,0x32,0x33,0x34,0x35],// sql state
92+
msg:String::from("Proxy rejecting any avocado-related queries")
93+
}
9294
}else{
9395
// pass the packet to MySQL unmodified
9496
Action::Forward

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp