[MDEV-31874] main.set_password*, main.connect, main.grant*, main.sp_notembedded, main.empty_user_table, main.mysql_upgrade*. roles.create_and_drop_role_invalid_user_table. plugins.multiauth, main.plugin_auth, main.system_mysql_db_507, main.password_expiration fail Created: 2023-08-08  Updated: 2023-10-02

Status: Open
Project: MariaDB Server
Component/s: Tests
Affects Version/s: None
Fix Version/s: 11.2

Type: Bug Priority: Major
Reporter: Timofey Turenko Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None
Environment:

debian bookworm aarch64, debian bookworm amd64, rocky 9 aarch64, rocky 9 amd64


Attachments: File mtr (9).log    

 Description   

looks like `Data too long for column 'Host' at row 3` causes `Result length mismatch`

main.set_password                        w4 [ fail ]
        Test ended at 2023-08-08 04:05:18
 
CURRENT_TEST: main.set_password
--- /usr/share/mariadb/mariadb-test/main/set_password.result	2023-07-26 20:42:09.000000000 +0200
+++ /usr/share/mariadb/mariadb-test/main/set_password.reject	2023-08-08 04:05:18.760086911 +0200
@@ -187,6 +187,8 @@
 drop user oldauth@localhost, oldpass@localhost, oldpassold@localhost;
 set global secure_auth=default;
 # switching from mysql.global_priv to mysql.user
+Warnings:
+Warning	1406	Data too long for column 'Host' at row 3
 create user foo@localhost identified with mysql_native_password;
 update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost';
 set password for 'foo'@'localhost' = password('bar');
 
mysqltest: Result length mismatch

main.connect                             w1 [ fail ]
        Test ended at 2023-08-08 03:38:52
 
CURRENT_TEST: main.connect
--- /usr/share/mariadb/mariadb-test/main/connect.result	2023-07-26 20:42:09.000000000 +0200
+++ /usr/share/mariadb/mariadb-test/main/connect.reject	2023-08-08 03:38:51.636770788 +0200
@@ -104,6 +104,8 @@
 connect  fail_con,localhost,test,zorro,;
 ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
 # switching from mysql.global_priv to mysql.user
+Warnings:
+Warning	1406	Data too long for column 'Host' at row 3
 update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
 flush privileges;
 show grants for test@localhost;
@@ -372,6 +374,8 @@
 ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: NO)
 connection default;
 # switching from mysql.global_priv to mysql.user
+Warnings:
+Warning	1406	Data too long for column 'Host' at row 3
 update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
 update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
 select user, password, plugin, authentication_string from mysql.user
 
mysqltest: Result length mismatch
 

main.grant                               w7 [ fail ]
        Test ended at 2023-08-08 03:50:41
 
CURRENT_TEST: main.grant
--- /usr/share/mariadb/mariadb-test/main/grant.result	2023-07-26 20:42:09.000000000 +0200
+++ /usr/share/mariadb/mariadb-test/main/grant.reject	2023-08-08 03:50:41.101096404 +0200
@@ -2837,6 +2837,8 @@
 # MDEV-19948 'show grants' return privileges individually
 #
 # switching from mysql.global_priv to mysql.user
+Warnings:
+Warning	1406	Data too long for column 'Host' at row 3
 CREATE USER ten2;
 GRANT ALL ON *.* TO ten2;
 SHOW GRANTS FOR ten2;
 
mysqltest: Result length mismatch
 
 - skipping '/var/tmp/mtr/7/log/main.grant/'

main.grant4                              w7 [ fail ]
        Test ended at 2023-08-08 03:50:43
 
CURRENT_TEST: main.grant4
--- /usr/share/mariadb/mariadb-test/main/grant4.result	2023-07-26 20:42:09.000000000 +0200
+++ /usr/share/mariadb/mariadb-test/main/grant4.reject	2023-08-08 03:50:43.053277163 +0200
@@ -130,6 +130,8 @@
 drop database mysqltest_db1;
 drop user mysqltest_u1@localhost;
 # switching from mysql.global_priv to mysql.user
+Warnings:
+Warning	1265	Data truncated for column 'Host' at row 3
 call mtr.add_suppression("Table 'mysql.user' doesn't exist");
 call mtr.add_suppression("'mysql.user' is not of type 'TABLE'");
 rename table mysql.user to mysql.user1;
@@ -144,6 +146,8 @@
 rename table mysql.user1 to mysql.user;
 # switching back from mysql.user to mysql.global_priv
 # switching from mysql.global_priv to mysql.user
+Warnings:
+Warning	1265	Data truncated for column 'Host' at row 3
 call mtr.add_suppression('mysql.user table is damaged');
 rename table mysql.user to mysql.user1;
 create table mysql.user (Host char(100), User char(100));
 
mysqltest: Result length mismatch



 Comments   
Comment by Elena Stepanova [ 2023-08-08 ]

It should be failing on that machine with the community server as well.
The host name is 64 symbols long. The tests call include/switch_to_mysql_user.inc which creates mysql.user table with Host char(60)

CREATE TABLE mysql.user (
  Host char(60) binary DEFAULT '' NOT NULL,
  User char(80) binary DEFAULT '' NOT NULL,
...

Generated at Thu Feb 08 10:27:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.