File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ func RegisterLocalFile(filepath string) {
3535 fileRegister [strings .Trim (filepath , `"` )] = true
3636}
3737
38+ // DeregisterLocalFile removes the given filepath from the whitelist.
39+ func DeregisterLocalFile (filepath string ) {
40+ delete (fileRegister , strings .Trim (filepath , `"` ))
41+ }
42+
3843// RegisterReaderHandler registers a handler function which is used
3944// to receive a io.Reader.
4045// The Reader can be used by "LOAD DATA LOCAL INFILE Reader::<name>".
@@ -44,6 +49,12 @@ func RegisterReaderHandler(name string, handler func() io.Reader) {
4449 readerRegister [name ] = handler
4550}
4651
52+ // DeregisterReaderHandler removes the ReaderHandler function with
53+ // the given name from the registry.
54+ func DeregisterReaderHandler (name string ) {
55+ delete (readerRegister , name )
56+ }
57+
4758func (mc * mysqlConn ) handleInFileRequest (name string ) (err error ) {
4859 var rdr io.Reader
4960 data := make ([]byte , 4 + mc .maxWriteSize )
You can’t perform that action at this time.
0 commit comments