Note: There are a few cases of duplicates in user autocompletion which are being worked on.

[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

RESOLVED FIXED in Bugzilla 3.2

Status

()

Bugzilla
Database
--
major
RESOLVED FIXED
9 years ago
7 years ago

People

(Reporter: justdave, Assigned: Max Kanat-Alexander)

Tracking

3.2.1
Bugzilla 3.2
Dependency tree / graph
Bug Flags:
approval +
blocking3.4 +
approval3.2 +
blocking3.2.3 +

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

v2
8.38 KB, patch
Frédéric Buclin
: review+
Details | Diff | Splinter Review
8.47 KB, patch
Frédéric Buclin
: 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.
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

9 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.
Severity: normal → major
Depends on: 442882, 141951
Flags: blocking3.4+
Flags: blocking3.2.3+
Target Milestone: --- → Bugzilla 3.2
(Assignee)

Comment 3

9 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

Comment 4

9 years ago
Is there any workaround for this?  I'm doing a new installation and I'm running into this.

Comment 5

9 years ago
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

9 years ago
Created attachment 364215 [details] [diff] [review]
v1

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

9 years ago
Attachment #364215 - Flags: review?(bugzilla) → review?(LpSolit)
(Assignee)

Comment 7

9 years ago
Created attachment 364226 [details] [diff] [review]
v2

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

9 years ago
Attachment #364226 - Flags: review?(LpSolit) → review+

Comment 8

9 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

9 years ago
Holding approval till the backport is ready for checkin.
Status: NEW → ASSIGNED
Flags: approval?
(Assignee)

Comment 10

9 years ago
Created attachment 364818 [details] [diff] [review]
v2 - 3.2

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

9 years ago
Comment on attachment 364818 [details] [diff] [review]
v2 - 3.2

Looks good. r=LpSolit
Attachment #364818 - Flags: review?(LpSolit) → review+
(Assignee)

Updated

9 years ago
Flags: approval?
Flags: approval3.2+
Flags: approval+
(Assignee)

Comment 12

9 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
Last Resolved: 9 years ago
Resolution: --- → FIXED
Duplicate of this bug: 478698

Comment 14

8 years ago
FYI, I got the same issue on windows with Mysql 5.0.84, so it looks like they back-ported this "feature".

Updated

7 years ago
Duplicate of this bug: 561322
You need to log in before you can comment on or make changes to this bug.