Before the fix on PHP 8.1 and MariaDB 10.6.7 the script will fail with an error like this:
PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NONBLOCKING' at line 1 in /etc/snmp/mysql:1313
Stack trace:
#0 /etc/snmp/mysql(1313): mysqli_query()
#1 /etc/snmp/mysql(422): run_query()
#2 /etc/snmp/mysql(141): ss_get_mysql_stats()
#3 {main}
thrown in /etc/snmp/mysql on line 1313
https://www.php.net/manual/en/mysqli-driver.report-mode.php As of PHP 8.1.0, the default setting is MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT. Previously, it was MYSQLI_REPORT_OFF.
Before the fix on PHP 8.1 and MariaDB 10.6.7 the script will fail with an error like this: