@@ -575,6 +575,7 @@ func TestDecodeSingleLine(t *testing.T) {
575575 CapturedPsID : 1 ,
576576 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("select \" ?\" " )... ),
577577 StmtType : "Select" ,
578+ PreparedStmt : "select \" ?\" " ,
578579 Success : true ,
579580 },
580581 {
@@ -587,6 +588,8 @@ func TestDecodeSingleLine(t *testing.T) {
587588 CapturedPsID : 1 ,
588589 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }... ),
589590 StmtType : "Select" ,
591+ PreparedStmt : "select \" ?\" " ,
592+ Params : []any {int64 (1 )},
590593 Success : true ,
591594 },
592595 {
@@ -599,6 +602,7 @@ func TestDecodeSingleLine(t *testing.T) {
599602 CapturedPsID : 1 ,
600603 Payload : append ([]byte {pnet .ComStmtClose .Byte ()}, []byte {1 , 0 , 0 , 0 }... ),
601604 StmtType : "Select" ,
605+ PreparedStmt : "select \" ?\" " ,
602606 Success : true ,
603607 },
604608 },
@@ -780,6 +784,7 @@ func TestDecodeMultiLines(t *testing.T) {
780784 CapturedPsID : 1 ,
781785 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("select \" ?\" " )... ),
782786 StmtType : "Select" ,
787+ PreparedStmt : "select \" ?\" " ,
783788 Line : 1 ,
784789 Success : true ,
785790 },
@@ -793,6 +798,8 @@ func TestDecodeMultiLines(t *testing.T) {
793798 CapturedPsID : 1 ,
794799 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }... ),
795800 StmtType : "Select" ,
801+ PreparedStmt : "select \" ?\" " ,
802+ Params : []any {int64 (1 )},
796803 Line : 1 ,
797804 Success : true ,
798805 },
@@ -806,6 +813,7 @@ func TestDecodeMultiLines(t *testing.T) {
806813 CapturedPsID : 1 ,
807814 Payload : append ([]byte {pnet .ComStmtClose .Byte ()}, []byte {1 , 0 , 0 , 0 }... ),
808815 StmtType : "Select" ,
816+ PreparedStmt : "select \" ?\" " ,
809817 Line : 1 ,
810818 Success : true ,
811819 },
@@ -819,6 +827,7 @@ func TestDecodeMultiLines(t *testing.T) {
819827 CapturedPsID : 2 ,
820828 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("select \" ?\" " )... ),
821829 StmtType : "Select" ,
830+ PreparedStmt : "select \" ?\" " ,
822831 Line : 2 ,
823832 Success : true ,
824833 },
@@ -832,6 +841,8 @@ func TestDecodeMultiLines(t *testing.T) {
832841 CapturedPsID : 2 ,
833842 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {2 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }... ),
834843 StmtType : "Select" ,
844+ PreparedStmt : "select \" ?\" " ,
845+ Params : []any {int64 (1 )},
835846 Line : 2 ,
836847 Success : true ,
837848 },
@@ -845,6 +856,7 @@ func TestDecodeMultiLines(t *testing.T) {
845856 CapturedPsID : 2 ,
846857 Payload : append ([]byte {pnet .ComStmtClose .Byte ()}, []byte {2 , 0 , 0 , 0 }... ),
847858 StmtType : "Select" ,
859+ PreparedStmt : "select \" ?\" " ,
848860 Line : 2 ,
849861 Success : true ,
850862 },
@@ -1003,6 +1015,7 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
10031015 CapturedPsID : 1 ,
10041016 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("SELECT c FROM sbtest1 WHERE id=?" )... ),
10051017 StmtType : "Select" ,
1018+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
10061019 Line : 1 ,
10071020 Success : true ,
10081021 },
@@ -1016,6 +1029,8 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
10161029 CapturedPsID : 1 ,
10171030 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 0xe8 , 0xaf , 0x07 , 0 , 0 , 0 , 0 , 0 }... ),
10181031 StmtType : "Select" ,
1032+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
1033+ Params : []any {int64 (503784 )},
10191034 Line : 1 ,
10201035 Success : true ,
10211036 },
@@ -1050,6 +1065,7 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
10501065 CapturedPsID : 1 ,
10511066 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("SELECT c FROM sbtest1 WHERE id=?" )... ),
10521067 StmtType : "Select" ,
1068+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
10531069 Line : 1 ,
10541070 Success : true ,
10551071 },
@@ -1063,6 +1079,8 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
10631079 CapturedPsID : 1 ,
10641080 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 0xe8 , 0xaf , 0x07 , 0 , 0 , 0 , 0 , 0 }... ),
10651081 StmtType : "Select" ,
1082+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
1083+ Params : []any {int64 (503784 )},
10661084 Line : 1 ,
10671085 Success : true ,
10681086 },
@@ -1076,6 +1094,8 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
10761094 CapturedPsID : 1 ,
10771095 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 0xf9 , 0xe4 , 0x01 , 0 , 0 , 0 , 0 , 0 }... ),
10781096 StmtType : "Select" ,
1097+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
1098+ Params : []any {int64 (124153 )},
10791099 Line : 2 ,
10801100 Success : true ,
10811101 },
@@ -1110,6 +1130,7 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
11101130 CapturedPsID : 1 ,
11111131 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("SELECT c FROM sbtest1 WHERE id=?" )... ),
11121132 StmtType : "Select" ,
1133+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
11131134 Line : 1 ,
11141135 Success : true ,
11151136 },
@@ -1123,6 +1144,8 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
11231144 CapturedPsID : 1 ,
11241145 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 0xe8 , 0xaf , 0x07 , 0 , 0 , 0 , 0 , 0 }... ),
11251146 StmtType : "Select" ,
1147+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
1148+ Params : []any {int64 (503784 )},
11261149 Line : 1 ,
11271150 Success : true ,
11281151 },
@@ -1149,6 +1172,7 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
11491172 CapturedPsID : 1 ,
11501173 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("SELECT c FROM sbtest1 WHERE id=?" )... ),
11511174 StmtType : "Select" ,
1175+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
11521176 Line : 3 ,
11531177 Success : true ,
11541178 },
@@ -1162,6 +1186,8 @@ func TestDecodeAuditLogInDirectedMode(t *testing.T) {
11621186 CapturedPsID : 1 ,
11631187 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 0xf9 , 0xe4 , 0x01 , 0 , 0 , 0 , 0 , 0 }... ),
11641188 StmtType : "Select" ,
1189+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
1190+ Params : []any {int64 (124153 )},
11651191 Line : 3 ,
11661192 Success : true ,
11671193 },
@@ -1212,6 +1238,7 @@ func TestDecodeAuditLogInNeverMode(t *testing.T) {
12121238 CapturedPsID : 1 ,
12131239 Payload : append ([]byte {pnet .ComStmtPrepare .Byte ()}, []byte ("SELECT c FROM sbtest1 WHERE id=?" )... ),
12141240 StmtType : "Select" ,
1241+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
12151242 Line : 1 ,
12161243 Success : true ,
12171244 },
@@ -1225,6 +1252,8 @@ func TestDecodeAuditLogInNeverMode(t *testing.T) {
12251252 CapturedPsID : 1 ,
12261253 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 0xe8 , 0xaf , 0x07 , 0 , 0 , 0 , 0 , 0 }... ),
12271254 StmtType : "Select" ,
1255+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
1256+ Params : []any {int64 (503784 )},
12281257 Line : 1 ,
12291258 Success : true ,
12301259 },
@@ -1238,6 +1267,8 @@ func TestDecodeAuditLogInNeverMode(t *testing.T) {
12381267 CapturedPsID : 1 ,
12391268 Payload : append ([]byte {pnet .ComStmtExecute .Byte ()}, []byte {1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 8 , 0 , 0xe8 , 0xaf , 0x07 , 0 , 0 , 0 , 0 , 0 }... ),
12401269 StmtType : "Select" ,
1270+ PreparedStmt : "SELECT c FROM sbtest1 WHERE id=?" ,
1271+ Params : []any {int64 (503784 )},
12411272 Line : 2 ,
12421273 Success : true ,
12431274 },
0 commit comments