Add Load_FILE function
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
**Is your feature request related to a problem? Please describe:**
```sql
CREATE TABLE t1 (i1 int, i2 int, c1 VARCHAR(256), c2 VARCHAR(256));
INSERT INTO t1 VALUES (101, 202, '-r-', '=raker=');
SELECT * from t1 INTO OUTFILE '/tmp/bug31663.txt' FIELDS TERMINATED BY 'raker';
SELECT LOAD_FILE('/tmp/bug31663.txt');
```
**Describe the feature you'd like:**
```sql
mysql> CREATE TABLE t1 (i1 int, i2 int, c1 VARCHAR(256), c2 VARCHAR(256));
Query OK, 0 rows affected (0.03 sec)
mysql> INSERT INTO t1 VALUES (101, 202, '-r-', '=raker=');
Query OK, 1 row affected (0.00 sec)
mysql> SELECT * from t1 INTO OUTFILE '/tmp/bug31663.txt' FIELDS TERMINATED BY 'raker';
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> SELECT LOAD_FILE('/tmp/bug31663.txt');
+--------------------------------------------------------------------+
| LOAD_FILE('/tmp/bug31663.txt') |
+--------------------------------------------------------------------+
| 0x31303172616B657232303272616B65722D722D72616B65723D72616B65723D0A |
+--------------------------------------------------------------------+
1 row in set (0.00 sec)
```
**Describe alternatives you've considered:**
```sql
mysql> SELECT LOAD_FILE('/tmp/bug31663.txt');
error message 'LOAD_FILE function doesn't support' or if it is a noop function then add comments accordingly
```
**Teachability, Documentation, Adoption, Migration Strategy:**
Contributor guide
Assessment
This issue has not been assessed yet.