4550 Akhila Maddukuri 2012-09-25
Description:
------------
sys_vars.all_vars fails on Windows 32 and 64 bit on daily trunk commercial
branch with multiple combinations.
Failure snippet-
sys_vars.all_vars w1 [ fail ]
Test ended at 2012-08-22 09:20:13
CURRENT_TEST: sys_vars.all_vars
'diff' is not recognized as an internal or external command,
operable program or batch file.
---
G:/pb2/test/sb_1-6672625-1345599364.71/mysql-advanced-5.7.0-m10-winx64/mysql-t
est/suite/sys_vars/r/all_vars.result 2012-08-22 01:05:07.000000000 +0300
+++
G:\pb2\test\sb_1-6672625-1345599364.71\mysql-advanced-5.7.0-m10-winx64\mysql-t
est\suite\sys_vars\r\all_vars.reject 2012-08-22 10:20:13.251978100 +0300
@@ -12,5 +12,7 @@
select variable_name as `There should be *no* variables listed below:` from
t2
left join t1 on variable_name=test_name where test_name is null ORDER BY
variable_name;
There should be *no* variables listed below:
+LOG_THROTTLE_QUERIES_NOT_USING_INDEXES
+LOG_THROTTLE_QUERIES_NOT_USING_INDEXES
drop table t1;
drop table t2;
mysqltest: Result length mismatch
How to repeat:
--------------
Seen on daily trunk commercial.
mysql-test-run.pl --timer --force --parallel=8 --comment=n_mix_4k_size
--vardir=var-n_mix --mysqld=--binlog-format=mixed
--experimental=collections/default.experimental --skip-ndb
--skip-test-list=collections/disabled-per-push.list
--mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
Suggested fix:
--------------
The purpose of all_vars.test is to make sure that there are tests for all
system variables. In daily trunk commercial it is failing because it could find
test for a system variable called log_throttle_queries_not_using_indexes.
In windows platform the test-name is truncated to
log_throttle_queries_not_using_indexes_basic.tes
Hence all_vars.test couldn't find a .test file for the above variable.
Inorder to get rid of the truncation, suggested fix is to change the name of the
test to a smaller name which is log_throttle_qni_basic.test
Also changing the file-name must happen in conjunction with another alias-rewrite:
update t2 set variable_name= replace(variable_name, "_THROTTLE_QUERIES_NOT_USING_INDEXES",
"_THROTTLE_QNI");
renamed:
mysql-test/suite/sys_vars/r/log_throttle_queries_not_using_indexes_basic.result => mysql-test/suite/sys_vars/r/log_throttle_qni_basic.result
mysql-test/suite/sys_vars/t/log_throttle_queries_not_using_indexes_basic.test => mysql-test/suite/sys_vars/t/log_throttle_qni_basic.test
modified:
mysql-test/suite/sys_vars/r/all_vars.result
mysql-test/suite/sys_vars/t/all_vars.test
4549 Raghav Kapoor 2012-09-25 [merge]
BUG#13864642: DROP/CREATE USER BEHAVING ODDLY
BACKGROUND:
In certain situations DROP USER fails to remove all privileges
belonging to user being dropped from in-memory structures.
Current workaround is to do DROP USER twice in scenario below
OR doing FLUSH PRIVILEGES after doing DROP USER.
ANALYSIS:
In MySQL, When we grant some stored routines privileges to a
user they are stored in their respective hash.
When doing DROP USER all the stored routine privilege entries
associated with that user has to be deleted from its respective
hash.
The root cause for this bug is some entries from the hash
are not getting deleted.
The problem is that code that deletes entries from the hash tries
to do so while iterating over it, without taking enough measures
to address the fact that such deletion can reshuffle elements in
the hash. If the user/administrator creates the same user again
he is thrown an error 'Error 1396 ER_CANNOT_USER' from MySQL.
This prompts the user to either do FLUSH PRIVILEGES or do DROP USER
again. This behaviour is not desirable as it is a workaround and
does not solves the problem mentioned above.
FIX:
This bug is fixed by introducing a dynamic array to store the
pointersto all stored routine privilege objects that either have
to be deleted or updated. This is done in 3 steps.
Step 1: Fetching the element from the hash and checking whether
it is to be deleted or updated.
Step 2: Storing the pointer to that privilege object in dynamic array.
Step 3: Traversing the dynamic array to perform the appropriate action
either delete or update.
This is a much cleaner way to delete or update the privilege entries
associated with some user and solves the problem mentioned above.
Also the code has been refactored a bit by introducing an enum
instead of hard coded numbers used for respective dynamic arrays
and hashes in handle_grant_struct() function.
modified:
internal/mysql-test/suite/i_main/r/grant.result
internal/mysql-test/suite/i_main/t/grant.test
sql/sql_acl.cc
=== modified file 'mysql-test/suite/sys_vars/r/all_vars.result'
--- a/mysql-test/suite/sys_vars/r/all_vars.result 2012-07-05 09:48:23 +0000
+++ b/mysql-test/suite/sys_vars/r/all_vars.result 2012-09-25 11:19:40 +0000
@@ -6,6 +6,7 @@ insert into t2 select variable_name from
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
update t2 set variable_name= replace(variable_name, "_HISTORY_LONG_", "_HL_");
update t2 set variable_name= replace(variable_name, "_HISTORY_", "_H_");
+update t2 set variable_name= replace(variable_name, "_THROTTLE_QUERIES_NOT_USING_INDEXES", "_THROTTLE_QNI");
select variable_name as `There should be *no* long test name listed below:` from t2
where length(variable_name) > 50;
There should be *no* long test name listed below:
=== renamed file 'mysql-test/suite/sys_vars/r/log_throttle_queries_not_using_indexes_basic.result' => 'mysql-test/suite/sys_vars/r/log_throttle_qni_basic.result'
=== modified file 'mysql-test/suite/sys_vars/t/all_vars.test'
--- a/mysql-test/suite/sys_vars/t/all_vars.test 2012-07-05 09:48:23 +0000
+++ b/mysql-test/suite/sys_vars/t/all_vars.test 2012-09-25 11:19:40 +0000
@@ -61,6 +61,7 @@ insert into t2 select variable_name from
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
update t2 set variable_name= replace(variable_name, "_HISTORY_LONG_", "_HL_");
update t2 set variable_name= replace(variable_name, "_HISTORY_", "_H_");
+update t2 set variable_name= replace(variable_name, "_THROTTLE_QUERIES_NOT_USING_INDEXES", "_THROTTLE_QNI");
--sorted_result
select variable_name as `There should be *no* long test name listed below:` from t2
=== renamed file 'mysql-test/suite/sys_vars/t/log_throttle_queries_not_using_indexes_basic.test' => 'mysql-test/suite/sys_vars/t/log_throttle_qni_basic.test'
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (akhila.x.maddukuri:4549 to 4550) | Akhila Maddukuri | 26 Sep |