From 8e72b44969fdd42e4e8dd5c61bbfdaab68075c57 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 15 May 2009 13:06:11 +0300 Subject: [PATCH 1/3] Bug #32651 grant_cache.test fails It turns out that this test case no longer fails with the discrepancy in numbers that was the original cause for disabling this test (and showed potential genuine issues with the query cache). Therefore this test is being enabled after some minor adjustment of error codes and messages. --- mysql-test/r/grant_cache.result | 2 +- mysql-test/t/disabled.def | 1 - mysql-test/t/grant_cache.test | 12 ++++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/grant_cache.result b/mysql-test/r/grant_cache.result index 925a5918c1b..b56ad6dea2a 100644 --- a/mysql-test/r/grant_cache.result +++ b/mysql-test/r/grant_cache.result @@ -149,7 +149,7 @@ select "user3"; user3 user3 select * from t1; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'b' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1' select a from t1; a 1 diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 49f422af298..e9de29e2c27 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -16,7 +16,6 @@ im_daemon_life_cycle : Bug#20294: Instance manager tests fail randomly im_options_set : Bug#20294: Instance manager tests fail randomly im_options_unset : Bug#20294: Instance manager tests fail randomly im_utils : Bug#20294: Instance manager tests fail randomly -grant_cache : Bug#32651: grant_cache.test fails ndb_backup_print : Bug#32357: ndb_backup_print test fails sometimes in pushbuild rpl_log_pos : Bug#8693 Test 'rpl_log_pos' fails sometimes kill : Bug#29149 Test "kill" fails on Windows diff --git a/mysql-test/t/grant_cache.test b/mysql-test/t/grant_cache.test index c2e31621744..616a2746148 100644 --- a/mysql-test/t/grant_cache.test +++ b/mysql-test/t/grant_cache.test @@ -88,7 +88,7 @@ select a from t1; select c from t1; select * from mysqltest.t1,test.t1; --replace_result 127.0.0.1 localhost ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR select * from t2; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; @@ -99,17 +99,17 @@ connect (user3,localhost,mysqltest_3,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK); connection user3; select "user3"; --replace_result 127.0.0.1 localhost ---error 1143 +--error ER_TABLEACCESS_DENIED_ERROR select * from t1; select a from t1; --replace_result 127.0.0.1 localhost ---error 1143 +--error ER_COLUMNACCESS_DENIED_ERROR select c from t1; --replace_result 127.0.0.1 localhost ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR select * from t2; --replace_result 127.0.0.1 localhost ---error 1143 +--error ER_COLUMNACCESS_DENIED_ERROR select mysqltest.t1.c from test.t1,mysqltest.t1; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; @@ -120,7 +120,7 @@ connect (user4,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,$MASTER_MYSOCK); connection user4; select "user4"; show grants; ---error 1046 +--error ER_NO_DB_ERROR select a from t1; # The following query is not cached before (different database) select * from mysqltest.t1,test.t1; From 793bf595367ce43eef9d054f3107f848326e6e95 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 15 May 2009 16:11:27 +0300 Subject: [PATCH 2/3] fixed a win32 compile error --- sql/sql_profile.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc index 551a103da10..8dde9fbf871 100644 --- a/sql/sql_profile.cc +++ b/sql/sql_profile.cc @@ -552,8 +552,9 @@ int PROFILING::fill_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond) The order of these fields is set by the query_profile_statistics_info array. */ - table->field[0]->store((ulonglong) query->profiling_query_id); - table->field[1]->store((ulonglong) seq); /* the step in the sequence */ + table->field[0]->store((longlong) query->profiling_query_id, TRUE); + /* the step in the sequence */ + table->field[1]->store((longlong) seq, TRUE); /* This entry, n, has a point in time, T(n), and a status phrase, S(n). The status phrase S(n) describes the period of time that begins at From df41cc207e7633d0184d481eeeeba0b52623049c Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 15 May 2009 16:13:54 +0300 Subject: [PATCH 3/3] backported a change from 5.1 --- sql/sql_profile.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc index 8dde9fbf871..f87f92471a3 100644 --- a/sql/sql_profile.cc +++ b/sql/sql_profile.cc @@ -552,9 +552,9 @@ int PROFILING::fill_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond) The order of these fields is set by the query_profile_statistics_info array. */ - table->field[0]->store((longlong) query->profiling_query_id, TRUE); + table->field[0]->store((ulonglong) query->profiling_query_id, TRUE); /* the step in the sequence */ - table->field[1]->store((longlong) seq, TRUE); + table->field[1]->store((ulonglong) seq, TRUE); /* This entry, n, has a point in time, T(n), and a status phrase, S(n). The status phrase S(n) describes the period of time that begins at