summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2021-04-16 18:23:46 +1000
committerDaniel Black <daniel@mariadb.org>2021-04-16 18:29:20 +1000
commit3f138fa3a53383b98a934aae72667390ea3bf2eb (patch)
tree55da906fbb303b7113961b2203c82250566e6b15 /debian
parentf862f39f46335605cc0584770b9ec04de5e67b2b (diff)
downloadmariadb-git-3f138fa3a53383b98a934aae72667390ea3bf2eb.tar.gz
Deb: Use build flag to enforce default charset as utf8mb4
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/salsa-ci.yml34
2 files changed, 34 insertions, 2 deletions
diff --git a/debian/rules b/debian/rules
index 0ded40ec886..aaab10c9e6e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -105,8 +105,6 @@ endif
-DCMAKE_SYSTEM_PROCESSOR=$(DEB_HOST_ARCH) \
-DBUILD_CONFIG=mysql_release \
-DCONC_DEFAULT_CHARSET=utf8mb4 \
- -DPLUGIN_TOKUDB=NO \
- -DPLUGIN_CASSANDRA=NO \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
-DPLUGIN_COLUMNSTORE=NO \
-DIGNORE_AIO_CHECK=YES \
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
index 816d4959320..43f59b4e493 100644
--- a/debian/salsa-ci.yml
+++ b/debian/salsa-ci.yml
@@ -175,6 +175,40 @@ blhc:
- pkg-config --cflags --libs libmariadb
- pkg-config --cflags --libs mariadb
- apt-get install -y --no-install-recommends g++
+ - |
+ # Build a test binary that depends on libmysqlclient
+ cat > b933063.cpp <<EOF
+ #include <iostream>
+ #include <mysql/mysql.h>
+ #include <stdexcept>
+ int main()
+ {
+ MYSQL h;
+ if (!mysql_init(&h)
+ || mysql_options(&h, MYSQL_READ_DEFAULT_GROUP, "")
+ // || mysql_options(&h, MYSQL_SET_CHARSET_NAME, "utf8mb4")
+ || !mysql_real_connect(&h, "", "", NULL, "", 0, NULL, 0))
+ throw std::runtime_error(mysql_error(&h));
+ std::string q = "show variables like '%char%'";
+ if (mysql_real_query(&h, q.data(), q.size()))
+ throw std::runtime_error(mysql_error(&h));
+ MYSQL_RES* result = mysql_store_result(&h);
+ if (!result && mysql_errno(&h))
+ throw std::runtime_error(mysql_error(&h));
+ while (MYSQL_ROW row = mysql_fetch_row(result))
+ {
+ std::cout << row[0] << ": " << row[1] << "\n";
+ }
+ return 0;
+ }
+ EOF
+ apt-get install -y ./*.deb # Server must be installed for client to connect
+ echo "Testing -l mysqlclient"
+ g++ b933063.cpp -l mysqlclient && ./a.out | tee result
+ if grep --quiet latin result; then echo "ERROR: Charset latin found!"; exit 1; fi
+ echo "Testing -l mariadbclient"
+ g++ b933063.cpp -l mariadbclient && ./a.out | tee result
+ if grep --quiet latin result; then echo "ERROR: Charset latin found!"; exit 1; fi
.test-install-all-libs: &test-install-all-libs
- apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb