Skip to content

Improved LOAD INFILE documentation #105

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

Merged
merged 2 commits into from
Jul 1, 2013
Merged

Improved LOAD INFILE documentation #105

merged 2 commits into from
Jul 1, 2013

Conversation

julienschmidt
Copy link
Member

No description provided.

@ghost ghost assigned julienschmidt Jul 1, 2013
// ...
//
func RegisterLocalFile(filePath string) {
if fileRegister == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be protected by sync.Once instead of the nil check. Otherwise, it's a very improbable race condition if someone blatantly misuses the driver...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I think sticking with the original concept of initializing this once at start up is the better option. The tls.Confing thing must also be changed.

@julienschmidt
Copy link
Member Author

PTAL; removed the lazy init commit. I'll change the TLS stuff in another PR (and some other related stuff)

// mysql.RegisterReaderHandler("data", func() io.Reader {
// var csvReader io.Reader // Some Reader that returns CSV data
// ... // Open Reader here
// return csvReader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation looks wrong

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops... fixed

@arnehormann
Copy link
Member

LGTM when Travis is green (in a minute or so)

julienschmidt added a commit that referenced this pull request Jul 1, 2013
Improved LOAD INFILE documentation
@julienschmidt julienschmidt merged commit 9bf94d4 into master Jul 1, 2013
@julienschmidt julienschmidt deleted the infile branch July 1, 2013 22:26
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

Successfully merging this pull request may close these issues.

2 participants