<div dir="ltr"><div>Hi Otto,</div><div><br></div><div>looks like you use the command line client to check this - command line client is different, it is using charset="auto" by default.</div><div>To check the mariadb_default_charset you can check the generated include files:</div><div><br></div><div><span style="font-family:monospace"><span style="font-weight:bold;color:rgb(84,255,84);background-color:rgb(255,255,255)">georg@beethoven</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">:</span><span style="font-weight:bold;color:rgb(84,84,255);background-color:rgb(255,255,255)">~/work/mariadb/server/bld</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">$ grep DEFAULT_CHARSET libmariadb/include/*.h
</span><br><span style="color:rgb(178,24,178);background-color:rgb(255,255,255)">libmariadb/include/config.h</span><span style="color:rgb(24,178,178);background-color:rgb(255,255,255)">:</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">#define MARIADB_</span><span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">DEFAULT_CHARSET</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> "utf8mb4"
</span><br><span style="color:rgb(178,24,178);background-color:rgb(255,255,255)">libmariadb/include/ma_config.h</span><span style="color:rgb(24,178,178);background-color:rgb(255,255,255)">:</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">#define MARIADB_</span><span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">DEFAULT_CHARSET</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> "utf8mb4"</span><br></span></div><div><br></div><div>/Georg<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 30, 2020 at 8:23 PM Otto Kekäläinen <<a href="mailto:otto@debian.org">otto@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Tested this patch, unfortunately it didn't work:<br>
<br>
<br>
MariaDB [(none)]> status;<br>
--------------<br>
mariadb  Ver 15.1 Distrib 10.5.5-MariaDB, for debian-linux-gnu<br>
(x86_64) using readline 5.2<br>
<br>
Connection id: 45<br>
Current database:<br>
Current user: root@localhost<br>
SSL: Not in use<br>
Current pager: stdout<br>
Using outfile: ''<br>
Using delimiter: ;<br>
Server: MariaDB<br>
Server version: 10.5.5-MariaDB-2-debug Debian unstable<br>
Protocol version: 10<br>
Connection: Localhost via UNIX socket<br>
Server characterset: utf8mb4<br>
Db     characterset: utf8mb4<br>
Client characterset: latin1<br>
Conn.  characterset: latin1<br>
<br>
<br>
commit 2e1239cd426dd6bb910363082f57d66c06f71254<br>
Author: Otto Kekäläinen <<a href="mailto:otto@debian.org" target="_blank">otto@debian.org</a>><br>
Date:   Tue Sep 29 21:27:02 2020 +0300<br>
<br>
    Use build flag to enforce default charset as utf8mb4 (Closes: #933063)<br>
<br>
diff --git a/debian/patches/933063-client-utf8mb4-by-default.patch<br>
b/debian/patches/933063-client-utf8mb4-by-default.patch<br>
new file mode 100644<br>
index 000000000..573dcf2f7<br>
--- /dev/null<br>
+++ b/debian/patches/933063-client-utf8mb4-by-default.patch<br>
@@ -0,0 +1,14 @@<br>
+Author: Georg Richter <<a href="mailto:georg@mariadb.com" target="_blank">georg@mariadb.com</a>><br>
+  Looks like it was forgotten to add this option when building C/C as<br>
a sunproject inside server. I fixed that now:<br>
+<br>
+--- a/libmariadb/CMakeLists.txt<br>
++++ b/libmariadb/CMakeLists.txt<br>
+@@ -25,7 +25,7 @@ get_directory_property(IS_SUBPROJECT PAR<br>
+ SET_PROPERTY(DIRECTORY PROPERTY INCLUDE_DIRECTORIES)<br>
+ FOREACH(V WITH_MYSQLCOMPAT WITH_MSI WITH_SIGNCODE WITH_RTC WITH_UNIT_TESTS<br>
+     WITH_DYNCOL WITH_EXTERNAL_ZLIB WITH_CURL WITH_SQLITE WITH_SSL<br>
+-    INSTALL_LAYOUT WITH_TEST_SRCPKG)<br>
++    DEFAULT_CHARSET INSTALL_LAYOUT WITH_TEST_SRCPKG)<br>
+   SET(${V} ${${OPT}${V}})<br>
+ ENDFOREACH()<br>
+<br>
diff --git a/debian/patches/series b/debian/patches/series<br>
index 043ed42cf..81eef0cdc 100644<br>
--- a/debian/patches/series<br>
+++ b/debian/patches/series<br>
@@ -14,3 +14,4 @@ prevent-executable-stack-due-to-objects-compiled-fro.patch<br>
 env-perl-usr-bin-perl.patch<br>
 fix-spelling.patch<br>
 ftbfs-x32.patch<br>
+933063-client-utf8mb4-by-default.patch<br>
diff --git a/debian/rules b/debian/rules<br>
index 819ac6ea0..3809e8f54 100755<br>
--- a/debian/rules<br>
+++ b/debian/rules<br>
@@ -101,6 +101,7 @@ endif<br>
            -DSYSTEM_TYPE="debian-$(DEB_HOST_GNU_SYSTEM)" \<br>
            -DBUILD_CONFIG=mysql_release \<br>
            -DWITH_SSL=bundled \<br>
+           -DCONC_DEFAULT_CHARSET=utf8mb4 \<br>
            -DPLUGIN_TOKUDB=NO \<br>
            -DPLUGIN_CASSANDRA=NO \<br>
            -DPLUGIN_AWS_KEY_MANAGEMENT=NO \<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Georg Richter, Senior Software Engineer<br></div><div>MariaDB Corporation Ab<br></div></div></div></div></div>