MySQL 8.4.2
Source Code Documentation
LOCAL INFILE Request

If the client wants to LOAD DATA from a LOCAL file into the server it sends:

LOAD DATA LOCAL INFILE '<filename>' INTO TABLE <table>;
@ LOCAL
the view WHERE clause is checked, but no underlying views are checked
Definition: mysqlx_crud.proto:365
#define LOAD
Definition: sql_yacc.h:1148
@ INTO
Definition: sql_yacc.h:299
Definition: table.h:1406

The LOCAL keyword triggers the server to set a LOCAL INFILE request packet which asks the client to send the file via a LOCAL INFILE Data response

The client has to send the CLIENT_LOCAL_FILES capability flag.

Returns
LOCAL INFILE Data
Payload
TypeNameDescription
int<1> packet type 0xFB: LOCAL INFILE
string<EOF> filename the path to the file the client shall send
Example
0c 00 00 01 fb 2f 65 74 63 2f 70 61 73 73 77 64 ...../etc/passwd
See also
handle_local_infile, mysql_set_local_infile_handler, net_request_file, Sql_cmd_load_table::execute_inner