From f31c6010a8c3480cf52c63fc50dffdbe28c15664 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 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)]> Additionally, have this extra line in server logs: [Note] Help others discover MariaDB. Star it on GitHub: https://github.com/MariaDB/server Test file updated with: nano --noconvert --nonewlines mysql-test/main/mysql-interactive.result This change is similar to 346c7afe9b7071ce9c47892a83d69944b608b3da applied on 'main', but without the SERVER_MATURITY_LEVEL check in order to have this text visible in stable releases and actually help get the GitHub star count up. --- client/mysql.cc | 3 +++ mysql-test/main/mysql-interactive.result | 4 ++++ sql/mysqld.cc | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 0ebc8114247ab..7e58c3d77e3a1 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1408,6 +1408,9 @@ 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); + put_info("Help others discover MariaDB." + " Star it on GitHub: https://github.com/MariaDB/server\n", + INFO_INFO); } #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 3b49c53c52b26..e128d8e3af485 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5044,11 +5044,15 @@ 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()); + sql_print_information("Help others discover MariaDB." + " Star it on GitHub: https://github.com/MariaDB/server"); + } + #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE /*