Bug #52805 max-allowed_packet confusion
Submitted: 14 Apr 2010 5:53 Modified: 14 Apr 2010 6:18
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.44 OS:Any
Assigned to: CPU Architecture:Any
Tags: qc

[14 Apr 2010 5:53] Peter Laursen
Description:
This report got closed too early: 
http://bugs.mysql.com/bug.php?id=52802

1 )From discussion in old reports (http://bugs.mysql.com/bug.php?id=22891 and http://bugs.mysql.com/bug.php?id=32223) it should not be possible to set max_allowed_packet dynamically (because it causes problems I understand).  

2) documentation states that it can be SET dynamically at both GLOBAL and SESSION level (http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html)

3) In bug52802 the example shows that it can be SET dynamically at GLOBAL level only.  And with reference to discussion in the two oldest reports one can doubt that it works properly

We now have 3 contradicting statements about how this should behave! 

How to repeat:
Read the 3 previous bug reports. 

Suggested fix:
Ask Shane to comment, please.  He probably memorizes details.

I am sorry that I had to create this, but I have no option to reopen a bug report posted by somebody else.
[14 Apr 2010 6:15] MySQL Verification Team
Docs here: http://tinyurl.com/nrrjjw  say
"As of MySQL 5.1.31, the session value of this variable is read only. Before 5.1.31, setting the session value is allowed but has no effect."

But, the table says BOTH for the variable scope in the table.

The reason the max_allowed_packet variable was made to readonly on 
the session level was:
o) it never worked anyway and was ignored,
o) if it was made to work, it could break slaves,
o) if it was made to work, a user might send a 1G packet, and exhaust memory!
[14 Apr 2010 6:18] MySQL Verification Team
Forgot to say, i'm writing to docs to ask them to change 
"Table 5.2. System Variable Summary" and say scope is global for max_allowed_packet:)
[14 Apr 2010 6:18] Sveta Smirnova
Thank you for the report.

See Shane's comment. Regarding to "BOTH" I believe this is correct, because SESSION variable still exists, although read-only.