3 # Read the contents of a file and store it in a mysqltest variable.
7 # --let $read_from_file= <FILENAME>
8 # --source include/read_file_to_var.inc
14 # The file to read from.
17 # The result is stored in the mysqltest variable $result.
19 --let $include_filename= read_file_to_var.inc
20 --source include/begin_include_file.inc
22 --let $_rftv_secure_file_priv= `SELECT @@secure_file_priv`
23 if ($_rftv_secur_file_priv)
25 --let $_rftv_suffix= `SELECT UUID()`
26 --let $_rftv_tmp_file= $_rftv_secure_file_priv/_rftv_$_rftv_suffix
28 --copy_file $input_file $_rftv_tmp_file
29 --let $result= `SELECT LOAD_FILE(
'$_rftv_tmp_file')`
30 --remove_file $_rftv_tmp_file
32 if (!$_rftv_secur_file_priv)
34 --let $result= `SELECT LOAD_FILE(
'$input_file')`
37 --let $include_filename= read_file_to_var.inc
38 --source include/end_include_file.inc