10bet网址
MySQL Internals Manual


26.2.5 Better Protocol Example

Good script with message about switching the connection:

设置@aux = 1;选择@aux“content of @aux is"; --echo # Establish session con1 (user=root) connect (con1,localhost,root,,,,); SELECT @aux AS "content of @aux is";

Protocol of good script:

设置@aux = 1;选择@aux“content of @aux is"; content of @aux is 1 # Establish session con1 (user=root) SELECT @aux AS "content of @aux is"; content of @aux is NULL

This is what the protocol looks like without the comment. The output becomes less clear because there is no indication that the connection has been changed.

设置@aux = 1;选择@aux“content of @aux is"; content of @aux is 1 SELECT @aux AS "content of @aux is"; content of @aux is NULL