Topic on Project:Support desk

update.php 1.39 removes charset of several columns

5
2003:C2:3F21:FD00:D4F9:F84A:F6CC:F3CA (talkcontribs)

Howdy,

when upgrading from 1.35 to 1.39, the script update.php changes the character set and collation of several database columns e.g. page_title to NULL. Why? It shouldn't. Never. N-e-v-e-r.

How can I avoid that? There is, of course, a reason to have a certain character set and collation.

2003:C2:3F21:FD00:C0D4:B817:C0F2:9DF9 (talkcontribs)

Ladies and gentlemen,

before 1.39 the page_title looked like this:

mysql> select page_id, page_title from page limit 3;

+---------+------------+

| page_id | page_title |

+---------+------------+

|   42473 | 'Issch'aa' |

|   19481 | 'nan-Si    |

|   73864 | 'Tigonos   |

+---------+------------+

3 rows in set (0,00 sec)


now, update.php changes the column to varbinary NULL and the result is:

mysql> select page_id, page_title from page limit 3;

+---------+------------------------+

| page_id | page_title             |

+---------+------------------------+

|   42473 | 0x27497373636827616127 |

|   73864 | 0x275469676F6E6F73     |

|   19481 | 0x276E616E2D5369       |

+---------+------------------------+

3 rows in set (0,00 sec)


The result is really a little bit annoying. Several db columns are modified that way. WHY do you do that and HOW can I avoid it?

79.224.210.84 (talkcontribs)

Is there anybody out there?

TheDJ (talkcontribs)

As you can see here: Manual:Page table, MediaWiki has long since used binary for strings. It does this because traditionally MediaWiki supported more locales than the databases did and because support for locales across the different db engines was very inconsistent. It pretty much ignores the locale of the tables fields, and only slightly cares about the default locale of the database (mostly because some 3rd party extensions don't follow conventions).

2003:C2:3F21:FD00:38C4:5C36:EBC:90FA (talkcontribs)

Would be great if Mediawiki *ignores* the locale of the tables fields. But it does not. The database script deliberately *modifies* the locale from human readable to binary. *Modifying* is exactly the opposite of what you state it does.


I see it was my fault thinking that Mediawiki developers do care about their users. Just as any closed circles they tend to drift away to outer space. What a pity.

Reply to "update.php 1.39 removes charset of several columns"