| Bug #114480 | P_S doesn't record SQL or digest for prepared statements for Non-mysql client | ||
|---|---|---|---|
| Submitted: | 26 Mar 2024 7:36 | Modified: | 26 Mar 2024 12:57 |
| Reporter: | Aristotle Po | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Performance Schema | Severity: | S3 (Non-critical) |
| Version: | 8.0 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | P_S doesn't record SQL or digest for prepared statements for Non-mysql client ap | ||
[26 Mar 2024 7:36]
Aristotle Po
[26 Mar 2024 8:47]
Aristotle Po
############################################
# Enabling general log was able to capture the complete query.
############################################
mysql [localhost:8036] {root} ((none)) > SHOW GLOBAL VARIABLES WHERE Variable_name IN ('general_log', 'general_log_file', 'log_output');
+------------------+---------------------------------------------+
| Variable_name | Value |
+------------------+---------------------------------------------+
| general_log | ON |
| general_log_file | /nfs/sandboxes/my/msb_8_0_36/data/nitro.log |
| log_output | TABLE |
+------------------+---------------------------------------------+
3 rows in set (0.00 sec)
mysql [localhost:8036] {root} ((none)) > TRUNCATE TABLE mysql.general_log;
Query OK, 0 rows affected (0.01 sec)
############################################
# Run same sysbench app :
############################################
shell> sysbench oltp_write_only --threads=1 --time=1 --tables=1 --table-size=10 --db-driver=mysql --mysql-db=test --mysql-user=msandbox --mysql-password=msandbox --mysql-storage-engine=InnoDB --report-interval=5 --mysql-host=127.0.0.1 --mysql-port=8036 run
############################################
# Verify :
############################################
mysql [localhost:8036] {root} ((none)) > SELECT v.* FROM (SELECT thread_id, convert(argument using utf8) argument_txt FROM mysql.general_log WHERE user_host LIKE 'msandbox%' ORDER BY thread_id, event_time) v WHERE v.argument_txt <> '' LIMIT 6;
+-----------+---------------------------------------------------------+
| thread_id | argument_txt |
+-----------+---------------------------------------------------------+
| 18 | COMMIT |
| 18 | UPDATE sbtest1 SET k=k+1 WHERE id=? |
| 18 | UPDATE sbtest1 SET c=? WHERE id=? |
| 18 | DELETE FROM sbtest1 WHERE id=? |
| 18 | INSERT INTO sbtest1 (id, k, c, pad) VALUES (?, ?, ?, ?) |
| 18 | BEGIN |
+-----------+---------------------------------------------------------+
6 rows in set, 1 warning (0.01 sec)
[26 Mar 2024 12:57]
MySQL Verification Team
Hi Mr. Po, Thank you for your bug report. We were able to repeat it fully. This is now a verified bug report.
[15 Jan 20:30]
Edward Gilmore
Posted by developer: Added the following note to the MySQL Server 9.6.0 release notes: Performance Schema did not capture SQL or digests for prepared statements from non-MySQL clients.
