openresty / lua-resty-mysql

Nonblocking Lua MySQL driver library for ngx_lua or OpenResty
708 stars 236 forks source link

mysql查询是否串行 #130

Open moonwith opened 3 years ago

moonwith commented 3 years ago

mysql驱动的实现方式是构造消息包通过nio发送来达到不阻塞的目的。那就有个问题,如果做两次查询,能否确保先做的查询必然先被mysql服务端处理完毕,并且先返回给客户端呢?

moonwith commented 3 years ago

如果无法确保,那客户端只能通过队列来自己保证了么