`--initialize-sql-file` can not create audit log filter by `SELECT`
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
1. Prepare a `init.sql`
```sql
SELECT audit_log_create_filter('all', '{}');
SELECT audit_log_create_rule('test@%', 'all');
```
2. bootstrap an **enterprise** vertion tidb with option `--initialize-sql-file=./init.sql`
### 2. What did you expect to see? (Required)
`select * from mysql.audit_log_filters` can get a filter
### 3. What did you see instead (Required)
`select * from mysql.audit_log_filters` returns empty result
### 4. What is your TiDB version? (Required)
master
### Workaround
Use `DO` instead of `SELECT` can work:
```sql
DO audit_log_create_filter('all', '{}');
DO audit_log_create_rule('test@%', 'all');
```
Contributor guide
Assessment
This issue has not been assessed yet.