On 2021/08/26 13:11, Ted Wynnychenko wrote:
> 
> 
> > -----Original Message-----
> > From: Stuart Henderson [mailto:[email protected]]
> > Sent: Thursday, August 26, 2021 4:05 AM
> > To: [email protected]
> > Cc: [email protected]; [email protected]
> > Subject: Re: MariaDB in current - fatal error with clients "utf8 is not
> > supported by MySQL"
> > 
> > +cc port maintainer and move the thread to ports@; misc@ is not a
> > good place for this
> > 
> 
> Ok, sorry for the slow response.
> I am copying/edit the original post below.
> I hope it will make more sense.
> 
> > From: Brad Smith
> > On 8/25/2021 4:13 PM, Ted Wynnychenko wrote:
> > > I don't know why this happened just now, since I last updated the
> > system
> > > about 3 weeks ago, but today, I was unable to access data on my home
> > server
> > > via a php web application (horde).
> > 
> > So you're were running 10.6.3 3 weeks ago and now are running 10.6.4?
> 
> To clarify, I updated to the current snapshot and all packages about 3-4
> weeks ago.
> I did not notice what version of MariaDB was running before or after the
> update.
> 
> I have no idea what may have changed, but everything was working as expected
> until after a reboot yesterday.
> After the restart, I started getting errors from php applications (in this
> case, Horde).

If you "grep started /var/mysql/*.err" you'll likely have versions and dates.
The port switched to the 10.6 branch here:

date: 2021/07/09 11:35:29;  author: sthen;  state: Exp;  lines: +7 -10;  
commitid: I3rHhQR1jFVVyvVB;
update to mariadb-10.6.3, from Brad

If you updated from a snapshot before then, and then updated packages
but didn't reboot after doing so, you would still have been running
an older version

> > From: Brad Smith
> > > This was working fine this morning, but I then restarted the server,
> > and I
> > > started getting this error:
> > >
> > > utf8 is not supported by MySQL (big5, dec8, cp850, hp8, koi8r,
> > latin1,
> > > latin2, swe7, ascii, ujis, sjis, hebrew, tis620, euckr, koi8u,
> > gb2312,
> > > greek, cp1250, gbk, latin5, armscii8, utf8mb3, ucs2, cp866, keybcs2,
> > macce,
> > > macroman, cp852, latin7, utf8mb4, cp1251, utf16, utf16le, cp1256,
> > cp1257,
> > > utf32, binary, geostd8, cp932, eucjpms)
> > 
> > Where is this error message from? I can't find anything like that in
> > MariaDB.
> 
> The error message is not from MariaDB, it is an error from the php
> application and is sent to both the user on the website and to the system
> logs.
> 
> When I looked at this, what I think I noticed is that the "utf8" character
> set is no longer available in the MariaDB  (Server version:
> 10.6.4-MariaDB-log OpenBSD port: mariadb-server-10.6.4p1v1) version on
> openbsd.
> 
> When I listed the character sets on the system, I saw (in part):
> 
> 
> MariaDB [(none)]> show character set;
> +----------+-----------------------------+---------------------+--------+
> | Charset  | Description                 | Default collation   | Maxlen |
> +----------+-----------------------------+---------------------+--------+
> ...
> | utf8mb3  | UTF-8 Unicode               | utf8mb3_general_ci  |      3 |
> ...
> | utf8mb4  | UTF-8 Unicode               | utf8mb4_general_ci  |      4 |
> ...
> | utf16    | UTF-16 Unicode              | utf16_general_ci    |      4 |
> | utf16le  | UTF-16LE Unicode            | utf16le_general_ci  |      4 |
> ...
> +----------+-----------------------------+---------------------+--------+
> 40 rows in set (0.000 sec)
> 
> There is no "utf8" listed by MariaDB.  But, according to the MariaDB
> website, it seems like it still should be.

"show character set" only shows the actual names, not aliases.
IMO it is correct that it's not listed there.

> According to the MariaDB site:
> "Until MariaDB 10.5, this was a UTF-8 encoding using one to three bytes
> per character. Basic Latin letters, numbers and punctuation use one byte.
> European and Middle East letters mostly fit into 2 bytes. Korean, Chinese,
> and Japanese ideographs use 3-bytes. No supplementary characters are
> stored. From MariaDB 10.6, utf8 is an alias for utf8mb3, but this can
> changed to ut8mb4 by changing the default value of the old_mode system
> variable."
> 
> And the listing of supported character sets on the MariaDB website includes
> "utf8".
> 
> Now, since I sent my original post, I realized (remembered more accurately -
> did not think of this since I haven't altered the Horde configuration in
> years) that I could change the character set being used by the php frontend
> to connect to the mysql backend.  I updated the php/horde configuration from
> "UTF-8" to "utf8mb3", and the Horde web application started working again.
> 
> I hope this makes a bit more sense.
> I cannot explain what I may have changed without knowing that resulted in
> this happening yesterday.
> 
> But, it seems to me that the missing (removal of the) character set
> designation ("utf8") in the openbsd port of MariaDB is not what was intended
> by the recent changes in MariaDB.
> 
> If there is anything I can provide that may be of help, please let me know.
> 
> Thanks
> Ted
> 

So this is where it comes from:

https://github.com/horde/Db/blob/master/lib/Horde/Db/Adapter/Mysql/Schema.php#L577

I think Horde should maybe try using the charset name as-is without trying
to look it up in 'show character set' first. Suggest reporting it to them
and see what they say.

It might be worth a note in the Upgrades section of the pkg-readme but
I bet nobody running into the problem would see it there.

Reply via email to