How to set a timeout for MySQL query using C API

前端 未结 4 1485
执笔经年
执笔经年 2021-01-02 15:33

I know there are lots of similar questions here, also there are lots of results, when I google it, but none of them answers my question. I read this, this, this and this but

4条回答
  •  孤街浪徒
    2021-01-02 16:14

    I have never tryed to do that, but i've been reading and i think that could means that MYSQL_OPT_WRITE_TIMEOUT and MYSQL_OPT_READ_TIMEOUT are only for windows prior MySQL version 5.0.25 but now sould be working for every TCP/IP connection. Take a look here

    Regards

    EDIT: I would try to update my mysql server to a newer version and try if it works.

提交回复
热议问题