File tree 1 file changed +11
-0
lines changed
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) {
35
35
fileRegister [strings .Trim (filepath , `"` )] = true
36
36
}
37
37
38
+ // DeregisterLocalFile removes the given filepath from the whitelist.
39
+ func DeregisterLocalFile (filepath string ) {
40
+ delete (fileRegister , strings .Trim (filepath , `"` ))
41
+ }
42
+
38
43
// RegisterReaderHandler registers a handler function which is used
39
44
// to receive a io.Reader.
40
45
// The Reader can be used by "LOAD DATA LOCAL INFILE Reader::<name>".
@@ -44,6 +49,12 @@ func RegisterReaderHandler(name string, handler func() io.Reader) {
44
49
readerRegister [name ] = handler
45
50
}
46
51
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
+
47
58
func (mc * mysqlConn ) handleInFileRequest (name string ) (err error ) {
48
59
var rdr io.Reader
49
60
data := make ([]byte , 4 + mc .maxWriteSize )
You can’t perform that action at this time.
0 commit comments