Closed
Bug 480001
Opened 16 years ago
Closed 16 years ago
[MYSQL] max_allowed_packet is no longer allowed to be modified in session scope, and throws an error if you try in 5.1.31 and newer
Categories
(Bugzilla :: Database, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: justdave, Assigned: mkanat)
References
()
Details
Attachments
(2 files, 1 obsolete file)
8.38 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
8.47 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
See the attached bug report. The SQL "SET SESSION max_allowed_packet = xxxx" causes MySQL 5.1.31 and newer to throw an error. Apparently it never worked, and rather than mislead people into thinking it did, they decided to make it throw an error so you'd know it didn't work.
Reporter | ||
Comment 1•16 years ago
|
||
Bugzilla/DB/Mysql.pm:113: $self->do("SET SESSION max_allowed_packet = $max_allowed_packet");
Bugzilla/Install/DB.pm:3015: $dbh->do('SET SESSION max_allowed_packet = 128000000');
![]() |
||
Comment 2•16 years ago
|
||
Yeah, this variable is now read-only, unless set globally. Bugzilla 3.0 and older are not affected, but Bugzilla 3.2 is and cannot work with MySQL 5.1.31 and newer anymore.
Assignee | ||
Comment 3•16 years ago
|
||
Wow, way to go MySQL. For reference, the docs say that this variable CAN be set:
http://dev.mysql.com/doc/refman/5.1/en/dynamic-system-variables.html
But the bug linked does indeed say that it can't.
This is a major issue because it means that bugs_fulltext may contain truncated data without MySQL having ever thrown a warning about it. We'll probably have to include a contrib/rebuild-fulltext.pl script for people now if they ever ran 3.2.(0,1,2).
Assignee: database → mkanat
Is there any workaround for this? I'm doing a new installation and I'm running into this.
The workaround i'm using right now is to comment the 2 lines that Dave Miller point out :
Bugzilla/DB/Mysql.pm:113: $self->do("SET SESSION max_allowed_packet =
$max_allowed_packet");
Bugzilla/Install/DB.pm:3015: $dbh->do('SET SESSION
max_allowed_packet = 128000000');
and then re-run chek_setup.pl.
It's working for me, but there might be some unpredictible side effects!
Assignee | ||
Comment 6•16 years ago
|
||
Okay, as suggested by LpSolit on IRC, I warn in checksetup now about what size max_allowed_packet needs to be. I also added back some docs about it.
Attachment #364215 -
Flags: review?(bugzilla)
Assignee | ||
Updated•16 years ago
|
Attachment #364215 -
Flags: review?(bugzilla) → review?(LpSolit)
Assignee | ||
Comment 7•16 years ago
|
||
Okay, we also check the setting when people try to set maxattachmentsize now, too.
Attachment #364215 -
Attachment is obsolete: true
Attachment #364226 -
Flags: review?(LpSolit)
Attachment #364215 -
Flags: review?(LpSolit)
![]() |
||
Updated•16 years ago
|
Attachment #364226 -
Flags: review?(LpSolit) → review+
![]() |
||
Comment 8•16 years ago
|
||
Comment on attachment 364226 [details] [diff] [review]
v2
Looks good, works fine. But your patch doesn't apply cleanly on the 3.2 branch. r=LpSolit for tip.
![]() |
||
Comment 9•16 years ago
|
||
Holding approval till the backport is ready for checkin.
Status: NEW → ASSIGNED
Flags: approval?
Assignee | ||
Comment 10•16 years ago
|
||
Here's the 3.2 backport. Same code, just the patch didn't apply to 3.2 because the surrounding code was different.
Attachment #364818 -
Flags: review?(LpSolit)
![]() |
||
Comment 11•16 years ago
|
||
Comment on attachment 364818 [details] [diff] [review]
v2 - 3.2
Looks good. r=LpSolit
Attachment #364818 -
Flags: review?(LpSolit) → review+
Assignee | ||
Updated•16 years ago
|
Flags: approval?
Flags: approval3.2+
Flags: approval+
Assignee | ||
Comment 12•16 years ago
|
||
tip:
Checking in Bugzilla/Config/Attachment.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Attachment.pm,v <-- Attachment.pm
new revision: 1.7; previous revision: 1.6
done
Checking in Bugzilla/Config/Common.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm,v <-- Common.pm
new revision: 1.25; previous revision: 1.24
done
Checking in Bugzilla/DB/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm
new revision: 1.72; previous revision: 1.71
done
Checking in Bugzilla/Install/DB.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/DB.pm,v <-- DB.pm
new revision: 1.60; previous revision: 1.59
done
Checking in docs/en/xml/installation.xml;
/cvsroot/mozilla/webtools/bugzilla/docs/en/xml/installation.xml,v <-- installation.xml
new revision: 1.165; previous revision: 1.164
done
Checking in template/en/default/setup/strings.txt.pl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/setup/strings.txt.pl,v <-- strings.txt.pl
new revision: 1.11; previous revision: 1.10
done
3.2:
Checking in Bugzilla/Config/Attachment.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Attachment.pm,v <-- Attachment.pm
new revision: 1.3.4.3; previous revision: 1.3.4.2
done
Checking in Bugzilla/Config/Common.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm,v <-- Common.pm
new revision: 1.21.2.1; previous revision: 1.21
done
Checking in Bugzilla/DB/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm
new revision: 1.60.2.8; previous revision: 1.60.2.7
done
Checking in Bugzilla/Install/DB.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/DB.pm,v <-- DB.pm
new revision: 1.51.2.3; previous revision: 1.51.2.2
done
Checking in docs/en/xml/installation.xml;
/cvsroot/mozilla/webtools/bugzilla/docs/en/xml/installation.xml,v <-- installation.xml
new revision: 1.157.2.7; previous revision: 1.157.2.6
done
Checking in template/en/default/setup/strings.txt.pl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/setup/strings.txt.pl,v <-- strings.txt.pl
new revision: 1.8.2.1; previous revision: 1.8
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 14•16 years ago
|
||
FYI, I got the same issue on windows with Mysql 5.0.84, so it looks like they back-ported this "feature".
You need to log in
before you can comment on or make changes to this bug.
Description
•