Test case, demonstrating the issue. Load it, then check content of audit log:
sveta@Thinkie:~/build/ps-5.7/mysql-test$ mysqlmtr -P13001 test <test1.sql foobar t\t sveta@Thinkie:~/build/ps-5.7/mysql-test$ tail var/mysqld.1/data/audit.log ... {"audit_record":{"name":"Query","record":"277737_2016-12-19T21:39:32","timestamp":"2016-12-19T21:47:34 UTC","command_class":"select","connection_id":"169","status":0,"sqltext":"select 't ' as foobar","user":"root[root] @ localhost [127.0.0.1]","host":"localhost","os_user":"","ip":"127.0.0.1","db":"test"}}
Bug is repeatable with Percona Server
Test case, demonstrating the issue. Load it, then check content of audit log:
sveta@Thinkie: ~/build/ ps-5.7/ mysql-test$ mysqlmtr -P13001 test <test1.sql ~/build/ ps-5.7/ mysql-test$ tail var/mysqld. 1/data/ audit.log record" :{"name" :"Query" ,"record" :"277737_ 2016-12- 19T21:39: 32","timestamp" :"2016- 12-19T21: 47:34 UTC","command_ class": "select" ,"connection_ id":"169" ,"status" :0,"sqltext" :"select 't ' as foobar" ,"user" :"root[ root] @ localhost [127.0. 0.1]"," host":" localhost" ,"os_user" :"","ip" :"127.0. 0.1","db" :"test" }}
foobar
t\t
sveta@Thinkie:
...
{"audit_
Bug is repeatable with Percona Server