fluent-plugin-mysql icon indicating copy to clipboard operation
fluent-plugin-mysql copied to clipboard

Add support for setting the encoding and collation

Open minusbat opened this issue 6 years ago • 5 comments

Simple changes to allow the encoding and collation attributes for mysql2 to be set on the fluent plugin.

This is necessary to enable the writing of utf8mb4 data into mysql out of fluent, as otherwise the connection defaults to utf8 and the conversion fails. You need this to support emoji for example, or any other characters outside of 3 byte UTF-8.

minusbat avatar Mar 19 '18 17:03 minusbat

@minusbat Mysql2::Client have collation option? I could not find this option.

https://github.com/brianmario/mysql2

toyama0919 avatar Mar 31 '18 16:03 toyama0919

Ah, apparently I imagined that! It does have encoding though, and the patch works. Possibly should remove the collation option if its not actually supported by the mysql2 client library.

minusbat avatar Mar 31 '18 22:03 minusbat

Possibly should remove the collation option if its not actually supported by the mysql2 client library.

What is the case when it is support?

toyama0919 avatar Apr 01 '18 01:04 toyama0919

ref: https://github.com/tagomoris/fluent-plugin-mysql/issues/53

toyama0919 avatar Apr 01 '18 01:04 toyama0919

What is preventing this from entering the package? It's 2024 and this little thing breaks scenarios as soon as an emoji flows into the context.

micdobro avatar May 25 '24 10:05 micdobro