From 5bfaf196dec4793936012b49d94cae27979d2375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Mon, 25 Aug 2025 21:27:55 -0700 Subject: [PATCH] Promote getting GitHub stars in server log and client prompt Ask users to give MariaDB a star by having an extra line in the MariaDB client prompt: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 33 Server version: 12.2.0-MariaDB-1:12.2.0 mariadb.org binary distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Help others discover MariaDB. Star it on GitHub: https://github.com/MariaDB/server Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> Additionally, have this extra line in server logs: [Note] Help others discover MariaDB. Star it on GitHub: https://github.com/MariaDB/server This change is done in a way that it is easy to cherry-pick to older releases, and the text can later be changed to promote something else. Test file updated with: nano --noconvert --nonewlines mysql-test/main/mysql-interactive.result --- client/mysql.cc | 4 ++++ mysql-test/main/mysql-interactive.result | 4 ++++ sql/mysqld.cc | 8 +++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 81a890b77c8d8..c91ecd30c05aa 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1424,6 +1424,10 @@ int main(int argc,char *argv[]) mysql_thread_id(&mysql), server_version_string(&mysql)); put_info((char*) glob_buffer.ptr(),INFO_INFO); put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO); +#if SERVER_MATURITY_LEVEL < MariaDB_PLUGIN_MATURITY_STABLE + puts("Help others discover MariaDB." + " Star it on GitHub: https://github.com/MariaDB/server\n"); +#endif } #ifdef HAVE_READLINE diff --git a/mysql-test/main/mysql-interactive.result b/mysql-test/main/mysql-interactive.result index 0eb3a53cac754..cd083339ace29 100644 --- a/mysql-test/main/mysql-interactive.result +++ b/mysql-test/main/mysql-interactive.result @@ -10,6 +10,8 @@ Your MariaDB connection id is X Server version: Y Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. +Help others discover MariaDB. Star it on GitHub: https://github.com/MariaDB/server + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> delimiter $ @@ -40,6 +42,8 @@ Your MariaDB connection id is X Server version: Y Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. +Help others discover MariaDB. Star it on GitHub: https://github.com/MariaDB/server + Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database db1; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c84329df86644..6205ab319ee5f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5049,11 +5049,17 @@ static int init_server_components() Print source revision hash, as one of the first lines, if not the first in error log, for troubleshooting and debugging purposes */ - if (!opt_help) + if (!opt_help) { sql_print_information("Starting MariaDB %s source revision %s " "server_uid %s as process %lu", server_version, SOURCE_REVISION, server_uid, (ulong) getpid()); +#if SERVER_MATURITY_LEVEL < MariaDB_PLUGIN_MATURITY_STABLE + sql_print_information("Help others discover MariaDB." + " Star it on GitHub: https://github.com/MariaDB/server"); +#endif + } + #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE /*