在使用sysbench进行基准测试的时候遇到下面的错误提示
(last message repeated 3 times)
FATAL: MySQL error: 1461 “Can’t create more than max_prepared_stmt_count statements (current value: 16382)”
FATAL: `thread_init’ function failed: /usr/sysbench/share/sysbench/oltp_common.lua:284: SQL API error
mysql> show variables like '%stmt%';
+----------------------------+----------------------+
| Variable_name | Value |
+----------------------------+----------------------+
| binlog_stmt_cache_size | 16777216 |
| max_binlog_stmt_cache_size | 18446744073709547520 |
| max_prepared_stmt_count | 16382 |
+----------------------------+----------------------
这个参数限制了预编译语句的的个数,默认是16382,高并发的情况下需要调高这个值。