Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
b4005dc7
Commit
b4005dc7
authored
Nov 20, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 361140: Upgrades from versions with enums fail UTF-8 conversion
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave
parent
f8238723
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Mysql.pm
Bugzilla/DB/Mysql.pm
+6
-1
No files found.
Bugzilla/DB/Mysql.pm
View file @
b4005dc7
...
@@ -576,6 +576,10 @@ EOT
...
@@ -576,6 +576,10 @@ EOT
my
$info_sth
=
$self
->
prepare
(
"SHOW FULL COLUMNS FROM $table"
);
my
$info_sth
=
$self
->
prepare
(
"SHOW FULL COLUMNS FROM $table"
);
$info_sth
->
execute
();
$info_sth
->
execute
();
while
(
my
$column
=
$info_sth
->
fetchrow_hashref
)
{
while
(
my
$column
=
$info_sth
->
fetchrow_hashref
)
{
# Our conversion code doesn't work on enum fields, but they
# all go away later in checksetup anyway.
next
if
$column
->
{
Type
}
=~
/enum/i
;
# If this particular column isn't stored in utf-8
# If this particular column isn't stored in utf-8
if
(
$column
->
{
Collation
}
if
(
$column
->
{
Collation
}
&&
$column
->
{
Collation
}
ne
'NULL'
&&
$column
->
{
Collation
}
ne
'NULL'
...
@@ -617,8 +621,9 @@ EOT
...
@@ -617,8 +621,9 @@ EOT
$self
->
do
(
"ALTER TABLE $table CHANGE COLUMN $name $name
$self
->
do
(
"ALTER TABLE $table CHANGE COLUMN $name $name
$utf8"
);
$utf8"
);
}
}
$self
->
do
(
"ALTER TABLE $table DEFAULT CHARACTER SET utf8"
);
}
}
$self
->
do
(
"ALTER TABLE $table DEFAULT CHARACTER SET utf8"
);
}
# foreach my $table (@tables)
}
# foreach my $table (@tables)
my
$db_name
=
Bugzilla
->
localconfig
->
{
db_name
};
my
$db_name
=
Bugzilla
->
localconfig
->
{
db_name
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment