zoukankan      html  css  js  c++  java
  • Go prepare statment超过mysql最大数

    mysql_stmt_prepare failed! error(1461)Can't create more than max_prepared_stmt_count statements (current value: 16382)



    给出的回复如下:

    max_prepared_stmt_count参数限制了同一时间在mysqld上所有session中prepared 语句的上限。
    它的取值范围为“0 - 1048576”,默认为16382。
    mysql对于超出max_prepared_stmt_count的prepare语句就会报1461的错误。
     
    调试语句:

    mysql> show global status like '%stmt%';

    +----------------------------+--------+

    | Variable_name              | Value  |

    +----------------------------+--------+

    | Binlog_stmt_cache_disk_use | 0      |

    | Binlog_stmt_cache_use      | 0      |

    | Com_stmt_close             | 142593 |

    | Com_stmt_execute           | 170302 |

    | Com_stmt_fetch             | 0      |

    | Com_stmt_prepare           | 157761 |

    | Com_stmt_reprepare         | 0      |

    | Com_stmt_reset             | 0      |

    | Com_stmt_send_long_data    | 0      |

    | Prepared_stmt_count        | 4      |

    +----------------------------+--------+

    10 rows in set (0.06 sec)

    mysql> set global max_prepared_stmt_count=124000;
    Query OK, 0 rows affected (0.00 sec)

     

  • 相关阅读:
    Eletron 打开文件夹,截图
    nodejs 与 json
    drupal sql 源码解析query.inc 文件
    The maximum column size is 767 bytes (Mysql)
    php 过滤emoji
    Mysql delete操作
    Mysql update 一个表中自己的数据
    form 表单排序
    jquery parents用法
    MYSQL数据库重点:流程控制语句
  • 原文地址:https://www.cnblogs.com/studyNT/p/5060624.html
Copyright © 2011-2022 走看看