forked from keploy/keploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: sync mysql changes acc to latest code (keploy#1809)
* refactor: sync mysql changes acc to latest code Signed-off-by: Sarthak160 <[email protected]> * Fixed lint issues Signed-off-by: Chinmay <[email protected]> * fix: Added an argument to DecodeMySQL function to find out the mode Signed-off-by: Chinmay <[email protected]> * refactor: remove set mocks function form the memdb interface Signed-off-by: Sarthak160 <[email protected]> --------- Signed-off-by: Sarthak160 <[email protected]> Signed-off-by: Chinmay <[email protected]> Co-authored-by: Chinmay <[email protected]>
- Loading branch information
1 parent
b9673e3
commit b1efc78
Showing
30 changed files
with
665 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
package mysql | ||
|
||
type ComInitDbPacket struct { | ||
Status byte `json:"status,omitempty" yaml:"status,omitempty"` | ||
DbName string `json:"db_name,omitempty" yaml:"db_name,omitempty"` | ||
Status byte | ||
DbName string | ||
} | ||
|
||
//func decodeComInitDb(data []byte) (*ComInitDbPacket, error) { | ||
// if len(data) < 2 { | ||
// return nil, errors.New("data too short for COM_INIT_DB") | ||
// } | ||
// status := data[0] | ||
// | ||
// // The rest of the packet after the command byte is the database name | ||
// dbName := string(data[1:]) | ||
// return &ComInitDbPacket{ | ||
// Status: status, | ||
// DbName: dbName, | ||
// }, nil | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.