[MXS-1319] Maxscale selecting extra whitespace while loading users Created: 2017-07-18  Updated: 2020-08-25  Resolved: 2017-07-24

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 2.1.3
Fix Version/s: 2.1.5

Type: Bug Priority: Major
Reporter: Nilnandan Joshi Assignee: markus makela
Resolution: Fixed Votes: 1
Labels: None


 Description   

Maxscale selecting extra whitespce while loading users when sql_mode=PAD_CHAR_TO_FULL_LENGTH.

MariaDB [(none)]> show global variables like 'sql_mode';
+---------------+---------------------+
| Variable_name | Value               |
+---------------+---------------------+
| sql_mode      | STRICT_TRANS_TABLES |
+---------------+---------------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> 
MariaDB [(none)]> select user, host from mysql.user;
+----------------------------------------------------------------------------------+--------------------------------------------------------------+
| user                                                                             | host                                                         |
+----------------------------------------------------------------------------------+--------------------------------------------------------------+
| maxscale                                                                         | %                                                            |
| root                                                                             | %                                                            |
| msandbox                                                                         | 127.%                                                        |
...
| root                                                                             | localhost                                                    |
+----------------------------------------------------------------------------------+--------------------------------------------------------------+
10 rows in set (0.01 sec)

Maxscale error log,

 
[root@centos68 ~]# mysql -umaxscale -h127.0.0.1 -p -P4006
Enter password: 
ERROR 1045 (28000): Access denied for user 'maxscale'@'127.0.0.1' (using password: YES)
[root@centos68 ~]# 
 
[root@centos68 ~]# tail -f /var/log/maxscale/maxscale.log 
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale                                                                        ', '%                                                           ', NULL, 1, '53E5D0C7885BD540911663B04133F20C94AD4306')
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('msandbox                                                                        ', '127.%                                                       ', NULL, 1, '6C387FC3893DBA1E3BA155E74754DA6682D04747')
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('msandbox                                                                        ', 'localhost                                                   ', NULL, 1, '6C387FC3893DBA1E3BA155E74754DA6682D04747')
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('msandbox_rw                                                                     ', 'localhost                                                   ', NULL, 1, '6C387FC3893DBA1E3BA155E74754DA6682D04747')
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('msandbox_rw                                                                     ', '127.%                                                       ', NULL, 1, '6C387FC3893DBA1E3BA155E74754DA6682D04747')
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('msandbox_ro                                                                     ', '127.%                                                       ', NULL, 1, '6C387FC3893DBA1E3BA155E74754DA6682D04747')
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('msandbox_ro                                                                     ', 'localhost                                                   ', NULL, 1, '6C387FC3893DBA1E3BA155E74754DA6682D04747')
2017-06-18 00:41:27   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('rsandbox                                                                        ', '127.%                                                       ', NULL, 0, 'B07EB15A2E7BD9620DAE47B194D5B9DBA14377AD')
2017-06-18 00:41:27   notice : [MySQLAuth] [Read-Write Service] Loaded 8 MySQL users for listener Read-Write Listener.
2017-06-18 00:41:27   warning: [MySQLAuth] Read-Write Service: login attempt for user 'maxscale'@[127.0.0.1]:51584, authentication failed.



 Comments   
Comment by markus makela [ 2017-07-18 ]

This can be fixed by using the empty SQL mode i.e. SET SQL_MODE=''.

Generated at Thu Feb 08 04:05:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.