-
Notifications
You must be signed in to change notification settings - Fork 20
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
Vinai/load data basic network handling. #54
Conversation
…aner expressions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, couple comments
go/mysql/conn.go
Outdated
c.recycleReadPacket() | ||
query := c.parseComQuery(data) | ||
//if strings.Contains(strings.ToLower(query), "local"){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are you actually going to check this? You have to parse the query, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I move the actual call to go-mysql-server
go/mysql/conn.go
Outdated
|
||
// Write the file to a temporary directory. | ||
// TODO: Get the tmpdir config params from here | ||
err = ioutil.WriteFile(fileName, fileData, 0644) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be more than one packet with file data, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Is the idea here to keep waiting with a timeout or something like that?
go/mysql/conn.go
Outdated
if sequence != c.sequence { | ||
return 0, vterrors.Errorf(vtrpc.Code_INTERNAL, "invalid sequence, expected %v got %v", c.sequence, sequence) | ||
} | ||
//sequence := uint8(header[3]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove this edit. Was having trouble with code earlier in the process...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
go/mysql/conn.go
Outdated
fileData, err = c.readEphemeralPacket(); | ||
} | ||
|
||
if len(fileData) != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this is now impossible due to the above loop
Basic steps for packet management. Have text with files up to 1gb.
Definitely some more work to be done here in the future. Is it optimal to write everything to a file or can we do something better? Regardless, I think this is a good enough start for Max to get unblocked while I continue to build more functionality.