[MDEV-23358] main.upgrade_MDEV-19650 fails with result difference Created: 2020-07-31  Updated: 2020-10-22  Resolved: 2020-10-22

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System, Tests
Affects Version/s: 10.4.14, 10.4.15, 10.4
Fix Version/s: 10.1.48, 10.2.35, 10.3.26, 10.4.16, 10.5.7

Type: Bug Priority: Minor
Reporter: Marko Mäkelä Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

The test main.upgrade_MDEV-19560 fails with a result difference after a merge from 10.3 66ec3a770f7854f500ece66c78f3c87c9cd6da15:

CURRENT_TEST: main.upgrade_MDEV-19650
--- /mariadb/10.4/mysql-test/main/upgrade_MDEV-19650.result	2020-07-31 14:24:17.304978248 +0300
+++ /mariadb/10.4/mysql-test/main/upgrade_MDEV-19650.reject	2020-07-31 17:25:27.973255284 +0300
@@ -165,6 +165,7 @@
 SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
 GRANTEE	TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PRIVILEGE_TYPE	IS_GRANTABLE
 'mariadb.sys'@'localhost'	def	mysql	global_priv	SELECT	NO
+'mariadb.sys'@'localhost'	def	mysql	global_priv	UPDATE	NO
 'mariadb.sys'@'localhost'	def	mysql	global_priv	DELETE	NO
 # check non root
 CREATE USER 'not_root'@'localhost';
 
mysqltest: Result length mismatch



 Comments   
Comment by Marko Mäkelä [ 2020-07-31 ]

I temporarily disabled the test because it apparently passes in some environments. I tested a debug build on both clang 10.0.1 and GCC 10.1.0.

Comment by Marko Mäkelä [ 2020-08-01 ]

I did not disable the test on a merge to 10.5, because for some reason, the test did not fail for me.

Comment by Marko Mäkelä [ 2020-08-10 ]

serg, yes, the still fails for me on 10.4 after merging mariadb-10.4.14:

CURRENT_TEST: main.upgrade_MDEV-19650
--- /mariadb/10.4/mysql-test/main/upgrade_MDEV-19650.result	2020-08-04 11:20:39.773055621 +0300
+++ /mariadb/10.4/mysql-test/main/upgrade_MDEV-19650.reject	2020-08-10 20:49:11.150731966 +0300
@@ -165,6 +165,7 @@
 SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'";
 GRANTEE	TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PRIVILEGE_TYPE	IS_GRANTABLE
 'mariadb.sys'@'localhost'	def	mysql	global_priv	SELECT	NO
+'mariadb.sys'@'localhost'	def	mysql	global_priv	UPDATE	NO
 'mariadb.sys'@'localhost'	def	mysql	global_priv	DELETE	NO
 # check non root
 CREATE USER 'not_root'@'localhost';
 
mysqltest: Result length mismatch

Curiously, it never failed for me on 10.5 or 10.6 (and hence I had disabled the test only in the 10.4 branch).

I am happy to help debug this, but I would need some directions from you.

Comment by Marko Mäkelä [ 2020-08-20 ]

This still fails for me in 10.4 2fa9f8c53a80e8b52c14d8c3260b18e7e77cc154.

Comment by Sergei Golubchik [ 2020-08-26 ]

marko, I cannot repeat it, it doesn't happen in buildbot. Could you please show how I can reproduce the failure?

Comment by Marko Mäkelä [ 2020-08-26 ]

This still fails for me on 10.4 1e08e08ccb8896c1f0d2f673c16f5b92cdf7dc46 (and not on any 10.5).

Comment by Marko Mäkelä [ 2020-08-26 ]

It turns out that I had accidentally invoked an in-tree build on my 10.4 directory in the past. There was a stale copy of the generated file scripts/mysql_fix_privilege_tables_sql.c in the source directory. That file was incorrectly used during the out-of-source build of the executable. I finally found that out by invoking strace on the compilation command. (First, I had replaced the -c and -o options of that command with -E -dD to find out that the unexpected UPDATE privilege was part of an INSERT statement.)

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