Bug #46342 Can't create more than max_prepared_stmt_count statements (current value: 16384)
Submitted: 23 Jul 2009 7:57 Modified: 23 Aug 2009 8:55
Reporter: Mohammad Lahlouh Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.45-log OS:Linux (x86_64)
Assigned to: CPU Architecture:Any
Tags: max_prepared_stmt_count, prepared_stmt_count

[23 Jul 2009 7:57] Mohammad Lahlouh
Description:
this is error message appear from mysql server 

Query: CALL SP_GetUserJokesByType(0 , 10 , 'aos911' , 5)
Message: SQLSTATE[42000]: Syntax error or access violation: 1461 Can't create more than max_prepared_stmt_count statements (current value: 16384)
Line #: 143
DB-Name: db
DB-Host: xxx.xxx.xxx.136
Package-Name: xxxxx
User-Name: xxxx
---------------------------------------------------
Remote-Address: xxx.xxx.xxx.17
Server-Address: xxx.xxx.xxx.133
Server-Name: website.com
Request-URI: /memberInfo/view/user/aos911/action/all/typeID/5/
Full-URL: website.com/memberInfo/view/user/aos911/action/all/typeID/5/
Script-Name: /index.php
Request-Time: 1248332324
Time: 2009-07-23 09:58:44

===================================================================

mysql> show global status like '%pre%';
+---------------------+-----------+
| Variable_name       | Value     |
+---------------------+-----------+
| Com_preload_keys    | 0         | 
| Com_prepare_sql     | 362857    | 
| Com_stmt_prepare    | 1397849   | 
| Com_xa_prepare      | 0         | 
| Compression         | OFF       | 
| Handler_prepare     | 394       | 
| Handler_read_prev   | 402138993 | 
| Prepared_stmt_count | 6         | 
+---------------------+-----------+
8 rows in set (0.00 sec)

mysql> show global variables like 'max_pr%';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| max_prepared_stmt_count | 16384 | 
+-------------------------+-------+
1 row in set (0.00 sec)

How to repeat:

sometimes, Even i've Prepared_stmt_count not exceeded 5500
[23 Jul 2009 8:55] Sveta Smirnova
Thank you for the report.

But version 5.0.45 is old. Additionally I can not repeat described behavior with current development sources. Please try current version 5.0.83 and inform us if problem still exists.
[23 Aug 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".