From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EEd0j-000230-TF for garchives@archives.gentoo.org; Mon, 12 Sep 2005 01:21:30 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j8C1GVPi014160; Mon, 12 Sep 2005 01:16:31 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j8C1EohI014658 for ; Mon, 12 Sep 2005 01:14:50 GMT Received: from zh034160.ppp.dion.ne.jp ([222.3.34.160] helo=opteron246.suzuki-stubbs.home) by smtp.gentoo.org with esmtpa (Exim 4.43) id 1EEcyR-0004Hz-Pq for gentoo-dev@lists.gentoo.org; Mon, 12 Sep 2005 01:19:08 +0000 Received: by opteron246.suzuki-stubbs.home (Postfix, from userid 1000) id C21D3101F3E; Mon, 12 Sep 2005 10:19:18 +0900 (JST) From: Jason Stubbs To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade Date: Mon, 12 Sep 2005 10:19:16 +0900 User-Agent: KMail/1.8.90 References: <43201B96.7050209@gentoo.org> <200509120102.26848.jstubbs@gentoo.org> <43246E96.8060008@gentoo.org> In-Reply-To: <43246E96.8060008@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart30451933.dzfOAz35mV"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200509121019.18512.jstubbs@gentoo.org> X-Archives-Salt: 8aeb2564-1a7e-4df7-84c9-518bb0555709 X-Archives-Hash: 8ce9d951a59d1c5b637f16dc861c62f0 --nextPart30451933.dzfOAz35mV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 12 September 2005 02:51, Francesco R wrote: > Jason Stubbs wrote: > >On Monday 12 September 2005 00:05, Francesco R wrote: > >>http://dev.gentoo.org/~vivo/doc/mysql-update.html > > > >With step 2, you should probably mention the issues that can arise with > >non-ASCII data in char fields. The character set really needs to > > specified in the dump. After the upgrade to 4.1, the default charset of > > the server should be set to something compatible and then the charset > > of the data should be specified to mysql when re-importing the backup. > > --default-character-set=3Dcharset > should be that of my.cnf config file, mysqldump don't permit an atomic > setting of this variable. > The only option for this kind of users is to atomically dump the tables > and then concat the results. > > Importing in mysql-4.1 it's ok, provided your default character set is > utf8. > > Russian, asian whatever person has experience on this please speak now > to correct what affermed here. I had a 4.0 database with strings mostly stored in SJIS that I upgraded to= =20 4.1 a while back. 4.1 then uses the "connection characater set" to do on=20 the fly translation of db encoding to connection encoding. This also=20 happens when importing data so if you haven't got the character set of the= =20 data correct, it'll get corrupted on the way in. Related to the automatic conversion, some fields in the DB contain raw URLs= =20 with un-URL-ified parameters that can be in any character set. These fields= =20 had to be set to BINARY for them to be usable. Another gotcha related to this is that php's mysql support defaults to=20 latin-1 encoding (at least on my current installation) and has no setting=20 for it. The only solution there was to execute "SET NAMES ujis" on every=20 connection. =2D-=20 Jason Stubbs --nextPart30451933.dzfOAz35mV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDJNeWxvWNPsk/ZP4RAqNSAJ9CgkKMaXJt2Ywqw7BxeEHGcu9A3ACgqJxE UTXG+x3p4a4kvzQhVmCuvwk= =d3Pf -----END PGP SIGNATURE----- --nextPart30451933.dzfOAz35mV-- -- gentoo-dev@gentoo.org mailing list