[MDEV-27174] client tools and configuration files Created: 2021-12-06  Updated: 2021-12-13  Resolved: 2021-12-13

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.2
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Georg Richter Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

command line tools read by default the client section from configuration file and exit with an error, if an entry is not supported.

How to repeat:

1) Using non C/C related configuration keywords

my.cnf
[client]
default-character-set=utf8mb4

georg@beethoven:~/work/mariadb/test$ ~/mariadb/bin/mysql -e"show variables like 'character_set_client'"
+----------------------+---------+
| Variable_name        | Value   |
+----------------------+---------+
| character_set_client | utf8mb4 |
+----------------------+---------+
georg@beethoven:~/work/mariadb/test$ ~/mariadb/bin/mysqlbinlog
/home/georg/mariadb/bin/mysqlbinlog: unknown variable 'default-character-set=utf8mb4'

2) Using Connector/C keywords

my.cnf
[client]
#db is an alias for database
db=test

georg@beethoven:~/work/mariadb/test$ ~/mariadb/bin/mysql
/home/georg/mariadb/bin/mysql: unknown variable 'db=test'



 Comments   
Comment by Elena Stepanova [ 2021-12-07 ]

Isn't it a definition of the [client] group, that it is read by all client programs (and thus they naturally fail if there is something incomprehensible)? What would be the alternative?
Also, the usual workaround with the loose- prefix should apply if there is a need to put something non-generic into the generic group.

Generated at Thu Feb 08 09:50:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.