一个简单的选择后,Mysql关闭30k COM_FIELD_LIST警告的连接

时间:2018-02-23 08:16:16

标签: mysql

基本上,问题出在标题中,产生这种情况的确切顺序如下。出于某种原因,带有LIMIT 2的SELECT很好,但带有LIMIT 1的SELECT会产生多个警告并关闭连接。

警告文本在阅读之后,在我的情况下也没有任何意义 - 毕竟,我并没有尝试调用某些PHP函数,我正在进行简单的数据库调用。

感谢所有能帮助我做出正面或反面的人。

from twilio.rest import Client

account_sid = "~~~"
auth_token = "~~~"
client = Client(account_sid, auth_token)

call = client.messages.create(
    to="+821012341234",# korea phone number : 010-1234-1234
    from_="+18442414836", # United States phone number :(844) 241-4836
    body="    this is message text contents    "
)

1 个答案:

答案 0 :(得分:0)

mysql> SELECT `id` FROM `sthng` WHERE `blaid`='126435217';
Empty set, 30208 warnings (0.00 sec)
mysql> show warnings;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> show warnings;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    892166
Current database: mine

+---------+------+------------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                                |
+---------+------+------------------------------------------------------------------------------------------------------------------------+
| Warning | 1287 | 'COM_FIELD_LIST' is deprecated and will be removed in a future release. Please use SHOW COLUMNS FROM statement instead |

由于某种原因,它可以按预期工作:

SELECT `id` FROM `sthng` WHERE `blaid`=126435217;
+---------+
| id      |
+---------+
| 3204457 |
+---------+
1 row in set (0.00 sec)

由于某种原因,我仅在mysql控制台客户端上遇到此问题。这个问题最近弹出,我确实有5.7.23-log版本。应该打开一个错误报告。